Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth pages - HTML fixes #924 #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/css/_base/_utility.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import "_variables.scss";

.border-0 {
border: none !important;
}
33 changes: 32 additions & 1 deletion src/css/_components/_buttons.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
@import "../_base/_variables.scss";
@import "../_base/_mixins.scss";

.v-btn {
.btn-primary {
color: #fff !important;
border: 1px solid $primary;
background-color: $primary !important;
&:hover {
border-color: $greyDark !important;
background-color: $greyDark !important;
}
}
.btn-secondary {
background-color: transparent !important;
color: $greyDark !important;
border: 1px solid $greyMedium;
&:hover {
background-color: $greyLight !important;
}
}

button.v-btn, a.btn {
&.v-btn--size-default {
font-size: $textSmall;
}

&.bg-primary,
&.text-primary {
@extend .btn-primary;
}
&.bg-secondary,
&.text-secondary {
@extend .btn-secondary;
}

&:not(.v-btn--round).v-size--small {
height: 28px;
padding: 0 12px;
Expand Down
2 changes: 1 addition & 1 deletion src/css/_components/_cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
white-space: normal;
}
.v-card-text {
padding: 1rem 2rem 2rem;
padding: 1rem 2rem;
}
.v-card-actions {
padding: 1rem 2rem 1rem;
Expand Down
12 changes: 1 addition & 11 deletions src/css/_components/_general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,4 @@ body {

.container {
padding: 30px;
}

.border-0 {
border: none !important;
}

.user-avatar {
font-size: 1.2em;
box-shadow: 0 0 3px white;
border: 1px solid white;
}
}
6 changes: 6 additions & 0 deletions src/css/_components/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,10 @@ header {
}
}
}

.user-avatar {
font-size: 1.2em;
box-shadow: 0 0 3px white;
border: 1px solid white;
}
}
2 changes: 1 addition & 1 deletion src/css/_components/_modals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
padding: 12px 24px;
}

.v-card__actions {
.v-card-actions {
background-color: white;
align-items: center;
display: flex;
Expand Down
3 changes: 3 additions & 0 deletions src/css/site.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Fonts
@import "./google-fonts/google-fonts.css";

// Base
@import "_base/_utility.scss";

// Components
@import "_components/_general.scss";
@import "_components/_header.scss";
Expand Down
4 changes: 2 additions & 2 deletions src/src/components/admin/changePassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
</v-text-field>
</v-card-text>
<div class="v-card-actions">
<v-btn v-if="passwordChanged" color="primary" @click="cancel">
<v-btn v-if="passwordChanged" color="secondary" @click="cancel">
{{ t("button.close") }}
</v-btn>
<v-btn v-if="!passwordChanged" @click="cancel">
<v-btn v-if="!passwordChanged" color="secondary" @click="cancel">
{{ t("button.cancel") }}
</v-btn>
<v-btn v-if="!passwordChanged" color="primary" @click="change">
Expand Down
2 changes: 1 addition & 1 deletion src/src/components/admin/users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</v-card-text>
</template>
<template #footer>
<v-btn id="closePopupBtn" @click="closeEntityModal">{{ t("button.close") }}</v-btn>
<v-btn id="closePopupBtn" color="secondary" @click="closeEntityModal">{{ t("button.close") }}</v-btn>
<v-btn id="unlockBtn" color="success" v-if="!entity.isNew && entity.isLockedOut" @click="unlock">{{
t("button.unlock")
}}</v-btn>
Expand Down
24 changes: 15 additions & 9 deletions src/src/components/auth/accessDenied.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
<v-dialog v-model="showForm" persistent max-width="480px">
<v-card>
<v-form>
<v-container>
<v-row>
<v-col text cols="12">
<h1>{{ t("title") }}</h1>

<p>{{ t("info") }}.</p>
</v-col>
</v-row>
</v-container>
<v-card-title>
<h1>{{ t("title") }}</h1>
</v-card-title>
<v-card-text>
<p class="text-center">{{ t("info") }}</p>
</v-card-text>
<v-card-actions>
<v-btn id="submit-btn" color="primary" @click="cancel">
{{ t("password.backToLogin") }}
</v-btn>
</v-card-actions>
</v-form>
</v-card>
</v-dialog>
Expand All @@ -27,4 +29,8 @@
});

const showForm = true;

function cancel(): void {
window.location.href = "/";
}
</script>
79 changes: 35 additions & 44 deletions src/src/components/auth/forgotPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,48 @@
<v-dialog v-model="showForm" persistent max-width="480px">
<v-card>
<v-form ref="formRef">
<v-container>
<v-row>
<v-col text cols="12">
<h1>{{ t("title") }}?</h1>
<v-card-title>
<h1>{{ t("title") }}?</h1>
</v-card-title>
<v-card-text>
<p>{{ t("instructions") }}.</p>

<v-card-text>
<p>{{ t("instructions") }}.</p>

