More style fixes and remove dead password reset code
This commit is contained in:
@@ -153,8 +153,9 @@ onMounted(async () => {
|
||||
<Dialog ref="newDialog"
|
||||
:title="$t('profile.createAppPassword.title')"
|
||||
:confirm-label="addedPassword ? '' : $t('profile.createAppPassword.generatePassword')"
|
||||
confirm-style="success"
|
||||
confirm-style="primary"
|
||||
:reject-label="$t('main.dialog.close')"
|
||||
reject-style="secondary"
|
||||
@confirm="onSubmit()"
|
||||
@close="onReset()"
|
||||
>
|
||||
@@ -196,7 +197,7 @@ onMounted(async () => {
|
||||
<template #creationTime="slotProps">{{ prettyLongDate(slotProps.creationTime) }}</template>
|
||||
<template #actions="slotProps">
|
||||
<div class="table-actions">
|
||||
<Button small outline tool danger @click="onRemove(slotProps.id)" v-tooltip="$t('profile.appPasswords.deletePasswordTooltip')" icon="far fa-trash-alt" />
|
||||
<Button small tool danger @click="onRemove(slotProps.id)" v-tooltip="$t('profile.appPasswords.deletePasswordTooltip')" icon="far fa-trash-alt" />
|
||||
</div>
|
||||
</template>
|
||||
</TableView>
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
:root {
|
||||
--pankow-color-primary: #0073cf;
|
||||
--font-family: "Noto Sans",Helvetica,Arial,sans-serif;
|
||||
--font-family--header: "Noto Sans Light",Helvetica,Arial,sans-serif;
|
||||
--card-background: #f7f7f8;
|
||||
--navbar-background: #f3f4f6;
|
||||
/* --pankow-body-background-color: var(--body-background);*/
|
||||
|
||||
--pankow-color-primary: #0073cf;
|
||||
--pankow-color-primary-hover: #0d89ec;
|
||||
--pankow-color-primary-active: #0b7ad1;
|
||||
|
||||
--pankow-color-success: #008eff;
|
||||
--pankow-color-success-hover: #41abff;
|
||||
--pankow-color-success-active: #0b7ad1;
|
||||
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--card-background: #15181f;
|
||||
--navbar-background: #11161f;
|
||||
/* --pankow-body-background-color: var(--body-background);*/
|
||||
--pankow-dialog-background-color: var(--navbar-background);
|
||||
--pankow-color-background: var(--navbar-background);
|
||||
--pankow-text-color: white;
|
||||
|
||||
@@ -52,9 +52,10 @@ async function onChangeDisplayName(currentDisplayName) {
|
||||
message: t('profile.changeDisplayName.title'),
|
||||
modal: false,
|
||||
value: currentDisplayName,
|
||||
confirmStyle: 'success',
|
||||
confirmLabel: t('main.dialog.save'),
|
||||
rejectLabel: t('main.dialog.cancel')
|
||||
confirmStyle: 'primary',
|
||||
rejectLabel: t('main.dialog.cancel'),
|
||||
rejectStyle: 'secondary',
|
||||
});
|
||||
|
||||
if (!displayName || currentDisplayName === displayName) return;
|
||||
@@ -71,9 +72,10 @@ async function onChangeEmail(currentEmail) {
|
||||
type: [ 'email', 'password' ],
|
||||
modal: false,
|
||||
value: [ currentEmail, '' ],
|
||||
confirmStyle: 'success',
|
||||
confirmLabel: t('main.dialog.save'),
|
||||
rejectLabel: t('main.dialog.cancel')
|
||||
confirmStyle: 'primary',
|
||||
rejectLabel: t('main.dialog.cancel'),
|
||||
rejectStyle: 'secondary',
|
||||
});
|
||||
|
||||
if (!result || !result[0] || !result[1] || currentEmail === result[0]) return;
|
||||
@@ -90,9 +92,10 @@ async function onChangeFallbackEmail(currentFallbackEmail) {
|
||||
type: [ 'email', 'password' ],
|
||||
modal: false,
|
||||
value: [ currentFallbackEmail, '' ],
|
||||
confirmStyle: 'success',
|
||||
confirmLabel: t('main.dialog.save'),
|
||||
rejectLabel: t('main.dialog.cancel')
|
||||
confirmStyle: 'primary',
|
||||
rejectLabel: t('main.dialog.cancel'),
|
||||
rejectStyle: 'secondary',
|
||||
});
|
||||
|
||||
if (!result || !result[1] || currentFallbackEmail === result[0]) return;
|
||||
@@ -121,9 +124,10 @@ async function onPasswordChange() {
|
||||
message: [ t('profile.changePassword.newPassword'), t('profile.changePassword.newPasswordRepeat'), t('profile.changePassword.currentPassword') ],
|
||||
type: [ 'password', 'password', 'password' ],
|
||||
modal: false,
|
||||
confirmStyle: 'success',
|
||||
confirmLabel: t('main.dialog.save'),
|
||||
rejectLabel: t('main.dialog.cancel')
|
||||
confirmStyle: 'primary',
|
||||
rejectLabel: t('main.dialog.cancel'),
|
||||
rejectStyle: 'secondary',
|
||||
});
|
||||
|
||||
if (!result || !result[0] || !result[1] || !result[2] || result[0] === result[1]) return;
|
||||
@@ -132,14 +136,6 @@ async function onPasswordChange() {
|
||||
if (error) return console.error('Failed to change password', error);
|
||||
}
|
||||
|
||||
// TODO
|
||||
async function onPasswordReset() {
|
||||
const error = await profileModel.sendPasswordReset(user.value.email);
|
||||
if (error) return console.error('Failed to reset password:', error);
|
||||
|
||||
window.pankow.notify({ type: 'success', timeout: 5000, text: t('profile.passwordResetNotification.title') + '. ' + t('profile.passwordResetNotification.body', { email: user.value.fallbackEmail || user.value.email }) });
|
||||
}
|
||||
|
||||
|
||||
// Tokens
|
||||
const webadminTokens = ref([]);
|
||||
@@ -196,7 +192,8 @@ async function onTwoFADisable() {
|
||||
type: 'password',
|
||||
confirmStyle: 'danger',
|
||||
confirmLabel: t('main.dialog.yes'),
|
||||
rejectLabel: t('main.dialog.no')
|
||||
rejectLabel: t('main.dialog.no'),
|
||||
rejectStyle: 'secondary',
|
||||
});
|
||||
|
||||
if (!password) return;
|
||||
@@ -302,7 +299,7 @@ onMounted(async () => {
|
||||
</FormGroup>
|
||||
<div style="display: flex; align-items: center">
|
||||
<!-- TODO translate -->
|
||||
<Button tool plain @click="displayName(user.email)" v-show="!user.source && !config.profileLocked">Edit</Button>
|
||||
<Button tool plain @click="onChangeEmail(user.email)" v-show="!user.source && !config.profileLocked">Edit</Button>
|
||||
</div>
|
||||
</SettingsItem>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user