Skip to content

Commit

Permalink
Make primary-button act as submit button
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Nov 5, 2023
1 parent 4e4387c commit 0422a57
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="cursor-pointer bg-warning px-5 py-2 rounded text-center drop-shadow-lg w-64">
<button class="cursor-pointer bg-warning px-5 py-2 rounded text-center drop-shadow-lg w-64">
<fa-icon [icon]="faWrench" class="pr-1.5"></fa-icon>
Manage in Admin Panel
</div>
</button>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<fa-icon [icon]="getIconForSide()" class="text-secondary text-3xl cursor-pointer drop-shadow-lg">

</fa-icon>
<button>
<fa-icon [icon]="getIconForSide()" class="text-secondary text-3xl cursor-pointer drop-shadow-lg"></fa-icon>
</button>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="cursor-pointer bg-dangerous hover:bg-red-700 px-5 py-2 rounded text-center drop-shadow-lg">
<button class="cursor-pointer bg-dangerous hover:bg-red-700 px-5 py-2 rounded text-center drop-shadow-lg w-full">
<fa-icon *ngIf="_icon" [icon]="_icon" class="pr-1.5"></fa-icon>
{{_text}}
</div>
</button>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="cursor-pointer bg-primary px-5 py-2 rounded text-center drop-shadow-lg">
<button class="cursor-pointer bg-primary px-5 py-2 rounded text-center drop-shadow-lg w-full" type="submit">
<fa-icon *ngIf="_icon" [icon]="_icon" class="pr-1.5"></fa-icon>
{{_text}}
</div>
</button>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="cursor-pointer bg-secondary transition-colors hover:bg-secondary-hover px-5 py-2 rounded text-center drop-shadow-lg">
<button class="cursor-pointer bg-secondary transition-colors hover:bg-secondary-hover px-5 py-2 rounded text-center drop-shadow-lg w-full">
<fa-icon *ngIf="_icon" [icon]="_icon" class="pr-1.5"></fa-icon>
{{_text}}
</div>
</button>
8 changes: 5 additions & 3 deletions src/app/pages/admin-panel/admin-panel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
<div class="flex gap-10">
<div class="w-[19rem]">
<p class="text-xl font-bold pb-2.5">Create</p>
<form-input name="Title" [icon]="faBullhorn" [(value)]="announcementTitle"></form-input>
<form-input name="Body" [icon]="faPencil" [(value)]="announcementBody"></form-input>
<form class="flex flex-col gap-y-1">
<form-input name="Title" [icon]="faBullhorn" [(value)]="announcementTitle"></form-input>
<form-input name="Body" [icon]="faPencil" [(value)]="announcementBody"></form-input>

<primary-button [icon]="faCheck" text="Publish" (click)="postAnnouncement()" class="w-[19rem] text-center"></primary-button>
<primary-button [icon]="faCheck" text="Publish" (click)="postAnnouncement()" class="w-[19rem] text-center my-1.5"></primary-button>
</form>
</div>
<div class="w-full">
<p class="text-xl font-bold">Preview</p>
Expand Down
18 changes: 10 additions & 8 deletions src/app/pages/forgot-password/forgot-password.component.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<form-holder>
<page-header class="text-3xl">Forgor Password</page-header> <!-- I'm sorry. -->
<form>
<form-holder>
<page-header class="text-3xl">Forgor Password</page-header> <!-- I'm sorry. -->

<form-input [icon]="faEnvelope" name="Email Address" type="email" [(value)]="email"></form-input>
<form-input [icon]="faEnvelope" name="Email Address" type="email" [(value)]="email"></form-input>

<div class="flex flex-row my-1 justify-between space-x-4">
<primary-button [icon]="faSkull" class="w-full" text="Send" (click)="send()"></primary-button>
<dangerous-button [icon]="faCancel" class="min-w-fit" text="Cancel" onclick="window.history.back()"></dangerous-button>
</div>
</form-holder>
<div class="flex flex-row my-1 justify-between space-x-4">
<primary-button [icon]="faSkull" class="w-full" text="Send" (click)="send()"></primary-button>
<dangerous-button [icon]="faCancel" class="min-w-fit" text="Cancel" onclick="window.history.back()"></dangerous-button>
</div>
</form-holder>
</form>
22 changes: 12 additions & 10 deletions src/app/pages/login/login.component.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<form-holder>
<page-header class="text-3xl">Sign into Refresh</page-header>
<form>
<form-holder>
<page-header class="text-3xl">Sign into Refresh</page-header>

