mirror of
https://github.com/zadam/trilium.git
synced 2025-12-05 23:14:24 +01:00
Compare commits
11 Commits
f505e68397
...
a7ca1f00d8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7ca1f00d8 | ||
|
|
32c16021c4 | ||
|
|
7713c1173a | ||
|
|
8018f400c3 | ||
|
|
79c8293881 | ||
|
|
db5652623b | ||
|
|
0f7a48b323 | ||
|
|
415d2826c6 | ||
|
|
7787e7085e | ||
|
|
4ab8417168 | ||
|
|
0c3b552678 |
@ -27,6 +27,9 @@
|
||||
--bs-body-bg: var(--main-background-color) !important;
|
||||
--ck-mention-list-max-height: 500px;
|
||||
--tn-modal-max-height: 90vh;
|
||||
|
||||
--tree-item-light-theme-max-color-lightness: 50;
|
||||
--tree-item-dark-theme-min-color-lightness: 75;
|
||||
}
|
||||
|
||||
body#trilium-app.motion-disabled *,
|
||||
@ -2580,3 +2583,11 @@ iframe.print-iframe {
|
||||
flex-grow: 1;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Calendar collection */
|
||||
|
||||
.calendar-view a.fc-timegrid-event,
|
||||
.calendar-view a.fc-daygrid-event {
|
||||
/* Workaround: set font weight only if the theme-next is not active */
|
||||
font-weight: var(--root-background, 800);
|
||||
}
|
||||
@ -76,6 +76,9 @@
|
||||
|
||||
--mermaid-theme: dark;
|
||||
--native-titlebar-background: #00000000;
|
||||
|
||||
--calendar-coll-event-background-saturation: 30%;
|
||||
--calendar-coll-event-background-lightness: 30%;
|
||||
}
|
||||
|
||||
body ::-webkit-calendar-picker-indicator {
|
||||
|
||||
@ -80,6 +80,9 @@ html {
|
||||
|
||||
--mermaid-theme: default;
|
||||
--native-titlebar-background: #ffffff00;
|
||||
|
||||
--calendar-coll-event-background-lightness: 95%;
|
||||
--calendar-coll-event-background-saturation: 80%;
|
||||
}
|
||||
|
||||
#left-pane .fancytree-node.tinted {
|
||||
|
||||
@ -271,11 +271,12 @@
|
||||
--ck-editor-toolbar-button-on-shadow: 1px 1px 2px rgba(0, 0, 0, .75);
|
||||
--ck-editor-toolbar-dropdown-button-open-background: #ffffff14;
|
||||
|
||||
--calendar-coll-event-background-saturation: 12%;
|
||||
--calendar-coll-event-background-lightness: 21%;
|
||||
--calendar-coll-event-background-saturation: 25%;
|
||||
--calendar-coll-event-background-lightness: 20%;
|
||||
--calendar-coll-event-background-color: #3c3c3c;
|
||||
--calendar-coll-event-text-color: white;
|
||||
--calendar-cell-event-hover-filter: brightness(1.25);
|
||||
--calendar-coll-today-background-color: #ffffff08;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -274,6 +274,7 @@
|
||||
--calendar-coll-event-background-color: #eaeaea;
|
||||
--calendar-coll-event-text-color: black;
|
||||
--calendar-cell-event-hover-filter: brightness(.95) saturate(1.25);
|
||||
--calendar-coll-today-background-color: #00000006;
|
||||
}
|
||||
|
||||
#left-pane .fancytree-node.tinted {
|
||||
|
||||
@ -81,7 +81,6 @@ export async function buildEventsForCalendar(note: FNote, e: EventSourceFuncArg)
|
||||
export async function buildEvent(note: FNote, { startDate, endDate, startTime, endTime, isArchived }: Event) {
|
||||
const customTitleAttributeName = note.getLabelValue("calendar:title");
|
||||
const titles = await parseCustomTitle(customTitleAttributeName, note);
|
||||
const color = note.getLabelValue("calendar:color") ?? note.getLabelValue("color");
|
||||
const colorClass = note.getColorClass();
|
||||
const events: EventInput[] = [];
|
||||
|
||||
@ -110,7 +109,6 @@ export async function buildEvent(note: FNote, { startDate, endDate, startTime, e
|
||||
start: startDate,
|
||||
url: `#${note.noteId}?popup`,
|
||||
noteId: note.noteId,
|
||||
color: color ?? undefined,
|
||||
iconClass: note.getLabelValue("iconClass"),
|
||||
promotedAttributes: displayedAttributesData,
|
||||
className: clsx({archived: isArchived}, colorClass)
|
||||
|
||||
@ -1,8 +1,19 @@
|
||||
:root {
|
||||
/* Default values to be overridden by themes */
|
||||
--calendar-coll-event-background-lightness: 95%;
|
||||
--calendar-coll-event-background-saturation: 80%;
|
||||
--calendar-coll-event-background-color: var(--accented-background-color);
|
||||
--calendar-coll-event-text-color: var(--primary-button-text-color);
|
||||
--calendar-cell-event-hover-filter: none;
|
||||
--calendar-coll-today-background-color: var(--more-accented-background-color);
|
||||
}
|
||||
|
||||
.calendar-view {
|
||||
--fc-event-border-color: var(--calendar-coll-event-text-color);
|
||||
--fc-event-bg-color: var(--calendar-coll-event-background-color);
|
||||
--fc-event-text-color: var(--calendar-coll-event-text-color);
|
||||
--fc-event-selected-overlay-color: transparent;
|
||||
--fc-today-bg-color: var(--calendar-coll-today-background-color);
|
||||
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
@ -12,8 +23,9 @@
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.calendar-view a {
|
||||
color: unset;
|
||||
.calendar-view a,
|
||||
:root .calendar-view a.fc-daygrid-event:hover {
|
||||
color: var(--fc-event-text-color);
|
||||
}
|
||||
|
||||
.search-result-widget-content .calendar-view {
|
||||
@ -85,17 +97,25 @@ body.desktop:not(.zen) .calendar-view .calendar-header {
|
||||
/* #region Events */
|
||||
|
||||
.calendar-view a.fc-timegrid-event,
|
||||
.calendar-view a.fc-daygrid-event {
|
||||
.calendar-view a.fc-daygrid-event,
|
||||
.fc-daygrid-dot-event .fc-event-title {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.calendar-view a.fc-timegrid-event:focus-visible,
|
||||
.calendar-view a.fc-daygrid-event:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.calendar-view a.fc-timegrid-event,
|
||||
.calendar-view a.fc-daygrid-event:not(.fc-daygrid-dot-event) {
|
||||
.calendar-view a.fc-daygrid-event {
|
||||
--border-color: transparent;
|
||||
|
||||
border-width: 2px 2px 2px 4px;
|
||||
border: 2px solid;
|
||||
border-left-width: 4px;
|
||||
border-color: var(--border-color) var(--border-color) var(--border-color)
|
||||
var(--fc-event-text-color) !important;
|
||||
background: var(--fc-event-bg-color) !important;
|
||||
|
||||
padding-left: 8px;
|
||||
}
|
||||
@ -115,8 +135,8 @@ body.desktop:not(.zen) .calendar-view .calendar-header {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
.fc-timegrid-event.with-hue,
|
||||
.fc-daygrid-event:not(.fc-daygrid-dot-event).with-hue {
|
||||
.calendar-view .fc-timegrid-event.with-hue,
|
||||
.calendar-view .fc-daygrid-event.with-hue {
|
||||
--fc-event-text-color: var(--custom-color);
|
||||
|
||||
background: hsl(var(--custom-color-hue),
|
||||
@ -124,8 +144,12 @@ body.desktop:not(.zen) .calendar-view .calendar-header {
|
||||
var(--calendar-coll-event-background-lightness)) !important;
|
||||
}
|
||||
|
||||
.fc-event-time {
|
||||
.calendar-view .fc-event-time {
|
||||
opacity: .75;
|
||||
}
|
||||
|
||||
.fc-daygrid-event-dot {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* #endregion */
|
||||
@ -1,8 +1,9 @@
|
||||
import path from "path";
|
||||
import path, { join } from "path";
|
||||
import fs from "fs-extra";
|
||||
import { LOCALES } from "@triliumnext/commons";
|
||||
import { PRODUCT_NAME } from "../src/app-info.js";
|
||||
import type { ForgeConfig } from "@electron-forge/shared-types";
|
||||
import { existsSync } from "fs";
|
||||
|
||||
const ELECTRON_FORGE_DIR = __dirname;
|
||||
|
||||
@ -228,8 +229,22 @@ const config: ForgeConfig = {
|
||||
// Ensure all locales that should be kept are actually present.
|
||||
for (const locale of localesToKeep) {
|
||||
if (!keptLocales.has(locale)) {
|
||||
console.error(`Locale ${locale} was not found in the packaged app.`);
|
||||
process.exit(1);
|
||||
throw new Error(`Locale ${locale} was not found in the packaged app.`);
|
||||
}
|
||||
}
|
||||
|
||||
// Check that the bettersqlite3 binary has the right architecture.
|
||||
if (packageResult.platform === "linux" && packageResult.arch === "arm64") {
|
||||
for (const outputPath of packageResult.outputPaths) {
|
||||
const binaryPath = join(outputPath, "resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node");
|
||||
if (!existsSync(binaryPath)) {
|
||||
throw new Error(`[better-sqlite3] Unable to find .node file at ${binaryPath}`);
|
||||
}
|
||||
|
||||
const actualArch = getELFArch(binaryPath);
|
||||
if (actualArch !== "ARM64") {
|
||||
throw new Error(`[better-sqlite3] Expected ARM64 architecture but got ${actualArch} at: ${binaryPath}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -284,4 +299,20 @@ function getExtraResourcesForPlatform() {
|
||||
return resources;
|
||||
}
|
||||
|
||||
function getELFArch(file: string) {
|
||||
const buf = fs.readFileSync(file);
|
||||
|
||||
if (buf[0] !== 0x7f || buf[1] !== 0x45 || buf[2] !== 0x4c || buf[3] !== 0x46) {
|
||||
throw new Error("Not an ELF file");
|
||||
}
|
||||
|
||||
const eiClass = buf[4]; // 1=32-bit, 2=64-bit
|
||||
const eiMachine = buf[18]; // architecture code
|
||||
|
||||
if (eiMachine === 0x3E) return 'x86-64';
|
||||
if (eiMachine === 0xB7) return 'ARM64';
|
||||
return 'other';
|
||||
}
|
||||
|
||||
|
||||
export default config;
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
"@triliumnext/commons": "workspace:*",
|
||||
"@triliumnext/server": "workspace:*",
|
||||
"copy-webpack-plugin": "13.0.1",
|
||||
"electron": "38.7.2",
|
||||
"electron": "39.2.4",
|
||||
"@electron-forge/cli": "7.10.2",
|
||||
"@electron-forge/maker-deb": "7.10.2",
|
||||
"@electron-forge/maker-dmg": "7.10.2",
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"@triliumnext/desktop": "workspace:*",
|
||||
"@types/fs-extra": "11.0.4",
|
||||
"copy-webpack-plugin": "13.0.1",
|
||||
"electron": "38.7.2",
|
||||
"electron": "39.2.4",
|
||||
"fs-extra": "11.3.2"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
"debounce": "3.0.0",
|
||||
"debug": "4.4.3",
|
||||
"ejs": "3.1.10",
|
||||
"electron": "38.7.2",
|
||||
"electron": "39.2.4",
|
||||
"electron-debug": "4.1.0",
|
||||
"electron-window-state": "5.0.3",
|
||||
"escape-html": "1.0.3",
|
||||
|
||||
37
pnpm-lock.yaml
generated
37
pnpm-lock.yaml
generated
@ -367,7 +367,7 @@ importers:
|
||||
dependencies:
|
||||
'@electron/remote':
|
||||
specifier: 2.1.3
|
||||
version: 2.1.3(electron@38.7.2)
|
||||
version: 2.1.3(electron@39.2.4)
|
||||
better-sqlite3:
|
||||
specifier: 12.5.0
|
||||
version: 12.5.0
|
||||
@ -424,8 +424,8 @@ importers:
|
||||
specifier: 13.0.1
|
||||
version: 13.0.1(webpack@5.101.3(esbuild@0.27.0))
|
||||
electron:
|
||||
specifier: 38.7.2
|
||||
version: 38.7.2
|
||||
specifier: 39.2.4
|
||||
version: 39.2.4
|
||||
prebuild-install:
|
||||
specifier: 7.1.3
|
||||
version: 7.1.3
|
||||
@ -480,8 +480,8 @@ importers:
|
||||
specifier: 13.0.1
|
||||
version: 13.0.1(webpack@5.101.3(esbuild@0.27.0))
|
||||
electron:
|
||||
specifier: 38.7.2
|
||||
version: 38.7.2
|
||||
specifier: 39.2.4
|
||||
version: 39.2.4
|
||||
fs-extra:
|
||||
specifier: 11.3.2
|
||||
version: 11.3.2
|
||||
@ -506,7 +506,7 @@ importers:
|
||||
version: 7.1.1
|
||||
'@electron/remote':
|
||||
specifier: 2.1.3
|
||||
version: 2.1.3(electron@38.7.2)
|
||||
version: 2.1.3(electron@39.2.4)
|
||||
'@preact/preset-vite':
|
||||
specifier: 2.10.2
|
||||
version: 2.10.2(@babel/core@7.28.0)(preact@10.27.2)(vite@7.2.4(@types/node@24.10.1)(jiti@2.6.1)(less@4.1.3)(lightningcss@1.30.1)(sass-embedded@1.91.0)(sass@1.91.0)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.1))
|
||||
@ -649,8 +649,8 @@ importers:
|
||||
specifier: 3.1.10
|
||||
version: 3.1.10
|
||||
electron:
|
||||
specifier: 38.7.2
|
||||
version: 38.7.2
|
||||
specifier: 39.2.4
|
||||
version: 39.2.4
|
||||
electron-debug:
|
||||
specifier: 4.1.0
|
||||
version: 4.1.0
|
||||
@ -5461,9 +5461,6 @@ packages:
|
||||
'@types/node@22.18.12':
|
||||
resolution: {integrity: sha512-BICHQ67iqxQGFSzfCFTT7MRQ5XcBjG5aeKh5Ok38UBbPe5fxTyE+aHFxwVrGyr8GNlqFMLKD1D3P2K/1ks8tog==}
|
||||
|
||||
'@types/node@22.18.13':
|
||||
resolution: {integrity: sha512-Bo45YKIjnmFtv6I1TuC8AaHBbqXtIo+Om5fE4QiU1Tj8QR/qt+8O3BAtOimG5IFmwaWiPmB3Mv3jtYzBA4Us2A==}
|
||||
|
||||
'@types/node@22.18.8':
|
||||
resolution: {integrity: sha512-pAZSHMiagDR7cARo/cch1f3rXy0AEXwsVsVH09FcyeJVAzCnGgmYis7P3JidtTUjyadhTeSo8TgRPswstghDaw==}
|
||||
|
||||
@ -7841,8 +7838,8 @@ packages:
|
||||
resolution: {integrity: sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
|
||||
electron@38.7.2:
|
||||
resolution: {integrity: sha512-BcjR0IHqp3uv4ytVQwW2/9zAWo17Rjwrydn6RS+g+vqhpcPTzmBHDCHKaEcqheSl/7zzKPgFZdvT21BoSfrxRQ==}
|
||||
electron@39.2.4:
|
||||
resolution: {integrity: sha512-KxPtwpFceQKSxRtUY39piHLYhJMMyHfOhc70e6zRnKGrbRdK6hzEqssth8IGjlKOdkeT4KCvIEngnNraYk39+g==}
|
||||
engines: {node: '>= 12.20.55'}
|
||||
hasBin: true
|
||||
|
||||
@ -16401,8 +16398,6 @@ snapshots:
|
||||
'@ckeditor/ckeditor5-utils': 47.2.0
|
||||
'@ckeditor/ckeditor5-widget': 47.2.0
|
||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@ckeditor/ckeditor5-mention@47.2.0(patch_hash=5981fb59ba35829e4dff1d39cf771000f8a8fdfa7a34b51d8af9549541f2d62d)':
|
||||
dependencies:
|
||||
@ -17403,9 +17398,9 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@electron/remote@2.1.3(electron@38.7.2)':
|
||||
'@electron/remote@2.1.3(electron@39.2.4)':
|
||||
dependencies:
|
||||
electron: 38.7.2
|
||||
electron: 39.2.4
|
||||
|
||||
'@electron/universal@2.0.2':
|
||||
dependencies:
|
||||
@ -20752,10 +20747,6 @@ snapshots:
|
||||
dependencies:
|
||||
undici-types: 6.21.0
|
||||
|
||||
'@types/node@22.18.13':
|
||||
dependencies:
|
||||
undici-types: 6.21.0
|
||||
|
||||
'@types/node@22.18.8':
|
||||
dependencies:
|
||||
undici-types: 6.21.0
|
||||
@ -23778,10 +23769,10 @@ snapshots:
|
||||
- supports-color
|
||||
optional: true
|
||||
|
||||
electron@38.7.2:
|
||||
electron@39.2.4:
|
||||
dependencies:
|
||||
'@electron/get': 2.0.3
|
||||
'@types/node': 22.18.13
|
||||
'@types/node': 22.19.1
|
||||
extract-zip: 2.0.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user