chore: clean up

This commit is contained in:
Zack Spear
2023-08-03 18:22:27 -07:00
parent ff2a5e5b2f
commit 23fc148755
5 changed files with 1 additions and 27 deletions

View File

@@ -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}_`;

View File

@@ -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,

View File

@@ -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();
}

View File

@@ -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,

View File

@@ -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); }
});