<form-input [icon]="faEnvelope" name="Email Address" type="email" [(value)]="email"></form-input>
<form-input [icon]="faKey" name="Password" type="password" [(value)]="password"></form-input>
<form-input [icon]="faEnvelope" name="Email Address" type="email" [(value)]="email"></form-input>
<form-input [icon]="faKey" name="Password" type="password" [(value)]="password"></form-input>

<primary-button [icon]="faSignIn" class="min-w-fit" text="Sign in" (click)="login()"></primary-button>
<secondary-button [icon]="faKey" class="w-full" text="Forgot password?" routerLink="/forgotPassword"></secondary-button>
<primary-button [icon]="faSignIn" class="min-w-fit" text="Sign in" (click)="login()"></primary-button>
<secondary-button [icon]="faKey" class="w-full" text="Forgot password?" routerLink="/forgotPassword"></secondary-button>

<divider></divider>
<p>Haven't signed up yet?</p>
<secondary-button [icon]="faUserPlus" text="Create an account" routerLink="/register"></secondary-button>
</form-holder>
<divider></divider>
<p>Haven't signed up yet?</p>
<secondary-button [icon]="faUserPlus" text="Create an account" routerLink="/register"></secondary-button>
</form-holder>
</form>
32 changes: 17 additions & 15 deletions src/app/pages/register/register.component.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<form-holder>
<page-header class="text-3xl">Sign Up</page-header>
<form>
<form-holder>
<page-header class="text-3xl">Sign Up</page-header>

<p class="text-warning">
<fa-icon [icon]="faTriangleExclamation" class="mr-1"></fa-icon>
Remember to make your username match your PSN/RPCN id!
</p>
<p class="text-warning">
<fa-icon [icon]="faTriangleExclamation" class="mr-1"></fa-icon>
Remember to make your username match your PSN/RPCN id!
</p>

<form-input [icon]="faUser" name="Username" type="text" [(value)]="username"></form-input>
<form-input [icon]="faEnvelope" name="Email Address" type="text" [(value)]="email"></form-input>
<form-input [icon]="faKey" name="Password" type="password" [(value)]="password"></form-input>
<form-input [icon]="faKey" name="Confirm Password" type="password" [(value)]="confirmPassword"></form-input>
<form-input [icon]="faUser" name="Username" type="text" [(value)]="username"></form-input>
<form-input [icon]="faEnvelope" name="Email Address" type="text" [(value)]="email"></form-input>
<form-input [icon]="faKey" name="Password" type="password" [(value)]="password"></form-input>
<form-input [icon]="faKey" name="Confirm Password" type="password" [(value)]="confirmPassword"></form-input>

<primary-button class="min-w-full" [icon]="faUserPlus" text="Register" (click)="register()"></primary-button>
<primary-button class="min-w-full" [icon]="faUserPlus" text="Register" (click)="register()"></primary-button>

<divider class="w-full"></divider>
<divider class="w-full"></divider>

<p>Already have an account?</p>
<secondary-button [icon]="faSignIn" text="Log in" routerLink="/login"></secondary-button>
</form-holder>
<p>Already have an account?</p>
<secondary-button [icon]="faSignIn" text="Log in" routerLink="/login"></secondary-button>
</form-holder>
</form>
19 changes: 11 additions & 8 deletions src/app/pages/verify/verify.component.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<form-holder>
<page-header class="text-3xl">Verify Email</page-header>
<form>
<form-holder>
<page-header class="text-3xl">Verify Email</page-header>

<form-input [icon]="faKey" name="Code" type="text" [(value)]="code"></form-input>
<form-input [icon]="faKey" name="Code" type="text" [(value)]="code"></form-input>

<primary-button [icon]="faCheckCircle" class="min-w-full" text="Verify" (click)="verify()"></primary-button>
<primary-button [icon]="faCheckCircle" class="min-w-full" text="Verify" (click)="verify()"></primary-button>

<divider class="w-full"></divider>
<p>Didn't get the email?</p>
<secondary-button [icon]="faMailReply" text="Resend Verification Code" (click)="resend()"></secondary-button>
</form-holder>
<divider class="w-full"></divider>
<p>Didn't get the email?</p>
<secondary-button [icon]="faMailReply" text="Resend Verification Code" (click)="resend()"></secondary-button>
</form-holder>

</form>

0 comments on commit 0422a57

Please sign in to comment.