var t = `
Weekly note
Daily note
` import DatePicker from './datepicker.js' export default { components: { DatePicker }, emits: ['note-daily', 'note-weekly', 'periodic-close'], data() { return { showDatePicker: false, periodicNoteDate: null, periodicNoteDates: {}, } }, methods: { fetchPeriodicNoteDates() { fetch('/api/raw/list?prefix=ctime&date=2006-01-02T15:04:05') .then(response => response.text()) .then(text => { const dates = text.split('\n').reduce((acc, line) => { const parts = line.split(' '); if (parts.length > 1) { const date = parts[1].split('T')[0]; const time = parts[1].split('T')[1]; if (time === '00:00:00') { if (!acc[date]) acc[date] = []; if (!acc[date].includes('daily')) acc[date].push('daily'); } else if (time === '00:00:01') { if (!acc[date]) acc[date] = []; if (!acc[date].includes('weekly')) acc[date].push('weekly'); } } return acc; }, {}); this.periodicNoteDates = dates; this.showDatePicker = true; }); }, }, created() { this.fetchPeriodicNoteDates(); }, template: t }