diff --git a/public/assets/icons/drawable-xxhdpi/vip_expired.png b/public/assets/icons/drawable-xxhdpi/vip_expired.png deleted file mode 100644 index fed7125..0000000 Binary files a/public/assets/icons/drawable-xxhdpi/vip_expired.png and /dev/null differ diff --git a/src/pages/NoteEditorPage.vue b/src/pages/NoteEditorPage.vue index 3299c13..ac0192e 100644 --- a/src/pages/NoteEditorPage.vue +++ b/src/pages/NoteEditorPage.vue @@ -1,174 +1,317 @@ - -const props = defineProps({ - noteId: { - type: String, - default: null - } -}); - -const store = useAppStore(); - -// 加载初始数据 -onMounted(() => { - store.loadData(); -}); - -// Check if we're editing an existing note -const isEditing = !!props.noteId; -const existingNote = isEditing ? store.notes.find(n => n.id === props.noteId) : null; - -// Initialize state with existing note data or empty strings -const title = ref(existingNote?.title || ''); -const content = ref(existingNote?.content || ''); -const showAlert = ref(false); - -const handleSave = async () => { - // Validate input - if (!title.value.trim()) { - // In a full implementation, show an alert or toast - console.log('Validation error: Please enter a note title.'); - return; - } - - try { - if (isEditing && existingNote) { - // Update existing note - await store.updateNote(props.noteId, { title: title.value, content: content.value }); - } else { - // Create new note - await store.addNote({ title: title.value, content: content.value, isStarred: false }); + diff --git a/src/pages/NoteEditorPage_old.vue b/src/pages/NoteEditorPage_old.vue new file mode 100644 index 0000000..3299c13 --- /dev/null +++ b/src/pages/NoteEditorPage_old.vue @@ -0,0 +1,174 @@ + + + \ No newline at end of file