UI review, stage 3: cleanup, shared chart code, confirmations, routing

useTrafficChart composable replaces the duplicated chart code in Analytics
and HistoryModal; theme observer is released on unmount; blob URLs are
revoked. ConfirmModal gets a unique id; confirm() in Server/PKI and
SweetAlert2 in Account are replaced by ConfirmModal and toasts, sweetalert2
and sass removed. Separate authApiClient for /api/auth. 404 redirect, lazy
Clients, token-based isAuthenticated, theme from prefers-color-scheme set
before mount. BaseModal reactive size, NewClientModal name check and focus
on opened, HistoryModal ignores stale answers. Login.vue.bak, the dead
global axios interceptor and empty <p> removed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-07 13:10:41 +03:00
1 parent 600119cdd1
commit 897c82ab88
23 files changed
+430 -710

No files matched your search

+3 -4
View File
@@ -22,7 +22,7 @@
</template>
<script setup>
import { ref, onMounted, onUnmounted } from 'vue';
import { ref, computed, onMounted, onUnmounted } from 'vue';
import { Modal } from 'bootstrap';
const props = defineProps({
@@ -40,11 +40,11 @@ const props = defineProps({
}
});
const emit = defineEmits(['close', 'opened', 'closed']);
const emit = defineEmits(['opened', 'closed']);
const modalRef = ref(null);
let bsModal = null;
const sizeClass = props.size || '';
const sizeClass = computed(() => props.size || '');
const show = () => {
bsModal?.show();
@@ -63,7 +63,6 @@ onMounted(() => {
modalRef.value.addEventListener('hidden.bs.modal', () => {
emit('closed');
emit('close');
});
});