@frigear-nu/account 0.6.2 → 0.6.4

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 (37) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +16 -16
  3. package/dist/runtime/app/components/Account/AccountAvatarField.d.vue.ts +3 -0
  4. package/dist/runtime/app/components/Account/AccountAvatarField.vue +112 -0
  5. package/dist/runtime/app/components/Account/AccountAvatarField.vue.d.ts +3 -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 +6 -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/middleware/preload.js +6 -0
  17. package/dist/runtime/app/pages/api-tokens.vue +31 -28
  18. package/dist/runtime/app/pages/index.vue +9 -0
  19. package/dist/runtime/app/pages/profile.vue +122 -23
  20. package/dist/runtime/app/pages/security.vue +2 -1
  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 +9 -3
  27. package/dist/runtime/app/utils/profile.js +3 -1
  28. package/dist/runtime/i18n/lang/da.json +72 -9
  29. package/dist/runtime/i18n/lang/en.json +71 -8
  30. package/dist/runtime/menus.js +1 -2
  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/plugins/bootstrap.client.js +0 -5
  36. /package/dist/runtime/app/middleware/{bootstrap.d.ts → preload.d.ts} +0 -0
  37. /package/dist/runtime/app/plugins/{bootstrap.client.d.ts → preload.client.d.ts} +0 -0
@@ -74,7 +74,22 @@
74
74
  "label": "Avatar",
75
75
  "description": "Link to a square image.",
76
76
  "url": "Avatar URL",
77
- "invalid": "Enter a valid URL."
77
+ "invalid": "Enter a valid URL.",
78
+ "hint": "Saved as soon as you choose a photo.",
79
+ "upload": "Upload photo",
80
+ "change": "Change photo",
81
+ "remove": "Remove photo",
82
+ "removeHint": "Your initials are shown instead, for everyone",
83
+ "removeConfirm": {
84
+ "title": "Remove your photo?",
85
+ "description": "Your photo is removed for everyone. Your initials are shown instead."
86
+ },
87
+ "saved": "Photo saved",
88
+ "removed": "Photo removed",
89
+ "saveFailed": "Could not save your photo.",
90
+ "removeFailed": "Could not remove your photo.",
91
+ "wrongType": "Choose an image, such as a PNG, JPEG or WebP file.",
92
+ "tooLarge": "The image is too large. Choose one under {size}."
78
93
  },
79
94
  "save": "Save profile",
80
95
  "saved": "Profile updated",
@@ -82,12 +97,37 @@
82
97
  "phone": {
83
98
  "label": "Phone",
84
99
  "description": "For text messages. Only staff who need it can see it.",
85
- "invalid": "Enter a phone number of digits, spaces and + - ( )."
100
+ "invalid": "Enter a valid phone number.",
101
+ "country": "Country"
86
102
  },
87
103
  "locale": {
88
104
  "label": "Language",
89
105
  "description": "The language we write to you in: emails, texts and notifications.",
90
106
  "none": "Not set"
107
+ },
108
+ "nickname": {
109
+ "label": "Nickname",
110
+ "description": "What you like to be called. Shown next to your name.",
111
+ "tooLong": "Use at most {max} characters."
112
+ },
113
+ "peopleNumber": {
114
+ "label": "People number",
115
+ "description": "Your number in the volunteer system we use, if you have one. Only staff who need it can see it.",
116
+ "tooLong": "Use at most {max} characters."
117
+ },
118
+ "media": {
119
+ "title": "Photos and tagging",
120
+ "description": "Tell photographers and the people who post about us what you prefer. You can still appear in photos where you are not the main focus, such as crowd shots.",
121
+ "photo": {
122
+ "label": "No photos of me",
123
+ "description": "Do not take photos with me as the main subject."
124
+ },
125
+ "tag": {
126
+ "label": "No tagging",
127
+ "description": "Do not tag or name me in posts and photos online."
128
+ },
129
+ "saved": "Photo choices saved",
130
+ "saveFailed": "Could not save your photo choices."
91
131
  }
92
132
  },
