mirror of
https://github.com/zadam/trilium.git
synced 2025-12-04 22:44:25 +01:00
Compare commits
11 Commits
4ab6bff846
...
55285bab5a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55285bab5a | ||
|
|
64662d5215 | ||
|
|
31cedad976 | ||
|
|
12ac5147d3 | ||
|
|
17291ff61d | ||
|
|
f3e334470e | ||
|
|
9407051f1e | ||
|
|
08a6d36153 | ||
|
|
f906fb9b4c | ||
|
|
b4a6356724 | ||
|
|
9004b724e7 |
@ -49,30 +49,6 @@
|
|||||||
z-index: 50;
|
z-index: 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-container a.fc-event {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar-container a.fc-event.archived {
|
|
||||||
opacity: .65;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar-container a.fc-event.archived::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: -1;
|
|
||||||
|
|
||||||
--c1: transparent;
|
|
||||||
--c2: var(--callendar-coll-event-archived-sripe-color);
|
|
||||||
|
|
||||||
background: repeating-linear-gradient(45deg, var(--c1), var(--c1) 8px,
|
|
||||||
var(--c2) 8px, var(--c2) 16px) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar-container .fc-button {
|
.calendar-container .fc-button {
|
||||||
padding: 0.2em 0.5em;
|
padding: 0.2em 0.5em;
|
||||||
}
|
}
|
||||||
@ -113,15 +89,38 @@ body.desktop:not(.zen) .calendar-view .calendar-header {
|
|||||||
|
|
||||||
/* #region Events */
|
/* #region Events */
|
||||||
|
|
||||||
.calendar-view a.fc-timegrid-event,
|
/*
|
||||||
.calendar-view a.fc-daygrid-event,
|
* week, month, year views
|
||||||
.fc-daygrid-dot-event .fc-event-title {
|
*/
|
||||||
font-weight: 500;
|
|
||||||
|
.calendar-container a.fc-event {
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-view a.fc-timegrid-event:focus-visible,
|
.calendar-container a.fc-event.archived {
|
||||||
.calendar-view a.fc-daygrid-event:focus-visible {
|
opacity: .65;
|
||||||
outline: none;
|
}
|
||||||
|
|
||||||
|
.calendar-container a.fc-event.archived::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: -1;
|
||||||
|
|
||||||
|
--c1: transparent;
|
||||||
|
--c2: var(--callendar-coll-event-archived-sripe-color);
|
||||||
|
|
||||||
|
background: repeating-linear-gradient(45deg, var(--c1), var(--c1) 8px,
|
||||||
|
var(--c2) 8px, var(--c2) 16px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendar-view a.fc-timegrid-event,
|
||||||
|
.calendar-view a.fc-daygrid-event,
|
||||||
|
.calendar-view .fc-daygrid-dot-event .fc-event-title {
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-view a.fc-timegrid-event,
|
.calendar-view a.fc-timegrid-event,
|
||||||
@ -137,6 +136,20 @@ body.desktop:not(.zen) .calendar-view .calendar-header {
|
|||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.calendar-view .fc-timegrid-event.with-hue,
|
||||||
|
.calendar-view .fc-daygrid-event.with-hue {
|
||||||
|
--fc-event-text-color: var(--custom-color);
|
||||||
|
|
||||||
|
--fc-event-bg-color: hsl(var(--custom-color-hue),
|
||||||
|
var(--calendar-coll-event-background-saturation),
|
||||||
|
var(--calendar-coll-event-background-lightness)) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendar-view a.fc-timegrid-event:focus-visible,
|
||||||
|
.calendar-view a.fc-daygrid-event:focus-visible {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
.calendar-view a.fc-timegrid-event.fc-event-selected,
|
.calendar-view a.fc-timegrid-event.fc-event-selected,
|
||||||
.calendar-view a.fc-timegrid-event.fc-event:focus,
|
.calendar-view a.fc-timegrid-event.fc-event:focus,
|
||||||
.calendar-view a.fc-daygrid-event.fc-event-selected,
|
.calendar-view a.fc-daygrid-event.fc-event-selected,
|
||||||
@ -153,21 +166,26 @@ body.desktop:not(.zen) .calendar-view .calendar-header {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-view .fc-timegrid-event.with-hue,
|
.calendar-view .fc-daygrid-event-dot {
|
||||||
.calendar-view .fc-daygrid-event.with-hue {
|
display: none;
|
||||||
--fc-event-text-color: var(--custom-color);
|
|
||||||
|
|
||||||
--fc-event-bg-color: hsl(var(--custom-color-hue),
|
|
||||||
var(--calendar-coll-event-background-saturation),
|
|
||||||
var(--calendar-coll-event-background-lightness)) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.calendar-view .fc-event-time {
|
.calendar-view .fc-event-time {
|
||||||
opacity: .75;
|
opacity: .75;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fc-daygrid-event-dot {
|
/*
|
||||||
display: none;
|
* List view
|
||||||
|
*/
|
||||||
|
|
||||||
|
.fc-list-table tr.fc-event.archived {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fc-list-table .fc-list-event-dot {
|
||||||
|
/* Apply note colors to the list item dots */
|
||||||
|
--fc-event-border-color: var(--custom-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #endregion */
|
/* #endregion */
|
||||||
@ -165,9 +165,20 @@ export function CodeEditor({ parentComponent, ntxId, containerRef: externalConta
|
|||||||
useTriliumEvent("executeWithCodeEditor", async ({ resolve, ntxId: eventNtxId }) => {
|
useTriliumEvent("executeWithCodeEditor", async ({ resolve, ntxId: eventNtxId }) => {
|
||||||
if (eventNtxId !== ntxId) return;
|
if (eventNtxId !== ntxId) return;
|
||||||
await initialized.current.promise();
|
await initialized.current.promise();
|
||||||
|
if (!codeEditorRef.current) return;
|
||||||
resolve(codeEditorRef.current!);
|
resolve(codeEditorRef.current!);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useTriliumEvent("noteContextRemoved", async ({ ntxIds: eventNtxIds }) => {
|
||||||
|
if (!ntxId || !eventNtxIds.includes(ntxId)) return;
|
||||||
|
|
||||||
|
const cm = codeEditorRef.current;
|
||||||
|
if (cm) {
|
||||||
|
cm.destroy();
|
||||||
|
codeEditorRef.current = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
useTriliumEvent("executeWithContentElement", async ({ resolve, ntxId: eventNtxId}) => {
|
useTriliumEvent("executeWithContentElement", async ({ resolve, ntxId: eventNtxId}) => {
|
||||||
if (eventNtxId !== ntxId) return;
|
if (eventNtxId !== ntxId) return;
|
||||||
await initialized.current.promise();
|
await initialized.current.promise();
|
||||||
|
|||||||
@ -188,6 +188,16 @@ export default function EditableText({ note, parentComponent, ntxId, noteContext
|
|||||||
resolve(editor);
|
resolve(editor);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useTriliumEvent("noteContextRemoved", async ({ ntxIds: eventNtxIds }) => {
|
||||||
|
if (!ntxId || !eventNtxIds.includes(ntxId)) return;
|
||||||
|
|
||||||
|
const watchdog = watchdogRef.current;
|
||||||
|
if (!watchdog) return;
|
||||||
|
|
||||||
|
await watchdog.destroy();
|
||||||
|
watchdogRef.current = null;
|
||||||
|
});
|
||||||
|
|
||||||
async function waitForEditor() {
|
async function waitForEditor() {
|
||||||
await initialized.current;
|
await initialized.current;
|
||||||
const editor = watchdogRef.current?.editor;
|
const editor = watchdogRef.current?.editor;
|
||||||
|
|||||||
@ -51,6 +51,15 @@ export default function ReadOnlyText({ note, noteContext, ntxId }: TypeWidgetPro
|
|||||||
resolve($(contentRef.current));
|
resolve($(contentRef.current));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useTriliumEvent("noteContextRemoved", ({ ntxIds: eventNtxIds }) => {
|
||||||
|
if (!ntxId || !eventNtxIds.includes(ntxId)) return;
|
||||||
|
|
||||||
|
if (contentRef.current) {
|
||||||
|
contentRef.current.innerHTML = "";
|
||||||
|
}
|
||||||
|
contentRef.current = null;
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<RawHtmlBlock
|
<RawHtmlBlock
|
||||||
|
|||||||
@ -63,7 +63,7 @@ For each note of the calendar, the following attributes can be used:
|
|||||||
| `#startTime` | The time the event starts at. If this value is missing, then the event is considered a full-day event. The format is `HH:MM` (hours in 24-hour format and minutes). |
|
| `#startTime` | The time the event starts at. If this value is missing, then the event is considered a full-day event. The format is `HH:MM` (hours in 24-hour format and minutes). |
|
||||||
| `#endTime` | Similar to `startTime`, it mentions the time at which the event ends (in relation with `endDate` if present, or `startDate`). |
|
| `#endTime` | Similar to `startTime`, it mentions the time at which the event ends (in relation with `endDate` if present, or `startDate`). |
|
||||||
| `#color` | Displays the event with a specified color (named such as `red`, `gray` or hex such as `#FF0000`). This will also change the color of the note in other places such as the note tree. |
|
| `#color` | Displays the event with a specified color (named such as `red`, `gray` or hex such as `#FF0000`). This will also change the color of the note in other places such as the note tree. |
|
||||||
| `#calendar:color` | Similar to `#color`, but applies the color only for the event in the calendar and not for other places such as the note tree. |
|
| `#calendar:color` | Similar to `#color`, but applies the color only for the event in the calendar and not for other places such as the note tree. (*Deprecated*) |
|
||||||
| `#iconClass` | If present, the icon of the note will be displayed to the left of the event title. |
|
| `#iconClass` | If present, the icon of the note will be displayed to the left of the event title. |
|
||||||
| `#calendar:title` | Changes the title of an event to point to an attribute of the note other than the title, can either a label or a relation (without the `#` or `~` symbol). See _Use-cases_ for more information. |
|
| `#calendar:title` | Changes the title of an event to point to an attribute of the note other than the title, can either a label or a relation (without the `#` or `~` symbol). See _Use-cases_ for more information. |
|
||||||
| `#calendar:displayedAttributes` | Allows displaying the value of one or more attributes in the calendar like this: <br> <br> <br> <br>`#weight="70" #Mood="Good" #calendar:displayedAttributes="weight,Mood"` <br> <br>It can also be used with relations, case in which it will display the title of the target note: <br> <br>`~assignee=@My assignee #calendar:displayedAttributes="assignee"` |
|
| `#calendar:displayedAttributes` | Allows displaying the value of one or more attributes in the calendar like this: <br> <br> <br> <br>`#weight="70" #Mood="Good" #calendar:displayedAttributes="weight,Mood"` <br> <br>It can also be used with relations, case in which it will display the title of the target note: <br> <br>`~assignee=@My assignee #calendar:displayedAttributes="assignee"` |
|
||||||
|
|||||||
@ -25,7 +25,6 @@
|
|||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
||||||
"@ckeditor/ckeditor5-dev-utils": "43.1.0",
|
|
||||||
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
||||||
"@ckeditor/ckeditor5-package-tools": "5.0.1",
|
"@ckeditor/ckeditor5-package-tools": "5.0.1",
|
||||||
"@typescript-eslint/eslint-plugin": "~8.48.0",
|
"@typescript-eslint/eslint-plugin": "~8.48.0",
|
||||||
|
|||||||
1255
pnpm-lock.yaml
generated
1255
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user