Compare commits

..

No commits in common. "32c16021c420ce10f630d98b00f8735f0bf2fdd7" and "a77e76d5c6d13c7a27b191116d9a6b38abbd5eda" have entirely different histories.

8 changed files with 16 additions and 88 deletions

View File

@ -27,9 +27,6 @@
--bs-body-bg: var(--main-background-color) !important; --bs-body-bg: var(--main-background-color) !important;
--ck-mention-list-max-height: 500px; --ck-mention-list-max-height: 500px;
--tn-modal-max-height: 90vh; --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 *, body#trilium-app.motion-disabled *,
@ -2583,11 +2580,3 @@ iframe.print-iframe {
flex-grow: 1; flex-grow: 1;
width: 100%; 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);
}

View File

@ -76,9 +76,6 @@
--mermaid-theme: dark; --mermaid-theme: dark;
--native-titlebar-background: #00000000; --native-titlebar-background: #00000000;
--calendar-coll-event-background-saturation: 30%;
--calendar-coll-event-background-lightness: 30%;
} }
body ::-webkit-calendar-picker-indicator { body ::-webkit-calendar-picker-indicator {

View File

@ -80,9 +80,6 @@ html {
--mermaid-theme: default; --mermaid-theme: default;
--native-titlebar-background: #ffffff00; --native-titlebar-background: #ffffff00;
--calendar-coll-event-background-lightness: 95%;
--calendar-coll-event-background-saturation: 80%;
} }
#left-pane .fancytree-node.tinted { #left-pane .fancytree-node.tinted {

View File

@ -271,12 +271,11 @@
--ck-editor-toolbar-button-on-shadow: 1px 1px 2px rgba(0, 0, 0, .75); --ck-editor-toolbar-button-on-shadow: 1px 1px 2px rgba(0, 0, 0, .75);
--ck-editor-toolbar-dropdown-button-open-background: #ffffff14; --ck-editor-toolbar-dropdown-button-open-background: #ffffff14;
--calendar-coll-event-background-saturation: 25%; --calendar-coll-event-background-saturation: 12%;
--calendar-coll-event-background-lightness: 20%; --calendar-coll-event-background-lightness: 21%;
--calendar-coll-event-background-color: #3c3c3c; --calendar-coll-event-background-color: #3c3c3c;
--calendar-coll-event-text-color: white; --calendar-coll-event-text-color: white;
--calendar-cell-event-hover-filter: brightness(1.25); --calendar-cell-event-hover-filter: brightness(1.25);
--calendar-coll-today-background-color: #ffffff08;
} }
/* /*

View File

@ -274,7 +274,6 @@
--calendar-coll-event-background-color: #eaeaea; --calendar-coll-event-background-color: #eaeaea;
--calendar-coll-event-text-color: black; --calendar-coll-event-text-color: black;
--calendar-cell-event-hover-filter: brightness(.95) saturate(1.25); --calendar-cell-event-hover-filter: brightness(.95) saturate(1.25);
--calendar-coll-today-background-color: #00000006;
} }
#left-pane .fancytree-node.tinted { #left-pane .fancytree-node.tinted {

View File

@ -81,6 +81,7 @@ export async function buildEventsForCalendar(note: FNote, e: EventSourceFuncArg)
export async function buildEvent(note: FNote, { startDate, endDate, startTime, endTime, isArchived }: Event) { export async function buildEvent(note: FNote, { startDate, endDate, startTime, endTime, isArchived }: Event) {
const customTitleAttributeName = note.getLabelValue("calendar:title"); const customTitleAttributeName = note.getLabelValue("calendar:title");
const titles = await parseCustomTitle(customTitleAttributeName, note); const titles = await parseCustomTitle(customTitleAttributeName, note);
const color = note.getLabelValue("calendar:color") ?? note.getLabelValue("color");
const colorClass = note.getColorClass(); const colorClass = note.getColorClass();
const events: EventInput[] = []; const events: EventInput[] = [];
@ -109,6 +110,7 @@ export async function buildEvent(note: FNote, { startDate, endDate, startTime, e
start: startDate, start: startDate,
url: `#${note.noteId}?popup`, url: `#${note.noteId}?popup`,
noteId: note.noteId, noteId: note.noteId,
color: color ?? undefined,
iconClass: note.getLabelValue("iconClass"), iconClass: note.getLabelValue("iconClass"),
promotedAttributes: displayedAttributesData, promotedAttributes: displayedAttributesData,
className: clsx({archived: isArchived}, colorClass) className: clsx({archived: isArchived}, colorClass)

View File

@ -1,19 +1,8 @@
: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 { .calendar-view {
--fc-event-border-color: var(--calendar-coll-event-text-color); --fc-event-border-color: var(--calendar-coll-event-text-color);
--fc-event-bg-color: var(--calendar-coll-event-background-color); --fc-event-bg-color: var(--calendar-coll-event-background-color);
--fc-event-text-color: var(--calendar-coll-event-text-color); --fc-event-text-color: var(--calendar-coll-event-text-color);
--fc-event-selected-overlay-color: transparent; --fc-event-selected-overlay-color: transparent;
--fc-today-bg-color: var(--calendar-coll-today-background-color);
overflow: hidden; overflow: hidden;
position: relative; position: relative;
@ -23,9 +12,8 @@
padding: 10px; padding: 10px;
} }
.calendar-view a, .calendar-view a {
:root .calendar-view a.fc-daygrid-event:hover { color: unset;
color: var(--fc-event-text-color);
} }
.search-result-widget-content .calendar-view { .search-result-widget-content .calendar-view {
@ -97,25 +85,17 @@ body.desktop:not(.zen) .calendar-view .calendar-header {
/* #region Events */ /* #region Events */
.calendar-view a.fc-timegrid-event, .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; 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-timegrid-event,
.calendar-view a.fc-daygrid-event { .calendar-view a.fc-daygrid-event:not(.fc-daygrid-dot-event) {
--border-color: transparent; --border-color: transparent;
border: 2px solid; border-width: 2px 2px 2px 4px;
border-left-width: 4px;
border-color: var(--border-color) var(--border-color) var(--border-color) border-color: var(--border-color) var(--border-color) var(--border-color)
var(--fc-event-text-color) !important; var(--fc-event-text-color) !important;
background: var(--fc-event-bg-color) !important;
padding-left: 8px; padding-left: 8px;
} }
@ -135,8 +115,8 @@ body.desktop:not(.zen) .calendar-view .calendar-header {
color: currentColor; color: currentColor;
} }
.calendar-view .fc-timegrid-event.with-hue, .fc-timegrid-event.with-hue,
.calendar-view .fc-daygrid-event.with-hue { .fc-daygrid-event:not(.fc-daygrid-dot-event).with-hue {
--fc-event-text-color: var(--custom-color); --fc-event-text-color: var(--custom-color);
background: hsl(var(--custom-color-hue), background: hsl(var(--custom-color-hue),
@ -144,12 +124,8 @@ body.desktop:not(.zen) .calendar-view .calendar-header {
var(--calendar-coll-event-background-lightness)) !important; var(--calendar-coll-event-background-lightness)) !important;
} }
.calendar-view .fc-event-time { .fc-event-time {
opacity: .75; opacity: .75;
} }
.fc-daygrid-event-dot {
display: none;
}
/* #endregion */ /* #endregion */

View File

@ -1,9 +1,8 @@
import path, { join } from "path"; import path from "path";
import fs from "fs-extra"; import fs from "fs-extra";
import { LOCALES } from "@triliumnext/commons"; import { LOCALES } from "@triliumnext/commons";
import { PRODUCT_NAME } from "../src/app-info.js"; import { PRODUCT_NAME } from "../src/app-info.js";
import type { ForgeConfig } from "@electron-forge/shared-types"; import type { ForgeConfig } from "@electron-forge/shared-types";
import { existsSync } from "fs";
const ELECTRON_FORGE_DIR = __dirname; const ELECTRON_FORGE_DIR = __dirname;
@ -229,22 +228,8 @@ const config: ForgeConfig = {
// Ensure all locales that should be kept are actually present. // Ensure all locales that should be kept are actually present.
for (const locale of localesToKeep) { for (const locale of localesToKeep) {
if (!keptLocales.has(locale)) { if (!keptLocales.has(locale)) {
throw new Error(`Locale ${locale} was not found in the packaged app.`); console.error(`Locale ${locale} was not found in the packaged app.`);
} process.exit(1);
}
// 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}`);
}
} }
} }
}, },
@ -299,20 +284,4 @@ function getExtraResourcesForPlatform() {
return resources; 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; export default config;