Skip to content

Build your personal knowledge base with Trilium Notes

feat(call_to_action): enable background effects CTA on macOS

Elian Doran5d5947f676d9
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 5637ab8473..88ed7ac752 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -2152,7 +2152,7 @@
"next_theme_message": "You are currently using the legacy theme, would you like to try the new theme?",
"next_theme_button": "Try the new theme",
"background_effects_title": "Background effects are now stable",
- "background_effects_message": "On Windows devices, background effects are now fully stable. The background effects adds a touch of color to the user interface by blurring the background behind it. This technique is also used in other applications such as Windows Explorer.",
+ "background_effects_message": "On Windows and macOS devices, background effects are now stable. The background effects adds a touch of color to the user interface by blurring the background behind it.",
"background_effects_button": "Enable background effects",
"new_layout_title": "New layout",
"new_layout_message": "We’ve introduced a modernized layout for Trilium. The ribbon has been removed and seamlessly integrated into the main interface, with a new status bar and expandable sections (such as promoted attributes) taking over key functions.\n\nThe new layout is enabled by default, and can be temporarily disabled via Options → Appearance.",
diff --git a/apps/client/src/widgets/dialogs/call_to_action_definitions.ts b/apps/client/src/widgets/dialogs/call_to_action_definitions.ts
index d783b1dbba..afaecbdfa3 100644
--- a/apps/client/src/widgets/dialogs/call_to_action_definitions.ts
+++ b/apps/client/src/widgets/dialogs/call_to_action_definitions.ts
@@ -1,7 +1,7 @@
import appContext from "../../components/app_context";
import { t } from "../../services/i18n";
import options from "../../services/options";
-import utils from "../../services/utils";
+import utils, { isMac } from "../../services/utils";
/**
* A "call-to-action" is an interactive message for the user, generally to present new features.
@@ -41,10 +41,6 @@ export interface CallToAction {
}[];
}
-function isNextTheme() {
- return [ "next", "next-light", "next-dark" ].includes(options.get("theme"));
-}
-
const CALL_TO_ACTIONS: CallToAction[] = [
{
id: "new_layout",
@@ -63,7 +59,7 @@ const CALL_TO_ACTIONS: CallToAction[] = [
id: "background_effects",
title: t("call_to_action.background_effects_title"),
message: t("call_to_action.background_effects_message"),
- enabled: () => false,
+ enabled: () => (isMac() && !options.is("backgroundEffects")),
buttons: [
{
text: t("call_to_action.background_effects_button"),
@@ -78,7 +74,7 @@ const CALL_TO_ACTIONS: CallToAction[] = [
id: "next_theme",
title: t("call_to_action.next_theme_title"),
message: t("call_to_action.next_theme_message"),
- enabled: () => !isNextTheme(),
+ enabled: () => ![ "next", "next-light", "next-dark" ].includes(options.get("theme")),
buttons: [
{
text: t("call_to_action.next_theme_button"),