@frigear-nu/account 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +1 -1
  2. package/dist/module.d.mts +0 -20
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +17 -25
  5. package/dist/runtime/app/components/Account/AccountAvatarField.vue +112 -0
  6. package/dist/runtime/app/components/Account/AccountMenu.d.vue.ts +1 -1
  7. package/dist/runtime/app/components/Account/AccountMenu.vue +8 -10
  8. package/dist/runtime/app/components/Account/AccountMenu.vue.d.ts +1 -1
  9. package/dist/runtime/app/components/Account/AccountSignedInApps.vue +3 -1
  10. package/dist/runtime/app/composables/index.d.ts +2 -0
  11. package/dist/runtime/app/composables/index.js +1 -0
  12. package/dist/runtime/app/composables/useAccount.d.ts +2 -0
  13. package/dist/runtime/app/composables/useAccount.js +15 -1
  14. package/dist/runtime/app/composables/useAccountAreas.d.ts +21 -0
  15. package/dist/runtime/app/composables/useAccountAreas.js +12 -0
  16. package/dist/runtime/app/composables/useAccountNav.js +1 -2
  17. package/dist/runtime/app/middleware/preload.js +6 -0
  18. package/dist/runtime/app/pages/api-tokens.vue +31 -28
  19. package/dist/runtime/app/pages/profile.vue +38 -15
  20. package/dist/runtime/app/pages/security.vue +4 -2
  21. package/dist/runtime/app/plugins/preload.client.js +5 -0
  22. package/dist/runtime/app/utils/avatar-image.d.ts +34 -0
  23. package/dist/runtime/app/utils/avatar-image.js +61 -0
  24. package/dist/runtime/app/utils/mcp-connect.d.ts +27 -0
  25. package/dist/runtime/app/utils/mcp-connect.js +70 -0
  26. package/dist/runtime/app/utils/profile.d.ts +5 -4
  27. package/dist/runtime/app/utils/profile.js +1 -1
  28. package/dist/runtime/i18n/lang/da.json +48 -20
  29. package/dist/runtime/i18n/lang/en.json +47 -19
  30. package/dist/runtime/menus.js +1 -14
  31. package/dist/runtime/utils/areas.d.ts +7 -0
  32. package/dist/runtime/utils/areas.js +4 -0
  33. package/package.json +15 -11
  34. package/dist/runtime/app/middleware/bootstrap.js +0 -6
  35. package/dist/runtime/app/pages/documents.vue +0 -54
  36. package/dist/runtime/app/plugins/bootstrap.client.js +0 -5
  37. package/dist/runtime/app/utils/documents.d.ts +0 -8
  38. package/dist/runtime/app/utils/documents.js +0 -7
  39. /package/dist/runtime/app/{pages/documents.d.vue.ts → components/Account/AccountAvatarField.d.vue.ts} +0 -0
  40. /package/dist/runtime/app/{pages/documents.vue.d.ts → components/Account/AccountAvatarField.vue.d.ts} +0 -0
  41. /package/dist/runtime/app/middleware/{bootstrap.d.ts → preload.d.ts} +0 -0
  42. /package/dist/runtime/app/plugins/{bootstrap.client.d.ts → preload.client.d.ts} +0 -0
@@ -1,38 +1,45 @@
1
1
  <script setup>
2
2
  import { z } from "zod";
3
3
  import { USER_NICKNAME_MAX_LENGTH, USER_PEOPLE_NUMBER_MAX_LENGTH, USER_PHONE_MAX_LENGTH, USER_PHONE_PATTERN } from "@frigear-nu/users/api";
4
+ import { phoneIssue } from "@frigear-nu/ui/phone";
4
5
  import AccountChangeEmailSlideover from "../components/Account/AccountChangeEmailSlideover.vue";
5
6
  import { PROFILE_NO_LOCALE as NO_LOCALE, profileChanges } from "../utils/profile";
6
- import { computed, reactive, ref, useAccount, useAction, useModuleT, useNuxtApp, useOverlay, useRoute, useToast, useUserSession, watch } from "#imports";
7
+ import { computed, reactive, ref, resolveComponent, useAccount, useAction, useModuleT, useNuxtApp, useOverlay, useRoute, useRuntimeConfig, useToast, useUserSession, watch } from "#imports";
7
8
  defineOptions({ name: "AccountProfilePage" });
8
9
  const t = useModuleT("account.profile");
10
+ const WidgetArea = resolveComponent("WidgetArea");
11
+ const widgetArea = typeof WidgetArea === "string" ? void 0 : WidgetArea;
9
12
  const toast = useToast();
10
13
  const route = useRoute();
11
14
  const { user } = useUserSession();
12
15
  const { updateProfileDetails } = useAccount();
16
+ const avatarUpload = useRuntimeConfig().public.users?.avatarUpload === true;
13
17
  const { $i18n } = useNuxtApp();
