mirror of
https://github.com/unraid/api.git
synced 2026-01-09 01:59:57 -06:00
chore: clean up
This commit is contained in:
@@ -16,10 +16,6 @@ export const useDropdownStore = defineStore('dropdown', () => {
|
||||
const dropdownShow = () => { dropdownVisible.value = true; };
|
||||
const dropdownToggle = useToggle(dropdownVisible);
|
||||
|
||||
watch(dropdownVisible, (newVal, _oldVal) => {
|
||||
console.debug('[dropdownVisible]', newVal, _oldVal);
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
// automatically open the launchpad dropdown on first page load when ENOKEYFILE aka a new server
|
||||
const baseStorageName = `unraidConnect_${serverStore.guid}_`;
|
||||
|
||||
@@ -14,10 +14,6 @@ export const useModalStore = defineStore('modal', () => {
|
||||
const modalShow = () => { modalVisible.value = true; };
|
||||
const modalToggle = useToggle(modalVisible);
|
||||
|
||||
watch(modalVisible, (newVal, _oldVal) => {
|
||||
console.debug('[modalVisible]', newVal, _oldVal);
|
||||
});
|
||||
|
||||
return {
|
||||
modalVisible,
|
||||
modalHide,
|
||||
|
||||
@@ -20,7 +20,6 @@ export const usePromoStore = defineStore('promo', () => {
|
||||
const promoToggle = useToggle(promoVisible);
|
||||
|
||||
watch(promoVisible, (newVal, _oldVal) => {
|
||||
console.debug('[promoVisible]', newVal, _oldVal);
|
||||
if (newVal) { // close the dropdown when the promo is opened
|
||||
dropdownStore.dropdownHide();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useToggle } from '@vueuse/core';
|
||||
import { defineStore, createPinia, setActivePinia } from 'pinia';
|
||||
import { useCallbackStore } from './callbackActions';
|
||||
import { useServerStore } from './server';
|
||||
@@ -12,9 +11,7 @@ setActivePinia(createPinia());
|
||||
export const usePurchaseStore = defineStore('purchase', () => {
|
||||
const callbackStore = useCallbackStore();
|
||||
const serverStore = useServerStore();
|
||||
// State
|
||||
const purchaseVisible = ref<boolean>(false);
|
||||
// Actions
|
||||
|
||||
const redeem = () => {
|
||||
console.debug('[redeem]');
|
||||
callbackStore.send('https://unraid.ddev.site/callback', [{
|
||||
@@ -42,21 +39,8 @@ export const usePurchaseStore = defineStore('purchase', () => {
|
||||
type: 'upgrade',
|
||||
}]);
|
||||
};
|
||||
const purchaseHide = () => { purchaseVisible.value = false; };
|
||||
const purchaseShow = () => { purchaseVisible.value = true; };
|
||||
const purchaseToggle = useToggle(purchaseVisible);
|
||||
|
||||
watch(purchaseVisible, (newVal, _oldVal) => {
|
||||
console.debug('[purchaseVisible]', newVal, _oldVal);
|
||||
});
|
||||
|
||||
return {
|
||||
// State
|
||||
purchaseVisible,
|
||||
purchaseHide,
|
||||
purchaseShow,
|
||||
// Actions
|
||||
purchaseToggle,
|
||||
redeem,
|
||||
purchase,
|
||||
upgrade,
|
||||
|
||||
@@ -518,7 +518,6 @@ export const useServerStore = defineStore('server', () => {
|
||||
};
|
||||
});
|
||||
watch(stateDataError, (newVal, oldVal) => {
|
||||
console.debug('[watch:stateDataError]', newVal, oldVal);
|
||||
if (oldVal && oldVal.ref) { errorsStore.removeErrorByRef(oldVal.ref); }
|
||||
if (newVal) { errorsStore.setError(newVal); }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user