@coffre/ui 0.1.18 → 0.3.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.
- package/README.md +23 -3
- package/dist/{server/_coffre/assets/affordances-CKANXDTG.js → chunks/affordances-DAvsVz7u.js} +12 -7
- package/dist/chunks/affordances-DAvsVz7u.js.map +1 -0
- package/dist/chunks/directory-CSjWWUQ1.js +370 -0
- package/dist/chunks/directory-CSjWWUQ1.js.map +1 -0
- package/dist/{server/_coffre/assets/grants-DdKT11Ny.js → chunks/grants-saMQagmG.js} +41 -39
- package/dist/chunks/grants-saMQagmG.js.map +1 -0
- package/dist/chunks/icons-D-PfAfnH.js +203 -0
- package/dist/chunks/icons-D-PfAfnH.js.map +1 -0
- package/dist/chunks/mounted-jJmqqV_n.js +17 -0
- package/dist/chunks/mounted-jJmqqV_n.js.map +1 -0
- package/dist/{server/_coffre/assets/offboarding-CRz-K82H.js → chunks/offboarding-C6l30DZR.js} +70 -69
- package/dist/chunks/offboarding-C6l30DZR.js.map +1 -0
- package/dist/chunks/page-C5HcNqf2.js +190 -0
- package/dist/chunks/page-C5HcNqf2.js.map +1 -0
- package/dist/chunks/page-route-Drfw7lmn.js +20 -0
- package/dist/chunks/page-route-Drfw7lmn.js.map +1 -0
- package/dist/{server/_coffre/assets/principal-page-C-EFwJQw.js → chunks/principal-page-D_91OA0l.js} +105 -103
- package/dist/chunks/principal-page-D_91OA0l.js.map +1 -0
- package/dist/{server/_coffre/assets → chunks}/project-environments-lEzFHUt4.js +2 -0
- package/dist/chunks/project-environments-lEzFHUt4.js.map +1 -0
- package/dist/chunks/queries-CQ81o4so.js +376 -0
- package/dist/chunks/queries-CQ81o4so.js.map +1 -0
- package/dist/{server/_coffre/assets/row-state-C2P57xT1.js → chunks/row-state-0PsrEzOL.js} +22 -21
- package/dist/chunks/row-state-0PsrEzOL.js.map +1 -0
- package/dist/{server/_coffre/assets → chunks}/signin-errors-BEFlVDbQ.js +2 -0
- package/dist/chunks/signin-errors-BEFlVDbQ.js.map +1 -0
- package/dist/chunks/theme-B2vQolVR.js +86 -0
- package/dist/chunks/theme-B2vQolVR.js.map +1 -0
- package/dist/chunks/ui-DixXLQvQ.js +405 -0
- package/dist/chunks/ui-DixXLQvQ.js.map +1 -0
- package/dist/{server/_coffre/assets/use-action-B-xpvVRO.js → chunks/use-action-CWsg_YWU.js} +8 -6
- package/dist/chunks/use-action-CWsg_YWU.js.map +1 -0
- package/dist/{server/_coffre/assets/use-change-C8BCf3oU.js → chunks/use-change-c6CeLRin.js} +10 -474
- package/dist/chunks/use-change-c6CeLRin.js.map +1 -0
- package/dist/chunks/use-shell-jxd7Tzd-.js +26 -0
- package/dist/chunks/use-shell-jxd7Tzd-.js.map +1 -0
- package/dist/{server/_coffre/assets → chunks}/validation-BQtqPe2V.js +2 -0
- package/dist/chunks/validation-BQtqPe2V.js.map +1 -0
- package/dist/index.d.ts +386 -18
- package/dist/index.js +1147 -0
- package/dist/index.js.map +1 -0
- package/dist/pages/account.d.ts +9 -0
- package/dist/pages/account.js +334 -0
- package/dist/pages/account.js.map +1 -0
- package/dist/pages/audit.d.ts +3 -0
- package/dist/{server/_coffre/assets/audit-qB9G2AQJ.js → pages/audit.js} +102 -100
- package/dist/pages/audit.js.map +1 -0
- package/dist/pages/device-login.d.ts +9 -0
- package/dist/pages/device-login.js +211 -0
- package/dist/pages/device-login.js.map +1 -0
- package/dist/pages/environment.d.ts +3 -0
- package/dist/{server/_coffre/assets/projects._project._environment-C6uybzeU.js → pages/environment.js} +323 -469
- package/dist/pages/environment.js.map +1 -0
- package/dist/pages/login.d.ts +10 -0
- package/dist/pages/login.js +104 -0
- package/dist/pages/login.js.map +1 -0
- package/dist/pages/project.d.ts +2 -0
- package/dist/{server/_coffre/assets/projects._project.index-3CXwkyTh.js → pages/project.js} +223 -225
- package/dist/pages/project.js.map +1 -0
- package/dist/pages/projects.d.ts +3 -0
- package/dist/{server/_coffre/assets/projects.index-iSoBpRFz.js → pages/projects.js} +83 -81
- package/dist/pages/projects.js.map +1 -0
- package/dist/pages/settings.d.ts +3 -0
- package/dist/{server/_coffre/assets/settings-BDQTF5XW.js → pages/settings.js} +20 -18
- package/dist/pages/settings.js.map +1 -0
- package/dist/pages/token.d.ts +3 -0
- package/dist/{server/_coffre/assets/tokens._token-CrBMpcbN.js → pages/token.js} +198 -267
- package/dist/pages/token.js.map +1 -0
- package/dist/pages/tokens.d.ts +3 -0
- package/dist/pages/tokens.js +39 -0
- package/dist/pages/tokens.js.map +1 -0
- package/dist/pages/unregistered.d.ts +8 -0
- package/dist/pages/unregistered.js +54 -0
- package/dist/pages/unregistered.js.map +1 -0
- package/dist/pages/user.d.ts +3 -0
- package/dist/pages/user.js +16 -0
- package/dist/pages/user.js.map +1 -0
- package/dist/pages/users.d.ts +3 -0
- package/dist/pages/users.js +39 -0
- package/dist/pages/users.js.map +1 -0
- package/dist/project-BqIy8gYR.d.ts +5 -0
- package/dist/vite.d.ts +16 -0
- package/dist/vite.js +52 -0
- package/package.json +36 -21
- package/src/assets/icon.svg +1 -0
- package/src/components/affordances.ts +10 -4
- package/src/components/command-palette.tsx +229 -203
- package/src/components/directory.tsx +34 -38
- package/src/components/principal.tsx +7 -3
- package/src/components/service-tokens.tsx +3 -2
- package/src/components/shell.tsx +89 -127
- package/src/components/theme.tsx +14 -81
- package/src/components/ui.tsx +97 -68
- package/src/index.ts +29 -0
- package/src/layout.tsx +113 -0
- package/src/lib/coffre.ts +8 -4
- package/src/lib/mounted.ts +13 -0
- package/src/lib/page-context.ts +31 -0
- package/src/lib/page-route.ts +22 -0
- package/src/lib/preferences.tsx +46 -0
- package/src/options.ts +240 -0
- package/src/{routes → pages}/account.tsx +7 -24
- package/src/{routes → pages}/audit.tsx +5 -16
- package/src/{routes/auth.device.tsx → pages/device-login.tsx} +8 -21
- package/src/{routes/projects.$project.$environment.tsx → pages/environment.tsx} +43 -52
- package/src/{routes → pages}/login.tsx +5 -16
- package/src/{routes/projects.$project.index.tsx → pages/project.tsx} +38 -50
- package/src/{routes/projects.index.tsx → pages/projects.tsx} +2 -7
- package/src/{routes → pages}/settings.tsx +3 -10
- package/src/{routes/tokens.$token.tsx → pages/token.tsx} +6 -7
- package/src/{routes/tokens.index.tsx → pages/tokens.tsx} +3 -8
- package/src/{routes → pages}/unregistered.tsx +1 -6
- package/src/pages/user.tsx +10 -0
- package/src/{routes/users.index.tsx → pages/users.tsx} +3 -8
- package/src/register.ts +55 -0
- package/src/router.tsx +31 -62
- package/src/styles/globals.css +104 -46
- package/src/vite.ts +78 -0
- package/dist/client/.assetsignore +0 -2
- package/dist/client/_coffre/assets/account-BoLGAxbD.js +0 -2
- package/dist/client/_coffre/assets/account-CnnuRTDB.js +0 -1
- package/dist/client/_coffre/assets/affordances-CEafRJcN.js +0 -1
- package/dist/client/_coffre/assets/audit-CHSvKLWX.js +0 -1
- package/dist/client/_coffre/assets/audit-Cn4hmS4u.js +0 -2
- package/dist/client/_coffre/assets/auth.device-Co5vrpaA.js +0 -2
- package/dist/client/_coffre/assets/auth.device-DAlqWacc.js +0 -1
- package/dist/client/_coffre/assets/directory-H8Eh3MnS.js +0 -1
- package/dist/client/_coffre/assets/dist-Braunv_x.js +0 -1
- package/dist/client/_coffre/assets/globals-CpMrgkV6.css +0 -1
- package/dist/client/_coffre/assets/grants-DPDxJXU1.js +0 -1
- package/dist/client/_coffre/assets/icons-Dc_-t0lp.js +0 -1
- package/dist/client/_coffre/assets/index-sUCIXRgJ.js +0 -12
- package/dist/client/_coffre/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/client/_coffre/assets/link-DBINMwm6.js +0 -1
- package/dist/client/_coffre/assets/login-BZFYfL1Y.js +0 -1
- package/dist/client/_coffre/assets/login-CYCKWTOD.js +0 -2
- package/dist/client/_coffre/assets/offboarding-Bwpftp3g.js +0 -1
- package/dist/client/_coffre/assets/page-C_hnzdaR.js +0 -1
- package/dist/client/_coffre/assets/preload-helper-CLkO85Nq.js +0 -1
- package/dist/client/_coffre/assets/principal-page-DLho8TSJ.js +0 -1
- package/dist/client/_coffre/assets/project-environments-CfIH5kFM.js +0 -1
- package/dist/client/_coffre/assets/projects._project._environment-DHRRvQw0.js +0 -3
- package/dist/client/_coffre/assets/projects._project._environment-TLI-RjBZ.js +0 -2
- package/dist/client/_coffre/assets/projects._project.index-BO-8FZIY.js +0 -2
- package/dist/client/_coffre/assets/projects._project.index-DGl921dP.js +0 -1
- package/dist/client/_coffre/assets/projects.index-BDn7Bhoo.js +0 -1
- package/dist/client/_coffre/assets/row-state-DJ-KLamZ.js +0 -1
- package/dist/client/_coffre/assets/settings-q9G1QvR_.js +0 -1
- package/dist/client/_coffre/assets/signin-errors-CroZWZgm.js +0 -1
- package/dist/client/_coffre/assets/suspense-O8sP0mEC.js +0 -1
- package/dist/client/_coffre/assets/tokens._token-B_qczpT9.js +0 -2
- package/dist/client/_coffre/assets/tokens._token-T-sqwMbz.js +0 -2
- package/dist/client/_coffre/assets/tokens.index-CcXSZnAG.js +0 -1
- package/dist/client/_coffre/assets/ui-BXP2IqrW.js +0 -46
- package/dist/client/_coffre/assets/unregistered-D2JXJ90x.js +0 -1
- package/dist/client/_coffre/assets/use-action-BpzKWhgg.js +0 -1
- package/dist/client/_coffre/assets/use-change-CKj3Inq9.js +0 -1
- package/dist/client/_coffre/assets/use-shell-W0SusPkz.js +0 -1
- package/dist/client/_coffre/assets/useQuery-B-lxFSES.js +0 -1
- package/dist/client/_coffre/assets/useSuspenseQuery-BZ-nzHST.js +0 -1
- package/dist/client/_coffre/assets/users._user-Bb3BGYHl.js +0 -1
- package/dist/client/_coffre/assets/users._user-DXmvKrzE.js +0 -2
- package/dist/client/_coffre/assets/users.index-BvzP3qwW.js +0 -1
- package/dist/client/_coffre/assets/validation-9Cl_XS-l.js +0 -1
- package/dist/server/.vite/manifest.json +0 -668
- package/dist/server/_coffre/assets/_tanstack-start-manifest_v-GsKnGGRy.js +0 -162
- package/dist/server/_coffre/assets/account-CV-a2IU2.js +0 -329
- package/dist/server/_coffre/assets/account-hk6wcIXU.js +0 -162
- package/dist/server/_coffre/assets/async-local-storage-C10uQtMM.js +0 -3108
- package/dist/server/_coffre/assets/audit-C1_Ej6YB.js +0 -31
- package/dist/server/_coffre/assets/auth.device-6JRrWbSV.js +0 -210
- package/dist/server/_coffre/assets/auth.device-CLoAxC2T.js +0 -29
- package/dist/server/_coffre/assets/directory-B-_rqsPx.js +0 -371
- package/dist/server/_coffre/assets/dist-CnnV3t2g.js +0 -908
- package/dist/server/_coffre/assets/empty-plugin-adapters-Cq4--YW-.js +0 -5
- package/dist/server/_coffre/assets/globals-CpMrgkV6.css +0 -1
- package/dist/server/_coffre/assets/icons-DOFT-eWB.js +0 -1704
- package/dist/server/_coffre/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/server/_coffre/assets/lazyRouteComponent-CqBNCGuZ.js +0 -480
- package/dist/server/_coffre/assets/link-42ZWdjzZ.js +0 -422
- package/dist/server/_coffre/assets/login-DRKUKkaW.js +0 -22
- package/dist/server/_coffre/assets/login-DnwxVl4Y.js +0 -102
- package/dist/server/_coffre/assets/matchContext-qLfYbC6_.js +0 -56
- package/dist/server/_coffre/assets/page-D6n45dcK.js +0 -3561
- package/dist/server/_coffre/assets/projects._project._environment-CS8DdSMY.js +0 -48
- package/dist/server/_coffre/assets/projects._project.index-BGfcNpj0.js +0 -23
- package/dist/server/_coffre/assets/react-dom-bBoJXlK2.js +0 -1718
- package/dist/server/_coffre/assets/router-9BTgJhWG.js +0 -2322
- package/dist/server/_coffre/assets/start-DR3rN0St.js +0 -4
- package/dist/server/_coffre/assets/suspense-C-2QfDd2.js +0 -602
- package/dist/server/_coffre/assets/tokens._token-rY86Cjgp.js +0 -10
- package/dist/server/_coffre/assets/tokens.index-Bq5qDW9q.js +0 -37
- package/dist/server/_coffre/assets/ui-Cc0CGMtr.js +0 -14881
- package/dist/server/_coffre/assets/unregistered-D9ZKLOPJ.js +0 -53
- package/dist/server/_coffre/assets/use-shell-DwOzEi87.js +0 -462
- package/dist/server/_coffre/assets/useQuery-CTe86qFq.js +0 -8
- package/dist/server/_coffre/assets/useRouter-CaUSUNsw.js +0 -473
- package/dist/server/_coffre/assets/useSuspenseQuery-CSoHzrMb.js +0 -117
- package/dist/server/_coffre/assets/users._user-BmLKYeo_.js +0 -10
- package/dist/server/_coffre/assets/users._user-BmiHwQx3.js +0 -14
- package/dist/server/_coffre/assets/users.index-BiEax90r.js +0 -37
- package/dist/server/index.js +0 -13911
- package/src/assets/favicon-32.png +0 -0
- package/src/components/agentation.tsx +0 -34
- package/src/entry.ts +0 -19
- package/src/routeTree.gen.ts +0 -367
- package/src/routes/__root.tsx +0 -169
- package/src/routes/access.tsx +0 -11
- package/src/routes/index.tsx +0 -15
- package/src/routes/users.$user.tsx +0 -13
- package/src/types.ts +0 -21
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
//#region \0tanstack-start-manifest:v
|
|
2
|
-
var tsrStartManifest = () => ({ routes: {
|
|
3
|
-
__root__: {
|
|
4
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/__root.tsx",
|
|
5
|
-
children: [
|
|
6
|
-
"/",
|
|
7
|
-
"/access",
|
|
8
|
-
"/account",
|
|
9
|
-
"/audit",
|
|
10
|
-
"/login",
|
|
11
|
-
"/settings",
|
|
12
|
-
"/unregistered",
|
|
13
|
-
"/auth/device",
|
|
14
|
-
"/tokens/$token",
|
|
15
|
-
"/users/$user",
|
|
16
|
-
"/projects/",
|
|
17
|
-
"/tokens/",
|
|
18
|
-
"/users/",
|
|
19
|
-
"/projects/$project/$environment",
|
|
20
|
-
"/projects/$project/"
|
|
21
|
-
],
|
|
22
|
-
preloads: [
|
|
23
|
-
"/_coffre/assets/index-sUCIXRgJ.js",
|
|
24
|
-
"/_coffre/assets/page-C_hnzdaR.js",
|
|
25
|
-
"/_coffre/assets/link-DBINMwm6.js",
|
|
26
|
-
"/_coffre/assets/preload-helper-CLkO85Nq.js",
|
|
27
|
-
"/_coffre/assets/suspense-O8sP0mEC.js",
|
|
28
|
-
"/_coffre/assets/use-shell-W0SusPkz.js",
|
|
29
|
-
"/_coffre/assets/dist-Braunv_x.js",
|
|
30
|
-
"/_coffre/assets/ui-BXP2IqrW.js",
|
|
31
|
-
"/_coffre/assets/project-environments-CfIH5kFM.js",
|
|
32
|
-
"/_coffre/assets/affordances-CEafRJcN.js",
|
|
33
|
-
"/_coffre/assets/icons-Dc_-t0lp.js",
|
|
34
|
-
"/_coffre/assets/account-BoLGAxbD.js",
|
|
35
|
-
"/_coffre/assets/row-state-DJ-KLamZ.js",
|
|
36
|
-
"/_coffre/assets/audit-Cn4hmS4u.js",
|
|
37
|
-
"/_coffre/assets/login-CYCKWTOD.js",
|
|
38
|
-
"/_coffre/assets/auth.device-Co5vrpaA.js",
|
|
39
|
-
"/_coffre/assets/tokens._token-B_qczpT9.js",
|
|
40
|
-
"/_coffre/assets/users._user-DXmvKrzE.js",
|
|
41
|
-
"/_coffre/assets/projects._project.index-BO-8FZIY.js",
|
|
42
|
-
"/_coffre/assets/projects._project._environment-TLI-RjBZ.js"
|
|
43
|
-
],
|
|
44
|
-
scripts: [{ attrs: {
|
|
45
|
-
type: "module",
|
|
46
|
-
async: !0,
|
|
47
|
-
src: "/_coffre/assets/index-sUCIXRgJ.js"
|
|
48
|
-
} }]
|
|
49
|
-
},
|
|
50
|
-
"/account": {
|
|
51
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/account.tsx",
|
|
52
|
-
children: void 0,
|
|
53
|
-
preloads: [
|
|
54
|
-
"/_coffre/assets/account-CnnuRTDB.js",
|
|
55
|
-
"/_coffre/assets/use-change-CKj3Inq9.js",
|
|
56
|
-
"/_coffre/assets/directory-H8Eh3MnS.js",
|
|
57
|
-
"/_coffre/assets/signin-errors-CroZWZgm.js"
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
|
-
"/audit": {
|
|
61
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/audit.tsx",
|
|
62
|
-
children: void 0,
|
|
63
|
-
preloads: [
|
|
64
|
-
"/_coffre/assets/audit-CHSvKLWX.js",
|
|
65
|
-
"/_coffre/assets/useSuspenseQuery-BZ-nzHST.js",
|
|
66
|
-
"/_coffre/assets/useQuery-B-lxFSES.js"
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
"/login": {
|
|
70
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/login.tsx",
|
|
71
|
-
children: void 0,
|
|
72
|
-
preloads: ["/_coffre/assets/login-BZFYfL1Y.js", "/_coffre/assets/signin-errors-CroZWZgm.js"]
|
|
73
|
-
},
|
|
74
|
-
"/settings": {
|
|
75
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/settings.tsx",
|
|
76
|
-
children: void 0,
|
|
77
|
-
preloads: ["/_coffre/assets/settings-q9G1QvR_.js", "/_coffre/assets/useSuspenseQuery-BZ-nzHST.js"]
|
|
78
|
-
},
|
|
79
|
-
"/unregistered": {
|
|
80
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/unregistered.tsx",
|
|
81
|
-
children: void 0,
|
|
82
|
-
preloads: ["/_coffre/assets/unregistered-D2JXJ90x.js"]
|
|
83
|
-
},
|
|
84
|
-
"/auth/device": {
|
|
85
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/auth.device.tsx",
|
|
86
|
-
children: void 0,
|
|
87
|
-
preloads: ["/_coffre/assets/auth.device-DAlqWacc.js"]
|
|
88
|
-
},
|
|
89
|
-
"/tokens/$token": {
|
|
90
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/tokens.$token.tsx",
|
|
91
|
-
children: void 0,
|
|
92
|
-
preloads: [
|
|
93
|
-
"/_coffre/assets/tokens._token-T-sqwMbz.js",
|
|
94
|
-
"/_coffre/assets/use-change-CKj3Inq9.js",
|
|
95
|
-
"/_coffre/assets/useSuspenseQuery-BZ-nzHST.js",
|
|
96
|
-
"/_coffre/assets/use-action-BpzKWhgg.js",
|
|
97
|
-
"/_coffre/assets/principal-page-DLho8TSJ.js"
|
|
98
|
-
]
|
|
99
|
-
},
|
|
100
|
-
"/users/$user": {
|
|
101
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/users.$user.tsx",
|
|
102
|
-
children: void 0,
|
|
103
|
-
preloads: ["/_coffre/assets/users._user-Bb3BGYHl.js", "/_coffre/assets/principal-page-DLho8TSJ.js"]
|
|
104
|
-
},
|
|
105
|
-
"/projects/": {
|
|
106
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/projects.index.tsx",
|
|
107
|
-
children: void 0,
|
|
108
|
-
preloads: [
|
|
109
|
-
"/_coffre/assets/projects.index-BDn7Bhoo.js",
|
|
110
|
-
"/_coffre/assets/use-change-CKj3Inq9.js",
|
|
111
|
-
"/_coffre/assets/useSuspenseQuery-BZ-nzHST.js",
|
|
112
|
-
"/_coffre/assets/validation-9Cl_XS-l.js"
|
|
113
|
-
]
|
|
114
|
-
},
|
|
115
|
-
"/tokens/": {
|
|
116
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/tokens.index.tsx",
|
|
117
|
-
children: void 0,
|
|
118
|
-
preloads: [
|
|
119
|
-
"/_coffre/assets/tokens.index-CcXSZnAG.js",
|
|
120
|
-
"/_coffre/assets/useSuspenseQuery-BZ-nzHST.js",
|
|
121
|
-
"/_coffre/assets/directory-H8Eh3MnS.js",
|
|
122
|
-
"/_coffre/assets/offboarding-Bwpftp3g.js"
|
|
123
|
-
]
|
|
124
|
-
},
|
|
125
|
-
"/users/": {
|
|
126
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/users.index.tsx",
|
|
127
|
-
children: void 0,
|
|
128
|
-
preloads: [
|
|
129
|
-
"/_coffre/assets/users.index-BvzP3qwW.js",
|
|
130
|
-
"/_coffre/assets/useSuspenseQuery-BZ-nzHST.js",
|
|
131
|
-
"/_coffre/assets/directory-H8Eh3MnS.js",
|
|
132
|
-
"/_coffre/assets/offboarding-Bwpftp3g.js"
|
|
133
|
-
]
|
|
134
|
-
},
|
|
135
|
-
"/projects/$project/$environment": {
|
|
136
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/projects.$project.$environment.tsx",
|
|
137
|
-
children: void 0,
|
|
138
|
-
preloads: [
|
|
139
|
-
"/_coffre/assets/projects._project._environment-DHRRvQw0.js",
|
|
140
|
-
"/_coffre/assets/use-change-CKj3Inq9.js",
|
|
141
|
-
"/_coffre/assets/useSuspenseQuery-BZ-nzHST.js",
|
|
142
|
-
"/_coffre/assets/use-action-BpzKWhgg.js",
|
|
143
|
-
"/_coffre/assets/validation-9Cl_XS-l.js"
|
|
144
|
-
]
|
|
145
|
-
},
|
|
146
|
-
"/projects/$project/": {
|
|
147
|
-
filePath: "/home/runner/work/coffre/coffre/packages/ui/src/routes/projects.$project.index.tsx",
|
|
148
|
-
children: void 0,
|
|
149
|
-
preloads: [
|
|
150
|
-
"/_coffre/assets/projects._project.index-DGl921dP.js",
|
|
151
|
-
"/_coffre/assets/use-change-CKj3Inq9.js",
|
|
152
|
-
"/_coffre/assets/useSuspenseQuery-BZ-nzHST.js",
|
|
153
|
-
"/_coffre/assets/useQuery-B-lxFSES.js",
|
|
154
|
-
"/_coffre/assets/directory-H8Eh3MnS.js",
|
|
155
|
-
"/_coffre/assets/use-action-BpzKWhgg.js",
|
|
156
|
-
"/_coffre/assets/validation-9Cl_XS-l.js",
|
|
157
|
-
"/_coffre/assets/grants-DPDxJXU1.js"
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
} });
|
|
161
|
-
//#endregion
|
|
162
|
-
export { tsrStartManifest };
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
import { i as require_react, r as require_jsx_runtime, s as __toESM } from "./useRouter-CaUSUNsw.js";
|
|
2
|
-
import { C as useCoffre, h as queries, i as PageHeader, r as Fact, t as Card } from "./page-D6n45dcK.js";
|
|
3
|
-
import { C as unlinkIdentity, n as useChangeStatus, t as useChange, u as endSession } from "./use-change-C8BCf3oU.js";
|
|
4
|
-
import { n as useSuspenseQueries, t as useShell } from "./use-shell-DwOzEi87.js";
|
|
5
|
-
import { a as ErrorLine, i as EmptyState, l as Timestamp, s as Notice, t as ConfirmButton } from "./ui-Cc0CGMtr.js";
|
|
6
|
-
import { B as Terminal, E as Monitor, G as X, L as SignOut, M as ProviderMark } from "./icons-DOFT-eWB.js";
|
|
7
|
-
import { n as ThemeCards, t as Route } from "./account-hk6wcIXU.js";
|
|
8
|
-
import { a as rowClass, i as RowPending, r as RowFailure } from "./row-state-C2P57xT1.js";
|
|
9
|
-
import { r as InstanceRole } from "./directory-B-_rqsPx.js";
|
|
10
|
-
import { t as signinErrorMessage } from "./signin-errors-BEFlVDbQ.js";
|
|
11
|
-
//#region src/routes/account.tsx?tsr-split=component
|
|
12
|
-
/**
|
|
13
|
-
* Your own settings: how coffre looks here, who it takes you for and, when
|
|
14
|
-
* coffre runs its own sign-in, which accounts you sign in with and where you
|
|
15
|
-
* are signed in. The sidebar's Settings is the instance's; this page is
|
|
16
|
-
* reached from your account at the sidebar's foot.
|
|
17
|
-
*/
|
|
18
|
-
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
19
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
20
|
-
function AccountPage() {
|
|
21
|
-
const { principal, instanceRole, auth } = useShell();
|
|
22
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
23
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeader, {
|
|
24
|
-
title: "Account",
|
|
25
|
-
actions: principal !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignOutButton, {})
|
|
26
|
-
}),
|
|
27
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
28
|
-
labelledBy: "appearance",
|
|
29
|
-
title: "Appearance",
|
|
30
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
31
|
-
className: "card-body",
|
|
32
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeCards, {})
|
|
33
|
-
})
|
|
34
|
-
}),
|
|
35
|
-
principal !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
36
|
-
labelledBy: "identity",
|
|
37
|
-
title: "Identity",
|
|
38
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
|
|
39
|
-
className: "facts",
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fact, {
|
|
42
|
-
label: principal.type === "user" ? "Email" : "Name",
|
|
43
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
44
|
-
className: "mono",
|
|
45
|
-
children: principal.id
|
|
46
|
-
})
|
|
47
|
-
}),
|
|
48
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fact, {
|
|
49
|
-
label: "Kind",
|
|
50
|
-
children: principal.type === "user" ? "User" : "Token"
|
|
51
|
-
}),
|
|
52
|
-
principal.type === "user" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fact, {
|
|
53
|
-
label: "Instance role",
|
|
54
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InstanceRole, { principal: {
|
|
55
|
-
principalType: "user",
|
|
56
|
-
principalId: principal.id,
|
|
57
|
-
instanceRole: instanceRole ?? "user",
|
|
58
|
-
isRootAdmin: instanceRole === "root-admin"
|
|
59
|
-
} })
|
|
60
|
-
})
|
|
61
|
-
]
|
|
62
|
-
})
|
|
63
|
-
}),
|
|
64
|
-
auth.signin !== null && principal?.type === "user" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignIn, {
|
|
65
|
-
email: principal.id,
|
|
66
|
-
providers: auth.signin.providers
|
|
67
|
-
})
|
|
68
|
-
] });
|
|
69
|
-
}
|
|
70
|
-
/** Which accounts you sign in with, and where you are signed in. */
|
|
71
|
-
function SignIn({ email, providers }) {
|
|
72
|
-
const client = useCoffre();
|
|
73
|
-
const [{ data: identities }, { data: sessions }] = useSuspenseQueries({ queries: [queries.identities(client), queries.sessions(client)] });
|
|
74
|
-
if (!identities.ok) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error: identities.error });
|
|
75
|
-
if (!sessions.ok) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error: sessions.error });
|
|
76
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SigninAccounts, {
|
|
77
|
-
email,
|
|
78
|
-
providers,
|
|
79
|
-
identities: identities.identities
|
|
80
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Sessions, {
|
|
81
|
-
sessions: sessions.sessions,
|
|
82
|
-
providers
|
|
83
|
-
})] });
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Sign-out is a form post: a GET could be triggered by any image tag on any
|
|
87
|
-
* page, and the server's origin check covers form posts.
|
|
88
|
-
*/
|
|
89
|
-
function SignOutButton() {
|
|
90
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("form", {
|
|
91
|
-
method: "post",
|
|
92
|
-
action: "/auth/signout",
|
|
93
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
94
|
-
className: "btn",
|
|
95
|
-
type: "submit",
|
|
96
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignOut, { size: 14 }), "Sign out"]
|
|
97
|
-
})
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function providerLabel(providers, id) {
|
|
101
|
-
return providers.find((provider) => provider.id === id)?.label ?? id ?? "unknown";
|
|
102
|
-
}
|
|
103
|
-
function SigninAccounts({ email, providers, identities }) {
|
|
104
|
-
const { linked, error } = Route.useSearch();
|
|
105
|
-
const message = signinErrorMessage(error);
|
|
106
|
-
const change = unlinkIdentity(useCoffre());
|
|
107
|
-
const unlink = useChange(change);
|
|
108
|
-
const { status, dismiss } = useChangeStatus(change.list.queryKey);
|
|
109
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
|
|
110
|
-
labelledBy: "signin-accounts",
|
|
111
|
-
title: "Sign-in accounts",
|
|
112
|
-
description: "coffre recognises you by these accounts, never by an email address alone. A new account is linked here, while you are signed in.",
|
|
113
|
-
children: [
|
|
114
|
-
(linked !== void 0 || message !== null) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
115
|
-
className: "card-body",
|
|
116
|
-
children: [linked !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Notice, {
|
|
117
|
-
tone: "good",
|
|
118
|
-
children: [providerLabel(providers, linked), " account linked."]
|
|
119
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error: message })]
|
|
120
|
-
}),
|
|
121
|
-
identities.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyState, {
|
|
122
|
-
title: "No account linked",
|
|
123
|
-
children: [
|
|
124
|
-
"Your next sign-in with a verified ",
|
|
125
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
126
|
-
className: "mono",
|
|
127
|
-
children: email
|
|
128
|
-
}),
|
|
129
|
-
" links that account."
|
|
130
|
-
]
|
|
131
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
132
|
-
className: "dt-wrap",
|
|
133
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
|
|
134
|
-
className: "dt",
|
|
135
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
|
|
136
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Account" }),
|
|
137
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
138
|
-
className: "col-shrink",
|
|
139
|
-
children: "Linked (UTC)"
|
|
140
|
-
}),
|
|
141
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
142
|
-
className: "col-shrink",
|
|
143
|
-
children: "Last sign-in"
|
|
144
|
-
}),
|
|
145
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
146
|
-
className: "col-actions",
|
|
147
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
148
|
-
className: "visually-hidden",
|
|
149
|
-
children: "Actions"
|
|
150
|
-
})
|
|
151
|
-
})
|
|
152
|
-
] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: identities.map((identity) => {
|
|
153
|
-
const label = providerLabel(providers, identity.provider);
|
|
154
|
-
const brand = providers.find((p) => p.id === identity.provider)?.brand ?? "oidc";
|
|
155
|
-
const state = status(identity.id);
|
|
156
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
|
|
157
|
-
className: rowClass(state),
|
|
158
|
-
children: [
|
|
159
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
160
|
-
className: "cell-account",
|
|
161
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProviderMark, { brand }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
162
|
-
className: "cell-stack",
|
|
163
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: label }), identity.email !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", {
|
|
164
|
-
className: "mono",
|
|
165
|
-
children: identity.email
|
|
166
|
-
})]
|
|
167
|
-
})]
|
|
168
|
-
}) }),
|
|
169
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
170
|
-
className: "nowrap",
|
|
171
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, { iso: identity.createdAt })
|
|
172
|
-
}),
|
|
173
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
174
|
-
className: "nowrap cell-muted",
|
|
175
|
-
children: identity.lastSignInAt === null ? "Never" : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, {
|
|
176
|
-
iso: identity.lastSignInAt,
|
|
177
|
-
display: "relative"
|
|
178
|
-
})
|
|
179
|
-
}),
|
|
180
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
181
|
-
className: "col-actions",
|
|
182
|
-
children: state.state === "pending" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RowPending, { status: state }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfirmButton, {
|
|
183
|
-
trigger: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
184
|
-
className: "act",
|
|
185
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(X, { size: 13 }), "Unlink"]
|
|
186
|
-
}),
|
|
187
|
-
title: `Unlink this ${label} account?`,
|
|
188
|
-
body: identities.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
189
|
-
"It stops signing you in, and every session it opened ends now, this one included if you signed in with it. Your next sign-in with any account whose verified email is",
|
|
190
|
-
" ",
|
|
191
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
192
|
-
className: "mono",
|
|
193
|
-
children: email
|
|
194
|
-
}),
|
|
195
|
-
" links that account instead."
|
|
196
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: "It stops signing you in, and every session it opened ends now, this one included if you signed in with it." }),
|
|
197
|
-
confirmLabel: "Unlink",
|
|
198
|
-
onConfirm: () => unlink({
|
|
199
|
-
...identity,
|
|
200
|
-
label
|
|
201
|
-
})
|
|
202
|
-
})
|
|
203
|
-
})
|
|
204
|
-
]
|
|
205
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RowFailure, {
|
|
206
|
-
status: state,
|
|
207
|
-
columns: 4,
|
|
208
|
-
onDismiss: () => state.state === "failed" && dismiss(state.mutationId)
|
|
209
|
-
})] }, identity.id);
|
|
210
|
-
}) })]
|
|
211
|
-
})
|
|
212
|
-
}),
|
|
213
|
-
providers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
214
|
-
className: "card-foot",
|
|
215
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
216
|
-
className: "hint",
|
|
217
|
-
children: "Link another account"
|
|
218
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
219
|
-
className: "link-providers",
|
|
220
|
-
children: providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
|
|
221
|
-
className: "btn btn-sm",
|
|
222
|
-
href: `/auth/signin/${encodeURIComponent(provider.id)}?link=1`,
|
|
223
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProviderMark, {
|
|
224
|
-
brand: provider.brand,
|
|
225
|
-
size: 14
|
|
226
|
-
}), provider.label]
|
|
227
|
-
}, provider.id))
|
|
228
|
-
})]
|
|
229
|
-
})
|
|
230
|
-
]
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
function Sessions({ sessions, providers }) {
|
|
234
|
-
const change = endSession(useCoffre());
|
|
235
|
-
const end = useChange(change);
|
|
236
|
-
const { status, dismiss } = useChangeStatus(change.list.queryKey);
|
|
237
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
|
|
238
|
-
labelledBy: "sessions",
|
|
239
|
-
title: "Sessions",
|
|
240
|
-
description: "Browsers and command lines signed in as you. Ending one signs it out at its next request.",
|
|
241
|
-
children: sessions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyState, {
|
|
242
|
-
title: "No sessions",
|
|
243
|
-
children: "Nothing is signed in as you right now."
|
|
244
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
245
|
-
className: "dt-wrap",
|
|
246
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
|
|
247
|
-
className: "dt",
|
|
248
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
|
|
249
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Where" }),
|
|
250
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
251
|
-
className: "col-shrink",
|
|
252
|
-
children: "Last active"
|
|
253
|
-
}),
|
|
254
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
255
|
-
className: "col-shrink",
|
|
256
|
-
children: "Expires"
|
|
257
|
-
}),
|
|
258
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
259
|
-
className: "col-actions",
|
|
260
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
261
|
-
className: "visually-hidden",
|
|
262
|
-
children: "Actions"
|
|
263
|
-
})
|
|
264
|
-
})
|
|
265
|
-
] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: sessions.map((session) => {
|
|
266
|
-
const state = status(session.id);
|
|
267
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
|
|
268
|
-
className: rowClass(state),
|
|
269
|
-
children: [
|
|
270
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
271
|
-
className: "cell-account",
|
|
272
|
-
children: [session.kind === "cli" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Terminal, { size: 15 }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Monitor, { size: 15 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
273
|
-
className: "cell-stack",
|
|
274
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
|
|
275
|
-
session.label ?? (session.kind === "cli" ? "Command line" : "Browser"),
|
|
276
|
-
" ",
|
|
277
|
-
session.current && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
278
|
-
className: "tag tag-blue",
|
|
279
|
-
children: "this browser"
|
|
280
|
-
})
|
|
281
|
-
] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("small", { children: [session.kind === "cli" ? "coffre login" : `via ${providerLabel(providers, session.provider)}`, session.lastUsedIp !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [" · ", /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
282
|
-
className: "mono",
|
|
283
|
-
children: session.lastUsedIp
|
|
284
|
-
})] })] })]
|
|
285
|
-
})]
|
|
286
|
-
}) }),
|
|
287
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
288
|
-
className: "nowrap cell-muted",
|
|
289
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, {
|
|
290
|
-
iso: session.lastUsedAt ?? session.createdAt,
|
|
291
|
-
display: "relative"
|
|
292
|
-
})
|
|
293
|
-
}),
|
|
294
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
295
|
-
className: "nowrap cell-muted",
|
|
296
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, {
|
|
297
|
-
iso: session.expiresAt,
|
|
298
|
-
display: "relative"
|
|
299
|
-
})
|
|
300
|
-
}),
|
|
301
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
302
|
-
className: "col-actions",
|
|
303
|
-
children: session.current ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("form", {
|
|
304
|
-
method: "post",
|
|
305
|
-
action: "/auth/signout",
|
|
306
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
307
|
-
className: "act",
|
|
308
|
-
type: "submit",
|
|
309
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignOut, { size: 13 }), "Sign out"]
|
|
310
|
-
})
|
|
311
|
-
}) : state.state === "pending" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RowPending, { status: state }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
312
|
-
className: "act",
|
|
313
|
-
onClick: () => end(session),
|
|
314
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(X, { size: 13 }), "End"]
|
|
315
|
-
})
|
|
316
|
-
})
|
|
317
|
-
]
|
|
318
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RowFailure, {
|
|
319
|
-
status: state,
|
|
320
|
-
columns: 4,
|
|
321
|
-
onDismiss: () => state.state === "failed" && dismiss(state.mutationId)
|
|
322
|
-
})] }, session.id);
|
|
323
|
-
}) })]
|
|
324
|
-
})
|
|
325
|
-
})
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
//#endregion
|
|
329
|
-
export { AccountPage as component };
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { i as require_react, r as require_jsx_runtime, s as __toESM } from "./useRouter-CaUSUNsw.js";
|
|
2
|
-
import { n as createFileRoute, t as lazyRouteComponent } from "./lazyRouteComponent-CqBNCGuZ.js";
|
|
3
|
-
import { f as loadShell, h as queries } from "./page-D6n45dcK.js";
|
|
4
|
-
import { h as dropdown_menu_exports } from "./ui-Cc0CGMtr.js";
|
|
5
|
-
import { D as Moon, E as Monitor, a as Check, z as Sun } from "./icons-DOFT-eWB.js";
|
|
6
|
-
//#region src/components/theme.tsx
|
|
7
|
-
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
8
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
9
|
-
var STORAGE_KEY = "coffre-theme";
|
|
10
|
-
var CHANGE_EVENT = "coffre-theme-change";
|
|
11
|
-
/**
|
|
12
|
-
* Applied before first paint, inlined in <head>.
|
|
13
|
-
*
|
|
14
|
-
* Without this the page renders in the system palette and then snaps to the
|
|
15
|
-
* stored choice once React hydrates -- a full-screen flash on every load for
|
|
16
|
-
* anyone who overrode it. Kept as a string so it runs synchronously; there is
|
|
17
|
-
* no way to do this correctly from a component.
|
|
18
|
-
*/
|
|
19
|
-
var themeBootScript = `(function(){try{var t=localStorage.getItem(${JSON.stringify(STORAGE_KEY)});if(t==="light"||t==="dark"){document.documentElement.setAttribute("data-theme",t)}}catch(e){}})()`;
|
|
20
|
-
function stored() {
|
|
21
|
-
try {
|
|
22
|
-
const value = localStorage.getItem(STORAGE_KEY);
|
|
23
|
-
return value === "light" || value === "dark" ? value : "system";
|
|
24
|
-
} catch {
|
|
25
|
-
return "system";
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function apply(theme) {
|
|
29
|
-
const root = document.documentElement;
|
|
30
|
-
try {
|
|
31
|
-
if (theme === "system") localStorage.removeItem(STORAGE_KEY);
|
|
32
|
-
else localStorage.setItem(STORAGE_KEY, theme);
|
|
33
|
-
} catch {}
|
|
34
|
-
if (theme === "system") root.removeAttribute("data-theme");
|
|
35
|
-
else root.setAttribute("data-theme", theme);
|
|
36
|
-
window.dispatchEvent(new CustomEvent(CHANGE_EVENT));
|
|
37
|
-
}
|
|
38
|
-
var OPTIONS = [
|
|
39
|
-
{
|
|
40
|
-
value: "system",
|
|
41
|
-
label: "Match system",
|
|
42
|
-
Icon: Monitor
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
value: "light",
|
|
46
|
-
label: "Light",
|
|
47
|
-
Icon: Sun
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
value: "dark",
|
|
51
|
-
label: "Dark",
|
|
52
|
-
Icon: Moon
|
|
53
|
-
}
|
|
54
|
-
];
|
|
55
|
-
/**
|
|
56
|
-
* The stored choice, kept in step with changes made elsewhere (the command
|
|
57
|
-
* palette, another tab).
|
|
58
|
-
*
|
|
59
|
-
* Server-rendered markup cannot know the stored preference, so it starts on
|
|
60
|
-
* "system" and corrects itself on mount. Any other approach hydration-mismatches.
|
|
61
|
-
*/
|
|
62
|
-
function useTheme() {
|
|
63
|
-
const [theme, setThemeState] = (0, import_react.useState)("system");
|
|
64
|
-
(0, import_react.useEffect)(() => {
|
|
65
|
-
const sync = () => setThemeState(stored());
|
|
66
|
-
sync();
|
|
67
|
-
window.addEventListener(CHANGE_EVENT, sync);
|
|
68
|
-
window.addEventListener("storage", sync);
|
|
69
|
-
return () => {
|
|
70
|
-
window.removeEventListener(CHANGE_EVENT, sync);
|
|
71
|
-
window.removeEventListener("storage", sync);
|
|
72
|
-
};
|
|
73
|
-
}, []);
|
|
74
|
-
return theme;
|
|
75
|
-
}
|
|
76
|
-
/** The theme as a radio group inside a dropdown menu (the account menu). */
|
|
77
|
-
function ThemeMenuItems() {
|
|
78
|
-
const theme = useTheme();
|
|
79
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(dropdown_menu_exports.RadioGroup, {
|
|
80
|
-
value: theme,
|
|
81
|
-
onValueChange: (value) => apply(value),
|
|
82
|
-
children: OPTIONS.map(({ value, label, Icon }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(dropdown_menu_exports.RadioItem, {
|
|
83
|
-
value,
|
|
84
|
-
className: "menu-item",
|
|
85
|
-
children: [
|
|
86
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: 15 }),
|
|
87
|
-
label,
|
|
88
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(dropdown_menu_exports.ItemIndicator, {
|
|
89
|
-
className: "menu-check",
|
|
90
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Check, { size: 14 })
|
|
91
|
-
})
|
|
92
|
-
]
|
|
93
|
-
}, value))
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Three glyphs, one of them pressed, for pages without the account menu.
|
|
98
|
-
* A menu for a three-way choice costs a click to find out the current value.
|
|
99
|
-
*/
|
|
100
|
-
function ThemeToggle() {
|
|
101
|
-
const theme = useTheme();
|
|
102
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
103
|
-
className: "theme-choice",
|
|
104
|
-
role: "group",
|
|
105
|
-
"aria-label": "Colour scheme",
|
|
106
|
-
children: OPTIONS.map(({ value, label, Icon }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
107
|
-
type: "button",
|
|
108
|
-
"aria-pressed": theme === value,
|
|
109
|
-
"aria-label": label,
|
|
110
|
-
title: label,
|
|
111
|
-
onClick: () => apply(value),
|
|
112
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: 14 })
|
|
113
|
-
}, value))
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
/** Imperative theme setter, so the command palette can offer the same options. */
|
|
117
|
-
function setTheme(theme) {
|
|
118
|
-
apply(theme);
|
|
119
|
-
}
|
|
120
|
-
/** The theme as three large choices, for the Settings page. */
|
|
121
|
-
function ThemeCards() {
|
|
122
|
-
const theme = useTheme();
|
|
123
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
124
|
-
className: "choice-grid",
|
|
125
|
-
role: "group",
|
|
126
|
-
"aria-label": "Colour scheme",
|
|
127
|
-
children: OPTIONS.map(({ value, label, Icon }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
128
|
-
type: "button",
|
|
129
|
-
className: "choice",
|
|
130
|
-
"aria-pressed": theme === value,
|
|
131
|
-
onClick: () => apply(value),
|
|
132
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: 16 }), label]
|
|
133
|
-
}, value))
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/routes/account.tsx
|
|
138
|
-
var $$splitComponentImporter = () => import("./account-CV-a2IU2.js");
|
|
139
|
-
/**
|
|
140
|
-
* Your own settings: how coffre looks here, who it takes you for and, when
|
|
141
|
-
* coffre runs its own sign-in, which accounts you sign in with and where you
|
|
142
|
-
* are signed in. The sidebar's Settings is the instance's; this page is
|
|
143
|
-
* reached from your account at the sidebar's foot.
|
|
144
|
-
*/
|
|
145
|
-
var Route = createFileRoute("/account")({
|
|
146
|
-
validateSearch: (search) => {
|
|
147
|
-
const out = {};
|
|
148
|
-
for (const name of ["linked", "error"]) {
|
|
149
|
-
const value = search[name];
|
|
150
|
-
if (typeof value === "string" && /^[a-z0-9_-]{1,40}$/.test(value)) out[name] = value;
|
|
151
|
-
}
|
|
152
|
-
return out;
|
|
153
|
-
},
|
|
154
|
-
loader: async ({ context: { client, queryClient } }) => {
|
|
155
|
-
const shell = await loadShell(queryClient, client);
|
|
156
|
-
if (shell.auth.signin === null || shell.principal?.type !== "user") return;
|
|
157
|
-
await Promise.all([queryClient.fetchQuery(queries.identities(client)), queryClient.fetchQuery(queries.sessions(client))]);
|
|
158
|
-
},
|
|
159
|
-
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
160
|
-
});
|
|
161
|
-
//#endregion
|
|
162
|
-
export { setTheme as a, ThemeToggle as i, ThemeCards as n, themeBootScript as o, ThemeMenuItems as r, Route as t };
|