16ecd6bbeb
Backend: - models/base.py: TimestampMixin + CreatedAtMixin; applied to all 10+ models - routes/utils.py: not_found() + parse_iso_date() helpers; used across all route files - routes/milestones.py: _milestone_dict() helper replaces 5 repeated to_dict + progress blocks Frontend: - 5 new composables: useAutoSave, useEditorGuards, useTagSuggestions, useFloatingAssist, useListKeyboardNavigation - ConfirmDialog.vue: reusable confirm modal replacing inline <teleport> blocks - editor-shared.css: sidebar CSS consolidated from both editor views - viewer-shared.css: context-bar/breadcrumb CSS consolidated from both viewer views - NoteEditorView + TaskEditorView: ~120 lines each replaced with composable calls; duplicate scoped sidebar CSS removed - NotesListView + TasksListView: inline keyboard-nav replaced with composable - NoteViewerView + TaskViewerView: duplicate context-bar CSS removed No behaviour changes. Net: -634 lines, +237 lines across 31 files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
854 B
Vue
38 lines
854 B
Vue
<script setup lang="ts">
|
|
withDefaults(
|
|
defineProps<{
|
|
title: string;
|
|
message: string;
|
|
confirmLabel?: string;
|
|
danger?: boolean;
|
|
}>(),
|
|
{
|
|
confirmLabel: "Delete",
|
|
danger: true,
|
|
}
|
|
);
|
|
|
|
const emit = defineEmits<{
|
|
confirm: [];
|
|
cancel: [];
|
|
}>();
|
|
</script>
|
|
|
|
<template>
|
|
<teleport to="body">
|
|
<div class="modal-overlay" @click="emit('cancel')">
|
|
<div class="modal-card" @click.stop>
|
|
<h3 class="modal-title">{{ title }}</h3>
|
|
<p class="modal-message">{{ message }}</p>
|
|
<div class="modal-actions">
|
|
<button class="modal-btn" @click="emit('cancel')">Cancel</button>
|
|
<button
|
|
:class="['modal-btn', { 'modal-btn-danger': danger }]"
|
|
@click="emit('confirm')"
|
|
>{{ confirmLabel }}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</teleport>
|
|
</template>
|