mirror of
https://github.com/unraid/api.git
synced 2026-01-03 23:19:54 -06:00
fix: extract callbacks to library (#1280)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated environment configuration to enhance secure handling. - Integrated a shared dependency for consistent callback management. - **Refactor** - Streamlined callback actions management for improved performance. - Upgraded the operating system version from a beta release to stable (7.0.0), delivering enhanced reliability. - Centralized callback actions store usage across components for better state management. - Removed deprecated callback management code to improve clarity and maintainability. - **New Features** - Introduced a new redirect component to enhance user navigation experience. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Eli Bosley <ekbosley@gmail.com> Co-authored-by: Zack Spear <hi@zackspear.com>
This commit is contained in:
130
pnpm-lock.yaml
generated
130
pnpm-lock.yaml
generated
@@ -698,6 +698,9 @@ importers:
|
|||||||
'@pinia/nuxt':
|
'@pinia/nuxt':
|
||||||
specifier: ^0.10.0
|
specifier: ^0.10.0
|
||||||
version: 0.10.1(magicast@0.3.5)(pinia@3.0.1(typescript@5.8.2)(vue@3.5.13(typescript@5.8.2)))
|
version: 0.10.1(magicast@0.3.5)(pinia@3.0.1(typescript@5.8.2)(vue@3.5.13(typescript@5.8.2)))
|
||||||
|
'@unraid/shared-callbacks':
|
||||||
|
specifier: ^1.0.1
|
||||||
|
version: 1.0.1(@vueuse/core@13.0.0(vue@3.5.13(typescript@5.8.2)))
|
||||||
'@unraid/ui':
|
'@unraid/ui':
|
||||||
specifier: link:../unraid-ui
|
specifier: link:../unraid-ui
|
||||||
version: link:../unraid-ui
|
version: link:../unraid-ui
|
||||||
@@ -3769,8 +3772,14 @@ packages:
|
|||||||
'@unraid/libvirt@1.1.3':
|
'@unraid/libvirt@1.1.3':
|
||||||
resolution: {integrity: sha512-aZNHkwgQ/0e+5BE7i3Ru4GC3Ev8fEUlnU0wmTcuSbpN0r74rMpiGwzA/4cqIJU8X+Kj//I80pkUufzXzHmMWwQ==}
|
resolution: {integrity: sha512-aZNHkwgQ/0e+5BE7i3Ru4GC3Ev8fEUlnU0wmTcuSbpN0r74rMpiGwzA/4cqIJU8X+Kj//I80pkUufzXzHmMWwQ==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
|
cpu: [x64, arm64]
|
||||||
os: [linux, darwin]
|
os: [linux, darwin]
|
||||||
|
|
||||||
|
'@unraid/shared-callbacks@1.0.1':
|
||||||
|
resolution: {integrity: sha512-dBUsfCShYzSVHjRMSVXhfu81GKJqLTKKSbfGcKAFScI2Po+GL3ITcI5gaGFryiIzfR2mlIsRCgul+1y8nYNrzA==}
|
||||||
|
peerDependencies:
|
||||||
|
'@vueuse/core': ^10.9.0
|
||||||
|
|
||||||
'@unraid/tailwind-rem-to-rem@1.1.0':
|
'@unraid/tailwind-rem-to-rem@1.1.0':
|
||||||
resolution: {integrity: sha512-lc5tqdSs5zwBStlC18lK+pg+iX0/i/JtO8qWOqHNT5KHt66Ba6nwDr+mfKekQq7Bsi8noXMBQJDB5b2J/OmDsw==}
|
resolution: {integrity: sha512-lc5tqdSs5zwBStlC18lK+pg+iX0/i/JtO8qWOqHNT5KHt66Ba6nwDr+mfKekQq7Bsi8noXMBQJDB5b2J/OmDsw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -9317,6 +9326,7 @@ packages:
|
|||||||
engines: {node: '>=0.6.0', teleport: '>=0.2.0'}
|
engines: {node: '>=0.6.0', teleport: '>=0.2.0'}
|
||||||
deprecated: |-
|
deprecated: |-
|
||||||
You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
|
You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
|
||||||
|
|
||||||
(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
|
(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
|
||||||
|
|
||||||
qs@6.13.0:
|
qs@6.13.0:
|
||||||
@@ -11745,7 +11755,7 @@ snapshots:
|
|||||||
'@babel/traverse': 7.26.10
|
'@babel/traverse': 7.26.10
|
||||||
'@babel/types': 7.26.10
|
'@babel/types': 7.26.10
|
||||||
convert-source-map: 2.0.0
|
convert-source-map: 2.0.0
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
gensync: 1.0.0-beta.2
|
gensync: 1.0.0-beta.2
|
||||||
json5: 2.2.3
|
json5: 2.2.3
|
||||||
semver: 6.3.1
|
semver: 6.3.1
|
||||||
@@ -12120,7 +12130,7 @@ snapshots:
|
|||||||
'@babel/parser': 7.27.0
|
'@babel/parser': 7.27.0
|
||||||
'@babel/template': 7.26.9
|
'@babel/template': 7.26.9
|
||||||
'@babel/types': 7.26.10
|
'@babel/types': 7.26.10
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
globals: 11.12.0
|
globals: 11.12.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
@@ -12132,7 +12142,7 @@ snapshots:
|
|||||||
'@babel/parser': 7.26.8
|
'@babel/parser': 7.26.8
|
||||||
'@babel/template': 7.26.8
|
'@babel/template': 7.26.8
|
||||||
'@babel/types': 7.26.8
|
'@babel/types': 7.26.8
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
globals: 11.12.0
|
globals: 11.12.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
@@ -12450,7 +12460,7 @@ snapshots:
|
|||||||
'@eslint/config-array@0.19.2':
|
'@eslint/config-array@0.19.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint/object-schema': 2.1.6
|
'@eslint/object-schema': 2.1.6
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
minimatch: 3.1.2
|
minimatch: 3.1.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
@@ -12464,7 +12474,7 @@ snapshots:
|
|||||||
bundle-require: 5.1.0(esbuild@0.25.1)
|
bundle-require: 5.1.0(esbuild@0.25.1)
|
||||||
cac: 6.7.14
|
cac: 6.7.14
|
||||||
chokidar: 4.0.3
|
chokidar: 4.0.3
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
esbuild: 0.25.1
|
esbuild: 0.25.1
|
||||||
eslint: 9.23.0(jiti@2.4.2)
|
eslint: 9.23.0(jiti@2.4.2)
|
||||||
find-up: 7.0.0
|
find-up: 7.0.0
|
||||||
@@ -12487,7 +12497,7 @@ snapshots:
|
|||||||
'@eslint/eslintrc@3.3.1':
|
'@eslint/eslintrc@3.3.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
ajv: 6.12.6
|
ajv: 6.12.6
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
espree: 10.3.0
|
espree: 10.3.0
|
||||||
globals: 14.0.0
|
globals: 14.0.0
|
||||||
ignore: 5.3.2
|
ignore: 5.3.2
|
||||||
@@ -13058,12 +13068,12 @@ snapshots:
|
|||||||
'@types/js-yaml': 4.0.9
|
'@types/js-yaml': 4.0.9
|
||||||
'@whatwg-node/fetch': 0.10.3
|
'@whatwg-node/fetch': 0.10.3
|
||||||
chalk: 4.1.2
|
chalk: 4.1.2
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
dotenv: 16.4.7
|
dotenv: 16.4.7
|
||||||
graphql: 16.10.0
|
graphql: 16.10.0
|
||||||
graphql-request: 6.1.0(graphql@16.10.0)
|
graphql-request: 6.1.0(graphql@16.10.0)
|
||||||
http-proxy-agent: 7.0.2
|
http-proxy-agent: 7.0.2
|
||||||
https-proxy-agent: 7.0.6(supports-color@9.4.0)
|
https-proxy-agent: 7.0.6
|
||||||
jose: 5.10.0
|
jose: 5.10.0
|
||||||
js-yaml: 4.1.0
|
js-yaml: 4.1.0
|
||||||
lodash: 4.17.21
|
lodash: 4.17.21
|
||||||
@@ -13308,7 +13318,7 @@ snapshots:
|
|||||||
|
|
||||||
'@koa/router@12.0.2':
|
'@koa/router@12.0.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
http-errors: 2.0.0
|
http-errors: 2.0.0
|
||||||
koa-compose: 4.1.0
|
koa-compose: 4.1.0
|
||||||
methods: 1.1.2
|
methods: 1.1.2
|
||||||
@@ -13318,7 +13328,7 @@ snapshots:
|
|||||||
|
|
||||||
'@kwsites/file-exists@1.1.1':
|
'@kwsites/file-exists@1.1.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@@ -13359,7 +13369,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
consola: 3.4.2
|
consola: 3.4.2
|
||||||
detect-libc: 2.0.3
|
detect-libc: 2.0.3
|
||||||
https-proxy-agent: 7.0.6(supports-color@9.4.0)
|
https-proxy-agent: 7.0.6
|
||||||
node-fetch: 2.7.0
|
node-fetch: 2.7.0
|
||||||
nopt: 8.1.0
|
nopt: 8.1.0
|
||||||
semver: 7.7.1
|
semver: 7.7.1
|
||||||
@@ -14088,7 +14098,7 @@ snapshots:
|
|||||||
|
|
||||||
'@pm2/pm2-version-check@1.0.4':
|
'@pm2/pm2-version-check@1.0.4':
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@@ -14968,7 +14978,7 @@ snapshots:
|
|||||||
'@typescript-eslint/types': 8.28.0
|
'@typescript-eslint/types': 8.28.0
|
||||||
'@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.2)
|
'@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.2)
|
||||||
'@typescript-eslint/visitor-keys': 8.28.0
|
'@typescript-eslint/visitor-keys': 8.28.0
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
eslint: 9.23.0(jiti@2.4.2)
|
eslint: 9.23.0(jiti@2.4.2)
|
||||||
typescript: 5.8.2
|
typescript: 5.8.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -14983,7 +14993,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.2)
|
'@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.2)
|
||||||
'@typescript-eslint/utils': 8.28.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
|
'@typescript-eslint/utils': 8.28.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
eslint: 9.23.0(jiti@2.4.2)
|
eslint: 9.23.0(jiti@2.4.2)
|
||||||
ts-api-utils: 2.1.0(typescript@5.8.2)
|
ts-api-utils: 2.1.0(typescript@5.8.2)
|
||||||
typescript: 5.8.2
|
typescript: 5.8.2
|
||||||
@@ -14998,7 +15008,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 8.28.0
|
'@typescript-eslint/types': 8.28.0
|
||||||
'@typescript-eslint/visitor-keys': 8.28.0
|
'@typescript-eslint/visitor-keys': 8.28.0
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
fast-glob: 3.3.3
|
fast-glob: 3.3.3
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
minimatch: 9.0.5
|
minimatch: 9.0.5
|
||||||
@@ -15050,6 +15060,11 @@ snapshots:
|
|||||||
tsx: 4.19.3
|
tsx: 4.19.3
|
||||||
xml2js: 0.6.2
|
xml2js: 0.6.2
|
||||||
|
|
||||||
|
'@unraid/shared-callbacks@1.0.1(@vueuse/core@13.0.0(vue@3.5.13(typescript@5.8.2)))':
|
||||||
|
dependencies:
|
||||||
|
'@vueuse/core': 13.0.0(vue@3.5.13(typescript@5.8.2))
|
||||||
|
crypto-js: 4.2.0
|
||||||
|
|
||||||
'@unraid/tailwind-rem-to-rem@1.1.0(tailwindcss@3.4.17)':
|
'@unraid/tailwind-rem-to-rem@1.1.0(tailwindcss@3.4.17)':
|
||||||
dependencies:
|
dependencies:
|
||||||
tailwindcss: 3.4.17
|
tailwindcss: 3.4.17
|
||||||
@@ -15131,7 +15146,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@ampproject/remapping': 2.3.0
|
'@ampproject/remapping': 2.3.0
|
||||||
'@bcoe/v8-coverage': 1.0.2
|
'@bcoe/v8-coverage': 1.0.2
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
istanbul-lib-coverage: 3.2.2
|
istanbul-lib-coverage: 3.2.2
|
||||||
istanbul-lib-report: 3.0.1
|
istanbul-lib-report: 3.0.1
|
||||||
istanbul-lib-source-maps: 5.0.6
|
istanbul-lib-source-maps: 5.0.6
|
||||||
@@ -17164,14 +17179,14 @@ snapshots:
|
|||||||
|
|
||||||
docker-event-emitter@0.3.0(dockerode@3.3.5):
|
docker-event-emitter@0.3.0(dockerode@3.3.5):
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
dockerode: 3.3.5
|
dockerode: 3.3.5
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
docker-modem@3.0.8:
|
docker-modem@3.0.8:
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
readable-stream: 3.6.2
|
readable-stream: 3.6.2
|
||||||
split-ca: 1.0.1
|
split-ca: 1.0.1
|
||||||
ssh2: 1.16.0
|
ssh2: 1.16.0
|
||||||
@@ -17480,7 +17495,7 @@ snapshots:
|
|||||||
|
|
||||||
esbuild-register@3.6.0(esbuild@0.25.1):
|
esbuild-register@3.6.0(esbuild@0.25.1):
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
esbuild: 0.25.1
|
esbuild: 0.25.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
@@ -17645,7 +17660,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@types/doctrine': 0.0.9
|
'@types/doctrine': 0.0.9
|
||||||
'@typescript-eslint/utils': 8.28.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
|
'@typescript-eslint/utils': 8.28.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
doctrine: 3.0.0
|
doctrine: 3.0.0
|
||||||
eslint: 9.23.0(jiti@2.4.2)
|
eslint: 9.23.0(jiti@2.4.2)
|
||||||
eslint-import-resolver-node: 0.3.9
|
eslint-import-resolver-node: 0.3.9
|
||||||
@@ -17693,7 +17708,7 @@ snapshots:
|
|||||||
'@es-joy/jsdoccomment': 0.49.0
|
'@es-joy/jsdoccomment': 0.49.0
|
||||||
are-docs-informative: 0.0.2
|
are-docs-informative: 0.0.2
|
||||||
comment-parser: 1.4.1
|
comment-parser: 1.4.1
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
escape-string-regexp: 4.0.0
|
escape-string-regexp: 4.0.0
|
||||||
eslint: 9.23.0(jiti@2.4.2)
|
eslint: 9.23.0(jiti@2.4.2)
|
||||||
espree: 10.3.0
|
espree: 10.3.0
|
||||||
@@ -17819,7 +17834,7 @@ snapshots:
|
|||||||
ajv: 6.12.6
|
ajv: 6.12.6
|
||||||
chalk: 4.1.2
|
chalk: 4.1.2
|
||||||
cross-spawn: 7.0.6
|
cross-spawn: 7.0.6
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
escape-string-regexp: 4.0.0
|
escape-string-regexp: 4.0.0
|
||||||
eslint-scope: 8.3.0
|
eslint-scope: 8.3.0
|
||||||
eslint-visitor-keys: 4.2.0
|
eslint-visitor-keys: 4.2.0
|
||||||
@@ -18361,7 +18376,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
basic-ftp: 5.0.5
|
basic-ftp: 5.0.5
|
||||||
data-uri-to-buffer: 6.0.2
|
data-uri-to-buffer: 6.0.2
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@@ -18824,7 +18839,7 @@ snapshots:
|
|||||||
http-proxy-agent@7.0.2:
|
http-proxy-agent@7.0.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 7.1.3
|
agent-base: 7.1.3
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@@ -18868,6 +18883,13 @@ snapshots:
|
|||||||
quick-lru: 5.1.1
|
quick-lru: 5.1.1
|
||||||
resolve-alpn: 1.2.1
|
resolve-alpn: 1.2.1
|
||||||
|
|
||||||
|
https-proxy-agent@7.0.6:
|
||||||
|
dependencies:
|
||||||
|
agent-base: 7.1.3
|
||||||
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
https-proxy-agent@7.0.6(supports-color@9.4.0):
|
https-proxy-agent@7.0.6(supports-color@9.4.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 7.1.3
|
agent-base: 7.1.3
|
||||||
@@ -18918,7 +18940,7 @@ snapshots:
|
|||||||
importx@0.4.4:
|
importx@0.4.4:
|
||||||
dependencies:
|
dependencies:
|
||||||
bundle-require: 5.1.0(esbuild@0.23.1)
|
bundle-require: 5.1.0(esbuild@0.23.1)
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
esbuild: 0.23.1
|
esbuild: 0.23.1
|
||||||
jiti: 2.0.0-beta.3
|
jiti: 2.0.0-beta.3
|
||||||
jiti-v1: jiti@1.21.7
|
jiti-v1: jiti@1.21.7
|
||||||
@@ -19012,7 +19034,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@ioredis/commands': 1.2.0
|
'@ioredis/commands': 1.2.0
|
||||||
cluster-key-slot: 1.1.2
|
cluster-key-slot: 1.1.2
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
denque: 2.1.0
|
denque: 2.1.0
|
||||||
lodash.defaults: 4.2.0
|
lodash.defaults: 4.2.0
|
||||||
lodash.isarguments: 3.1.0
|
lodash.isarguments: 3.1.0
|
||||||
@@ -19299,7 +19321,7 @@ snapshots:
|
|||||||
istanbul-lib-source-maps@5.0.6:
|
istanbul-lib-source-maps@5.0.6:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@jridgewell/trace-mapping': 0.3.25
|
'@jridgewell/trace-mapping': 0.3.25
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
istanbul-lib-coverage: 3.2.2
|
istanbul-lib-coverage: 3.2.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
@@ -19386,7 +19408,7 @@ snapshots:
|
|||||||
form-data: 4.0.2
|
form-data: 4.0.2
|
||||||
html-encoding-sniffer: 4.0.0
|
html-encoding-sniffer: 4.0.0
|
||||||
http-proxy-agent: 7.0.2
|
http-proxy-agent: 7.0.2
|
||||||
https-proxy-agent: 7.0.6(supports-color@9.4.0)
|
https-proxy-agent: 7.0.6
|
||||||
is-potential-custom-element-name: 1.0.1
|
is-potential-custom-element-name: 1.0.1
|
||||||
nwsapi: 2.2.16
|
nwsapi: 2.2.16
|
||||||
parse5: 7.2.1
|
parse5: 7.2.1
|
||||||
@@ -19501,7 +19523,7 @@ snapshots:
|
|||||||
|
|
||||||
koa-send@5.0.1:
|
koa-send@5.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
http-errors: 1.8.1
|
http-errors: 1.8.1
|
||||||
resolve-path: 1.4.0
|
resolve-path: 1.4.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -19521,7 +19543,7 @@ snapshots:
|
|||||||
content-disposition: 0.5.4
|
content-disposition: 0.5.4
|
||||||
content-type: 1.0.5
|
content-type: 1.0.5
|
||||||
cookies: 0.9.1
|
cookies: 0.9.1
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
delegates: 1.0.0
|
delegates: 1.0.0
|
||||||
depd: 2.0.0
|
depd: 2.0.0
|
||||||
destroy: 1.2.0
|
destroy: 1.2.0
|
||||||
@@ -20636,10 +20658,10 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@tootallnate/quickjs-emscripten': 0.23.0
|
'@tootallnate/quickjs-emscripten': 0.23.0
|
||||||
agent-base: 7.1.3
|
agent-base: 7.1.3
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
get-uri: 6.0.4
|
get-uri: 6.0.4
|
||||||
http-proxy-agent: 7.0.2
|
http-proxy-agent: 7.0.2
|
||||||
https-proxy-agent: 7.0.6(supports-color@9.4.0)
|
https-proxy-agent: 7.0.6
|
||||||
pac-resolver: 7.0.1
|
pac-resolver: 7.0.1
|
||||||
socks-proxy-agent: 8.0.5
|
socks-proxy-agent: 8.0.5
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -20903,7 +20925,7 @@ snapshots:
|
|||||||
|
|
||||||
pm2-axon-rpc@0.7.1:
|
pm2-axon-rpc@0.7.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@@ -20911,7 +20933,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
amp: 0.3.1
|
amp: 0.3.1
|
||||||
amp-message: 0.1.2
|
amp-message: 0.1.2
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
escape-string-regexp: 4.0.0
|
escape-string-regexp: 4.0.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
@@ -20928,7 +20950,7 @@ snapshots:
|
|||||||
pm2-sysmonit@1.2.8:
|
pm2-sysmonit@1.2.8:
|
||||||
dependencies:
|
dependencies:
|
||||||
async: 3.2.6
|
async: 3.2.6
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
pidusage: 2.0.21
|
pidusage: 2.0.21
|
||||||
systeminformation: 5.25.11
|
systeminformation: 5.25.11
|
||||||
tx2: 1.0.5
|
tx2: 1.0.5
|
||||||
@@ -20950,7 +20972,7 @@ snapshots:
|
|||||||
commander: 2.15.1
|
commander: 2.15.1
|
||||||
croner: 4.1.97
|
croner: 4.1.97
|
||||||
dayjs: 1.11.13
|
dayjs: 1.11.13
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
enquirer: 2.3.6
|
enquirer: 2.3.6
|
||||||
eventemitter2: 5.0.1
|
eventemitter2: 5.0.1
|
||||||
fclone: 1.0.11
|
fclone: 1.0.11
|
||||||
@@ -20989,7 +21011,7 @@ snapshots:
|
|||||||
portfinder@1.0.35:
|
portfinder@1.0.35:
|
||||||
dependencies:
|
dependencies:
|
||||||
async: 3.2.6
|
async: 3.2.6
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@@ -21194,7 +21216,7 @@ snapshots:
|
|||||||
|
|
||||||
postcss-styl@0.12.3:
|
postcss-styl@0.12.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
fast-diff: 1.3.0
|
fast-diff: 1.3.0
|
||||||
lodash.sortedlastindex: 4.1.0
|
lodash.sortedlastindex: 4.1.0
|
||||||
postcss: 8.5.3
|
postcss: 8.5.3
|
||||||
@@ -21289,9 +21311,9 @@ snapshots:
|
|||||||
proxy-agent@6.4.0:
|
proxy-agent@6.4.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 7.1.3
|
agent-base: 7.1.3
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
http-proxy-agent: 7.0.2
|
http-proxy-agent: 7.0.2
|
||||||
https-proxy-agent: 7.0.6(supports-color@9.4.0)
|
https-proxy-agent: 7.0.6
|
||||||
lru-cache: 7.18.3
|
lru-cache: 7.18.3
|
||||||
pac-proxy-agent: 7.1.0
|
pac-proxy-agent: 7.1.0
|
||||||
proxy-from-env: 1.1.0
|
proxy-from-env: 1.1.0
|
||||||
@@ -21678,7 +21700,7 @@ snapshots:
|
|||||||
|
|
||||||
require-in-the-middle@5.2.0:
|
require-in-the-middle@5.2.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
module-details-from-path: 1.0.3
|
module-details-from-path: 1.0.3
|
||||||
resolve: 1.22.10
|
resolve: 1.22.10
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -22082,7 +22104,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@kwsites/file-exists': 1.1.1
|
'@kwsites/file-exists': 1.1.1
|
||||||
'@kwsites/promise-deferred': 1.1.1
|
'@kwsites/promise-deferred': 1.1.1
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@@ -22140,7 +22162,7 @@ snapshots:
|
|||||||
socks-proxy-agent@8.0.5:
|
socks-proxy-agent@8.0.5:
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 7.1.3
|
agent-base: 7.1.3
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
socks: 2.8.4
|
socks: 2.8.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
@@ -22396,7 +22418,7 @@ snapshots:
|
|||||||
stylus@0.57.0:
|
stylus@0.57.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
css: 3.0.0
|
css: 3.0.0
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
glob: 7.2.3
|
glob: 7.2.3
|
||||||
safer-buffer: 2.1.2
|
safer-buffer: 2.1.2
|
||||||
sax: 1.2.4
|
sax: 1.2.4
|
||||||
@@ -23125,7 +23147,7 @@ snapshots:
|
|||||||
vite-node@3.0.9(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0):
|
vite-node@3.0.9(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
cac: 6.7.14
|
cac: 6.7.14
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
es-module-lexer: 1.6.0
|
es-module-lexer: 1.6.0
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
vite: 6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)
|
vite: 6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)
|
||||||
@@ -23167,7 +23189,7 @@ snapshots:
|
|||||||
'@microsoft/api-extractor': 7.43.0(@types/node@22.13.13)
|
'@microsoft/api-extractor': 7.43.0(@types/node@22.13.13)
|
||||||
'@rollup/pluginutils': 5.1.4(rollup@4.37.0)
|
'@rollup/pluginutils': 5.1.4(rollup@4.37.0)
|
||||||
'@vue/language-core': 1.8.27(typescript@5.8.2)
|
'@vue/language-core': 1.8.27(typescript@5.8.2)
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
kolorist: 1.8.0
|
kolorist: 1.8.0
|
||||||
magic-string: 0.30.17
|
magic-string: 0.30.17
|
||||||
typescript: 5.8.2
|
typescript: 5.8.2
|
||||||
@@ -23183,7 +23205,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@antfu/utils': 0.7.10
|
'@antfu/utils': 0.7.10
|
||||||
'@rollup/pluginutils': 5.1.4(rollup@4.37.0)
|
'@rollup/pluginutils': 5.1.4(rollup@4.37.0)
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
error-stack-parser-es: 0.1.5
|
error-stack-parser-es: 0.1.5
|
||||||
fs-extra: 11.3.0
|
fs-extra: 11.3.0
|
||||||
open: 10.1.0
|
open: 10.1.0
|
||||||
@@ -23198,7 +23220,7 @@ snapshots:
|
|||||||
vite-plugin-inspect@11.0.0(@nuxt/kit@3.16.1(magicast@0.3.5))(vite@6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)):
|
vite-plugin-inspect@11.0.0(@nuxt/kit@3.16.1(magicast@0.3.5))(vite@6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)):
|
||||||
dependencies:
|
dependencies:
|
||||||
ansis: 3.17.0
|
ansis: 3.17.0
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
error-stack-parser-es: 1.0.5
|
error-stack-parser-es: 1.0.5
|
||||||
ohash: 2.0.11
|
ohash: 2.0.11
|
||||||
open: 10.1.0
|
open: 10.1.0
|
||||||
@@ -23216,7 +23238,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 4.2.1
|
'@rollup/pluginutils': 4.2.1
|
||||||
chalk: 4.1.2
|
chalk: 4.1.2
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
vite: 6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)
|
vite: 6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@swc/core': 1.11.13(@swc/helpers@0.5.15)
|
'@swc/core': 1.11.13(@swc/helpers@0.5.15)
|
||||||
@@ -23269,7 +23291,7 @@ snapshots:
|
|||||||
vite-plugin-vuetify@2.1.0(vite@6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0))(vue@3.5.13(typescript@5.8.2))(vuetify@3.7.18):
|
vite-plugin-vuetify@2.1.0(vite@6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0))(vue@3.5.13(typescript@5.8.2))(vuetify@3.7.18):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vuetify/loader-shared': 2.1.0(vue@3.5.13(typescript@5.8.2))(vuetify@3.7.18)
|
'@vuetify/loader-shared': 2.1.0(vue@3.5.13(typescript@5.8.2))(vuetify@3.7.18)
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
upath: 2.0.1
|
upath: 2.0.1
|
||||||
vite: 6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)
|
vite: 6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)
|
||||||
vue: 3.5.13(typescript@5.8.2)
|
vue: 3.5.13(typescript@5.8.2)
|
||||||
@@ -23279,7 +23301,7 @@ snapshots:
|
|||||||
|
|
||||||
vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)):
|
vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@6.2.3(@types/node@22.13.13)(jiti@2.4.2)(stylus@0.57.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)):
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
globrex: 0.1.2
|
globrex: 0.1.2
|
||||||
tsconfck: 3.1.5(typescript@5.8.2)
|
tsconfck: 3.1.5(typescript@5.8.2)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
@@ -23312,7 +23334,7 @@ snapshots:
|
|||||||
'@vitest/spy': 3.0.9
|
'@vitest/spy': 3.0.9
|
||||||
'@vitest/utils': 3.0.9
|
'@vitest/utils': 3.0.9
|
||||||
chai: 5.2.0
|
chai: 5.2.0
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
expect-type: 1.2.0
|
expect-type: 1.2.0
|
||||||
magic-string: 0.30.17
|
magic-string: 0.30.17
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
@@ -23395,7 +23417,7 @@ snapshots:
|
|||||||
|
|
||||||
vue-eslint-parser@10.1.1(eslint@9.23.0(jiti@2.4.2)):
|
vue-eslint-parser@10.1.1(eslint@9.23.0(jiti@2.4.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
eslint: 9.23.0(jiti@2.4.2)
|
eslint: 9.23.0(jiti@2.4.2)
|
||||||
eslint-scope: 8.3.0
|
eslint-scope: 8.3.0
|
||||||
eslint-visitor-keys: 4.2.0
|
eslint-visitor-keys: 4.2.0
|
||||||
@@ -23408,7 +23430,7 @@ snapshots:
|
|||||||
|
|
||||||
vue-eslint-parser@9.4.3(eslint@9.23.0(jiti@2.4.2)):
|
vue-eslint-parser@9.4.3(eslint@9.23.0(jiti@2.4.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0(supports-color@9.4.0)
|
debug: 4.4.0(supports-color@5.5.0)
|
||||||
eslint: 9.23.0(jiti@2.4.2)
|
eslint: 9.23.0(jiti@2.4.2)
|
||||||
eslint-scope: 7.2.2
|
eslint-scope: 7.2.2
|
||||||
eslint-visitor-keys: 3.4.3
|
eslint-visitor-keys: 3.4.3
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ VITE_ACCOUNT=http://localhost:5555
|
|||||||
VITE_CONNECT=https://connect.myunraid.net
|
VITE_CONNECT=https://connect.myunraid.net
|
||||||
VITE_UNRAID_NET=https://unraid.ddev.site
|
VITE_UNRAID_NET=https://unraid.ddev.site
|
||||||
VITE_OS_RELEASES="https://releases.unraid.net/os"
|
VITE_OS_RELEASES="https://releases.unraid.net/os"
|
||||||
VITE_CALLBACK_KEY=aNotSoSecretKeyUsedToObfuscateQueryParams
|
VITE_CALLBACK_KEY=Uyv2o8e*FiQe8VeLekTqyX6Z*8XonB
|
||||||
VITE_ALLOW_CONSOLE_LOGS=true
|
VITE_ALLOW_CONSOLE_LOGS=true
|
||||||
# Base font size in pixels for Tailwind CSS. Used by the tailwind-rem-to-rem plugin to scale rem values.
|
# Base font size in pixels for Tailwind CSS. Used by the tailwind-rem-to-rem plugin to scale rem values.
|
||||||
# This lets us use rem's in our css instead of pixels while remaining webgui-compatible without additional hacks.
|
# This lets us use rem's in our css instead of pixels while remaining webgui-compatible without additional hacks.
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ switch (state) {
|
|||||||
// const connectPluginInstalled = 'dynamix.unraid.net.staging.plg';
|
// const connectPluginInstalled = 'dynamix.unraid.net.staging.plg';
|
||||||
const connectPluginInstalled = 'dynamix.unraid.net.staging.plg';
|
const connectPluginInstalled = 'dynamix.unraid.net.staging.plg';
|
||||||
|
|
||||||
const osVersion = '7.0.0-beta.2.10';
|
const osVersion = '7.0.0';
|
||||||
const osVersionBranch = 'stable';
|
const osVersionBranch = 'stable';
|
||||||
// const parsedRegExp = regExp ? dayjs(regExp).format('YYYY-MM-DD') : undefined;
|
// const parsedRegExp = regExp ? dayjs(regExp).format('YYYY-MM-DD') : undefined;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useCallbackStore } from '~/store/callbackActions';
|
import { useCallbackActionsStore } from '~/store/callbackActions';
|
||||||
|
|
||||||
const callbackStore = useCallbackStore();
|
const callbackStore = useCallbackActionsStore();
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
callbackStore.watcher();
|
callbackStore.watcher();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { devConfig } from '~/helpers/env';
|
|||||||
|
|
||||||
import type { Server } from '~/types/server';
|
import type { Server } from '~/types/server';
|
||||||
|
|
||||||
import { useCallbackActionsStore, useCallbackStore } from '~/store/callbackActions';
|
import { useCallbackActionsStore } from '~/store/callbackActions';
|
||||||
import { useServerStore } from '~/store/server';
|
import { useServerStore } from '~/store/server';
|
||||||
import { useThemeStore } from '~/store/theme';
|
import { useThemeStore } from '~/store/theme';
|
||||||
|
|
||||||
@@ -18,10 +18,10 @@ const props = defineProps<Props>();
|
|||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const callbackStore = useCallbackStore();
|
const callbackStore = useCallbackActionsStore();
|
||||||
const serverStore = useServerStore();
|
const serverStore = useServerStore();
|
||||||
|
|
||||||
const { callbackData } = storeToRefs(useCallbackActionsStore());
|
const { callbackData } = storeToRefs(callbackStore);
|
||||||
const { name, description, guid, keyfile, lanIp, connectPluginInstalled } = storeToRefs(serverStore);
|
const { name, description, guid, keyfile, lanIp, connectPluginInstalled } = storeToRefs(serverStore);
|
||||||
const { bannerGradient, theme } = storeToRefs(useThemeStore());
|
const { bannerGradient, theme } = storeToRefs(useThemeStore());
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
"@jsonforms/vue-vuetify": "^3.5.1",
|
"@jsonforms/vue-vuetify": "^3.5.1",
|
||||||
"@nuxtjs/color-mode": "^3.5.2",
|
"@nuxtjs/color-mode": "^3.5.2",
|
||||||
"@pinia/nuxt": "^0.10.0",
|
"@pinia/nuxt": "^0.10.0",
|
||||||
|
"@unraid/shared-callbacks": "^1.0.1",
|
||||||
"@unraid/ui": "link:../unraid-ui",
|
"@unraid/ui": "link:../unraid-ui",
|
||||||
"@vue/apollo-composable": "^4.2.1",
|
"@vue/apollo-composable": "^4.2.1",
|
||||||
"@vueuse/components": "^13.0.0",
|
"@vueuse/components": "^13.0.0",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { BrandButton, BrandLogo, Toaster } from '@unraid/ui';
|
|||||||
import { useDummyServerStore } from '~/_data/serverState';
|
import { useDummyServerStore } from '~/_data/serverState';
|
||||||
import AES from 'crypto-js/aes';
|
import AES from 'crypto-js/aes';
|
||||||
|
|
||||||
import type { SendPayloads } from '~/store/callback';
|
import type { SendPayloads } from '@unraid/shared-callbacks';
|
||||||
|
|
||||||
import LogViewerCe from '~/components/Logs/LogViewer.ce.vue';
|
import LogViewerCe from '~/components/Logs/LogViewer.ce.vue';
|
||||||
import SsoButtonCe from '~/components/SsoButton.ce.vue';
|
import SsoButtonCe from '~/components/SsoButton.ce.vue';
|
||||||
|
|||||||
42
web/pages/redirect.vue
Normal file
42
web/pages/redirect.vue
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
const parseRedirectTarget = (target: string | null) => {
|
||||||
|
if (target && target !== '/') {
|
||||||
|
// parse target and ensure it is a bare path with no query parameters
|
||||||
|
console.log(target);
|
||||||
|
return '/';
|
||||||
|
}
|
||||||
|
return '/';
|
||||||
|
};
|
||||||
|
|
||||||
|
const getRedirectUrl = () => {
|
||||||
|
const search = new URLSearchParams(window.location.search);
|
||||||
|
const targetRoute = parseRedirectTarget(search.get('target'));
|
||||||
|
if (search.has('data') && (search.size === 1 || search.size === 2)) {
|
||||||
|
return `${window.location.origin}${targetRoute}?data=${encodeURIComponent(search.get('data')!)}`;
|
||||||
|
}
|
||||||
|
return `${window.location.origin}${targetRoute}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
const textElement = document.getElementById('text');
|
||||||
|
if (textElement) {
|
||||||
|
textElement.style.display = 'block';
|
||||||
|
}
|
||||||
|
}, 750);
|
||||||
|
|
||||||
|
window.location.href = getRedirectUrl();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
id="text"
|
||||||
|
style="text-align: center; margin-top: calc(100vh - 75%); display: none; font-family: sans-serif"
|
||||||
|
>
|
||||||
|
<h1>Redirecting...</h1>
|
||||||
|
<h2><a :href="getRedirectUrl()">Click here if you are not redirected automatically</a></h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -3,13 +3,13 @@ import { logErrorMessages } from '@vue/apollo-util';
|
|||||||
import { defineStore, createPinia, setActivePinia } from 'pinia';
|
import { defineStore, createPinia, setActivePinia } from 'pinia';
|
||||||
|
|
||||||
import { CONNECT_SIGN_IN, CONNECT_SIGN_OUT } from './account.fragment';
|
import { CONNECT_SIGN_IN, CONNECT_SIGN_OUT } from './account.fragment';
|
||||||
import { useCallbackStore } from '~/store/callbackActions';
|
import { useCallbackActionsStore } from '~/store/callbackActions';
|
||||||
import { useErrorsStore } from '~/store/errors';
|
import { useErrorsStore } from '~/store/errors';
|
||||||
import { useReplaceRenewStore } from '~/store/replaceRenew';
|
import { useReplaceRenewStore } from '~/store/replaceRenew';
|
||||||
import { useServerStore } from '~/store/server';
|
import { useServerStore } from '~/store/server';
|
||||||
import { useUnraidApiStore } from '~/store/unraidApi';
|
import { useUnraidApiStore } from '~/store/unraidApi';
|
||||||
import { ACCOUNT_CALLBACK } from '~/helpers/urls';
|
import { ACCOUNT_CALLBACK } from '~/helpers/urls';
|
||||||
import type { ExternalSignIn, ExternalSignOut } from '~/store/callback';
|
import type { ExternalSignIn, ExternalSignOut } from '@unraid/shared-callbacks';
|
||||||
/**
|
/**
|
||||||
* @see https://stackoverflow.com/questions/73476371/using-pinia-with-vue-js-web-components
|
* @see https://stackoverflow.com/questions/73476371/using-pinia-with-vue-js-web-components
|
||||||
* @see https://github.com/vuejs/pinia/discussions/1085
|
* @see https://github.com/vuejs/pinia/discussions/1085
|
||||||
@@ -23,7 +23,7 @@ export interface ConnectSignInMutationPayload {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const useAccountStore = defineStore('account', () => {
|
export const useAccountStore = defineStore('account', () => {
|
||||||
const callbackStore = useCallbackStore();
|
const callbackStore = useCallbackActionsStore();
|
||||||
const errorsStore = useErrorsStore();
|
const errorsStore = useErrorsStore();
|
||||||
const replaceRenewStore = useReplaceRenewStore();
|
const replaceRenewStore = useReplaceRenewStore();
|
||||||
const serverStore = useServerStore();
|
const serverStore = useServerStore();
|
||||||
|
|||||||
@@ -1,230 +0,0 @@
|
|||||||
/**
|
|
||||||
* This file is used to handle callbacks from the server.
|
|
||||||
* It is used in the following apps:
|
|
||||||
* - auth
|
|
||||||
* - craft-unraid
|
|
||||||
* - connect @todo
|
|
||||||
* - connect-components
|
|
||||||
*/
|
|
||||||
import AES from 'crypto-js/aes';
|
|
||||||
import Utf8 from 'crypto-js/enc-utf8';
|
|
||||||
import { defineStore, createPinia, setActivePinia } from 'pinia';
|
|
||||||
|
|
||||||
export type SignIn = 'signIn';
|
|
||||||
export type SignOut = 'signOut';
|
|
||||||
export type OemSignOut = 'oemSignOut';
|
|
||||||
export type Troubleshoot = 'troubleshoot';
|
|
||||||
export type Recover = 'recover';
|
|
||||||
export type Replace = 'replace';
|
|
||||||
export type TrialExtend = 'trialExtend';
|
|
||||||
export type TrialStart = 'trialStart';
|
|
||||||
export type Purchase = 'purchase';
|
|
||||||
export type Redeem = 'redeem';
|
|
||||||
export type Renew = 'renew';
|
|
||||||
export type Upgrade = 'upgrade';
|
|
||||||
export type UpdateOs = 'updateOs';
|
|
||||||
export type DowngradeOs = 'downgradeOs';
|
|
||||||
export type Manage = 'manage';
|
|
||||||
export type MyKeys = 'myKeys';
|
|
||||||
export type LinkKey = 'linkKey';
|
|
||||||
export type Activate = 'activate';
|
|
||||||
export type AccountActionTypes = Troubleshoot | SignIn | SignOut | OemSignOut | Manage | MyKeys | LinkKey;
|
|
||||||
export type AccountKeyActionTypes = Recover | Replace | TrialExtend | TrialStart | UpdateOs | DowngradeOs;
|
|
||||||
export type PurchaseActionTypes = Purchase | Redeem | Renew | Upgrade | Activate;
|
|
||||||
|
|
||||||
export type ServerActionTypes = AccountActionTypes | AccountKeyActionTypes | PurchaseActionTypes;
|
|
||||||
|
|
||||||
export type ServerState = 'BASIC'
|
|
||||||
| 'PLUS'
|
|
||||||
| 'PRO'
|
|
||||||
| 'TRIAL'
|
|
||||||
| 'EEXPIRED'
|
|
||||||
| 'ENOKEYFILE'
|
|
||||||
| 'EGUID'
|
|
||||||
| 'EGUID1'
|
|
||||||
| 'ETRIAL'
|
|
||||||
| 'ENOKEYFILE2'
|
|
||||||
| 'ENOKEYFILE1'
|
|
||||||
| 'ENOFLASH'
|
|
||||||
| 'ENOFLASH1'
|
|
||||||
| 'ENOFLASH2'
|
|
||||||
| 'ENOFLASH3'
|
|
||||||
| 'ENOFLASH4'
|
|
||||||
| 'ENOFLASH5'
|
|
||||||
| 'ENOFLASH6'
|
|
||||||
| 'ENOFLASH7'
|
|
||||||
| 'EBLACKLISTED'
|
|
||||||
| 'EBLACKLISTED1'
|
|
||||||
| 'EBLACKLISTED2'
|
|
||||||
| 'ENOCONN'
|
|
||||||
| 'STARTER'
|
|
||||||
| 'UNLEASHED'
|
|
||||||
| 'LIFETIME'
|
|
||||||
| 'STALE'
|
|
||||||
| undefined;
|
|
||||||
|
|
||||||
export interface ServerData {
|
|
||||||
description?: string;
|
|
||||||
deviceCount?: number;
|
|
||||||
expireTime?: number;
|
|
||||||
flashProduct?: string;
|
|
||||||
flashVendor?: string;
|
|
||||||
guid?: string;
|
|
||||||
keyfile?: string;
|
|
||||||
locale?: string;
|
|
||||||
name?: string;
|
|
||||||
osVersion?: string;
|
|
||||||
osVersionBranch?: 'stable' | 'next' | 'preview' | 'test';
|
|
||||||
registered: boolean;
|
|
||||||
regExp?: number;
|
|
||||||
regUpdatesExpired?: boolean;
|
|
||||||
regGen?: number;
|
|
||||||
regGuid?: string;
|
|
||||||
regTy?: string;
|
|
||||||
state: ServerState;
|
|
||||||
wanFQDN?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UserInfo {
|
|
||||||
'custom:ips_id'?: string;
|
|
||||||
email?: string;
|
|
||||||
email_verifed?: 'true' | 'false';
|
|
||||||
preferred_username?: string;
|
|
||||||
sub?: string;
|
|
||||||
username?: string;
|
|
||||||
/**
|
|
||||||
* @param identities {string} JSON string containing @type Identity[]
|
|
||||||
*/
|
|
||||||
identities?: string;
|
|
||||||
/**
|
|
||||||
* @param cognito:groups {string[]} JSON string containing @type string[]
|
|
||||||
*
|
|
||||||
* Will contain all groups for the signed in user, used for determining which branch to use
|
|
||||||
* @example ["download-preview", "unraidPOOLID_Google"]
|
|
||||||
*/
|
|
||||||
'cognito:groups'?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ExternalSignIn {
|
|
||||||
type: SignIn;
|
|
||||||
apiKey: string;
|
|
||||||
user: UserInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ExternalSignOut {
|
|
||||||
type: SignOut | OemSignOut;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ExternalKeyActions {
|
|
||||||
type: PurchaseActionTypes | AccountKeyActionTypes;
|
|
||||||
keyUrl: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ExternalUpdateOsAction {
|
|
||||||
type: DowngradeOs | UpdateOs;
|
|
||||||
sha256: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ServerPayload {
|
|
||||||
type: ServerActionTypes;
|
|
||||||
server: ServerData;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ServerTroubleshoot {
|
|
||||||
type: Troubleshoot;
|
|
||||||
server: ServerData;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type ExternalActions = ExternalSignIn | ExternalSignOut | ExternalKeyActions | ExternalUpdateOsAction;
|
|
||||||
|
|
||||||
export type UpcActions = ServerPayload | ServerTroubleshoot;
|
|
||||||
|
|
||||||
export type SendPayloads = ExternalActions[] | UpcActions[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Payload containing all actions that are sent from account.unraid.net to the server
|
|
||||||
*/
|
|
||||||
export interface ExternalPayload {
|
|
||||||
type: 'forUpc';
|
|
||||||
actions: ExternalActions[];
|
|
||||||
sender: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Payload containing all actions that are sent from a server to account.unraid.net
|
|
||||||
*/
|
|
||||||
export interface UpcPayload {
|
|
||||||
actions: UpcActions[];
|
|
||||||
sender: string;
|
|
||||||
type: 'fromUpc';
|
|
||||||
}
|
|
||||||
|
|
||||||
export type QueryPayloads = ExternalPayload | UpcPayload;
|
|
||||||
|
|
||||||
export interface CallbackActionsStore {
|
|
||||||
saveCallbackData: (decryptedData: QueryPayloads) => void;
|
|
||||||
encryptionKey: string;
|
|
||||||
sendType: 'fromUpc' | 'forUpc';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see https://stackoverflow.com/questions/73476371/using-pinia-with-vue-js-web-components
|
|
||||||
* @see https://github.com/vuejs/pinia/discussions/1085
|
|
||||||
*/
|
|
||||||
setActivePinia(createPinia());
|
|
||||||
|
|
||||||
export const useCallbackStoreGeneric = (
|
|
||||||
useCallbackActions: () => CallbackActionsStore
|
|
||||||
) =>
|
|
||||||
defineStore('callback', () => {
|
|
||||||
const callbackActions = useCallbackActions();
|
|
||||||
|
|
||||||
const send = (url: string, payload: SendPayloads, redirectType?: 'newTab' | 'replace', sendType?: string) => {
|
|
||||||
console.debug('[callback.send]');
|
|
||||||
const stringifiedData = JSON.stringify({
|
|
||||||
actions: [...payload],
|
|
||||||
sender: window.location.href.replace('/Tools/Update', '/Tools'),
|
|
||||||
type: sendType ?? callbackActions.sendType,
|
|
||||||
});
|
|
||||||
const encryptedMessage = AES.encrypt(
|
|
||||||
stringifiedData,
|
|
||||||
callbackActions.encryptionKey,
|
|
||||||
).toString();
|
|
||||||
/**
|
|
||||||
* Build and go to url
|
|
||||||
*/
|
|
||||||
const destinationUrl = new URL(url.replace('/Tools/Update', '/Tools'));
|
|
||||||
destinationUrl.searchParams.set('data', encodeURI(encryptedMessage));
|
|
||||||
console.debug('[callback.send]', encryptedMessage, destinationUrl);
|
|
||||||
if (redirectType === 'newTab') { // helpful when webgui is in an iframe and callbacks need to be opened in a new tab
|
|
||||||
window.open(destinationUrl.toString(), '_blank');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (redirectType === 'replace') { // helpful when autoredirecting and we want to replace the current url to prevent back button issues with auto redirect loops
|
|
||||||
window.location.replace(destinationUrl.toString());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
window.location.href = destinationUrl.toString();
|
|
||||||
};
|
|
||||||
|
|
||||||
const watcher = () => {
|
|
||||||
console.debug('[callback.watcher]');
|
|
||||||
const currentUrl = new URL(window.location.toString());
|
|
||||||
const callbackValue = decodeURI(currentUrl.searchParams.get('data') ?? '');
|
|
||||||
console.debug('[callback.watcher]', { callbackValue });
|
|
||||||
if (!callbackValue) {
|
|
||||||
return console.debug('[callback.watcher] no callback to handle');
|
|
||||||
}
|
|
||||||
|
|
||||||
const decryptedMessage = AES.decrypt(callbackValue, callbackActions.encryptionKey);
|
|
||||||
const decryptedData: QueryPayloads = JSON.parse(decryptedMessage.toString(Utf8));
|
|
||||||
console.debug('[callback.watcher]', decryptedMessage, decryptedData);
|
|
||||||
// Parse the data and perform actions
|
|
||||||
callbackActions.saveCallbackData(decryptedData);
|
|
||||||
};
|
|
||||||
|
|
||||||
return {
|
|
||||||
send,
|
|
||||||
watcher,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
@@ -1,4 +1,15 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { createPinia, defineStore, setActivePinia } from 'pinia';
|
||||||
|
|
||||||
|
import { useCallback } from '@unraid/shared-callbacks';
|
||||||
|
|
||||||
|
import type {
|
||||||
|
ExternalActions,
|
||||||
|
ExternalKeyActions,
|
||||||
|
ExternalSignIn,
|
||||||
|
ExternalSignOut,
|
||||||
|
ExternalUpdateOsAction,
|
||||||
|
QueryPayloads,
|
||||||
|
} from '@unraid/shared-callbacks';
|
||||||
|
|
||||||
import { addPreventClose, removePreventClose } from '~/composables/preventClose';
|
import { addPreventClose, removePreventClose } from '~/composables/preventClose';
|
||||||
import { useAccountStore } from '~/store/account';
|
import { useAccountStore } from '~/store/account';
|
||||||
@@ -6,17 +17,15 @@ import { useInstallKeyStore } from '~/store/installKey';
|
|||||||
import { useServerStore } from '~/store/server';
|
import { useServerStore } from '~/store/server';
|
||||||
import { useUpdateOsStore } from '~/store/updateOs';
|
import { useUpdateOsStore } from '~/store/updateOs';
|
||||||
import { useUpdateOsActionsStore } from '~/store/updateOsActions';
|
import { useUpdateOsActionsStore } from '~/store/updateOsActions';
|
||||||
import {
|
|
||||||
useCallbackStoreGeneric,
|
type CallbackStatus = 'closing' | 'error' | 'loading' | 'ready' | 'success';
|
||||||
type CallbackActionsStore,
|
|
||||||
type ExternalKeyActions,
|
setActivePinia(createPinia());
|
||||||
type ExternalSignIn,
|
|
||||||
type ExternalSignOut,
|
|
||||||
type ExternalUpdateOsAction,
|
|
||||||
type QueryPayloads,
|
|
||||||
} from '~/store/callback';
|
|
||||||
|
|
||||||
export const useCallbackActionsStore = defineStore('callbackActions', () => {
|
export const useCallbackActionsStore = defineStore('callbackActions', () => {
|
||||||
|
const { send, watcher: providedWatcher } = useCallback({
|
||||||
|
encryptionKey: import.meta.env.VITE_CALLBACK_KEY,
|
||||||
|
});
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore();
|
||||||
const installKeyStore = useInstallKeyStore();
|
const installKeyStore = useInstallKeyStore();
|
||||||
const serverStore = useServerStore();
|
const serverStore = useServerStore();
|
||||||
@@ -24,15 +33,18 @@ export const useCallbackActionsStore = defineStore('callbackActions', () => {
|
|||||||
const updateOsStore = useUpdateOsStore(); // if we remove this line, the store things break…
|
const updateOsStore = useUpdateOsStore(); // if we remove this line, the store things break…
|
||||||
const updateOsActionsStore = useUpdateOsActionsStore();
|
const updateOsActionsStore = useUpdateOsActionsStore();
|
||||||
|
|
||||||
type CallbackStatus = 'closing' | 'error' | 'loading' | 'ready' | 'success';
|
|
||||||
const callbackStatus = ref<CallbackStatus>('ready');
|
const callbackStatus = ref<CallbackStatus>('ready');
|
||||||
|
|
||||||
const callbackData = ref<QueryPayloads>();
|
const callbackData = ref<QueryPayloads>();
|
||||||
const callbackError = ref();
|
const callbackError = ref();
|
||||||
|
|
||||||
const saveCallbackData = (
|
const watcher = () => {
|
||||||
decryptedData?: QueryPayloads,
|
const result = providedWatcher();
|
||||||
) => {
|
if (result) {
|
||||||
|
saveCallbackData(result);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const saveCallbackData = (decryptedData?: QueryPayloads) => {
|
||||||
if (decryptedData) {
|
if (decryptedData) {
|
||||||
callbackData.value = decryptedData;
|
callbackData.value = decryptedData;
|
||||||
}
|
}
|
||||||
@@ -54,9 +66,15 @@ export const useCallbackActionsStore = defineStore('callbackActions', () => {
|
|||||||
'renew',
|
'renew',
|
||||||
'upgrade',
|
'upgrade',
|
||||||
];
|
];
|
||||||
|
|
||||||
const redirectToCallbackType = () => {
|
const redirectToCallbackType = () => {
|
||||||
console.debug('[redirectToCallbackType]');
|
console.debug('[redirectToCallbackType]');
|
||||||
if (!callbackData.value || !callbackData.value.type || callbackData.value.type !== 'forUpc' || !callbackData.value.actions?.length) {
|
if (
|
||||||
|
!callbackData.value ||
|
||||||
|
!callbackData.value.type ||
|
||||||
|
callbackData.value.type !== 'forUpc' ||
|
||||||
|
!callbackData.value.actions?.length
|
||||||
|
) {
|
||||||
callbackError.value = 'Callback redirect type not present or incorrect';
|
callbackError.value = 'Callback redirect type not present or incorrect';
|
||||||
callbackStatus.value = 'ready'; // default status
|
callbackStatus.value = 'ready'; // default status
|
||||||
return console.error('[redirectToCallbackType]', callbackError.value);
|
return console.error('[redirectToCallbackType]', callbackError.value);
|
||||||
@@ -65,56 +83,64 @@ export const useCallbackActionsStore = defineStore('callbackActions', () => {
|
|||||||
callbackStatus.value = 'loading';
|
callbackStatus.value = 'loading';
|
||||||
|
|
||||||
// Parse the data and perform actions
|
// Parse the data and perform actions
|
||||||
callbackData.value.actions.forEach(async (action, index, array) => {
|
callbackData.value.actions.forEach(
|
||||||
console.debug('[redirectToCallbackType]', { action, index, array });
|
async (action: ExternalActions, index: number, array: ExternalActions[]) => {
|
||||||
|
console.debug('[redirectToCallbackType]', { action, index, array });
|
||||||
|
|
||||||
if (actionTypesWithKey.includes(action.type)) {
|
if (actionTypesWithKey.includes(action.type)) {
|
||||||
await installKeyStore.install(action as ExternalKeyActions);
|
await installKeyStore.install(action as ExternalKeyActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action.type === 'signIn' && action?.user) {
|
if (action.type === 'signIn' && action?.user) {
|
||||||
accountStore.setAccountAction(action as ExternalSignIn);
|
accountStore.setAccountAction(action as ExternalSignIn);
|
||||||
await accountStore.setConnectSignInPayload({
|
await accountStore.setConnectSignInPayload({
|
||||||
apiKey: action?.apiKey ?? '',
|
apiKey: action?.apiKey ?? '',
|
||||||
email: action.user?.email ?? '',
|
email: action.user?.email ?? '',
|
||||||
preferred_username: action.user?.preferred_username ?? '',
|
preferred_username: action.user?.preferred_username ?? '',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action.type === 'signOut' || action.type === 'oemSignOut') {
|
if (action.type === 'signOut' || action.type === 'oemSignOut') {
|
||||||
accountStore.setAccountAction(action as ExternalSignOut);
|
accountStore.setAccountAction(action as ExternalSignOut);
|
||||||
await accountStore.setQueueConnectSignOut(true);
|
await accountStore.setQueueConnectSignOut(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action.type === 'updateOs' || action.type === 'downgradeOs') {
|
if (action.type === 'updateOs' || action.type === 'downgradeOs') {
|
||||||
updateOsActionsStore.setUpdateOsAction(action as ExternalUpdateOsAction);
|
updateOsActionsStore.setUpdateOsAction(action as ExternalUpdateOsAction);
|
||||||
await updateOsActionsStore.actOnUpdateOsAction(action.type === 'downgradeOs');
|
await updateOsActionsStore.actOnUpdateOsAction(action.type === 'downgradeOs');
|
||||||
|
|
||||||
if (array.length === 1) { // only 1 action, skip refresh server state
|
if (array.length === 1) {
|
||||||
console.debug('[redirectToCallbackType] updateOs done');
|
// only 1 action, skip refresh server state
|
||||||
// removing query string relase is set so users can't refresh the page and go through the same actions
|
console.debug('[redirectToCallbackType] updateOs done');
|
||||||
window.history.replaceState(null, '', window.location.pathname);
|
// removing query string relase is set so users can't refresh the page and go through the same actions
|
||||||
return;
|
window.history.replaceState(null, '', window.location.pathname);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array.length === index + 1) {
|
||||||
|
// all actions have run
|
||||||
|
await serverStore.refreshServerState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
);
|
||||||
if (array.length === (index + 1)) { // all actions have run
|
|
||||||
await serverStore.refreshServerState();
|
|
||||||
// callbackStatus.value = 'done';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Wait until we have a refreshServerStateStatus value to determine callbackStatus
|
// Wait until we have a refreshServerStateStatus value to determine callbackStatus
|
||||||
const refreshServerStateStatus = computed(() => serverStore.refreshServerStateStatus);
|
const refreshServerStateStatus = computed(() => serverStore.refreshServerStateStatus);
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
if (callbackData.value?.actions && refreshServerStateStatus.value === 'done') {
|
if (callbackData.value?.actions && refreshServerStateStatus.value === 'done') {
|
||||||
if (callbackData.value.actions.length > 1) {
|
if (callbackData.value.actions.length > 1) {
|
||||||
// if we have more than 1 action it means there was a key install and an account action so both need to be successful
|
// if we have more than 1 action it means there was a key install and an account action so both need to be successful
|
||||||
const allSuccess = accountStore.accountActionStatus === 'success' && installKeyStore.keyInstallStatus === 'success';
|
const allSuccess =
|
||||||
|
accountStore.accountActionStatus === 'success' &&
|
||||||
|
installKeyStore.keyInstallStatus === 'success';
|
||||||
callbackStatus.value = allSuccess ? 'success' : 'error';
|
callbackStatus.value = allSuccess ? 'success' : 'error';
|
||||||
} else {
|
} else {
|
||||||
// only 1 action needs to be successful
|
// only 1 action needs to be successful
|
||||||
const oneSuccess = accountStore.accountActionStatus === 'success' || installKeyStore.keyInstallStatus === 'success';
|
const oneSuccess =
|
||||||
|
accountStore.accountActionStatus === 'success' ||
|
||||||
|
installKeyStore.keyInstallStatus === 'success';
|
||||||
callbackStatus.value = oneSuccess ? 'success' : 'error';
|
callbackStatus.value = oneSuccess ? 'success' : 'error';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,7 +150,10 @@ export const useCallbackActionsStore = defineStore('callbackActions', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const setCallbackStatus = (status: CallbackStatus) => { callbackStatus.value = status; };
|
const setCallbackStatus = (status: CallbackStatus) => {
|
||||||
|
callbackStatus.value = status;
|
||||||
|
};
|
||||||
|
|
||||||
watch(callbackStatus, (newVal, oldVal) => {
|
watch(callbackStatus, (newVal, oldVal) => {
|
||||||
if (newVal === 'loading') {
|
if (newVal === 'loading') {
|
||||||
addPreventClose();
|
addPreventClose();
|
||||||
@@ -144,10 +173,10 @@ export const useCallbackActionsStore = defineStore('callbackActions', () => {
|
|||||||
redirectToCallbackType,
|
redirectToCallbackType,
|
||||||
saveCallbackData,
|
saveCallbackData,
|
||||||
setCallbackStatus,
|
setCallbackStatus,
|
||||||
|
send,
|
||||||
|
watcher,
|
||||||
// helpers
|
// helpers
|
||||||
sendType: 'fromUpc',
|
sendType: 'fromUpc',
|
||||||
encryptionKey: import.meta.env.VITE_CALLBACK_KEY,
|
encryptionKey: import.meta.env.VITE_CALLBACK_KEY,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
export const useCallbackStore = useCallbackStoreGeneric(useCallbackActionsStore as unknown as () => CallbackActionsStore);
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { defineStore, createPinia, setActivePinia } from 'pinia';
|
import { defineStore, createPinia, setActivePinia } from 'pinia';
|
||||||
import { WebguiInstallKey } from '~/composables/services/webgui';
|
import { WebguiInstallKey } from '~/composables/services/webgui';
|
||||||
import { useErrorsStore } from '~/store/errors';
|
import { useErrorsStore } from '~/store/errors';
|
||||||
import type { ExternalKeyActions } from '~/store/callback';
|
import type { ExternalKeyActions } from '@unraid/shared-callbacks';
|
||||||
/**
|
/**
|
||||||
* @see https://stackoverflow.com/questions/73476371/using-pinia-with-vue-js-web-components
|
* @see https://stackoverflow.com/questions/73476371/using-pinia-with-vue-js-web-components
|
||||||
* @see https://github.com/vuejs/pinia/discussions/1085
|
* @see https://github.com/vuejs/pinia/discussions/1085
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { defineStore, createPinia, setActivePinia } from 'pinia';
|
import { defineStore, createPinia, setActivePinia } from 'pinia';
|
||||||
|
|
||||||
import { PURCHASE_CALLBACK } from '~/helpers/urls';
|
import { PURCHASE_CALLBACK } from '~/helpers/urls';
|
||||||
import { useCallbackStore } from '~/store/callbackActions';
|
import { useCallbackActionsStore } from '~/store/callbackActions';
|
||||||
import { useServerStore } from '~/store/server';
|
import { useServerStore } from '~/store/server';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11,7 +11,7 @@ import { useServerStore } from '~/store/server';
|
|||||||
setActivePinia(createPinia());
|
setActivePinia(createPinia());
|
||||||
|
|
||||||
export const usePurchaseStore = defineStore('purchase', () => {
|
export const usePurchaseStore = defineStore('purchase', () => {
|
||||||
const callbackStore = useCallbackStore();
|
const callbackStore = useCallbackActionsStore();
|
||||||
const serverStore = useServerStore();
|
const serverStore = useServerStore();
|
||||||
|
|
||||||
const activate = () => {
|
const activate = () => {
|
||||||
|
|||||||
@@ -16,17 +16,10 @@ import {
|
|||||||
import { BrandLoading } from '@unraid/ui';
|
import { BrandLoading } from '@unraid/ui';
|
||||||
|
|
||||||
import type { BadgeProps } from '@unraid/ui';
|
import type { BadgeProps } from '@unraid/ui';
|
||||||
import type {
|
import type { ValidateGuidResponse } from '~/composables/services/keyServer';
|
||||||
// type KeyLatestResponse,
|
|
||||||
ValidateGuidResponse,
|
|
||||||
} from '~/composables/services/keyServer';
|
|
||||||
import type { WretchError } from 'wretch';
|
import type { WretchError } from 'wretch';
|
||||||
|
|
||||||
import {
|
import { validateGuid } from '~/composables/services/keyServer';
|
||||||
// keyLatest,
|
|
||||||
validateGuid,
|
|
||||||
} from '~/composables/services/keyServer';
|
|
||||||
// import { useCallbackStore } from '~/store/callbackActions';
|
|
||||||
import { useServerStore } from '~/store/server';
|
import { useServerStore } from '~/store/server';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,7 +42,6 @@ const BrandLoadingIcon = () => h(BrandLoading, { variant: 'white' });
|
|||||||
export const REPLACE_CHECK_LOCAL_STORAGE_KEY = 'unraidReplaceCheck';
|
export const REPLACE_CHECK_LOCAL_STORAGE_KEY = 'unraidReplaceCheck';
|
||||||
|
|
||||||
export const useReplaceRenewStore = defineStore('replaceRenewCheck', () => {
|
export const useReplaceRenewStore = defineStore('replaceRenewCheck', () => {
|
||||||
// const callbackStore = useCallbackStore();
|
|
||||||
const serverStore = useServerStore();
|
const serverStore = useServerStore();
|
||||||
|
|
||||||
const guid = computed(() => serverStore.guid);
|
const guid = computed(() => serverStore.guid);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { startTrial, type StartTrialResponse } from '~/composables/services/keyS
|
|||||||
import { useCallbackActionsStore } from '~/store/callbackActions';
|
import { useCallbackActionsStore } from '~/store/callbackActions';
|
||||||
import { useDropdownStore } from '~/store/dropdown';
|
import { useDropdownStore } from '~/store/dropdown';
|
||||||
import { useServerStore } from '~/store/server';
|
import { useServerStore } from '~/store/server';
|
||||||
import type { ExternalPayload, TrialExtend, TrialStart } from '~/store/callback';
|
import type { ExternalPayload, TrialExtend, TrialStart } from '@unraid/shared-callbacks';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://stackoverflow.com/questions/73476371/using-pinia-with-vue-js-web-components
|
* @see https://stackoverflow.com/questions/73476371/using-pinia-with-vue-js-web-components
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { useAccountStore } from '~/store/account';
|
|||||||
import { useServerStore } from '~/store/server';
|
import { useServerStore } from '~/store/server';
|
||||||
import { useUpdateOsStore } from '~/store/updateOs';
|
import { useUpdateOsStore } from '~/store/updateOs';
|
||||||
|
|
||||||
import type { ExternalUpdateOsAction } from '~/store/callback';
|
import type { ExternalUpdateOsAction } from '@unraid/shared-callbacks';
|
||||||
import type { UserProfileLink } from '~/types/userProfile';
|
import type { UserProfileLink } from '~/types/userProfile';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
import { Markdown } from '@/helpers/markdown';
|
|
||||||
import { request } from '~/composables/services/request';
|
|
||||||
import { DOCS_RELEASE_NOTES } from '~/helpers/urls';
|
|
||||||
import { useCallbackStore } from '~/store/callbackActions';
|
|
||||||
// import { useServerStore } from '~/store/server';
|
|
||||||
import type { ServerUpdateOsResponse } from '~/types/server';
|
|
||||||
import { baseUrl } from 'marked-base-url';
|
|
||||||
import { defineStore } from 'pinia';
|
|
||||||
import prerelease from 'semver/functions/prerelease';
|
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
import { defineStore } from 'pinia';
|
||||||
|
|
||||||
|
import { Markdown } from '@/helpers/markdown';
|
||||||
|
import { DOCS_RELEASE_NOTES } from '~/helpers/urls';
|
||||||
|
import { baseUrl } from 'marked-base-url';
|
||||||
|
import prerelease from 'semver/functions/prerelease';
|
||||||
|
|
||||||
|
import type { ServerUpdateOsResponse } from '~/types/server';
|
||||||
|
|
||||||
|
import { request } from '~/composables/services/request';
|
||||||
|
import { useCallbackActionsStore } from '~/store/callbackActions';
|
||||||
|
|
||||||
export const useUpdateOsChangelogStore = defineStore('updateOsChangelog', () => {
|
export const useUpdateOsChangelogStore = defineStore('updateOsChangelog', () => {
|
||||||
const callbackStore = useCallbackStore();
|
const callbackStore = useCallbackActionsStore();
|
||||||
// const serverStore = useServerStore();
|
|
||||||
// const osVersionBranch = computed(() => serverStore.osVersionBranch);
|
|
||||||
|
|
||||||
const releaseForUpdate = ref<ServerUpdateOsResponse | null>(null);
|
const releaseForUpdate = ref<ServerUpdateOsResponse | null>(null);
|
||||||
watch(releaseForUpdate, async (newVal, oldVal) => {
|
watch(releaseForUpdate, async (newVal, oldVal) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user