mirror of
https://github.com/unraid/api.git
synced 2026-02-25 03:09:24 -06:00
chore(web): shared callback store parity
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
import AES from 'crypto-js/aes';
|
||||
import Utf8 from 'crypto-js/enc-utf8';
|
||||
import { defineStore } from 'pinia';
|
||||
import { defineStore, createPinia, setActivePinia } from 'pinia';
|
||||
|
||||
export type SignIn = 'signIn';
|
||||
export type SignOut = 'signOut';
|
||||
@@ -82,8 +82,6 @@ export interface ServerData {
|
||||
|
||||
export interface UserInfo {
|
||||
'custom:ips_id'?: string;
|
||||
'custom:preview_releases'?: string;
|
||||
'custom:test_releases'?: string;
|
||||
email?: string;
|
||||
email_verifed?: 'true' | 'false';
|
||||
preferred_username?: string;
|
||||
@@ -92,7 +90,14 @@ export interface UserInfo {
|
||||
/**
|
||||
* @param identities {string} JSON string containing @type Identity[]
|
||||
*/
|
||||
identities: string;
|
||||
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 {
|
||||
@@ -157,6 +162,12 @@ export interface CallbackActionsStore {
|
||||
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
|
||||
) =>
|
||||
|
||||
Reference in New Issue
Block a user