Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

feat(web): add WeChat Classic Green editor theme

tianma-ifd66a7a11799f
diff --git a/apps/web/src/components/EditorPane.tsx b/apps/web/src/components/EditorPane.tsx
index efef4619..41f405be 100644
--- a/apps/web/src/components/EditorPane.tsx
+++ b/apps/web/src/components/EditorPane.tsx
@@ -2746,7 +2746,10 @@ const RichEditorPane = ({
<div
ref={setEditorScrollContainerRef}
data-editor-theme={
- editorTheme === "default" || editorTheme === "minimal-emerald" || editorTheme === "outline-emerald"
+ editorTheme === "default" ||
+ editorTheme === "minimal-emerald" ||
+ editorTheme === "outline-emerald" ||
+ editorTheme === "wechat-green"
? editorTheme
: "custom"
}
@@ -2755,7 +2758,10 @@ const RichEditorPane = ({
"--editor-body-line-height": String(MEMO_CONTENT_STYLE.body.lineHeight / MEMO_CONTENT_STYLE.body.fontSize),
"--memo-content-divider-color": MEMO_CONTENT_STYLE.divider.color[resolvedTheme],
"--memo-content-divider-spacing": `${MEMO_CONTENT_STYLE.divider.marginVertical}px`,
- ...(editorTheme !== "default" && editorTheme !== "minimal-emerald" && editorTheme !== "outline-emerald"
+ ...(editorTheme !== "default" &&
+ editorTheme !== "minimal-emerald" &&
+ editorTheme !== "outline-emerald" &&
+ editorTheme !== "wechat-green"
? {
"--editor-theme-bg": (resolvedTheme === "dark" ? customEditorTheme.dark : customEditorTheme.light).background,
"--editor-theme-text": (resolvedTheme === "dark" ? customEditorTheme.dark : customEditorTheme.light).text,
@@ -2774,6 +2780,7 @@ const RichEditorPane = ({
{editorTheme !== "default" &&
editorTheme !== "minimal-emerald" &&
editorTheme !== "outline-emerald" &&
+ editorTheme !== "wechat-green" &&
customEditorTheme.customCss && (
<style
data-theme-custom-css
diff --git a/apps/web/src/components/ThemeProvider.tsx b/apps/web/src/components/ThemeProvider.tsx
index 60c012e6..e7ce3343 100644
--- a/apps/web/src/components/ThemeProvider.tsx
+++ b/apps/web/src/components/ThemeProvider.tsx
@@ -56,6 +56,7 @@ export const EDITOR_THEME_NAMES = [
"default",
"minimal-emerald",
"outline-emerald",
+ "wechat-green",
"custom",
] as const;
export type EditorThemeName = string;
diff --git a/apps/web/src/components/settings/PreferenceCard.tsx b/apps/web/src/components/settings/PreferenceCard.tsx
index 36a26f9f..b7cbc7ea 100644
--- a/apps/web/src/components/settings/PreferenceCard.tsx
+++ b/apps/web/src/components/settings/PreferenceCard.tsx
@@ -63,7 +63,7 @@ export const PreferenceCard = ({
}, []);
const activeCustom = customEditorThemes.find((t) => t.id === editorTheme);
- const isPreset = editorTheme === "default" || editorTheme === "minimal-emerald" || editorTheme === "outline-emerald";
+ const isPreset = editorTheme === "default" || editorTheme === "minimal-emerald" || editorTheme === "outline-emerald" || editorTheme === "wechat-green";
const handleEditClick = () => {
if (activeCustom) {
@@ -178,6 +178,7 @@ export const PreferenceCard = ({
<SelectItem value="default">{t("settings.editorThemes.default")}</SelectItem>
<SelectItem value="minimal-emerald">{t("settings.editorThemes.minimal-emerald")}</SelectItem>
<SelectItem value="outline-emerald">{t("settings.editorThemes.outline-emerald")}</SelectItem>
+ <SelectItem value="wechat-green">{t("settings.editorThemes.wechat-green")}</SelectItem>
{!isMobile && (
<>
{customEditorThemes.length > 0 && <div className="my-1 border-t border-slate-100" />}
diff --git a/apps/web/src/styles/editor-themes/index.css b/apps/web/src/styles/editor-themes/index.css
index 4ac8950d..98809012 100644
--- a/apps/web/src/styles/editor-themes/index.css
+++ b/apps/web/src/styles/editor-themes/index.css
@@ -1,3 +1,5 @@
@import "./base.css";
@import "./minimal-emerald.css";
@import "./outline-emerald.css";
+@import "./wechat-green.css";
+
diff --git a/apps/web/src/styles/editor-themes/wechat-green.css b/apps/web/src/styles/editor-themes/wechat-green.css
new file mode 100644
index 00000000..d01d746e
--- /dev/null
+++ b/apps/web/src/styles/editor-themes/wechat-green.css
@@ -0,0 +1,168 @@
+/* wechat-green editor theme (Clean WeChat Official Account style with green accents) */
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) {
+ --editor-theme-bg: #ffffff;
+ --editor-theme-text: #333333;
+ --editor-theme-muted: #555555;
+ --editor-theme-heading: #111111;
+ --editor-theme-accent: #07c160;
+ --editor-theme-soft: #f0f7f2;
+ --editor-theme-border: #d8e8dc;
+ --editor-theme-code-bg: #f8fafc;
+ --editor-theme-code-text: #06ae56;
+ --editor-theme-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
+ --editor-theme-radius: 6px;
+}
+
+:root.dark .edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) {
+ --editor-theme-bg: #121212;
+ --editor-theme-text: #cbd5e1;
+ --editor-theme-muted: #94a3b8;
+ --editor-theme-heading: #fafafa;
+ --editor-theme-accent: #34d399;
+ --editor-theme-soft: #1a241e;
+ --editor-theme-border: #2d3d33;
+ --editor-theme-code-bg: #1e293b;
+ --editor-theme-code-text: #3eb575;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror {
+ font-size: 1rem;
+ line-height: 1.75;
+ letter-spacing: -0.003em;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror p {
+ margin: 0;
+ padding: 0.45rem 0;
+ line-height: 1.75;
+ color: var(--editor-theme-text);
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror h1,
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror h2,
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror h3,
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror h4 {
+ color: var(--editor-theme-heading);
+ font-family: var(--editor-theme-font);
+ margin: 1.8rem 0 0.8rem;
+ line-height: 1.35;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror h1 {
+ font-size: 1.85rem;
+ font-weight: 700;
+ letter-spacing: -0.02em;
+ border-bottom: 0;
+ padding-bottom: 0;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror h2 {
+ font-size: 1.5rem;
+ font-weight: 600;
+ letter-spacing: -0.015em;
+ border-left: 0;
+ border-bottom: 0;
+ padding-left: 0;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror h3 {
+ font-size: 1.2rem;
+ font-weight: 600;
+ letter-spacing: -0.01em;
+ border: 0;
+ padding-left: 0;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror strong {
+ color: var(--editor-theme-accent);
+ background: rgba(7, 193, 96, 0.08);
+ padding: 0 4px;
+ border-radius: 4px;
+ font-weight: 700;
+}
+
+:root.dark .edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror strong {
+ color: var(--editor-theme-accent);
+ background: rgba(52, 211, 153, 0.15);
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror a {
+ color: var(--editor-theme-accent);
+ text-decoration: underline;
+ text-decoration-color: rgba(7, 193, 96, 0.4);
+ text-underline-offset: 2px;
+}
+
+:root.dark .edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror a {
+ text-decoration-color: rgba(52, 211, 153, 0.4);
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror blockquote {
+ margin: 1.5rem 0;
+ border-left: 4px solid var(--editor-theme-accent);
+ border-radius: 4px;
+ background: var(--editor-theme-soft);
+ color: var(--editor-theme-muted);
+ padding: 1rem 1.25rem;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror ul,
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror ol {
+ margin: 1rem 0;
+ padding-left: 1.75rem;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror li {
+ margin: 0.5rem 0;
+ line-height: 1.75;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror li::marker {
+ color: var(--editor-theme-accent);
+ font-weight: 600;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror code {
+ border: 1px solid var(--editor-theme-border);
+ border-radius: 4px;
+ background: var(--editor-theme-code-bg);
+ color: var(--editor-theme-code-text);
+ font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
+ font-size: 0.875rem;
+ padding: 0.15rem 0.35rem;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror pre {
+ border: 1px solid var(--editor-theme-border);
+ border-radius: 6px;
+ background: var(--editor-theme-code-bg);
+ color: var(--editor-theme-text);
+ padding: 0.85rem 1.1rem;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror hr {
+ height: 1px;
+ border: 0;
+ background: var(--editor-theme-border);
+ margin: 2rem 0;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror th {
+ background: var(--editor-theme-soft);
+ color: var(--editor-theme-heading);
+ font-weight: 600;
+ border: 1px solid var(--editor-theme-border);
+ padding: 12px 16px;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror td {
+ border: 1px solid var(--editor-theme-border);
+ padding: 12px 16px;
+}
+
+.edgeever-editor[data-editor-theme="wechat-green"]:not([data-editor-theme="default"]) .ProseMirror .edgeever-theme-block {
+ --theme-block-bg: var(--editor-theme-soft);
+ --theme-block-border: var(--editor-theme-border);
+ border-radius: 6px;
+}
diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.ts
index 34950290..95a43965 100644
--- a/packages/shared/src/i18n/en-US.ts
+++ b/packages/shared/src/i18n/en-US.ts
@@ -185,6 +185,7 @@ export const enUS = {
default: "System default",
"minimal-emerald": "Minimal Emerald",
"outline-emerald": "Outline Emerald",
+ "wechat-green": "WeChat Classic Green",
custom: "Custom",
},
customEditorTheme: {
diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.ts
index 187cf7ce..fcff92a9 100644
--- a/packages/shared/src/i18n/zh-CN.ts
+++ b/packages/shared/src/i18n/zh-CN.ts
@@ -185,6 +185,7 @@ export const zhCN = {
default: "系统默认",
"minimal-emerald": "minimal品牌绿",
"outline-emerald": "Outline 品牌绿",
+ "wechat-green": "微信经典绿",
custom: "自定义",
},
customEditorTheme: {