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 -13
View File
@@ -147,11 +147,6 @@
<NewClientModal ref="newClientModal" @create="createClient" />
<ConfirmModal ref="confirmModal" @confirm="confirmRevoke" />
<ProfileDetailsModal ref="detailsModal" @save="saveNote" />
<div v-if="toastMessage" class="toast-message show" :class="'toast-' + toastType" style="position: fixed; bottom: 20px; right: 20px; z-index: 9999;">
<i class="fas" :class="toastType === 'success' ? 'fa-check-circle' : 'fa-exclamation-circle'"></i>
{{ toastMessage }}
</div>
</template>
<script setup>
@@ -161,8 +156,10 @@ import NewClientModal from '../components/NewClientModal.vue';
import ConfirmModal from '../components/ConfirmModal.vue';
import ProfileDetailsModal from '../components/ProfileDetailsModal.vue';
import vNoteTooltip from '../directives/noteTooltip';
import { useToast } from '../composables/useToast';
const { profilesApiClient } = useApi();
const toast = useToast();
const loading = ref(true);
const allProfiles = ref([]);
@@ -172,14 +169,7 @@ const hideExpired = ref(false);
const newClientModal = ref(null);
const confirmModal = ref(null);
const detailsModal = ref(null);
const toastMessage = ref('');
const toastType = ref('success');
const showToast = (msg, type = 'success') => {
toastMessage.value = msg;
toastType.value = type;
setTimeout(() => toastMessage.value = '', 3000);
};
const showToast = (msg, type = 'success') => toast.show(msg, type);
const formatDate = (dateStr) => {
if (!dateStr) return 'N/A';