14
18
  const localeItems = computed(() => {
15
19
  const locales = ($i18n?.locales.value ?? []).map((locale) => typeof locale === "string" ? { value: locale, label: locale } : { value: locale.code, label: locale.name || locale.code });
16
20
  return locales.length ? [{ value: NO_LOCALE, label: t("locale.none", "Not set") }, ...locales] : [];
17
21
  });
18
- const schema = z.object({
22
+ const baseSchema = z.object({
19
23
  name: z.string().trim().min(1, t("name.required", "Please enter your name.")),
20
24
  nickname: z.string().trim().max(USER_NICKNAME_MAX_LENGTH, t("nickname.tooLong", "Use at most {max} characters.", { max: USER_NICKNAME_MAX_LENGTH })).optional(),
21
- // The server's rule: an http(s) URL of at most 2048 characters (empty clears the avatar).
25
+ // The server's rule, imported from `@frigear-nu/users`, and a full international number (`PhoneInput` writes
26
+ // `+4512345678`); empty clears it. A number stored before the country selector passes until it is changed.
27
+ phone: z.string().trim().max(USER_PHONE_MAX_LENGTH).regex(USER_PHONE_PATTERN, t("phone.invalid", "Enter a valid phone number.")).refine((value) => !value || value === saved.value.phone || !phoneIssue(value), t("phone.invalid", "Enter a valid phone number.")).optional(),
28
+ peopleNumber: z.string().trim().max(USER_PEOPLE_NUMBER_MAX_LENGTH, t("peopleNumber.tooLong", "Use at most {max} characters.", { max: USER_PEOPLE_NUMBER_MAX_LENGTH })).optional()
29
+ });
30
+ const schema = avatarUpload ? baseSchema : baseSchema.extend({
22
31
  avatar: z.union([
23
32
  z.literal(""),
24
33
  z.url({ protocol: /^https?$/, message: t("avatar.invalid", "Enter a valid URL.") }).max(2048, t("avatar.invalid", "Enter a valid URL."))
25
- ]).optional(),
26
- // The server's rule, imported from `@frigear-nu/users`: digits, spaces and `+-().`; empty clears it.
27
- phone: z.string().trim().max(USER_PHONE_MAX_LENGTH).regex(USER_PHONE_PATTERN, t("phone.invalid", "Enter a phone number of digits, spaces and + - ( ).")).optional(),
28
- peopleNumber: z.string().trim().max(USER_PEOPLE_NUMBER_MAX_LENGTH, t("peopleNumber.tooLong", "Use at most {max} characters.", { max: USER_PEOPLE_NUMBER_MAX_LENGTH })).optional()
34
+ ]).optional()
29
35
  });
30
36
  const sessionField = (key) => user.value?.[key];
31
37
  const sessionText = (key) => {
32
38
  const value = sessionField(key);
33
39
  return typeof value === "string" ? value : "";
34
40
  };
