Skip to content

TaskView is a self-hosted project and task management platform focused on clarity, ownership, and control. TaskView is built for teams that want a transparent, self-hosted alternative to SaaS task managers.

feat: edit default user and change password

Nikolai Giman0a8497af5935
diff --git a/api/src/tv-modules/auth/AuthController.ts b/api/src/tv-modules/auth/AuthController.ts
index 4f8a4fe..f6335bb 100644
--- a/api/src/tv-modules/auth/AuthController.ts
+++ b/api/src/tv-modules/auth/AuthController.ts
@@ -6,7 +6,11 @@ import { z } from 'zod';
import { Email } from '../../core/Email';
import { $logger } from '../../modules/logget';
import {
+ ChangeDefaultUserCredentialsSchema,
+ ChangeOwnPasswordByPasswordSchema,
+ ChangeOwnPasswordSchema,
ChangePasswordDataScheme,
+ type PasswordChangeConfirmationMode,
ConfirmEmailReqDataSchema,
RefreshTokenSchema,
RemindPasswordSchema,
@@ -23,6 +27,10 @@ import { OrganizationRepository } from '../organizations/OrganizationRepository'
import { GoalsRepository } from '../goals/GoalsRepository';
const LOGIN_CODE_TTL_MS = 5 * 60 * 1000;
+const PASSWORD_CHANGE_CODE_TTL_S = 15 * 60;
+const PASSWORD_CHANGE_CODE_RESEND_COOLDOWN_S = 60;
+// Seeded by migration 0.0.0 (app_permissions.sql) on self-hosted installs.
+const DEFAULT_USER_EMAIL = '[email protected]';
export default class AuthController {
private readonly jwtAlg: Algorithm = process.env.JWT_ALG as Algorithm;
@@ -656,6 +664,178 @@ export default class AuthController {
return res.json(newTokens);
};
+ private passwordChangeConfirmationMode(): PasswordChangeConfirmationMode {
+ return process.env.PASSWORD_CHANGE_CONFIRMATION === 'password' ? 'password' : 'email';
+ }
+
+ getPasswordChangeMode = async (_req: Request, res: Response) => {
+ return res.status(200).send({ mode: this.passwordChangeConfirmationMode() });
+ };
+
+ sendPasswordChangeCode = async (req: Request, res: Response) => {
+ if (this.passwordChangeConfirmationMode() !== 'email') {
+ return res.status(403).send();
+ }
+
+ const userEmail = req.appUser.getUserData()?.email;
+ if (!userEmail) {
+ return res.status(400).end();
+ }
+
+ const userData = await req.appUser.authManager.repository.getUserByLogin(userEmail, true);
+ if (!userData) {
+ return res.status(400).end();
+ }
+
+ const now = Math.floor(Date.now() / 1000);
+ const sinceLastCode = userData.remind_password_time ? now - userData.remind_password_time : null;
+ if (sinceLastCode !== null && sinceLastCode < PASSWORD_CHANGE_CODE_RESEND_COOLDOWN_S) {
+ return res.status(429).send({
+ message: 'Please wait before requesting another code.',
+ retryAfter: PASSWORD_CHANGE_CODE_RESEND_COOLDOWN_S - sinceLastCode,
+ });
+ }
+
+ // High-entropy code: the shared remind_password_code column is also redeemable
+ // via the unauthenticated /password/reset endpoint, so a short numeric code
+ // would be brute-forceable there.
+ const code = generateString(12);
+ const saved = await req.appUser.authManager.repository.setReminderCodeAndTime(userEmail, code, now);
+ if (!saved) {
+ $logger.error(`Can not save password change code for user ${userData.id}`);
+ return res.status(500).end();
+ }
+
+ const text = `Your TaskView password change code is ${code}\n\nUse this code to confirm your new password. The code expires in 15 minutes.\n\nIf you didn't request this change, ignore this email.`;
+
+ Email.send({
+ text,
+ to: userEmail,
+ subject: `Your TaskView password change code: ${code}`,
+ from: process.env.SMTP_FROM_EMAIL as string,
+ })
+ .then((ok) => {
+ if (!ok) $logger.error({ to: userEmail }, 'Failed to send password change code email');
+ })
+ .catch((err) => $logger.error({ err, to: userEmail }, 'Failed to send password change code email'));
+
+ return res.status(200).end();
+ };
+
+ changeOwnPassword = async (req: Request, res: Response) => {
+ const userEmail = req.appUser.getUserData()?.email;
+ if (!userEmail) {
+ return res.status(400).end();
+ }
+
+ const userData = await req.appUser.authManager.repository.getUserByLogin(userEmail, true);
+ if (!userData) {
+ return res.status(400).send();
+ }
+
+ if (this.passwordChangeConfirmationMode() === 'password') {
+ const parsedData = ChangeOwnPasswordByPasswordSchema.safeParse(req.body);
+ if (!parsedData.success) {
+ return res.status(400).send();
+ }
+
+ const validPassword = await this.comparePasswords(parsedData.data.currentPassword, userData.password);
+ if (!validPassword) {
+ return res.status(403).send({ field: 'currentPassword' });
+ }
+
+ return this.applyNewPassword(res, req, userData.id, parsedData.data.password);
+ }
+
+ const parsedData = ChangeOwnPasswordSchema.safeParse(req.body);
+ if (!parsedData.success) {
+ return res.status(400).send();
+ }
+
+ if (!userData.remind_password_code || !userData.remind_password_time) {
+ return res.status(400).send();
+ }
+
+ const now = Math.floor(Date.now() / 1000);
+ if (now > userData.remind_password_time + PASSWORD_CHANGE_CODE_TTL_S) {
+ return res.status(400).send();
+ }
+
+ if (userData.remind_password_code !== parsedData.data.code) {
+ return res.status(400).send();
+ }
+
+ await req.appUser.authManager.repository.setReminderCodeAndTime(userEmail, null, null);
+
+ return this.applyNewPassword(res, req, userData.id, parsedData.data.password);
+ };
+
+ private async applyNewPassword(res: Response, req: Request, userId: number, newPassword: string) {
+ const passwordHash = hashSync(newPassword, 10);
+ const result = await req.appUser.authManager.repository.updateUserPassword(passwordHash, userId);
+ if (!result) {
+ $logger.error(`Can not update password for user ${userId}`);
+ return res.status(500).send();
+ }
+
+ const currentSessionId = req.appUser.getTokenId();
+ await req.appUser.authManager.sessionStorage.deleteAllSessions(userId, currentSessionId);
+
+ return res.status(200).send({ changed: true });
+ }
+
+ changeDefaultUserCredentials = async (req: Request, res: Response) => {
+ const parsedData = ChangeDefaultUserCredentialsSchema.safeParse(req.body);
+ if (!parsedData.success) {
+ return res.status(400).send();
+ }
+
+ const userEmail = req.appUser.getUserData()?.email;
+ if (!userEmail) {
+ return res.status(400).end();
+ }
+
+ const userData = await req.appUser.authManager.repository.getUserByLogin(userEmail, true);
+ if (!userData || userData.email.toLowerCase() !== DEFAULT_USER_EMAIL) {
+ return res.status(403).send();
+ }
+
+ const validPassword = await this.comparePasswords(parsedData.data.currentPassword, userData.password);
+ if (!validPassword) {
+ return res.status(403).send({ field: 'currentPassword' });
+ }
+
+ const { login, email } = parsedData.data;
+
+ if (login !== userData.login && (await req.appUser.authManager.repository.getUserByLogin(login))) {
+ return res.status(409).send({ field: 'login' });
+ }
+ if (email !== userData.email && (await req.appUser.authManager.repository.getUserByLogin(email, true))) {
+ return res.status(409).send({ field: 'email' });
+ }
+
+ const updated = await req.appUser.authManager.repository.updateUserCredentials({
+ userId: userData.id,
+ oldEmail: userData.email,
+ login,
+ email,
+ passwordHash: hashSync(parsedData.data.password, 10),
+ });
+ if (updated === 'conflict') {
+ return res.status(409).send({ field: 'email' });
+ }
+ if (updated !== 'ok') {
+ return res.status(500).send();
+ }
+
+ // JWTs carry login/email and refresh does not re-read them from the DB,
+ // so drop every session and make the user sign in with the new credentials.
+ await req.appUser.authManager.sessionStorage.deleteAllSessions(userData.id);
+ this.clearRefreshToken(res);
+
+ return res.status(200).send({ changed: true });
+ };
+
sendDeleteAccountCode = async (req: Request, res: Response) => {
const userId = req.appUser.getUserData()?.id;
const userEmail = req.appUser.getUserData()?.email;
diff --git a/api/src/tv-modules/auth/AuthModel.ts b/api/src/tv-modules/auth/AuthModel.ts
index 8aab488..21043f1 100644
--- a/api/src/tv-modules/auth/AuthModel.ts
+++ b/api/src/tv-modules/auth/AuthModel.ts
@@ -1,6 +1,8 @@
+import { eq } from 'drizzle-orm';
+import { CollaborationUsersSchema, OrganizationMembersSchema, SsoIdentitiesSchema, UsersSchema } from 'taskview-db-schemas';
import { Database } from '../../modules/db';
import { $logger } from '../../modules/logget';
-import type { RegisterUserInDb, UserDbRecord } from '../../types/auth.types';
+import type { RegisterUserInDb, UpdateUserCredentialsArgs, UpdateUserCredentialsResult, UserDbRecord } from '../../types/auth.types';
export default class AuthModel {
private readonly db: Database;
@@ -133,6 +135,38 @@ export default class AuthModel {
}
}
+ async updateUserCredentials(args: UpdateUserCredentialsArgs): Promise<UpdateUserCredentialsResult> {
+ try {
+ await this.db.dbDrizzle.transaction(async (tx) => {
+ await tx
+ .update(UsersSchema)
+ .set({ login: args.login, email: args.email, password: args.passwordHash })
+ .where(eq(UsersSchema.id, args.userId));
+ await tx
+ .update(OrganizationMembersSchema)
+ .set({ email: args.email })
+ .where(eq(OrganizationMembersSchema.email, args.oldEmail));
+ await tx
+ .update(CollaborationUsersSchema)
+ .set({ email: args.email })
+ .where(eq(CollaborationUsersSchema.email, args.oldEmail));
+ await tx
+ .update(SsoIdentitiesSchema)
+ .set({ email: args.email })
+ .where(eq(SsoIdentitiesSchema.userId, args.userId));
+ });
+ return 'ok';
+ } catch (error) {
+ // unique(organization_id, email): the new email is already an invited member of one of the user's orgs
+ const pgCode = (error as { code?: string })?.code ?? (error as { cause?: { code?: string } })?.cause?.code;
+ if (pgCode === '23505') {
+ return 'conflict';
+ }
+ $logger.error(error, `Can not update credentials for user ${args.userId}`);
+ return 'error';
+ }
+ }
+
async updateUserPassword(password: string, userId: number): Promise<boolean> {
try {
const query = 'UPDATE tv_auth.users SET password = $1 WHERE id = $2';
diff --git a/api/src/tv-modules/auth/AuthRoutes.ts b/api/src/tv-modules/auth/AuthRoutes.ts
index 2614499..4c5b34f 100644
--- a/api/src/tv-modules/auth/AuthRoutes.ts
+++ b/api/src/tv-modules/auth/AuthRoutes.ts
@@ -2,6 +2,7 @@ import { Router, type NextFunction, type Request, type Response } from 'express'
import type { Routable } from '../../types/routable.type';
import AuthController from './AuthController';
import { IsLoggedIn } from './middlewares/is-logged-in';
+import { RejectApiTokenAuth } from '../api-tokens/middlewares/RejectApiTokenAuth';
import passport from './strategies/passport-login';
import { ExternalProviderScope } from './strategies/external-auth.types';
export default class AuthRoutes implements Routable {
@@ -26,6 +27,10 @@ export default class AuthRoutes implements Routable {
this.router.get('/confirm/email/:code/login/:login', this.authController.confirmEmail);
this.router.post('/email/recovery', this.authController.remindPassword);
this.router.post('/password/reset', this.authController.changeRemindedPassword);
+ this.router.get('/password/change/mode', [IsLoggedIn], this.authController.getPasswordChangeMode);
+ this.router.post('/password/change/code', [IsLoggedIn, RejectApiTokenAuth], this.authController.sendPasswordChangeCode);
+ this.router.post('/password/change', [IsLoggedIn, RejectApiTokenAuth], this.authController.changeOwnPassword);
+ this.router.post('/credentials/change', [IsLoggedIn, RejectApiTokenAuth], this.authController.changeDefaultUserCredentials);
this.router.post('/logout', [IsLoggedIn], this.authController.logout);
this.router.post('/refresh/token', this.authController.refreshTokens);
this.router.post('/delete/account/code', [IsLoggedIn], this.authController.sendDeleteAccountCode);
diff --git a/api/src/types/app.types.ts b/api/src/types/app.types.ts
index c7c97dd..c257676 100644
--- a/api/src/types/app.types.ts
+++ b/api/src/types/app.types.ts
@@ -23,6 +23,9 @@ export const AppEnvSchema = z.object({
SMTP_FROM_EMAIL: z.string().optional(),
APP_URL: z.string(),
+ // How account password changes are confirmed: code sent by email (default) or current password
+ PASSWORD_CHANGE_CONFIRMATION: z.enum(['email', 'password']).optional(),
+
TELEGRAM_BOT_TOKEN: z.string().optional(),
TELEGRAM_BOT_USERNAME: z.string().optional(),
TELEGRAM_WEBHOOK_SECRET: z.string().optional(),
diff --git a/api/src/types/auth.types.ts b/api/src/types/auth.types.ts
index 79ac09b..1046724 100644
--- a/api/src/types/auth.types.ts
+++ b/api/src/types/auth.types.ts
@@ -62,6 +62,59 @@ export const ChangePasswordDataScheme = z
export type ChangePasswordData = z.infer<typeof ChangePasswordDataScheme>;
+export const ChangeOwnPasswordSchema = z
+ .object({
+ code: z.string().min(1).max(64),
+ password: z.string().min(6).max(128),
+ passwordRepeat: z.string().max(128),
+ })
+ .refine((data) => data.password === data.passwordRepeat, {
+ message: "Passwords don't match",
+ path: ['passwordRepeat'],
+ });
+
+export type ChangeOwnPassword = z.infer<typeof ChangeOwnPasswordSchema>;
+
+export const ChangeOwnPasswordByPasswordSchema = z
+ .object({
+ currentPassword: z.string().min(1).max(128),
+ password: z.string().min(6).max(128),
+ passwordRepeat: z.string().max(128),
+ })
+ .refine((data) => data.password === data.passwordRepeat, {
+ message: "Passwords don't match",
+ path: ['passwordRepeat'],
+ });
+
+export type ChangeOwnPasswordByPassword = z.infer<typeof ChangeOwnPasswordByPasswordSchema>;
+
+export type PasswordChangeConfirmationMode = 'email' | 'password';
+
+export const ChangeDefaultUserCredentialsSchema = z
+ .object({
+ currentPassword: z.string().min(1).max(128),
+ login: z.string().min(3).max(64).regex(/^[a-zA-Z0-9._-]+$/).toLowerCase(),
+ email: z.string().email().max(255).toLowerCase(),
+ password: z.string().min(6).max(128),
+ passwordRepeat: z.string().max(128),
+ })
+ .refine((data) => data.password === data.passwordRepeat, {
+ message: "Passwords don't match",
+ path: ['passwordRepeat'],
+ });
+
+export type ChangeDefaultUserCredentials = z.infer<typeof ChangeDefaultUserCredentialsSchema>;
+
+export type UpdateUserCredentialsArgs = {
+ userId: number;
+ oldEmail: string;
+ login: string;
+ email: string;
+ passwordHash: string;
+};
+
+export type UpdateUserCredentialsResult = 'ok' | 'conflict' | 'error';
+
export const RefreshTokenSchema = z.object({
refreshToken: z.string(),
});
diff --git a/web/ios/App/App.xcodeproj/project.pbxproj b/web/ios/App/App.xcodeproj/project.pbxproj
index bbb2320..5d1fdfe 100644
--- a/web/ios/App/App.xcodeproj/project.pbxproj
+++ b/web/ios/App/App.xcodeproj/project.pbxproj
@@ -492,6 +492,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = NO;
+ CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION = YES;
CODE_SIGN_ENTITLEMENTS = TaskViewWidget/TaskViewWidget.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.49.2;
@@ -520,6 +521,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = NO;
+ CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION = YES;
CODE_SIGN_ENTITLEMENTS = TaskViewWidget/TaskViewWidget.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.49.2;
diff --git a/web/ios/App/TaskViewWidget/TodayWidget.swift b/web/ios/App/TaskViewWidget/TodayWidget.swift
index e7b1cfa..d71853b 100644
--- a/web/ios/App/TaskViewWidget/TodayWidget.swift
+++ b/web/ios/App/TaskViewWidget/TodayWidget.swift
@@ -48,21 +48,29 @@ struct TodayWidgetView: View {
WidgetStrings.forLocale(entry.snapshot?.locale)
}
- private var maxSlots: Int {
- switch family {
- case .systemLarge: return 8
- case .systemSmall: return 4
- default: return 3
+ var body: some View {
+ GeometryReader { geo in
+ TaskListTodayView(
+ snapshot: entry.snapshot,
+ strings: strings,
+ maxSlots: slots(for: geo.size.height),
+ compact: family == .systemSmall,
+ pinMoreToBottom: true
+ )
}
}
- var body: some View {
- TaskListTodayView(
- snapshot: entry.snapshot,
- strings: strings,
- maxSlots: maxSlots,
- compact: family == .systemSmall
- )
+ // Rows are given a fixed frame (24pt compact / 32pt regular), so this math is exact:
+ // header = top + bottom padding + content; chrome = list top + bottom padding;
+ // each slot after the first adds a hairline divider.
+ private func slots(for height: CGFloat) -> Int {
+ let compact = family == .systemSmall
+ let headerHeight: CGFloat = compact ? 38 : 46
+ let listChrome: CGFloat = compact ? 9 : 12
+ let rowHeight: CGFloat = compact ? 24 : 32
+ let dividerHeight: CGFloat = 0.34
+ let available = height - headerHeight - listChrome + dividerHeight
+ return max(2, Int(available / (rowHeight + dividerHeight)))
}
}
@@ -71,10 +79,12 @@ struct TaskListTodayView: View {
let strings: WidgetStrings
let maxSlots: Int
let compact: Bool
+ let pinMoreToBottom: Bool
- private var horizontalPadding: CGFloat { compact ? 12 : 16 }
- private var rowVerticalPadding: CGFloat { compact ? 6 : 10 }
- private var dividerInset: CGFloat { compact ? 38 : 48 }
+ private var horizontalPadding: CGFloat { compact ? 16 : 20 }
+ private var rowFixedHeight: CGFloat { compact ? 24 : 32 }
+ private var rowVerticalPadding: CGFloat { compact ? 3 : 6 }
+ private var dividerInset: CGFloat { compact ? 42 : 52 }
private var isUpcoming: Bool {
snapshot?.isUpcoming ?? false
@@ -98,6 +108,8 @@ struct TaskListTodayView: View {
Text(isUpcoming ? strings.upcoming : strings.today)
.font(compact ? .footnote.weight(.semibold) : .headline)
+ .lineLimit(1)
+ .truncationMode(.tail)
Spacer()
@@ -110,8 +122,8 @@ struct TaskListTodayView: View {
.background(WidgetPalette.accent, in: Capsule())
}
.padding(.horizontal, horizontalPadding)
- .padding(.top, 12)
- .padding(.bottom, compact ? 8 : 12)
+ .padding(.top, compact ? 16 : 18)
+ .padding(.bottom, compact ? 4 : 6)
.background(WidgetPalette.headerBackground)
if !visibleTasks.isEmpty {
@@ -125,7 +137,8 @@ struct TaskListTodayView: View {
TaskRowView(task: task, strings: strings, compact: compact, showDate: isUpcoming)
.padding(.horizontal, horizontalPadding)
- .padding(.vertical, rowVerticalPadding)
+ .frame(height: pinMoreToBottom ? rowFixedHeight : nil)
+ .padding(.vertical, pinMoreToBottom ? 0 : rowVerticalPadding)
}
.transition(.opacity.combined(with: .move(edge: .trailing)))
}
@@ -134,16 +147,25 @@ struct TaskListTodayView: View {
Divider()
.padding(.leading, dividerInset)
+ if pinMoreToBottom {
+ Spacer(minLength: 0)
+ }
+
Text(strings.more(hiddenCount))
.font(compact ? .caption2 : .footnote)
.foregroundStyle(.secondary)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, dividerInset)
.padding(.trailing, horizontalPadding)
- .padding(.vertical, rowVerticalPadding)
+ .frame(height: pinMoreToBottom ? rowFixedHeight : nil)
+ .padding(.vertical, pinMoreToBottom ? 0 : rowVerticalPadding)
}
}
- Spacer(minLength: 0)
+ .padding(.top, compact ? 3 : 4)
+ .padding(.bottom, compact ? 6 : 8)
+ if !(pinMoreToBottom && hiddenCount > 0) {
+ Spacer(minLength: 0)
+ }
} else {
Spacer()
Text(snapshot == nil ? strings.openApp : strings.empty)
diff --git a/web/src/components/features/account/AccountSettings.vue b/web/src/components/features/account/AccountSettings.vue
index e50695a..79562c6 100644
--- a/web/src/components/features/account/AccountSettings.vue
+++ b/web/src/components/features/account/AccountSettings.vue
@@ -2,15 +2,39 @@
<div class="flex flex-col gap-6 p-1 lg:p-6 w-full max-w-full lg:max-w-2xl m-0 lg:mx-auto">
<NotificationSettings />
- <UPageCard class="w-full rounded-3xl">
+ <UPageCard
+ variant="soft"
+ class="w-full rounded-3xl"
+ >
<SessionsPanel />
</UPageCard>
- <UPageCard class="w-full rounded-3xl">
+ <UPageCard
+ variant="soft"
+ class="w-full rounded-3xl"
+ >
<ApiTokensPanel />
</UPageCard>
- <UPageCard class="w-full rounded-3xl">
+ <UPageCard
+ v-if="isDefaultUser"
+ variant="soft"
+ class="w-full rounded-3xl bg-warning/10 ring-2 ring-warning/60"
+ >
+ <DefaultUserCredentials />
+ </UPageCard>
+
+ <UPageCard
+ variant="soft"
+ class="w-full rounded-3xl"
+ >
+ <PasswordSettings />
+ </UPageCard>
+
+ <UPageCard
+ variant="soft"
+ class="w-full rounded-3xl"
+ >
<div class="flex flex-col gap-4">
<h2 class="text-lg font-semibold">
{{ t('account.management') }}
@@ -34,12 +58,14 @@
</template>
<script setup lang="ts">
-import { ref } from 'vue'
+import { computed, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@/stores/user.store'
import DeleteAccountButton from './parts/DeleteAccountButton.vue'
import DeleteAccountCodeModal from './parts/DeleteAccountCodeModal.vue'
import NotificationSettings from './parts/NotificationSettings.vue'
+import PasswordSettings from './parts/PasswordSettings.vue'
+import DefaultUserCredentials from './parts/DefaultUserCredentials.vue'
import SessionsPanel from '@/components/features/sessions/SessionsPanel.vue'
import ApiTokensPanel from '@/components/features/api-tokens/ApiTokensPanel.vue'
@@ -49,6 +75,9 @@ const toast = useToast()
const showCodeModal = ref(false)
+// Seeded default user on self-hosted installs (migration 0.0.0); backend enforces the same check
+const isDefaultUser = computed(() => userStore.email.toLowerCase() === '[email protected]')
+
function onCodeSendError() {
toast.add({
title: t('account.codeSendError'),
diff --git a/web/src/components/features/account/parts/DefaultUserCredentials.vue b/web/src/components/features/account/parts/DefaultUserCredentials.vue
new file mode 100644
index 0000000..78d262f
--- /dev/null
+++ b/web/src/components/features/account/parts/DefaultUserCredentials.vue
@@ -0,0 +1,217 @@
+<template>
+ <div class="flex flex-col gap-4">
+ <div class="flex flex-col gap-3">
+ <h2 class="flex items-center gap-2 text-lg font-semibold">
+ <UIcon
+ name="i-lucide-triangle-alert"
+ class="size-5 text-warning shrink-0"
+ />
+ {{ t('account.defaultCredsTitle') }}
+ </h2>
+ <UAlert
+ color="warning"
+ variant="subtle"
+ icon="i-lucide-shield-alert"
+ :title="t('account.defaultCredsWarning')"
+ :description="t('account.defaultCredsDescription')"
+ />
+ </div>
+
+ <UForm
+ :state="state"
+ :schema="CredentialsSchema"
+ :validate="validatePasswordsMatch"
+ class="space-y-4"
+ @submit="save"
+ >
+ <UFormField
+ :label="t('account.newLogin')"
+ name="login"
+ >
+ <UInput
+ v-model="state.login"
+ :placeholder="t('account.newLoginPlaceholder')"
+ icon="i-lucide-user"
+ autocomplete="username"
+ class="w-full"
+ />
+ </UFormField>
+
+ <UFormField
+ :label="t('account.newEmail')"
+ name="email"
+ >
+ <UInput
+ v-model="state.email"
+ type="email"
+ :placeholder="t('auth.emailPlaceholder')"
+ icon="i-lucide-mail"
+ autocomplete="email"
+ class="w-full"
+ />
+ </UFormField>
+
+ <UFormField
+ :label="t('auth.newPassword')"
+ name="password"
+ >
+ <UInput
+ v-model="state.password"
+ :type="showNewPassword ? 'text' : 'password'"
+ :placeholder="t('auth.newPasswordPlaceholder')"
+ icon="i-lucide-lock"
+ autocomplete="new-password"
+ class="w-full"
+ >
+ <template #trailing>
+ <UButton
+ :icon="showNewPassword ? 'i-lucide-eye-off' : 'i-lucide-eye'"
+ color="neutral"
+ variant="link"
+ size="sm"
+ @click="showNewPassword = !showNewPassword"
+ />
+ </template>
+ </UInput>
+ </UFormField>
+
+ <UFormField
+ :label="t('auth.confirmPassword')"
+ name="passwordRepeat"
+ >
+ <UInput
+ v-model="state.passwordRepeat"
+ :type="showNewPasswordRepeat ? 'text' : 'password'"
+ :placeholder="t('auth.confirmPasswordPlaceholder')"
+ icon="i-lucide-lock"
+ autocomplete="new-password"
+ class="w-full"
+ >
+ <template #trailing>
+ <UButton
+ :icon="showNewPasswordRepeat ? 'i-lucide-eye-off' : 'i-lucide-eye'"
+ color="neutral"
+ variant="link"
+ size="sm"
+ @click="showNewPasswordRepeat = !showNewPasswordRepeat"
+ />
+ </template>
+ </UInput>
+ </UFormField>
+
+ <UFormField
+ :label="t('account.currentPassword')"
+ name="currentPassword"
+ >
+ <UInput
+ v-model="state.currentPassword"
+ :type="showPassword ? 'text' : 'password'"
+ :placeholder="t('account.currentPasswordPlaceholder')"
+ icon="i-lucide-lock"
+ autocomplete="current-password"
+ class="w-full"
+ >
+ <template #trailing>
+ <UButton
+ :icon="showPassword ? 'i-lucide-eye-off' : 'i-lucide-eye'"
+ color="neutral"
+ variant="link"
+ size="sm"
+ @click="showPassword = !showPassword"
+ />
+ </template>
+ </UInput>
+ </UFormField>
+
+ <div>
+ <UButton
+ :label="t('account.saveCredentials')"
+ type="submit"
+ color="primary"
+ :loading="isSaving"
+ />
+ </div>
+ </UForm>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { type } from 'arktype'
+import { isAxiosError } from 'axios'
+import { ref, reactive } from 'vue'
+import { useI18n } from 'vue-i18n'
+import { useRouter } from 'vue-router'
+import $api from '@/helpers/axios'
+import { $ls } from '@/plugins/axios'
+
+const { t } = useI18n()
+const toast = useToast()
+const router = useRouter()
+
+const isSaving = ref(false)
+const showPassword = ref(false)
+const showNewPassword = ref(false)
+const showNewPasswordRepeat = ref(false)
+
+const CredentialsSchema = type({
+ login: type('3 <= string <= 64').configure({ message: t('account.loginInvalid') }),
+ email: type('string.email').configure({ message: t('auth.invalidEmail') }),
+ password: type('string >= 6').configure({ message: t('auth.passwordTooShort') }),
+ passwordRepeat: type('string >= 6').configure({ message: t('auth.passwordTooShort') }),
+ currentPassword: type('string >= 1').configure({ message: t('account.currentPasswordRequired') }),
+})
+
+const state = reactive({
+ login: '',
+ email: '',
+ password: '',
+ passwordRepeat: '',
+ currentPassword: '',
+})
+
+function validatePasswordsMatch(formState: Partial<{ password: string; passwordRepeat: string }>) {
+ const errors = []
+ if (formState.password && formState.passwordRepeat && formState.password !== formState.passwordRepeat) {
+ errors.push({ name: 'passwordRepeat', message: t('auth.passwordsDoNotMatch') })
+ }
+ return errors
+}
+
+async function save() {
+ isSaving.value = true
+ try {
+ const result = await $api.post<{ changed: boolean }>('/module/auth/credentials/change', {
+ currentPassword: state.currentPassword,
+ login: state.login.trim(),
+ email: state.email.trim(),
+ password: state.password,
+ passwordRepeat: state.passwordRepeat,
+ })
+ if (result.data.changed) {
+ toast.add({
+ title: t('account.credentialsChanged'),
+ color: 'success',
+ })
+ $ls.invalidateTokens()
+ router.push('/')
+ }
+ } catch (error) {
+ toast.add({
+ title: errorMessage(error),
+ color: 'error',
+ })
+ } finally {
+ isSaving.value = false
+ }
+}
+
+function errorMessage(error: unknown): string {
+ if (isAxiosError(error)) {
+ const field = error.response?.data?.field
+ if (error.response?.status === 403 && field === 'currentPassword') return t('account.wrongPassword')
+ if (error.response?.status === 409 && field === 'login') return t('account.loginTaken')
+ if (error.response?.status === 409 && field === 'email') return t('account.emailTaken')
+ }
+ return t('account.credentialsChangeError')
+}
+</script>
diff --git a/web/src/components/features/account/parts/NotificationSettings.vue b/web/src/components/features/account/parts/NotificationSettings.vue
index 4ea68f5..2b33a0a 100644
--- a/web/src/components/features/account/parts/NotificationSettings.vue
+++ b/web/src/components/features/account/parts/NotificationSettings.vue
@@ -1,5 +1,8 @@
<template>
- <UPageCard class="w-full rounded-3xl">
+ <UPageCard
+ variant="soft"
+ class="w-full rounded-3xl"
+ >
<div class="flex flex-col gap-4">
<div>
<h2 class="text-lg font-semibold">
diff --git a/web/src/components/features/account/parts/PasswordCodeModal.vue b/web/src/components/features/account/parts/PasswordCodeModal.vue
new file mode 100644
index 0000000..5085048
--- /dev/null
+++ b/web/src/components/features/account/parts/PasswordCodeModal.vue
@@ -0,0 +1,106 @@
+<template>
+ <UModal
+ v-model:open="open"
+ :fullscreen="isMobile"
+ >
+ <template #content>
+ <div class="flex flex-col gap-4 p-6">
+ <div>
+ <h3 class="text-lg font-semibold">
+ {{ t('account.confirmPasswordChange') }}
+ </h3>
+ <p class="text-sm text-muted mt-1">
+ {{ t('account.passwordCodeSent') }}
+ </p>
+ </div>
+
+ <UInput
+ v-model="code"
+ :placeholder="t('account.enterCode')"
+ spellcheck="false"
+ autocomplete="one-time-code"
+ variant="soft"
+ :ui="{ base: 'rounded-xl' }"
+ />
+
+ <div class="flex justify-end gap-2">
+ <UButton
+ color="neutral"
+ variant="outline"
+ @click="open = false"
+ >
+ {{ t('account.cancel') }}
+ </UButton>
+ <UButton
+ color="primary"
+ :disabled="!code"
+ :loading="isLoading"
+ @click="handleConfirm"
+ >
+ {{ t('account.changePassword') }}
+ </UButton>
+ </div>
+ </div>
+ </template>
+ </UModal>
+</template>
+
+<script setup lang="ts">
+import { ref, watch } from 'vue'
+import { useI18n } from 'vue-i18n'
+import $api from '@/helpers/axios'
+import { useTaskView } from '@/composables/useTaskView'
+
+const props = defineProps<{
+ password: string
+ passwordRepeat: string
+}>()
+
+const emit = defineEmits<{
+ changed: []
+}>()
+
+const open = defineModel<boolean>('open', { required: true })
+
+const { t } = useI18n()
+const { isMobile } = useTaskView()
+const toast = useToast()
+
+const code = ref('')
+const isLoading = ref(false)
+
+watch(open, (value) => {
+ if (value) code.value = ''
+})
+
+async function handleConfirm() {
+ isLoading.value = true
+ try {
+ const result = await $api.post<{ changed: boolean }>('/module/auth/password/change', {
+ code: code.value.trim(),
+ password: props.password,
+ passwordRepeat: props.passwordRepeat,
+ })
+ if (result.data.changed) {
+ toast.add({
+ title: t('account.passwordChanged'),
+ color: 'success',
+ })
+ open.value = false
+ emit('changed')
+ } else {
+ toast.add({
+ title: t('account.passwordChangeError'),
+ color: 'error',
+ })
+ }
+ } catch {
+ toast.add({
+ title: t('account.passwordChangeError'),
+ color: 'error',
+ })
+ } finally {
+ isLoading.value = false
+ }
+}
+</script>
diff --git a/web/src/components/features/account/parts/PasswordSettings.vue b/web/src/components/features/account/parts/PasswordSettings.vue
new file mode 100644
index 0000000..08768ab
--- /dev/null
+++ b/web/src/components/features/account/parts/PasswordSettings.vue
@@ -0,0 +1,214 @@
+<template>
+ <div class="flex flex-col gap-4">
+ <div>
+ <h2 class="text-lg font-semibold">
+ {{ t('account.password') }}
+ </h2>
+ <p class="text-sm text-muted mt-1">
+ {{ byCurrentPassword ? t('account.passwordDescriptionByPassword') : t('account.passwordDescription') }}
+ </p>
+ </div>
+
+ <UForm
+ :state="state"
+ :schema="PasswordSchema"
+ :validate="validatePasswordsMatch"
+ class="space-y-4"
+ @submit="sendCode"
+ >
+ <UFormField
+ :label="t('auth.newPassword')"
+ name="password"
+ >
+ <UInput
+ v-model="state.password"
+ :type="showPassword ? 'text' : 'password'"
+ :placeholder="t('auth.newPasswordPlaceholder')"
+ icon="i-lucide-lock"
+ class="w-full"
+ >
+ <template #trailing>
+ <UButton
+ :icon="showPassword ? 'i-lucide-eye-off' : 'i-lucide-eye'"
+ color="neutral"
+ variant="link"
+ size="sm"
+ @click="showPassword = !showPassword"
+ />
+ </template>
+ </UInput>
+ </UFormField>
+
+ <UFormField
+ :label="t('auth.confirmPassword')"
+ name="passwordRepeat"
+ >
+ <UInput
+ v-model="state.passwordRepeat"
+ :type="showPasswordRepeat ? 'text' : 'password'"
+ :placeholder="t('auth.confirmPasswordPlaceholder')"
+ icon="i-lucide-lock"
+ class="w-full"
+ >
+ <template #trailing>
+ <UButton
+ :icon="showPasswordRepeat ? 'i-lucide-eye-off' : 'i-lucide-eye'"
+ color="neutral"
+ variant="link"
+ size="sm"
+ @click="showPasswordRepeat = !showPasswordRepeat"
+ />
+ </template>
+ </UInput>
+ </UFormField>
+
+ <UFormField
+ v-if="byCurrentPassword"
+ :label="t('account.currentPassword')"
+ name="currentPassword"
+ >
+ <UInput
+ v-model="state.currentPassword"
+ :type="showCurrentPassword ? 'text' : 'password'"
+ :placeholder="t('account.currentPasswordPlaceholder')"
+ icon="i-lucide-lock"
+ autocomplete="current-password"
+ class="w-full"
+ >
+ <template #trailing>
+ <UButton
+ :icon="showCurrentPassword ? 'i-lucide-eye-off' : 'i-lucide-eye'"
+ color="neutral"
+ variant="link"
+ size="sm"
+ @click="showCurrentPassword = !showCurrentPassword"
+ />
+ </template>
+ </UInput>
+ </UFormField>
+
+ <div>
+ <UButton
+ :label="byCurrentPassword ? t('account.changePassword') : t('account.sendPasswordCode')"
+ type="submit"
+ color="primary"
+ :loading="isSending"
+ />
+ </div>
+ </UForm>
+
+ <PasswordCodeModal
+ v-model:open="showCodeModal"
+ :password="state.password"
+ :password-repeat="state.passwordRepeat"
+ @changed="onPasswordChanged"
+ />
+ </div>
+</template>
+
+<script setup lang="ts">
+import { type } from 'arktype'
+import { isAxiosError } from 'axios'
+import { ref, computed, reactive, onMounted } from 'vue'
+import { useI18n } from 'vue-i18n'
+import $api from '@/helpers/axios'
+import { logError } from '@/helpers/Helper'
+import PasswordCodeModal from './PasswordCodeModal.vue'
+
+const { t } = useI18n()
+const toast = useToast()
+
+const isSending = ref(false)
+const showPassword = ref(false)
+const showPasswordRepeat = ref(false)
+const showCurrentPassword = ref(false)
+const showCodeModal = ref(false)
+
+const confirmationMode = ref<'email' | 'password'>('email')
+const byCurrentPassword = computed(() => confirmationMode.value === 'password')
+
+onMounted(async () => {
+ const result = await $api
+ .get<{ mode: 'email' | 'password' }>('/module/auth/password/change/mode')
+ .catch(logError)
+ if (result) confirmationMode.value = result.data.mode
+})
+
+const PasswordSchema = type({
+ password: type('string >= 6').configure({ message: t('auth.passwordTooShort') }),
+ passwordRepeat: type('string >= 6').configure({ message: t('auth.passwordTooShort') }),
+})
+
+const state = reactive({
+ password: '',
+ passwordRepeat: '',
+ currentPassword: '',
+})
+
+function validatePasswordsMatch(formState: Partial<{ password: string; passwordRepeat: string; currentPassword: string }>) {
+ const errors = []
+ if (formState.password && formState.passwordRepeat && formState.password !== formState.passwordRepeat) {
+ errors.push({ name: 'passwordRepeat', message: t('auth.passwordsDoNotMatch') })
+ }
+ if (byCurrentPassword.value && !formState.currentPassword) {
+ errors.push({ name: 'currentPassword', message: t('account.currentPasswordRequired') })
+ }
+ return errors
+}
+
+async function sendCode() {
+ if (byCurrentPassword.value) {
+ await changeByCurrentPassword()
+ return
+ }
+
+ isSending.value = true
+ try {
+ await $api.post('/module/auth/password/change/code')
+ showCodeModal.value = true
+ } catch (error) {
+ const isCooldown = isAxiosError(error) && error.response?.status === 429
+ toast.add({
+ title: isCooldown ? t('account.passwordCodeCooldown') : t('account.passwordCodeSendError'),
+ color: 'error',
+ })
+ } finally {
+ isSending.value = false
+ }
+}
+
+async function changeByCurrentPassword() {
+ isSending.value = true
+ try {
+ const result = await $api.post<{ changed: boolean }>('/module/auth/password/change', {
+ currentPassword: state.currentPassword,
+ password: state.password,
+ passwordRepeat: state.passwordRepeat,
+ })
+ if (result.data.changed) {
+ toast.add({
+ title: t('account.passwordChanged'),
+ color: 'success',
+ })
+ onPasswordChanged()
+ }
+ } catch (error) {
+ const isWrongPassword = isAxiosError(error) && error.response?.status === 403
+ toast.add({
+ title: isWrongPassword ? t('account.wrongPassword') : t('account.passwordChangeError'),
+ color: 'error',
+ })
+ } finally {
+ isSending.value = false
+ }
+}
+
+function onPasswordChanged() {
+ state.password = ''
+ state.passwordRepeat = ''
+ state.currentPassword = ''
+ showPassword.value = false
+ showPasswordRepeat.value = false
+ showCurrentPassword.value = false
+}
+</script>
diff --git a/web/src/components/features/api-tokens/parts/ApiTokenItem.vue b/web/src/components/features/api-tokens/parts/ApiTokenItem.vue
index 7d18002..2cdeaab 100644
--- a/web/src/components/features/api-tokens/parts/ApiTokenItem.vue
+++ b/web/src/components/features/api-tokens/parts/ApiTokenItem.vue
@@ -61,7 +61,7 @@
<UButton
:label="t('common.delete')"
color="error"
- variant="outline"
+ variant="soft"
:loading="deleting"
@click="handleDelete"
/>
diff --git a/web/src/locales/de.ts b/web/src/locales/de.ts
index c0d52c2..8abde8c 100644
--- a/web/src/locales/de.ts
+++ b/web/src/locales/de.ts
@@ -530,6 +530,8 @@ export default {
subtasks: 'Unteraufgaben',
addSubtask: 'Unteraufgabe hinzufügen',
notFound: 'Aufgabe nicht gefunden',
+ copyId: 'Aufgaben-ID kopieren',
+ idCopied: 'Aufgaben-ID kopiert',
noTasks: 'Keine Aufgaben',
showCompleted: 'Abgeschlossene anzeigen',
hideCompleted: 'Abgeschlossene ausblenden',
@@ -703,6 +705,33 @@ export default {
cancel: 'Abbrechen',
deleted: 'Konto gelöscht',
codeSendError: 'Code konnte nicht gesendet werden. Bitte wenden Sie sich an den Support, um Ihr Konto zu löschen.',
+ password: 'Passwort',
+ passwordDescription: 'Legen Sie das Passwort für die Anmeldung per E-Mail fest oder ändern Sie es. Wir senden einen Bestätigungscode an Ihre E-Mail.',
+ passwordDescriptionByPassword: 'Ändern Sie Ihr Anmeldepasswort. Bestätigen Sie die Änderung mit Ihrem aktuellen Passwort.',
+ sendPasswordCode: 'Bestätigungscode senden',
+ confirmPasswordChange: 'Passwortänderung bestätigen',
+ passwordCodeSent: 'Wir haben einen Bestätigungscode an Ihre E-Mail gesendet. Geben Sie ihn unten ein, um das neue Passwort festzulegen.',
+ changePassword: 'Passwort ändern',
+ passwordChanged: 'Passwort aktualisiert',
+ passwordChangeError: 'Passwort konnte nicht aktualisiert werden. Prüfen Sie den Code und versuchen Sie es erneut.',
+ passwordCodeCooldown: 'Code wurde bereits gesendet. Versuchen Sie es in einer Minute erneut.',
+ passwordCodeSendError: 'Code konnte nicht gesendet werden. Versuchen Sie es später erneut.',
+ defaultCredsTitle: 'Login und E-Mail',
+ defaultCredsWarning: 'Die Standard-Zugangsdaten sind öffentlich bekannt',
+ defaultCredsDescription: 'Ihr Konto verwendet die vorinstallierten Zugangsdaten. Legen Sie eigenen Login, E-Mail und Passwort fest — nach dem Speichern müssen Sie sich erneut anmelden.',
+ newLogin: 'Neuer Login',
+ newLoginPlaceholder: 'Buchstaben, Ziffern, . _ -',
+ newEmail: 'Neue E-Mail',
+ currentPassword: 'Aktuelles Passwort',
+ currentPasswordPlaceholder: 'Aktuelles Passwort eingeben',
+ currentPasswordRequired: 'Geben Sie Ihr aktuelles Passwort ein',
+ loginInvalid: 'Der Login muss 3-64 Zeichen lang sein',
+ saveCredentials: 'Speichern und abmelden',
+ credentialsChanged: 'Zugangsdaten aktualisiert. Melden Sie sich mit dem neuen Login und Passwort an.',
+ credentialsChangeError: 'Zugangsdaten konnten nicht aktualisiert werden. Versuchen Sie es erneut.',
+ wrongPassword: 'Falsches Passwort',
+ loginTaken: 'Dieser Login ist bereits vergeben',
+ emailTaken: 'Diese E-Mail ist bereits vergeben',
},
organizations: {
title: 'Organisationen',
diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts
index c8040ac..1541acb 100644
--- a/web/src/locales/en.ts
+++ b/web/src/locales/en.ts
@@ -719,6 +719,33 @@ export default {
cancel: 'Cancel',
deleted: 'Account deleted',
codeSendError: 'Unable to send the code. Please contact support to delete your account.',
+ password: 'Password',
+ passwordDescription: 'Set or change the password you use to sign in with your email. We will send a confirmation code to your email.',
+ passwordDescriptionByPassword: 'Change the password you use to sign in. Confirm the change with your current password.',
+ sendPasswordCode: 'Send confirmation code',
+ confirmPasswordChange: 'Confirm password change',
+ passwordCodeSent: 'We sent a confirmation code to your email. Enter it below to set the new password.',
+ changePassword: 'Change password',
+ passwordChanged: 'Password updated',
+ passwordChangeError: 'Could not update the password. Check the code and try again.',
+ passwordCodeCooldown: 'Code already sent. Try again in a minute.',
+ passwordCodeSendError: 'Unable to send the code. Try again later.',
+ defaultCredsTitle: 'Login and email',
+ defaultCredsWarning: 'The default sign-in credentials are publicly known',
+ defaultCredsDescription: 'Your account uses the preinstalled credentials. Set your own login, email and password — you will need to sign in again after saving.',
+ newLogin: 'New login',
+ newLoginPlaceholder: 'Letters, digits, . _ -',
+ newEmail: 'New email',
+ currentPassword: 'Current password',
+ currentPasswordPlaceholder: 'Enter current password',
+ currentPasswordRequired: 'Enter your current password',
+ loginInvalid: 'Login must be 3-64 characters',
+ saveCredentials: 'Save and sign out',
+ credentialsChanged: 'Credentials updated. Sign in with the new login and password.',
+ credentialsChangeError: 'Could not update credentials. Try again.',
+ wrongPassword: 'Wrong password',
+ loginTaken: 'This login is already taken',
+ emailTaken: 'This email is already taken',
},
organizations: {
title: 'Organizations',
diff --git a/web/src/locales/es.ts b/web/src/locales/es.ts
index d3ffbbc..671ca6b 100644
--- a/web/src/locales/es.ts
+++ b/web/src/locales/es.ts
@@ -530,6 +530,8 @@ export default {
subtasks: 'Subtareas',
addSubtask: 'Añadir subtarea',
notFound: 'Tarea no encontrada',
+ copyId: 'Copiar ID de la tarea',
+ idCopied: 'ID de la tarea copiado',
noTasks: 'No hay tareas',
showCompleted: 'Mostrar completadas',
hideCompleted: 'Ocultar completadas',
@@ -703,6 +705,33 @@ export default {
cancel: 'Cancelar',
deleted: 'Cuenta eliminada',
codeSendError: 'No se pudo enviar el código. Ponte en contacto con soporte para eliminar tu cuenta.',
+ password: 'Contraseña',
+ passwordDescription: 'Establece o cambia la contraseña para iniciar sesión con tu email. Enviaremos un código de confirmación a tu correo.',
+ passwordDescriptionByPassword: 'Cambia la contraseña que usas para iniciar sesión. Confirma el cambio con tu contraseña actual.',
+ sendPasswordCode: 'Enviar código de confirmación',
+ confirmPasswordChange: 'Confirmar cambio de contraseña',
+ passwordCodeSent: 'Hemos enviado un código de confirmación a tu correo. Introdúcelo abajo para establecer la nueva contraseña.',
+ changePassword: 'Cambiar contraseña',
+ passwordChanged: 'Contraseña actualizada',
+ passwordChangeError: 'No se pudo actualizar la contraseña. Comprueba el código e inténtalo de nuevo.',
+ passwordCodeCooldown: 'El código ya fue enviado. Inténtalo de nuevo en un minuto.',
+ passwordCodeSendError: 'No se pudo enviar el código. Inténtalo más tarde.',
+ defaultCredsTitle: 'Login y email',
+ defaultCredsWarning: 'Las credenciales de acceso predeterminadas son de conocimiento público',
+ defaultCredsDescription: 'Tu cuenta usa las credenciales preinstaladas. Establece tu propio login, email y contraseña — tendrás que iniciar sesión de nuevo después de guardar.',
+ newLogin: 'Nuevo login',
+ newLoginPlaceholder: 'Letras, dígitos, . _ -',
+ newEmail: 'Nuevo email',
+ currentPassword: 'Contraseña actual',
+ currentPasswordPlaceholder: 'Introduce la contraseña actual',
+ currentPasswordRequired: 'Introduce tu contraseña actual',
+ loginInvalid: 'El login debe tener entre 3 y 64 caracteres',
+ saveCredentials: 'Guardar y cerrar sesión',
+ credentialsChanged: 'Credenciales actualizadas. Inicia sesión con el nuevo login y contraseña.',
+ credentialsChangeError: 'No se pudieron actualizar las credenciales. Inténtalo de nuevo.',
+ wrongPassword: 'Contraseña incorrecta',
+ loginTaken: 'Este login ya está en uso',
+ emailTaken: 'Este email ya está en uso',
},
organizations: {
title: 'Organizaciones',
diff --git a/web/src/locales/ru.ts b/web/src/locales/ru.ts
index 79fbc0f..cfbb1f4 100644
--- a/web/src/locales/ru.ts
+++ b/web/src/locales/ru.ts
@@ -692,6 +692,33 @@ export default {
cancel: 'Отмена',
deleted: 'Аккаунт удалён',
codeSendError: 'Не удалось отправить код. Обратитесь в поддержку для удаления аккаунта.',
+ password: 'Пароль',
+ passwordDescription: 'Задайте или измените пароль для входа по email. Мы отправим код подтверждения на вашу почту.',
+ passwordDescriptionByPassword: 'Измените пароль для входа. Подтвердите изменение текущим паролем.',
+ sendPasswordCode: 'Отправить код подтверждения',
+ confirmPasswordChange: 'Подтверждение смены пароля',
+ passwordCodeSent: 'Мы отправили код подтверждения на вашу почту. Введите его ниже, чтобы установить новый пароль.',
+ changePassword: 'Изменить пароль',
+ passwordChanged: 'Пароль обновлён',
+ passwordChangeError: 'Не удалось обновить пароль. Проверьте код и попробуйте ещё раз.',
+ passwordCodeCooldown: 'Код уже отправлен. Повторите через минуту.',
+ passwordCodeSendError: 'Не удалось отправить код. Попробуйте позже.',
+ defaultCredsTitle: 'Логин и email',
+ defaultCredsWarning: 'Стандартные данные для входа общеизвестны',
+ defaultCredsDescription: 'Учётная запись использует стандартные данные. Задайте свои логин, email и пароль — после сохранения потребуется войти заново.',
+ newLogin: 'Новый логин',
+ newLoginPlaceholder: 'Буквы, цифры, . _ -',
+ newEmail: 'Новый email',
+ currentPassword: 'Текущий пароль',
+ currentPasswordPlaceholder: 'Введите текущий пароль',
+ currentPasswordRequired: 'Введите текущий пароль',
+ loginInvalid: 'Логин должен быть от 3 до 64 символов',
+ saveCredentials: 'Сохранить и выйти',
+ credentialsChanged: 'Данные обновлены. Войдите с новым логином и паролем.',
+ credentialsChangeError: 'Не удалось обновить данные. Попробуйте ещё раз.',
+ wrongPassword: 'Неверный пароль',
+ loginTaken: 'Этот логин уже занят',
+ emailTaken: 'Этот email уже занят',
},
organizations: {
title: 'Организации',