UI: shared toast notifications in the bottom-right corner

- useToast composable and ToastContainer (mounted once in App.vue):
  stacked toasts with icon, close button and progress bar, hover pause,
  slide-in animation, aria roles, full width on phones.
- Light and dark theme colour tokens; old .toast-message styles removed.
- PKIConfig, VPNConfig, ServerManagement and Certificates use the shared
  toast through thin showMessage/showToast wrappers.
- Docs: plan and summary in DOCS/Changes, README, Index.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-04 21:05:41 +03:00
1 parent d251ec73d0
commit dcc3d7f2d5
12 files changed
+316 -93

No files matched your search

+3 -19
View File
@@ -5,10 +5,6 @@
<h1>Server Process Management</h1>
</div>
<div v-if="message.text" :class="['toast-message', 'toast-' + message.type, 'show']">
<i :class="['fas', message.icon]"></i> {{ message.text }}
</div>
<!-- Stats Grid -->
<!-- User requested specific order: CPU (full), Status, PID, Memory, Uptime -->
@@ -92,8 +88,10 @@
<script setup>
import { ref, reactive, onMounted, onUnmounted } from 'vue';
import { useApi } from '../composables/useApi';
import { useToast } from '../composables/useToast';
const { profilesApiClient } = useApi();
const toast = useToast();
// State
const stats = reactive({
@@ -104,26 +102,12 @@ const stats = reactive({
uptime: null
});
const message = reactive({
text: '',
type: 'success',
icon: 'fa-check-circle'
});
const isLoading = ref(false);
const action = ref(''); // 'start', 'stop', 'restart'
let pollInterval = null;
// Methods
const showMessage = (text, type = 'success') => {
message.text = text;
message.type = type;
message.icon = type === 'success' ? 'fa-check-circle' : 'fa-exclamation-circle';
setTimeout(() => {
message.text = '';
}, 4000);
};
const showMessage = (text, type = 'success') => toast.show(text, type);
const fetchStats = async () => {
try {