mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-12 20:02:28 +08:00
feat(calendar): add list view & improve styling
This commit is contained in:
parent
ceddc1b497
commit
d67dd27568
11
package-lock.json
generated
11
package-lock.json
generated
@ -116,6 +116,7 @@
|
|||||||
"@electron-forge/plugin-auto-unpack-natives": "7.7.0",
|
"@electron-forge/plugin-auto-unpack-natives": "7.7.0",
|
||||||
"@electron/rebuild": "3.7.1",
|
"@electron/rebuild": "3.7.1",
|
||||||
"@eslint/js": "9.22.0",
|
"@eslint/js": "9.22.0",
|
||||||
|
"@fullcalendar/list": "6.1.15",
|
||||||
"@fullcalendar/timegrid": "6.1.15",
|
"@fullcalendar/timegrid": "6.1.15",
|
||||||
"@playwright/test": "1.51.0",
|
"@playwright/test": "1.51.0",
|
||||||
"@popperjs/core": "2.11.8",
|
"@popperjs/core": "2.11.8",
|
||||||
@ -2903,6 +2904,16 @@
|
|||||||
"@fullcalendar/core": "~6.1.15"
|
"@fullcalendar/core": "~6.1.15"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@fullcalendar/list": {
|
||||||
|
"version": "6.1.15",
|
||||||
|
"resolved": "https://registry.npmjs.org/@fullcalendar/list/-/list-6.1.15.tgz",
|
||||||
|
"integrity": "sha512-U1bce04tYDwkFnuVImJSy2XalYIIQr6YusOWRPM/5ivHcJh67Gm8CIMSWpi3KdRSNKFkqBxLPkfZGBMaOcJYug==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"peerDependencies": {
|
||||||
|
"@fullcalendar/core": "~6.1.15"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@fullcalendar/timegrid": {
|
"node_modules/@fullcalendar/timegrid": {
|
||||||
"version": "6.1.15",
|
"version": "6.1.15",
|
||||||
"resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.15.tgz",
|
"resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.15.tgz",
|
||||||
|
@ -173,6 +173,7 @@
|
|||||||
"@electron-forge/plugin-auto-unpack-natives": "7.7.0",
|
"@electron-forge/plugin-auto-unpack-natives": "7.7.0",
|
||||||
"@electron/rebuild": "3.7.1",
|
"@electron/rebuild": "3.7.1",
|
||||||
"@eslint/js": "9.22.0",
|
"@eslint/js": "9.22.0",
|
||||||
|
"@fullcalendar/list": "6.1.15",
|
||||||
"@fullcalendar/timegrid": "6.1.15",
|
"@fullcalendar/timegrid": "6.1.15",
|
||||||
"@playwright/test": "1.51.0",
|
"@playwright/test": "1.51.0",
|
||||||
"@popperjs/core": "2.11.8",
|
"@popperjs/core": "2.11.8",
|
||||||
|
@ -30,12 +30,19 @@ const TPL = `
|
|||||||
|
|
||||||
.calendar-container {
|
.calendar-container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
--fc-border-color: var(--main-border-color);
|
||||||
|
--fc-neutral-bg-color: var(--launcher-pane-background-color);
|
||||||
|
--fc-list-event-hover-bg-color: var(--left-pane-item-hover-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-container .fc-toolbar.fc-header-toolbar {
|
.calendar-container .fc-toolbar.fc-header-toolbar {
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.calendar-container .fc-list-sticky .fc-list-day > * {
|
||||||
|
z-index: 50;
|
||||||
|
}
|
||||||
|
|
||||||
body.desktop:not(.zen) .calendar-container .fc-toolbar.fc-header-toolbar {
|
body.desktop:not(.zen) .calendar-container .fc-toolbar.fc-header-toolbar {
|
||||||
padding-right: 5em;
|
padding-right: 5em;
|
||||||
}
|
}
|
||||||
@ -103,6 +110,7 @@ export default class CalendarView extends ViewMode {
|
|||||||
const plugins: PluginDef[] = [];
|
const plugins: PluginDef[] = [];
|
||||||
plugins.push((await import("@fullcalendar/daygrid")).default);
|
plugins.push((await import("@fullcalendar/daygrid")).default);
|
||||||
plugins.push((await import("@fullcalendar/timegrid")).default);
|
plugins.push((await import("@fullcalendar/timegrid")).default);
|
||||||
|
plugins.push((await import("@fullcalendar/list")).default);
|
||||||
if (isEditable || this.isCalendarRoot) {
|
if (isEditable || this.isCalendarRoot) {
|
||||||
plugins.push((await import("@fullcalendar/interaction")).default);
|
plugins.push((await import("@fullcalendar/interaction")).default);
|
||||||
}
|
}
|
||||||
@ -162,7 +170,7 @@ export default class CalendarView extends ViewMode {
|
|||||||
},
|
},
|
||||||
headerToolbar: {
|
headerToolbar: {
|
||||||
start: "title",
|
start: "title",
|
||||||
end: "dayGridMonth,timeGridWeek today prev,next"
|
end: "dayGridMonth,timeGridWeek,listMonth today prev,next"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
calendar.render();
|
calendar.render();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user