mirror of
https://github.com/unraid/api.git
synced 2026-05-19 23:48:42 -05:00
fix: sign in post working
This commit is contained in:
@@ -23,18 +23,17 @@ const { updating, updateSuccess } = storeToRefs(accountStore);
|
||||
const { callbackLoading } = storeToRefs(callbackActionsStore);
|
||||
const { keyUrl, installing, success } = storeToRefs(installKeyStore);
|
||||
|
||||
const heading = computed(() => {
|
||||
callbackLoading.value ? 'Performing actions' : 'Finished performing actions';
|
||||
});
|
||||
|
||||
const subheading = computed(() => {
|
||||
callbackLoading.value ? 'Please keep this window open' : '';
|
||||
});
|
||||
const heading = computed(() => callbackLoading.value ? 'Performing actions' : 'Finished performing actions');
|
||||
const subheading = computed(() => callbackLoading.value ? 'Please keep this window open' : '');
|
||||
|
||||
const close = () => {
|
||||
if (callbackLoading.value) return console.debug('[close] not allowed');
|
||||
callbackActionsStore.closeCallbackFeedback();
|
||||
};
|
||||
// @close="close"
|
||||
// :show-close-x="!callbackLoading"
|
||||
|
||||
const reload = () => window.location.reload();
|
||||
|
||||
const { text, copy, copied, isSupported } = useClipboard({ source: keyUrl.value });
|
||||
</script>
|
||||
@@ -42,11 +41,9 @@ const { text, copy, copied, isSupported } = useClipboard({ source: keyUrl.value
|
||||
<template>
|
||||
<Modal
|
||||
:open="open"
|
||||
@close="close"
|
||||
max-width="max-w-800px"
|
||||
:show-close-x="!callbackLoading"
|
||||
>
|
||||
<div class="text-center relative w-full flex flex-col gap-y-16px">
|
||||
<div class="text-16px text-center relative w-full flex flex-col gap-y-16px">
|
||||
<header>
|
||||
<h1 class="text-24px font-semibold">{{ heading }}</h1>
|
||||
<p v-if="subheading" class="text-16px opacity-80">{{ subheading }}</p>
|
||||
@@ -77,10 +74,10 @@ const { text, copy, copied, isSupported } = useClipboard({ source: keyUrl.value
|
||||
|
||||
<div v-if="!callbackLoading" class="w-full max-w-xs flex flex-col gap-y-16px mx-auto">
|
||||
<button
|
||||
@click="close"
|
||||
@click="reload"
|
||||
class="text-12px tracking-wide inline-block mx-8px opacity-60 hover:opacity-100 focus:opacity-100 underline transition"
|
||||
>
|
||||
{{ 'Close' }}
|
||||
{{ 'Reload Page to Finalize' }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,8 +12,9 @@ export const WebguiInstallKey = request.url('/webGui/include/InstallKey.php');
|
||||
* @param {string} csrf_token
|
||||
* @param {string} '#file' - ex: getters.myServersCfgPath
|
||||
* @param {string} '#section' - ex: 'remote'
|
||||
* @param {string} apikey
|
||||
* @param {string} apikey - from key server's response
|
||||
* @param {string} avatar
|
||||
* @param {string} regWizTime - date_guid
|
||||
* @param {string} email
|
||||
* @param {string} username
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @todo setup .env
|
||||
*/
|
||||
const ACCOUNT = 'https://localhost:8008/connect';
|
||||
const ACCOUNT = 'https://localhost:8008';
|
||||
const CONNECT_DOCS = 'https://docs.unraid.net/category/unraid-connect';
|
||||
const CONNECT_DASHBOARD = 'https://connect.myunraid.net';
|
||||
const DEV_GRAPH_URL = '';
|
||||
|
||||
+3
-1
@@ -2,6 +2,7 @@ import { defineStore, createPinia, setActivePinia } from 'pinia';
|
||||
import { useCallbackStore } from './callbackActions';
|
||||
import { useServerStore } from './server';
|
||||
import { WebguiUpdate } from '~/composables/services/webgui';
|
||||
import { ACCOUNT_CALLBACK } from '~/helpers/urls';
|
||||
import type { CallbackAction } from '~/types/callback';
|
||||
/**
|
||||
* @see https://stackoverflow.com/questions/73476371/using-pinia-with-vue-js-web-components
|
||||
@@ -64,7 +65,8 @@ export const useAccountStore = defineStore('account', () => {
|
||||
const userPayload = {
|
||||
...(action.user
|
||||
? {
|
||||
apikey: serverStore.apiKey,
|
||||
apikey: action.apiKey,
|
||||
// avatar: '',
|
||||
email: action.user?.email,
|
||||
regWizTime: `${Date.now()}_${serverStore.guid}`, // set when signing in the first time and never unset for the sake of displaying Sign In/Up in the UPC without needing to validate guid every time
|
||||
username: action.user?.preferred_username,
|
||||
|
||||
Reference in New Issue
Block a user