-
17 | Select some items to continue
18 |
26 |
Note for ${noteDate} do not exist.
Would you like to create one?
`); 62 | await joplin.views.dialogs.addScript(this.createDialog, './scripts/dailyNote/dialog.css'); 63 | const dialogResult = await joplin.views.dialogs.open(this.createDialog); 64 | if (dialogResult.id === 'ok') { 65 | const createNoteId = await createDailyNoteByDate(noteDate, this.config.todoNote); 66 | await joplin.commands.execute('openItem', `:/${createNoteId}`); 67 | } 68 | } else { 69 | await joplin.commands.execute('openItem', `:/${noteId}`); 70 | } 71 | return true; 72 | } 73 | break; 74 | case 'sidebar_dailynote_show_calendar_for': 75 | await this.sidebar.updateHtml(this.id, await createCalendar(msg.id.year, msg.id.month, this.config)); 76 | this.year = msg.id.year; 77 | this.month = msg.id.month; 78 | return true; 79 | default: 80 | break; 81 | } 82 | return false; 83 | } 84 | } 85 | 86 | const dailyNotePlugin = new DailyNotePlugin(); 87 | export default dailyNotePlugin; 88 | -------------------------------------------------------------------------------- /src/dailyNote/panelHtml.ts: -------------------------------------------------------------------------------- 1 | import * as moment from "moment"; 2 | import {getDailyNoteIdsByMonth} from "./utils"; 3 | import {DailyNoteConfig} from "./settings"; 4 | import {cellInnerHtml} from "./htmlGenerator"; 5 | 6 | function createCell(monthClass: string, hasNote: boolean, isToday: boolean, date, finishedTaskCount?: number, config?: DailyNoteConfig, wordCount?: number) { 7 | return `Su | 30 |Mo | 31 |Tu | 32 |We | 33 |Th | 34 |Fr | 35 |Sa | `; 36 | } else { 37 | table += ` 38 |Mo | 39 |Tu | 40 |We | 41 |Th | 42 |Fr | 43 |Sa | 44 |Su | `; 45 | } 46 | table += `
No table of contents
100 |${title} | 28 ||||
---|---|---|---|
${authors.join(', ')} | 33 ||||
${from} | 36 |${year} | 37 |${tags.length > 0 ? tags : 'No tags'} | 38 |${stars} | 39 |
${abstract} | 42 ||||
User Notes: ${notes} |
45 |
${item.title} | 44 ||||
---|---|---|---|
${item.authors.join(', ')} | 49 ||||
${item.journal} | 52 |${item.year} | 53 |${item.tags.length > 0 ? item.tags : 'No tags'} | 54 |${stars} | 55 |
${item.abstract} | 58 ||||
User Notes: ${item.notes} |
61 |