mirror of
https://github.com/unraid/api.git
synced 2026-02-07 08:28:56 -06:00
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - Documentation - Updated contributor guide to use “standalone” naming for web components. - Refactor - Migrated app and component references from legacy variants to standalone components. - Unified component registry and updated global component typings to standalone names. - Tests - Updated test suites to target standalone components; no behavior changes. No user-facing changes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
31 lines
930 B
Vue
31 lines
930 B
Vue
<script setup lang="ts">
|
|
import { nextTick } from 'vue';
|
|
|
|
import { Button } from '@unraid/ui';
|
|
|
|
import { useActivationCodeModalStore } from '~/components/Activation/store/activationCodeModal';
|
|
|
|
const activationModalStore = useActivationCodeModalStore();
|
|
|
|
const showActivationModal = async () => {
|
|
// First set the value in sessionStorage to persist the state
|
|
sessionStorage.setItem('activationCodeModalHidden', 'false');
|
|
|
|
// Then update the store
|
|
activationModalStore.setIsHidden(false);
|
|
|
|
// Wait for next tick to ensure the reactive system has updated
|
|
await nextTick();
|
|
|
|
// Log the current state for debugging
|
|
console.log('Modal visibility after setting:', activationModalStore.isVisible);
|
|
console.log('isHidden value:', activationModalStore.isHidden);
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<div class="p-8">
|
|
<Button variant="primary" @click="showActivationModal"> Show Activation Modal </Button>
|
|
</div>
|
|
</template>
|