From eb6d802952ea6086ba811c56fc6e02c82b2f643f Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 22 Apr 2025 23:02:36 +0300 Subject: [PATCH] chore(monorepo/client): set up stylesheets --- apps/client/src/desktop.ts | 2 +- apps/client/src/login.ts | 2 +- apps/client/src/mobile.ts | 2 +- apps/client/src/set_password.ts | 4 ++-- apps/client/src/setup.ts | 2 +- apps/client/src/share.ts | 2 +- .../apps/client => apps/client/src}/stylesheets/auth.css | 0 .../client => apps/client/src}/stylesheets/bootstrap.scss | 0 .../apps/client => apps/client/src}/stylesheets/calendar.css | 0 .../client => apps/client/src}/stylesheets/ckeditor-theme.css | 0 .../apps/client => apps/client/src}/stylesheets/llm_chat.css | 0 .../apps/client => apps/client/src}/stylesheets/print.css | 0 .../client => apps/client/src}/stylesheets/relation_map.css | 0 .../apps/client => apps/client/src}/stylesheets/share.css | 0 .../apps/client => apps/client/src}/stylesheets/style.css | 0 .../client => apps/client/src}/stylesheets/theme-dark.css | 0 .../client => apps/client/src}/stylesheets/theme-light.css | 0 .../client/src}/stylesheets/theme-next-dark.css | 0 .../client/src}/stylesheets/theme-next-light.css | 0 .../client => apps/client/src}/stylesheets/theme-next.css | 0 .../client/src}/stylesheets/theme-next/base.css | 0 .../client/src}/stylesheets/theme-next/dialogs.css | 0 .../client/src}/stylesheets/theme-next/forms.css | 0 .../client/src}/stylesheets/theme-next/llm-chat.css | 0 .../client/src}/stylesheets/theme-next/notes/text.css | 0 .../client/src}/stylesheets/theme-next/pages.css | 0 .../client/src}/stylesheets/theme-next/ribbon.css | 0 .../client/src}/stylesheets/theme-next/shell.css | 0 .../apps/client => apps/client/src}/stylesheets/theme.css | 0 .../apps/client => apps/client/src}/stylesheets/tree.css | 0 apps/client/src/widgets/buttons/calendar.ts | 2 +- apps/client/src/widgets/llm_chat/llm_chat_panel.ts | 2 +- apps/client/src/widgets/type_widgets/relation_map.ts | 2 +- apps/client/webpack.config.js | 2 +- 34 files changed, 11 insertions(+), 11 deletions(-) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/auth.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/bootstrap.scss (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/calendar.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/ckeditor-theme.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/llm_chat.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/print.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/relation_map.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/share.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/style.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-dark.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-light.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-next-dark.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-next-light.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-next.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-next/base.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-next/dialogs.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-next/forms.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-next/llm-chat.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-next/notes/text.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-next/pages.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-next/ribbon.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme-next/shell.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/theme.css (100%) rename {_regroup_monorepo/apps/client => apps/client/src}/stylesheets/tree.css (100%) diff --git a/apps/client/src/desktop.ts b/apps/client/src/desktop.ts index 025132495..51c69aa70 100644 --- a/apps/client/src/desktop.ts +++ b/apps/client/src/desktop.ts @@ -10,7 +10,7 @@ import { t } from "./services/i18n.js"; import options from "./services/options.js"; import type ElectronRemote from "@electron/remote"; import type Electron from "electron"; -import "../stylesheets/bootstrap.scss"; +import "./stylesheets/bootstrap.scss"; await appContext.earlyInit(); diff --git a/apps/client/src/login.ts b/apps/client/src/login.ts index 5db5cfd4e..2ba27be02 100644 --- a/apps/client/src/login.ts +++ b/apps/client/src/login.ts @@ -1,4 +1,4 @@ -import "../stylesheets/bootstrap.scss"; +import "./stylesheets/bootstrap.scss"; // @ts-ignore - module = undefined // Required for correct loading of scripts in Electron diff --git a/apps/client/src/mobile.ts b/apps/client/src/mobile.ts index 925b6bb15..5d88ec1c4 100644 --- a/apps/client/src/mobile.ts +++ b/apps/client/src/mobile.ts @@ -1,7 +1,7 @@ import appContext from "./components/app_context.js"; import noteAutocompleteService from "./services/note_autocomplete.js"; import glob from "./services/glob.js"; -import "../stylesheets/bootstrap.scss"; +import "./stylesheets/bootstrap.scss"; glob.setupGlobs(); diff --git a/apps/client/src/set_password.ts b/apps/client/src/set_password.ts index 95e6cc2da..67dfee187 100644 --- a/apps/client/src/set_password.ts +++ b/apps/client/src/set_password.ts @@ -1,5 +1,5 @@ -import "../stylesheets/bootstrap.scss"; -import "../stylesheets/auth.css"; +import "./stylesheets/bootstrap.scss"; +import "./stylesheets/auth.css"; // @TriliumNextTODO: is this even needed anymore? // @ts-ignore - module = undefined diff --git a/apps/client/src/setup.ts b/apps/client/src/setup.ts index 0d4647093..2e0dae151 100644 --- a/apps/client/src/setup.ts +++ b/apps/client/src/setup.ts @@ -1,6 +1,6 @@ import utils from "./services/utils.js"; import ko from "knockout"; -import "../stylesheets/bootstrap.scss"; +import "./stylesheets/bootstrap.scss"; // TriliumNextTODO: properly make use of below types // type SetupModelSetupType = "new-document" | "sync-from-desktop" | "sync-from-server" | ""; diff --git a/apps/client/src/share.ts b/apps/client/src/share.ts index 8f5ebebad..0281e6ed4 100644 --- a/apps/client/src/share.ts +++ b/apps/client/src/share.ts @@ -1,4 +1,4 @@ -import "../stylesheets/bootstrap.scss"; +import "./stylesheets/bootstrap.scss"; /** * Fetch note with given ID from backend diff --git a/_regroup_monorepo/apps/client/stylesheets/auth.css b/apps/client/src/stylesheets/auth.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/auth.css rename to apps/client/src/stylesheets/auth.css diff --git a/_regroup_monorepo/apps/client/stylesheets/bootstrap.scss b/apps/client/src/stylesheets/bootstrap.scss similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/bootstrap.scss rename to apps/client/src/stylesheets/bootstrap.scss diff --git a/_regroup_monorepo/apps/client/stylesheets/calendar.css b/apps/client/src/stylesheets/calendar.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/calendar.css rename to apps/client/src/stylesheets/calendar.css diff --git a/_regroup_monorepo/apps/client/stylesheets/ckeditor-theme.css b/apps/client/src/stylesheets/ckeditor-theme.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/ckeditor-theme.css rename to apps/client/src/stylesheets/ckeditor-theme.css diff --git a/_regroup_monorepo/apps/client/stylesheets/llm_chat.css b/apps/client/src/stylesheets/llm_chat.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/llm_chat.css rename to apps/client/src/stylesheets/llm_chat.css diff --git a/_regroup_monorepo/apps/client/stylesheets/print.css b/apps/client/src/stylesheets/print.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/print.css rename to apps/client/src/stylesheets/print.css diff --git a/_regroup_monorepo/apps/client/stylesheets/relation_map.css b/apps/client/src/stylesheets/relation_map.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/relation_map.css rename to apps/client/src/stylesheets/relation_map.css diff --git a/_regroup_monorepo/apps/client/stylesheets/share.css b/apps/client/src/stylesheets/share.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/share.css rename to apps/client/src/stylesheets/share.css diff --git a/_regroup_monorepo/apps/client/stylesheets/style.css b/apps/client/src/stylesheets/style.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/style.css rename to apps/client/src/stylesheets/style.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-dark.css b/apps/client/src/stylesheets/theme-dark.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-dark.css rename to apps/client/src/stylesheets/theme-dark.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-light.css b/apps/client/src/stylesheets/theme-light.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-light.css rename to apps/client/src/stylesheets/theme-light.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-next-dark.css b/apps/client/src/stylesheets/theme-next-dark.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-next-dark.css rename to apps/client/src/stylesheets/theme-next-dark.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-next-light.css b/apps/client/src/stylesheets/theme-next-light.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-next-light.css rename to apps/client/src/stylesheets/theme-next-light.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-next.css b/apps/client/src/stylesheets/theme-next.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-next.css rename to apps/client/src/stylesheets/theme-next.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-next/base.css b/apps/client/src/stylesheets/theme-next/base.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-next/base.css rename to apps/client/src/stylesheets/theme-next/base.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-next/dialogs.css b/apps/client/src/stylesheets/theme-next/dialogs.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-next/dialogs.css rename to apps/client/src/stylesheets/theme-next/dialogs.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-next/forms.css b/apps/client/src/stylesheets/theme-next/forms.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-next/forms.css rename to apps/client/src/stylesheets/theme-next/forms.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-next/llm-chat.css b/apps/client/src/stylesheets/theme-next/llm-chat.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-next/llm-chat.css rename to apps/client/src/stylesheets/theme-next/llm-chat.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-next/notes/text.css b/apps/client/src/stylesheets/theme-next/notes/text.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-next/notes/text.css rename to apps/client/src/stylesheets/theme-next/notes/text.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-next/pages.css b/apps/client/src/stylesheets/theme-next/pages.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-next/pages.css rename to apps/client/src/stylesheets/theme-next/pages.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-next/ribbon.css b/apps/client/src/stylesheets/theme-next/ribbon.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-next/ribbon.css rename to apps/client/src/stylesheets/theme-next/ribbon.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme-next/shell.css rename to apps/client/src/stylesheets/theme-next/shell.css diff --git a/_regroup_monorepo/apps/client/stylesheets/theme.css b/apps/client/src/stylesheets/theme.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/theme.css rename to apps/client/src/stylesheets/theme.css diff --git a/_regroup_monorepo/apps/client/stylesheets/tree.css b/apps/client/src/stylesheets/tree.css similarity index 100% rename from _regroup_monorepo/apps/client/stylesheets/tree.css rename to apps/client/src/stylesheets/tree.css diff --git a/apps/client/src/widgets/buttons/calendar.ts b/apps/client/src/widgets/buttons/calendar.ts index 30c16432d..3bcba2558 100644 --- a/apps/client/src/widgets/buttons/calendar.ts +++ b/apps/client/src/widgets/buttons/calendar.ts @@ -10,7 +10,7 @@ import type { EventData } from "../../components/app_context.js"; import dayjs, { Dayjs } from "dayjs"; import utc from "dayjs/plugin/utc.js"; import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js"; -import "../../../stylesheets/calendar.css"; +import "../../stylesheets/calendar.css"; import { AttributeRow } from "@triliumnext/commons"; dayjs.extend(utc); diff --git a/apps/client/src/widgets/llm_chat/llm_chat_panel.ts b/apps/client/src/widgets/llm_chat/llm_chat_panel.ts index 3554773d7..7cbd6a802 100644 --- a/apps/client/src/widgets/llm_chat/llm_chat_panel.ts +++ b/apps/client/src/widgets/llm_chat/llm_chat_panel.ts @@ -14,7 +14,7 @@ import { validateEmbeddingProviders } from "./validation.js"; import type { MessageData, ToolExecutionStep, ChatData } from "./types.js"; import { applySyntaxHighlight } from "../../services/syntax_highlight.js"; -import "../../../stylesheets/llm_chat.css"; +import "../../stylesheets/llm_chat.css"; export default class LlmChatPanel extends BasicWidget { private noteContextChatMessages!: HTMLElement; diff --git a/apps/client/src/widgets/type_widgets/relation_map.ts b/apps/client/src/widgets/type_widgets/relation_map.ts index 29a9b4524..b69c7a94e 100644 --- a/apps/client/src/widgets/type_widgets/relation_map.ts +++ b/apps/client/src/widgets/type_widgets/relation_map.ts @@ -11,7 +11,7 @@ import dialogService from "../../services/dialog.js"; import { t } from "../../services/i18n.js"; import type FNote from "../../entities/fnote.js"; import type { ConnectionMadeEventInfo, jsPlumbInstance, OverlaySpec } from "jsplumb"; -import "../../../stylesheets/relation_map.css"; +import "../../stylesheets/relation_map.css"; declare module "jsplumb" { diff --git a/apps/client/webpack.config.js b/apps/client/webpack.config.js index 41be6d4ef..1571b60d1 100644 --- a/apps/client/webpack.config.js +++ b/apps/client/webpack.config.js @@ -16,7 +16,7 @@ module.exports = { main: './src/desktop.ts', baseHref: '/', assets: ["./src/assets"], - styles: ["./src/styles.css"], + styles: [], outputHashing: process.env['NODE_ENV'] === 'production' ? 'all' : 'none', optimization: process.env['NODE_ENV'] === 'production', })