<v-text-field
v-model="emailInput"
type="text"
hide-details="auto"
dense
outlined
name="email"
:data-vv-as="t('password.email')"
:label="t('password.email')"
:rules="[rules.required, rules.email]"
>
</v-text-field>
</v-card-text>
<div class="v-card-actions">
<v-btn id="submit-btn" @click="cancel">{{ t("button.cancel") }}</v-btn>
<v-btn id="submit-btn" color="primary" @click="sendResetPassword">
{{ t("resetButton") }}
</v-btn>
</div>
</v-col>
</v-row>
</v-container>
<v-text-field
v-model="emailInput"
type="text"
hide-details="auto"
dense
outlined
name="email"
:data-vv-as="t('password.email')"
:label="t('password.email')"
:rules="[rules.required, rules.email]"
>
</v-text-field>
</v-card-text>
<v-card-actions>
<v-btn id="submit-btn" color="secondary" @click="cancel">{{ t("button.cancel") }}</v-btn>
<v-btn id="submit-btn" color="primary" @click="sendResetPassword">
{{ t("resetButton") }}
</v-btn>
</v-card-actions>
</v-form>
</v-card>
</v-dialog>
<v-dialog v-model="showPasswordConfirmation" persistent max-width="480px">
<v-card>
<v-form>
<v-container>
<v-row>
<v-col text cols="12">
<h1>{{ t("confirmationMessage.title") }}</h1>

<p>{{ t("confirmationMessage.instructions") }}.</p>

<div class="v-card__actions">
<v-btn id="submit-btn" color="primary" @click="cancel">
{{ t("password.backToLogin") }}
</v-btn>
</div>
</v-col>
</v-row>
</v-container>
<v-card-title>
<h1>{{ t("confirmationMessage.title") }}</h1>
</v-card-title>
<v-card-text>
<p>{{ t("confirmationMessage.instructions") }}.</p>
</v-card-text>
<v-card-actions>
<v-btn id="submit-btn" color="primary" @click="cancel">
{{ t("password.backToLogin") }}
</v-btn>
</v-card-actions>
</v-form>
</v-card>
</v-dialog>
Expand Down
112 changes: 52 additions & 60 deletions src/src/components/auth/setPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,72 +3,64 @@
<v-dialog v-model="showForm" persistent max-width="480px">
<v-card>
<v-form ref="formRef">
<v-container>
<v-row>
<v-col text cols="12">
<h1>{{ props.isFirstTimeSetup ? t("setTitle") : t("resetTitle") }}</h1>

<v-text-field
class="pt-3"
v-model="password"
type="password"
hide-details="auto"
dense
outlined
name="password"
:disabled="passwordChanged"
:label="t('password')"
:rules="passwordRules"
>
</v-text-field>

<v-text-field
class="pt-3"
v-model="confirmPassword"
type="password"
hide-details="auto"
dense
outlined
name="confirmPassword"
:disabled="passwordChanged"
:label="t('confirmPassword')"
:rules="[rules.required, rules.passwordMatch]"
>
</v-text-field>

<div class="v-card-actions">
<v-btn id="submit-btn" color="primary" @click="cancel">
{{ t("password.backToLogin") }}
</v-btn>

<v-btn id="submit-btn" :disabled="passwordChanged" color="primary" @click="change">
{{ t("setPasswordButton") }}
</v-btn>
</div>
</v-col>
</v-row>
</v-container>
<v-card-title>
<h1>{{ props.isFirstTimeSetup ? t("setTitle") : t("resetTitle") }}</h1>
</v-card-title>
<v-card-text>
<v-text-field
class="pt-3"
v-model="password"
type="password"
hide-details="auto"
dense
outlined
name="password"
:disabled="passwordChanged"
:label="t('password')"
:rules="passwordRules"
>
</v-text-field>

<v-text-field
class="pt-3"
v-model="confirmPassword"
type="password"
hide-details="auto"
dense
outlined
name="confirmPassword"
:disabled="passwordChanged"
:label="t('confirmPassword')"
:rules="[rules.required, rules.passwordMatch]"
>
</v-text-field>
</v-card-text>
<v-card-actions>
<v-btn id="submit-btn" color="secondary" @click="cancel">
{{ t("password.backToLogin") }}
</v-btn>

<v-btn id="submit-btn" :disabled="passwordChanged" color="primary" @click="change">
{{ t("setPasswordButton") }}
</v-btn>
</v-card-actions>
</v-form>
</v-card>
</v-dialog>
<v-dialog v-model="passwordChanged" persistent max-width="480px">
<v-card>
<v-form>
<v-container>
<v-row>
<v-col text cols="12">
<h1>{{ t("confirmationMessage.title") }}</h1>

<p>{{ t("confirmationMessage.instructions") }}.</p>

<div class="v-card__actions">
<v-btn id="submit-btn" color="primary" @click="cancel">
{{ t("password.backToLogin") }}
</v-btn>
</div>
</v-col>
</v-row>
</v-container>
<v-card-title>
<h1>{{ t("confirmationMessage.title") }}</h1>
</v-card-title>
<v-card-text>
<p>{{ t("confirmationMessage.instructions") }}.</p>
</v-card-text>
<v-card-actions>
<v-btn id="submit-btn" color="primary" @click="cancel">
{{ t("password.backToLogin") }}
</v-btn>
</v-card-actions>
</v-form>
</v-card>
</v-dialog>
Expand Down
Loading
Loading