93
133
  "documents": {
@@ -125,6 +165,7 @@
125
165
  "passkeys": {
126
166
  "title": "Passkeys",
127
167
  "add": "Add passkey",
168
+ "addHint": "Register this device so you can sign in without a password",
128
169
  "description": "Sign in with your fingerprint, face or device PIN instead of a password.",
129
170
  "unnamed": "Passkey",
130
171
  "created": "Added {date}",
@@ -159,6 +200,7 @@
159
200
  "signedOut": "Signed out.",
160
201
  "signOutError": "Could not sign out of the application.",
161
202
  "signOutAll": "Sign out of all apps",
203
+ "signOutAllHint": "Every app listed here has to ask you to sign in again",
162
204
  "signOutAllConfirm": {
163
205
  "title": "Sign out of every app?",
164
206
  "description": "Every application listed here, on every device, has to ask you to sign in again. You stay signed in on this website."
@@ -177,11 +219,12 @@
177
219
  "copy": "Copy token",
178
220
  "copied": "Token copied.",
179
221
  "copiedSnippet": "Copied.",
180
- "copySnippet": "Copy command",
222
+ "copySnippetHint": "Copy this command to your clipboard",
181
223
  "create": {
182
224
  "title": "Create API token",
183
225
  "description": "Tokens let scripts and tools such as MCP clients act as you. Give each one only the scopes it needs.",
184
- "submit": "Create API token"
226
+ "submit": "Create API token",
227
+ "submitHint": "Make a token for scripts and tools; it is shown only once"
185
228
  },
186
229
  "createError": "Could not create the token.",
187
230
  "created": "Token created",
@@ -213,13 +256,33 @@
213
256
  "connect": {
214
257
  "title": "Connect to MCP",
215
258
  "description": "Use your account from an AI assistant. Your API token is only filled into the commands right after you create it.",
259
+ "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.",
216
260
  "claude": {
217
- "steps": "Claude.ai and Claude Desktop: open Settings → Connectors → Add custom connector, paste the URL below and sign in when asked. No token needed.",
218
- "cli": "Claude Code (uses an API token):"
261
+ "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."
219
262
  },
220
263
  "chatgpt": {
221
- "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."
222
- }
264
+ "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."
265
+ },
266
+ "claudeCode": {
267
+ "steps": "Claude Code: run this command, then run /mcp in Claude Code, pick {name} and choose Authenticate to sign in.",
268
+ "token": "Or use an API token from this page instead of signing in:"
269
+ },
270
+ "vscode": {
271
+ "steps": "VS Code: run MCP: Add Server, choose HTTP and paste the URL below, then sign in when VS Code asks.",
272
+ "file": "Or add it to .vscode/mcp.json:"
273
+ },
274
+ "cursor": {
275
+ "steps": "Cursor: add this to .cursor/mcp.json (or ~/.cursor/mcp.json), then choose Login next to {name} under Settings → MCP."
276
+ },
277
+ "token": {
278
+ "claudeCode": "Claude Code: run this command with an API token from this page.",
279
+ "vscode": "VS Code: add this to .vscode/mcp.json, with an API token from this page.",
280
+ "cursor": "Cursor: add this to .cursor/mcp.json (or ~/.cursor/mcp.json), with an API token from this page.",
281
+ "otherLabel": "Other clients",
282
+ "other": "Other clients: connect to the URL below and send an API token from this page as the header \"Authorization: Bearer TOKEN\"."
283
+ },
284
+ "signedInApps": "Apps you connect by signing in are listed under Signed-in apps on the Security page, where you can sign them out.",
285
+ "signedInAppsLink": "Open signed-in apps"
223
286
  },
224
287
  "list": {
225
288
  "title": "Your tokens",
@@ -9,7 +9,7 @@ export default defineMenuSource(() => {
9
9
  labelKey: "account.menu.account.label",
10
10
  description: "Your account.",
11
11
  descriptionKey: "account.menu.account.description",
12
- icon: "i-lucide-layout-dashboard",
12
+ icon: "i-lucide-user-round-cog",
13
13
  to: config.pages.index,
14
14
  order: -99
15
15
  });
@@ -36,7 +36,6 @@ export default defineMenuSource(() => {
36
36
  order: 10
37
37
  });
38
38
  extendMenuItem("account", profileItem);
39
- extendMenuItem("account.dropdown", profileItem);
40
39
  }
41
40
  if (config?.pages?.security) {
42
41
  extendMenuItem("account", {
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The area a path belongs to: the area whose path is the path itself or a parent of it, the longest one when several
3
+ * match (`/account/profile` belongs to `/account`, not to `/`). Both sides are expected without a locale prefix.
4
+ */
5
+ export declare function matchArea<T extends {
6
+ to: string;
7
+ }>(areas: T[], path: string): T | undefined;
@@ -0,0 +1,4 @@
1
+ export function matchArea(areas, path) {
2
+ const contains = (to) => path === to || to !== "/" && path.startsWith(`${to.replace(/\/$/, "")}/`);
3
+ return areas.filter((area) => contains(area.to)).sort((a, b) => b.to.length - a.to.length)[0];
4
+ }
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@frigear-nu/account",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "A module for managing the account area (profile, email, password, security) in the main frigear app.",
5
+ "keywords": [
6
+ "frigear-module",
7
+ "nuxt-module"
8
+ ],
5
9
  "homepage": "https://docs.frigear.dev/modules/identity/account",
6
10
  "repository": {
7
11
  "type": "git",
@@ -24,10 +28,10 @@
24
28
  "playground"
25
29
  ],
26
30
  "dependencies": {
27
- "@frigear-nu/auth": "^0.6.5",
28
- "@frigear-nu/module-kit": "^1.3.9",
29
- "@frigear-nu/ui": "^0.2.9",
30
- "@frigear-nu/users": "^3.1.3",
31
+ "@frigear-nu/auth": "^0.6.9",
32
+ "@frigear-nu/module-kit": "^1.3.13",
33
+ "@frigear-nu/ui": "^0.2.12",
34
+ "@frigear-nu/users": "^3.1.6",
31
35
  "@libsql/client": "^0.18.0",
32
36
  "@nuxt/kit": "^4.6.4",
33
37
  "@vueuse/core": "^15.0.0",
@@ -36,9 +40,9 @@
36
40
  "zod": "^4.6.7"
37
41
  },
38
42
  "peerDependencies": {
39
- "@frigear-nu/authorization": "^0.6.3",
40
- "@frigear-nu/menu": "^0.4.1",
41
- "@frigear-nu/widget": "^0.4.2",
43
+ "@frigear-nu/authorization": "^0.6.7",
44
+ "@frigear-nu/menu": "^0.4.2",
45
+ "@frigear-nu/widget": "^0.4.4",
42
46
  "@nuxt/ui": "^4.12.0",
43
47
  "@nuxthub/core": "^0.10.12"
44
48
  },
@@ -57,9 +61,9 @@
57
61
  }
58
62
  },
59
63
  "devDependencies": {
60
- "@frigear-nu/authorization": "^0.6.3",
61
- "@frigear-nu/menu": "^0.4.1",
62
- "@frigear-nu/widget": "^0.4.2",
64
+ "@frigear-nu/authorization": "^0.6.7",
65
+ "@frigear-nu/menu": "^0.4.2",
66
+ "@frigear-nu/widget": "^0.4.4",
63
67
  "@nuxt/devtools": "^4.2.0",
64
68
  "@nuxt/eslint-config": "^1.17.0",
65
69
  "@nuxt/module-builder": "^1.0.4",
@@ -1,6 +0,0 @@
1
- import { keys } from "#account/bootstrap";
2
- import { defineNuxtRouteMiddleware, loadBootstrap, useUserSession } from "#imports";
3
- export default defineNuxtRouteMiddleware(async () => {
4
- if (!keys.length || !useUserSession().loggedIn.value) return;
5
- await loadBootstrap("account");
6
- });
@@ -1,5 +0,0 @@
1
- import { defineNuxtPlugin, resetBootstrap, useUserSession, watch } from "#imports";
2
- export default defineNuxtPlugin(() => {
3
- const { user } = useUserSession();
4
- watch(() => user.value?.id ?? null, () => resetBootstrap("account"));
5
- });