35
- const FIELDS = ["name", "nickname", "avatar", "phone", "peopleNumber", "locale"];
41
+ const ALL_FIELDS = ["name", "nickname", "avatar", "phone", "peopleNumber", "locale"];
42
+ const FIELDS = avatarUpload ? ALL_FIELDS.filter((key) => key !== "avatar") : ALL_FIELDS;
36
43
  const saved = computed(() => ({
37
44
  name: user.value?.name ?? "",
38
45
  nickname: sessionText("nickname"),
@@ -54,7 +61,7 @@ function onSubmitProfile(event) {
54
61
  const body = profileChanges({
55
62
  ...event.data,
56
63
  nickname: event.data.nickname ?? "",
57
- avatar: event.data.avatar ?? "",
64
+ avatar: avatarUpload ? void 0 : event.data.avatar ?? "",
58
65
  phone: event.data.phone ?? "",
59
66
  peopleNumber: event.data.peopleNumber ?? "",
60
67
  locale: state.locale
@@ -131,6 +138,13 @@ async function onChangeEmail() {
131
138
  class="flex flex-col divide-y divide-default"
132
139
  @submit="onSubmitProfile"
133
140
  >
141
+ <FormRow
142
+ v-if="avatarUpload"
143
+ :label="t('avatar.label', 'Avatar')"
144
+ :description="t('avatar.hint', 'Saved as soon as you choose a photo.')"
145
+ >
146
+ <AccountAvatarField />
147
+ </FormRow>
134
148
  <FormRow
135
149
  name="name"
136
150
  :label="t('name.label', 'Name')"
@@ -155,6 +169,7 @@ async function onChangeEmail() {
155
169
  />
156
170
  </FormRow>
157
171
  <FormRow
172
+ v-if="!avatarUpload"
158
173
  name="avatar"
159
174
  :label="t('avatar.label', 'Avatar')"
160
175
  :description="t('avatar.description', 'Link to a square image.')"
@@ -180,11 +195,10 @@ async function onChangeEmail() {
180
195
  :label="t('phone.label', 'Phone')"
181
196
  :description="t('phone.description', 'For text messages. Only staff who need it can see it.')"
182
197
  >
183
- <UInput
184
- v-model="state.phone"
185
- type="tel"
186
- autocomplete="tel"
187
- class="w-full"
198
+ <PhoneInput
199
+ :model-value="state.phone"
200
+ :country-label="t('phone.country', 'Country')"
201
+ @update:model-value="state.phone = $event ?? ''"
188
202
  />
189
203
  </FormRow>
190
204
  <FormRow
@@ -213,9 +227,10 @@ async function onChangeEmail() {
213
227
  </UForm>
214
228
  <template #footer>
215
229
  <div class="flex justify-end gap-2">
216
- <UButton
230
+ <TooltipButton
217
231
  type="submit"
218
232
  form="account-profile"
233
+ :kbds="['meta', 'enter']"
219
234
  :loading="profileAction.busy.value"
220
235
  :disabled="!dirty"
221
236
  :label="t('save', 'Save profile')"
@@ -280,5 +295,13 @@ async function onChangeEmail() {
280
295
  </div>
281
296
  </template>
282
297
  </SectionCard>
298
+
299
+ <component
300
+ :is="widgetArea"
301
+ v-if="widgetArea"
302
+ name="account.profile"
303
+ :context="{ user }"
304
+ grid-class="flex flex-col gap-4"
305
+ />
283
306
  </div>
284
307
  </template>
@@ -134,9 +134,10 @@ const passkeyMenu = (passkey) => [[
134
134
  </UForm>
135
135
  <template #footer>
136
136
  <div class="flex justify-end gap-2">
137
- <UButton
137
+ <TooltipButton
138
138
  type="submit"
139
139
  form="account-change-password"
140
+ :kbds="['meta', 'enter']"
140
141
  :loading="passwordAction.busy.value"
141
142
  :label="t('changePassword.submit', 'Change password')"
142
143
  />
@@ -152,9 +153,10 @@ const passkeyMenu = (passkey) => [[
152
153
  flush
153
154
  >
154
155
  <template #actions>
155
- <UButton
156
+ <TooltipButton
156
157
  icon="i-lucide-plus"
157
158
  :label="t('passkeys.add', 'Add passkey')"
159
+ :tooltip="t('passkeys.addHint', 'Register this device so you can sign in without a password')"
158
160
  @click="onAddPasskey"
159
161
  />
160
162
  </template>
@@ -0,0 +1,5 @@
1
+ import { defineNuxtPlugin, resetPreload, useUserSession, watch } from "#imports";
2
+ export default defineNuxtPlugin(() => {
3
+ const { user } = useUserSession();
4
+ watch(() => user.value?.id ?? null, () => resetPreload("account"));
5
+ });
@@ -0,0 +1,34 @@
1
+ /** The side of the stored avatar, in pixels. */
2
+ export declare const AVATAR_SIZE = 512;
3
+ /** Files above this are refused before decoding, so a huge photo never freezes the tab. */
4
+ export declare const AVATAR_MAX_SOURCE_BYTES: number;
5
+ /** The `accept` of the file input: the formats every browser decodes first, then any image. */
6
+ export declare const AVATAR_ACCEPT = "image/png,image/jpeg,image/webp,image/*";
7
+ /** Why a chosen file cannot become an avatar. */
8
+ export type AvatarFileProblem = 'wrong_type' | 'too_large';
9
+ /** Thrown by {@link squareAvatar}; `problem` says why. */
10
+ export declare class AvatarImageError extends Error {
11
+ readonly problem: AvatarFileProblem;
12
+ constructor(problem: AvatarFileProblem);
13
+ }
14
+ /** Checks a chosen file before it is decoded: an image of at most `maxBytes`. */
15
+ export declare function avatarFileProblem(file: Pick<File, 'type' | 'size'>, maxBytes?: number): AvatarFileProblem | null;
16
+ /**
17
+ * The problem behind a failed upload, from the server's `data.code` (`unsupported_media_type`, `file_too_large`) or
18
+ * else its status (415, 413), so the page can say it in the user's language; `null` for any other error.
19
+ */
20
+ export declare function avatarUploadProblem(error: unknown): AvatarFileProblem | null;
21
+ /** The largest centred square of a `width` x `height` image: where to cut it (`sx`, `sy`) and its side. */
22
+ export declare function centreSquare(width: number, height: number): {
23
+ sx: number;
24
+ sy: number;
25
+ side: number;
26
+ };
27
+ /** The side of the output: `size`, or the image's own side when it is smaller (never scaled up). */
28
+ export declare function avatarOutputSide(side: number, size?: number): number;
29
+ /**
30
+ * Decodes `file`, cuts the centred square, scales it to `size` pixels and encodes it as WebP (quality 0.85), or as JPEG
31
+ * when the browser produced something else (Safari answers a WebP request with PNG). Throws {@link AvatarImageError}
32
+ * for a file that is not an image, is too large, or cannot be decoded.
33
+ */
34
+ export declare function squareAvatar(file: File, size?: number): Promise<File>;
@@ -0,0 +1,61 @@
1
+ export const AVATAR_SIZE = 512;
2
+ export const AVATAR_MAX_SOURCE_BYTES = 20 * 1024 * 1024;
3
+ export const AVATAR_ACCEPT = "image/png,image/jpeg,image/webp,image/*";
4
+ export class AvatarImageError extends Error {
5
+ constructor(problem) {
6
+ super(problem);
7
+ this.problem = problem;
8
+ this.name = "AvatarImageError";
9
+ }
10
+ }
11
+ export function avatarFileProblem(file, maxBytes = AVATAR_MAX_SOURCE_BYTES) {
12
+ if (!file.type.startsWith("image/")) return "wrong_type";
13
+ if (file.size > maxBytes) return "too_large";
14
+ return null;
15
+ }
16
+ export function avatarUploadProblem(error) {
17
+ if (error instanceof AvatarImageError) return error.problem;
18
+ if (!error || typeof error !== "object") return null;
19
+ const { statusCode, status, data } = error;
20
+ const code = data?.data?.code;
21
+ const httpStatus = statusCode ?? status;
22
+ if (code === "unsupported_media_type" || httpStatus === 415) return "wrong_type";
23
+ if (code === "file_too_large" || httpStatus === 413) return "too_large";
24
+ return null;
25
+ }
26
+ export function centreSquare(width, height) {
27
+ const side = Math.min(width, height);
28
+ return { sx: Math.floor((width - side) / 2), sy: Math.floor((height - side) / 2), side };
29
+ }
30
+ export function avatarOutputSide(side, size = AVATAR_SIZE) {
31
+ return Math.max(1, Math.min(side, size));
32
+ }
33
+ const encode = (canvas, type, quality) => new Promise((resolve) => canvas.toBlob(resolve, type, quality));
34
+ export async function squareAvatar(file, size = AVATAR_SIZE) {
35
+ const problem = avatarFileProblem(file);
36
+ if (problem) throw new AvatarImageError(problem);
37
+ let bitmap;
38
+ try {
39
+ bitmap = await createImageBitmap(file);
40
+ } catch {
41
+ throw new AvatarImageError("wrong_type");
42
+ }
43
+ try {
44
+ const { sx, sy, side } = centreSquare(bitmap.width, bitmap.height);
45
+ const out = avatarOutputSide(side, size);
46
+ const canvas = document.createElement("canvas");
47
+ canvas.width = out;
48
+ canvas.height = out;
49
+ const context = canvas.getContext("2d");
50
+ if (!context) throw new AvatarImageError("wrong_type");
51
+ context.imageSmoothingQuality = "high";
52
+ context.drawImage(bitmap, sx, sy, side, side, 0, 0, out, out);
53
+ let blob = await encode(canvas, "image/webp", 0.85);
54
+ if (blob?.type !== "image/webp") blob = await encode(canvas, "image/jpeg", 0.85);
55
+ if (!blob) throw new AvatarImageError("wrong_type");
56
+ const ext = blob.type === "image/webp" ? "webp" : "jpg";
57
+ return new File([blob], `avatar.${ext}`, { type: blob.type });
58
+ } finally {
59
+ bitmap.close();
60
+ }
61
+ }
@@ -0,0 +1,27 @@
1
+ type Translate = (key: string, fallback: string, params?: Record<string, string | number>) => string;
2
+ export interface McpConnectTab {
3
+ label: string;
4
+ value: string;
5
+ steps: string;
6
+ code: string;
7
+ extraSteps?: string;
8
+ extraCode?: string;
9
+ }
10
+ export interface McpConnectOptions {
11
+ /** The absolute MCP URL, e.g. `https://example.org/mcp`. */
12
+ url: string;
13
+ /** Whether clients sign in with OAuth there (`runtimeConfig.public.mcpModules.oauth`). */
14
+ oauth: boolean;
15
+ /** The API token to fill in, or a placeholder. */
16
+ token: string;
17
+ /** `useModuleT('account.apiTokens')`. */
18
+ t: Translate;
19
+ }
20
+ /** The name the snippets give the server in the client. */
21
+ export declare const MCP_SERVER_NAME = "frigear";
22
+ /**
23
+ * The tabs of the connect card. With OAuth every client adds the URL and signs the user in (Claude Code keeps the API
24
+ * token as an alternative); without it only clients that can send an `Authorization` header are listed, with the token.
25
+ */
26
+ export declare function mcpConnectTabs({ url, oauth, token, t }: McpConnectOptions): McpConnectTab[];
27
+ export {};
@@ -0,0 +1,70 @@
1
+ export const MCP_SERVER_NAME = "frigear";
2
+ const json = (value) => JSON.stringify(value, null, 2);
3
+ export function mcpConnectTabs({ url, oauth, token, t }) {
4
+ const bearer = `Bearer ${token}`;
5
+ const tokenCommand = `claude mcp add --transport http ${MCP_SERVER_NAME} ${url} --header "Authorization: ${bearer}"`;
6
+ if (!oauth) {
7
+ return [
8
+ {
9
+ label: "Claude Code",
10
+ value: "claude-code",
11
+ steps: t("connect.token.claudeCode", "Claude Code: run this command with an API token from this page."),
12
+ code: tokenCommand
13
+ },
14
+ {
15
+ label: "VS Code",
16
+ value: "vscode",
17
+ steps: t("connect.token.vscode", "VS Code: add this to .vscode/mcp.json, with an API token from this page."),
18
+ code: json({ servers: { [MCP_SERVER_NAME]: { type: "http", url, headers: { Authorization: bearer } } } })
19
+ },
20
+ {
21
+ label: "Cursor",
22
+ value: "cursor",
23
+ steps: t("connect.token.cursor", "Cursor: add this to .cursor/mcp.json (or ~/.cursor/mcp.json), with an API token from this page."),
24
+ code: json({ mcpServers: { [MCP_SERVER_NAME]: { url, headers: { Authorization: bearer } } } })
25
+ },
26
+ {
27
+ label: t("connect.token.otherLabel", "Other clients"),
28
+ value: "other",
29
+ steps: t("connect.token.other", 'Other clients: connect to the URL below and send an API token from this page as the header "Authorization: Bearer TOKEN".'),
30
+ code: url
31
+ }
32
+ ];
33
+ }
34
+ return [
35
+ {
36
+ label: "Claude",
37
+ value: "claude",
38
+ steps: t("connect.claude.steps", "Claude.ai and Claude Desktop: open Settings \u2192 Connectors \u2192 Add custom connector, paste the URL below, then choose Connect and sign in. No token needed."),
39
+ code: url
40
+ },
41
+ {
42
+ label: "ChatGPT",
43
+ value: "chatgpt",
44
+ steps: t("connect.chatgpt.steps", "ChatGPT: turn on Developer mode under Settings \u2192 Apps & Connectors \u2192 Advanced settings, then create a connector with the URL below and OAuth authentication, and sign in. No token needed."),
45
+ code: url
46
+ },
47
+ {
48
+ label: "Claude Code",
49
+ value: "claude-code",
50
+ steps: t("connect.claudeCode.steps", "Claude Code: run this command, then run /mcp in Claude Code, pick {name} and choose Authenticate to sign in.", { name: MCP_SERVER_NAME }),
51
+ code: `claude mcp add --transport http ${MCP_SERVER_NAME} ${url}`,
52
+ extraSteps: t("connect.claudeCode.token", "Or use an API token from this page instead of signing in:"),
53
+ extraCode: tokenCommand
54
+ },
55
+ {
56
+ label: "VS Code",
57
+ value: "vscode",
58
+ steps: t("connect.vscode.steps", "VS Code: run MCP: Add Server, choose HTTP and paste the URL below, then sign in when VS Code asks."),
59
+ code: url,
60
+ extraSteps: t("connect.vscode.file", "Or add it to .vscode/mcp.json:"),
61
+ extraCode: json({ servers: { [MCP_SERVER_NAME]: { type: "http", url } } })
62
+ },
63
+ {
64
+ label: "Cursor",
65
+ value: "cursor",
66
+ steps: t("connect.cursor.steps", "Cursor: add this to .cursor/mcp.json (or ~/.cursor/mcp.json), then choose Login next to {name} under Settings \u2192 MCP.", { name: MCP_SERVER_NAME }),
67
+ code: json({ mcpServers: { [MCP_SERVER_NAME]: { url } } })
68
+ }
69
+ ];
70
+ }
@@ -3,7 +3,8 @@ export declare const PROFILE_NO_LOCALE = "-";
3
3
  export interface ProfileFormValues {
4
4
  name: string;
5
5
  nickname: string;
6
- avatar: string;
6
+ /** Left out when the avatar is uploaded on its own (`users.avatarUpload`): the body then keeps the stored one. */
7
+ avatar?: string;
7
8
  phone: string;
8
9
  /** The user's id in an external system (`users.peopleNumber`). */
9
10
  peopleNumber: string;
@@ -19,9 +20,9 @@ export declare function profileChanges(values: ProfileFormValues, saved: Pick<Pr
19
20
  localeChoice: boolean;
20
21
  }): {
21
22
  locale?: string | null | undefined;
22
- name: string;
23
- nickname: string | null;
24
- avatar: string | null;
25
23
  phone: string | null;
26
24
  peopleNumber: string | null;
25
+ avatar?: string | null | undefined;
26
+ name: string;
27
+ nickname: string | null;
27
28
  };
@@ -4,7 +4,7 @@ export function profileChanges(values, saved, options) {
4
4
  return {
5
5
  name: values.name,
6
6
  nickname: values.nickname.trim() || null,
7
- avatar: values.avatar || null,
7
+ ...values.avatar === void 0 ? {} : { avatar: values.avatar || null },
8
8
  phone: values.phone || null,
9
9
  peopleNumber: values.peopleNumber.trim() || null,
10
10
  ...localeChanged ? { locale: values.locale === PROFILE_NO_LOCALE ? null : values.locale } : {}
@@ -19,10 +19,6 @@
19
19
  "label": "Sikkerhed",
20
20
  "description": "Skift din adgangskode og administrer adgangsnøgler."
21
21
  },
22
- "documents": {
23
- "label": "Dokumenter",
24
- "description": "Håndbøger og andre filer til dig."
25
- },
26
22
  "apiTokens": {
27
23
  "label": "API-nøgler",
28
24
  "description": "Opret nøgler til scripts og værktøjer."
@@ -71,10 +67,25 @@
71
67
  "invalid": "Indtast en gyldig e-mailadresse."
72
68
  },
73
69
  "avatar": {
74
- "label": "Avatar",
70
+ "label": "Profilbillede",
75
71
  "description": "Link til et kvadratisk billede.",
76
72
  "url": "Avatar URL",
77
- "invalid": "Indtast en gyldig URL."
73
+ "invalid": "Indtast en gyldig URL.",
74
+ "hint": "Gemmes, så snart du vælger et billede.",
75
+ "upload": "Upload billede",
76
+ "change": "Skift billede",
77
+ "remove": "Fjern billede",
78
+ "removeHint": "Dine initialer vises i stedet, for alle",
79
+ "removeConfirm": {
80
+ "title": "Fjern dit billede?",
81
+ "description": "Dit billede fjernes for alle. Dine initialer vises i stedet."
82
+ },
83
+ "saved": "Billede gemt",
84
+ "removed": "Billede fjernet",
85
+ "saveFailed": "Kunne ikke gemme dit billede.",
86
+ "removeFailed": "Kunne ikke fjerne dit billede.",
87
+ "wrongType": "Vælg et billede, fx en PNG-, JPEG- eller WebP-fil.",
88
+ "tooLarge": "Billedet er for stort. Vælg et under {size}."
78
89
  },
79
90
  "save": "Gem profil",
80
91
  "saved": "Profil opdateret",
@@ -82,7 +93,8 @@
82
93
  "phone": {
83
94
  "label": "Telefon",
84
95
  "description": "Til sms'er. Kun personale, der har brug for det, kan se det.",
85
- "invalid": "Angiv et telefonnummer med cifre, mellemrum og + - ( )."
96
+ "invalid": "Angiv et gyldigt telefonnummer.",
97
+ "country": "Land"
86
98
  },
87
99
  "locale": {
88
100
  "label": "Sprog",
@@ -114,13 +126,6 @@
114
126
  "saveFailed": "Kunne ikke gemme dine fotovalg."
115
127
  }
116
128
  },
117
- "documents": {
118
- "title": "Dokumenter",
119
- "description": "Dine dokumenter.",
120
- "download": "Download",
121
- "downloadNamed": "Download {name}",
122
- "empty": "Ingen dokumenter til dig endnu."
123
- },
124
129
  "security": {
125
130
  "title": "Sikkerhed",
126
131
  "description": "Skift password, Social login etc.",
@@ -149,6 +154,7 @@
149
154
  "passkeys": {
150
155
  "title": "Passkeys",
151
156
  "add": "Tilføj passkey",
157
+ "addHint": "Registrér denne enhed, så du kan logge ind uden adgangskode",
152
158
  "description": "Log ind med fingeraftryk, ansigt eller enhedens pinkode i stedet for et password.",
153
159
  "unnamed": "Passkey",
154
160
  "created": "Tilføjet {date}",
@@ -183,6 +189,7 @@
183
189
  "signedOut": "Logget ud.",
184
190
  "signOutError": "Kunne ikke logge ud af applikationen.",
185
191
  "signOutAll": "Log ud af alle apps",
192
+ "signOutAllHint": "Alle apps på listen skal bede dig logge ind igen",
186
193
  "signOutAllConfirm": {
187
194
  "title": "Log ud af alle apps?",
188
195
  "description": "Alle applikationer på listen, på alle enheder, skal bede dig logge ind igen. Du forbliver logget ind på dette website."
@@ -201,11 +208,12 @@
201
208
  "copy": "Kopiér nøgle",
202
209
  "copied": "Nøglen er kopieret.",
203
210
  "copiedSnippet": "Kopieret.",
204
- "copySnippet": "Kopiér kommando",
211
+ "copySnippetHint": "Kopiér kommandoen til udklipsholderen",
205
212
  "create": {
206
213
  "title": "Opret API-nøgle",
207
214
  "description": "Nøgler lader scripts og værktøjer som MCP-klienter handle på dine vegne. Giv hver nøgle kun de rettigheder, den har brug for.",
208
- "submit": "Opret API-nøgle"
215
+ "submit": "Opret API-nøgle",
216
+ "submitHint": "Lav en nøgle til scripts og værktøjer; den vises kun én gang"
209
217
  },
210
218
  "createError": "Kunne ikke oprette nøglen.",
211
219
  "created": "Nøglen er oprettet",
@@ -237,13 +245,33 @@
237
245
  "connect": {
238
246
  "title": "Forbind til MCP",
239
247
  "description": "Brug din konto fra en AI-assistent. Din API-nøgle indsættes kun i kommandoerne lige efter, du har oprettet den.",
248
+ "descriptionOAuth": "Brug din konto fra en AI-assistent: tilføj URL'en i appen, og log ind. Du skal kun bruge en API-nøgle til klienter, der ikke kan logge ind, og den indsættes i kommandoerne lige efter, du har oprettet den.",
240
249
  "claude": {
241
- "steps": "Claude.ai og Claude Desktop: åbn Indstillinger → Connectors → Tilføj brugerdefineret connector, indsæt URL'en nedenfor og log ind, når du bliver bedt om det. Ingen nøgle nødvendig.",
242
- "cli": "Claude Code (bruger en API-nøgle):"
250
+ "steps": "Claude.ai og Claude Desktop: åbn Indstillinger → Connectors → Tilføj brugerdefineret connector, indsæt URL'en nedenfor, vælg Forbind og log ind. Ingen nøgle nødvendig."
243
251
  },
244
252
  "chatgpt": {
245
- "steps": "ChatGPT: åbn Indstillinger → Connectors → Avanceret, slå udviklertilstand til, og opret en connector med URL'en nedenfor. Vælg OAuth og log ind, når du bliver bedt om det. Ingen nøgle nødvendig."
246
- }
253
+ "steps": "ChatGPT: slå udviklertilstand til under Indstillinger → Apps og connectors → Avancerede indstillinger, opret en connector med URL'en nedenfor og OAuth-godkendelse, og log ind. Ingen nøgle nødvendig."
254
+ },
255
+ "claudeCode": {
256
+ "steps": "Claude Code: kør denne kommando, kør derefter /mcp i Claude Code, vælg {name} og vælg Authenticate for at logge ind.",
257
+ "token": "Eller brug en API-nøgle fra denne side i stedet for at logge ind:"
258
+ },
259
+ "vscode": {
260
+ "steps": "VS Code: kør MCP: Add Server, vælg HTTP og indsæt URL'en nedenfor, og log ind, når VS Code beder om det.",
261
+ "file": "Eller tilføj den i .vscode/mcp.json:"
262
+ },
263
+ "cursor": {
264
+ "steps": "Cursor: tilføj dette i .cursor/mcp.json (eller ~/.cursor/mcp.json), og vælg derefter Login ud for {name} under Settings → MCP."
265
+ },
266
+ "token": {
267
+ "claudeCode": "Claude Code: kør denne kommando med en API-nøgle fra denne side.",
268
+ "vscode": "VS Code: tilføj dette i .vscode/mcp.json med en API-nøgle fra denne side.",
269
+ "cursor": "Cursor: tilføj dette i .cursor/mcp.json (eller ~/.cursor/mcp.json) med en API-nøgle fra denne side.",
270
+ "otherLabel": "Andre klienter",
271
+ "other": "Andre klienter: forbind til URL'en nedenfor, og send en API-nøgle fra denne side som headeren \"Authorization: Bearer NØGLE\"."
272
+ },
273
+ "signedInApps": "Apps, du forbinder ved at logge ind, vises under Apps, der er logget ind, på siden Sikkerhed, hvor du kan logge dem ud.",
274
+ "signedInAppsLink": "Åbn apps, der er logget ind"
247
275
  },
248
276
  "list": {
249
277
  "title": "Dine nøgler",
@@ -19,10 +19,6 @@
19
19
  "label": "Security",
20
20
  "description": "Change your password and manage passkeys."
21
21
  },
22
- "documents": {
23
- "label": "Documents",
24
- "description": "Handbooks and other files for you."
25
- },
26
22
  "apiTokens": {
27
23
  "label": "API tokens",
28
24
  "description": "Create tokens for scripts and tools."
@@ -74,7 +70,22 @@
74
70
  "label": "Avatar",
75
71
  "description": "Link to a square image.",
76
72
  "url": "Avatar URL",
77
- "invalid": "Enter a valid URL."
73
+ "invalid": "Enter a valid URL.",
74
+ "hint": "Saved as soon as you choose a photo.",
75
+ "upload": "Upload photo",
76
+ "change": "Change photo",
77
+ "remove": "Remove photo",
78
+ "removeHint": "Your initials are shown instead, for everyone",
79
+ "removeConfirm": {
80
+ "title": "Remove your photo?",
81
+ "description": "Your photo is removed for everyone. Your initials are shown instead."
82
+ },
83
+ "saved": "Photo saved",
84
+ "removed": "Photo removed",
85
+ "saveFailed": "Could not save your photo.",
86
+ "removeFailed": "Could not remove your photo.",
87
+ "wrongType": "Choose an image, such as a PNG, JPEG or WebP file.",
88
+ "tooLarge": "The image is too large. Choose one under {size}."
78
89
  },
79
90
  "save": "Save profile",
80
91
  "saved": "Profile updated",
@@ -82,7 +93,8 @@
82
93
  "phone": {
83
94
  "label": "Phone",
84
95
  "description": "For text messages. Only staff who need it can see it.",
85
- "invalid": "Enter a phone number of digits, spaces and + - ( )."
96
+ "invalid": "Enter a valid phone number.",
97
+ "country": "Country"
86
98
  },
87
99
  "locale": {
88
100
  "label": "Language",
@@ -114,13 +126,6 @@
114
126
  "saveFailed": "Could not save your photo choices."
115
127
  }
116
128
  },
117
- "documents": {
118
- "title": "Documents",
119
- "description": "Your documents.",
120
- "download": "Download",
121
- "downloadNamed": "Download {name}",
122
- "empty": "No documents for you yet."
123
- },
124
129
  "security": {
125
130
  "title": "Security",
126
131
  "description": "Change password, Social login etc.",
@@ -149,6 +154,7 @@
149
154
  "passkeys": {
150
155
  "title": "Passkeys",
151
156
  "add": "Add passkey",
157
+ "addHint": "Register this device so you can sign in without a password",
152
158
  "description": "Sign in with your fingerprint, face or device PIN instead of a password.",
153
159
  "unnamed": "Passkey",
154
160
  "created": "Added {date}",
@@ -183,6 +189,7 @@
183
189
  "signedOut": "Signed out.",
184
190
  "signOutError": "Could not sign out of the application.",
185
191
  "signOutAll": "Sign out of all apps",
192
+ "signOutAllHint": "Every app listed here has to ask you to sign in again",
186
193
  "signOutAllConfirm": {
187
194
  "title": "Sign out of every app?",
188
195
  "description": "Every application listed here, on every device, has to ask you to sign in again. You stay signed in on this website."
@@ -201,11 +208,12 @@
201
208
  "copy": "Copy token",
202
209
  "copied": "Token copied.",
203
210
  "copiedSnippet": "Copied.",
204
- "copySnippet": "Copy command",
211
+ "copySnippetHint": "Copy this command to your clipboard",
205
212
  "create": {
206
213
  "title": "Create API token",
207
214
  "description": "Tokens let scripts and tools such as MCP clients act as you. Give each one only the scopes it needs.",
208
- "submit": "Create API token"
215
+ "submit": "Create API token",
216
+ "submitHint": "Make a token for scripts and tools; it is shown only once"
209
217
  },
210
218
  "createError": "Could not create the token.",
211
219
  "created": "Token created",
@@ -237,13 +245,33 @@
237
245
  "connect": {
238
246
  "title": "Connect to MCP",
239
247
  "description": "Use your account from an AI assistant. Your API token is only filled into the commands right after you create it.",
248
+ "descriptionOAuth": "Use your account from an AI assistant: add the URL in the app, then sign in. An API token is only needed for clients that cannot sign in, and is filled into the commands right after you create it.",
240
249
  "claude": {
241
- "steps": "Claude.ai and Claude Desktop: open Settings → Connectors → Add custom connector, paste the URL below and sign in when asked. No token needed.",
242
- "cli": "Claude Code (uses an API token):"
250
+ "steps": "Claude.ai and Claude Desktop: open Settings → Connectors → Add custom connector, paste the URL below, then choose Connect and sign in. No token needed."
243
251
  },
244
252
  "chatgpt": {
245
- "steps": "ChatGPT: open Settings → Connectors → Advanced, turn on Developer mode, then create a connector with the URL below. Choose OAuth and sign in when asked. No token needed."
246
- }
253
+ "steps": "ChatGPT: turn on Developer mode under Settings → Apps & Connectors → Advanced settings, then create a connector with the URL below and OAuth authentication, and sign in. No token needed."
254
+ },
255
+ "claudeCode": {
256
+ "steps": "Claude Code: run this command, then run /mcp in Claude Code, pick {name} and choose Authenticate to sign in.",
257
+ "token": "Or use an API token from this page instead of signing in:"
258
+ },
259
+ "vscode": {
260
+ "steps": "VS Code: run MCP: Add Server, choose HTTP and paste the URL below, then sign in when VS Code asks.",
261
+ "file": "Or add it to .vscode/mcp.json:"
262
+ },
263
+ "cursor": {
264
+ "steps": "Cursor: add this to .cursor/mcp.json (or ~/.cursor/mcp.json), then choose Login next to {name} under Settings → MCP."
265
+ },
266
+ "token": {
267
+ "claudeCode": "Claude Code: run this command with an API token from this page.",
268
+ "vscode": "VS Code: add this to .vscode/mcp.json, with an API token from this page.",
269
+ "cursor": "Cursor: add this to .cursor/mcp.json (or ~/.cursor/mcp.json), with an API token from this page.",
270
+ "otherLabel": "Other clients",
271
+ "other": "Other clients: connect to the URL below and send an API token from this page as the header \"Authorization: Bearer TOKEN\"."
272
+ },
273
+ "signedInApps": "Apps you connect by signing in are listed under Signed-in apps on the Security page, where you can sign them out.",
274
+ "signedInAppsLink": "Open signed-in apps"
247
275
  },
248
276
  "list": {
249
277
  "title": "Your tokens",