Skip to content

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

fix(web): paint filled actions with the brand green

tianma-ifd301d91d98e0
diff --git a/apps/web/src/components/DesktopRendererErrorBoundary.tsx b/apps/web/src/components/DesktopRendererErrorBoundary.tsx
index bc038a7e..62f10833 100644
--- a/apps/web/src/components/DesktopRendererErrorBoundary.tsx
+++ b/apps/web/src/components/DesktopRendererErrorBoundary.tsx
@@ -77,7 +77,7 @@ export class DesktopRendererErrorBoundary extends React.Component<{ children: Re
</p>
<div className="mt-5 flex flex-wrap gap-3">
<button
- className="rounded-lg bg-emerald-600 px-4 py-2 text-sm font-semibold text-white hover:bg-emerald-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
+ className="rounded-lg bg-emerald-500 px-4 py-2 text-sm font-semibold text-white hover:bg-emerald-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
type="button"
onClick={() => window.location.reload()}
>
diff --git a/apps/web/src/components/DesktopUpdateNotice.tsx b/apps/web/src/components/DesktopUpdateNotice.tsx
index f4738b0f..05cdc361 100644
--- a/apps/web/src/components/DesktopUpdateNotice.tsx
+++ b/apps/web/src/components/DesktopUpdateNotice.tsx
@@ -36,7 +36,7 @@ export const DesktopUpdateNotice = () => {
return (
<Button
- className="h-8 shrink-0 animate-in rounded-full bg-emerald-600 px-4 text-xs font-semibold text-white shadow-sm fade-in slide-in-from-left-2 hover:bg-emerald-700 hover:text-white"
+ className="h-8 shrink-0 animate-in rounded-full px-4 text-xs font-semibold shadow-sm fade-in slide-in-from-left-2"
size="sm"
variant="solid"
role="alert"
diff --git a/apps/web/src/components/EditorPaneErrorBoundary.tsx b/apps/web/src/components/EditorPaneErrorBoundary.tsx
index 831286bf..230aefd1 100644
--- a/apps/web/src/components/EditorPaneErrorBoundary.tsx
+++ b/apps/web/src/components/EditorPaneErrorBoundary.tsx
@@ -60,7 +60,7 @@ export class EditorPaneErrorBoundary extends React.Component<Props, State> {
</p>
<div className="mt-5 flex flex-wrap gap-3">
<button
- className="rounded-lg bg-emerald-600 px-4 py-2 text-sm font-semibold text-white hover:bg-emerald-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
+ className="rounded-lg bg-emerald-500 px-4 py-2 text-sm font-semibold text-white hover:bg-emerald-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
type="button"
onClick={this.props.onBackToList}
>
diff --git a/apps/web/src/components/MemoListPane.tsx b/apps/web/src/components/MemoListPane.tsx
index 646949f1..8a9f1227 100644
--- a/apps/web/src/components/MemoListPane.tsx
+++ b/apps/web/src/components/MemoListPane.tsx
@@ -1416,7 +1416,7 @@ export const MemoListPane = ({
{...contentEnterMotion}
>
{searchActive && (
- <span className="flex shrink-0 items-center gap-1 rounded-full bg-emerald-600 px-2 py-1 font-semibold text-white">
+ <span className="flex shrink-0 items-center gap-1 rounded-full bg-emerald-500 px-2 py-1 font-semibold text-white">
<Search className="h-3 w-3" />
{t("memoList.searchActive")}
</span>
diff --git a/apps/web/src/components/NotebookPane.tsx b/apps/web/src/components/NotebookPane.tsx
index fc4e2360..519deec0 100644
--- a/apps/web/src/components/NotebookPane.tsx
+++ b/apps/web/src/components/NotebookPane.tsx
@@ -581,7 +581,7 @@ export const NotebookPane = ({
onClick={() => onCreateMemo()}
disabled={!canCreateMemo || isCreatingMemo}
>
- <span className="flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-emerald-600 text-white shadow-[0_5px_12px_rgb(var(--brand-green-rgb)/0.22)] transition-transform duration-150 group-hover:scale-[1.03] group-focus-visible:ring-2 group-focus-visible:ring-emerald-500/70 group-focus-visible:ring-offset-2">
+ <span className="flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-emerald-500 text-white shadow-[0_5px_12px_rgb(var(--brand-green-rgb)/0.22)] transition-transform duration-150 group-hover:scale-[1.03] group-focus-visible:ring-2 group-focus-visible:ring-emerald-500/70 group-focus-visible:ring-offset-2">
<Plus className="h-5 w-5" />
</span>
<span className="min-w-0 truncate text-sm font-semibold text-slate-950">{t("notebookPane.newMemo")}</span>
diff --git a/apps/web/src/components/PwaIosPrompt.tsx b/apps/web/src/components/PwaIosPrompt.tsx
index fe78f602..27e8a859 100644
--- a/apps/web/src/components/PwaIosPrompt.tsx
+++ b/apps/web/src/components/PwaIosPrompt.tsx
@@ -70,7 +70,7 @@ export const PwaIosPrompt = () => {
<button
onClick={dismissIOSPrompt}
- className="mt-3.5 w-full rounded-lg bg-emerald-600 py-2 text-center text-xs font-semibold text-white shadow-sm shadow-emerald-600/10 transition-all hover:bg-emerald-700 active:scale-[0.98]"
+ className="mt-3.5 w-full rounded-lg bg-emerald-500 py-2 text-center text-xs font-semibold text-white shadow-sm shadow-emerald-500/10 transition-all hover:bg-emerald-600 active:scale-[0.98]"
>
{t("pwa.iosPrompt.dismiss") || "我知道了"}
</button>
diff --git a/apps/web/src/components/TemplatesPane.tsx b/apps/web/src/components/TemplatesPane.tsx
index 00ba8ff0..cb3c837f 100644
--- a/apps/web/src/components/TemplatesPane.tsx
+++ b/apps/web/src/components/TemplatesPane.tsx
@@ -313,7 +313,8 @@ export const TemplatesPane = ({
<Button
type="button"
size="sm"
- className="bg-emerald-600 hover:bg-emerald-700 text-white gap-1.5 font-semibold"
+ variant="solid"
+ className="gap-1.5 font-semibold"
onClick={() => void saveEditing()}
disabled={!draft.name.trim() || isCreating}
>
@@ -424,7 +425,7 @@ export const TemplatesPane = ({
<button
type="button"
- className="inline-flex items-center gap-1.5 rounded-lg border border-emerald-200/80 bg-emerald-50/70 px-3 py-1.5 text-xs font-semibold text-emerald-800 hover:bg-emerald-600 hover:text-white hover:border-emerald-600 transition-all duration-200 disabled:opacity-50"
+ className="inline-flex items-center gap-1.5 rounded-lg border border-emerald-200/80 bg-emerald-50/70 px-3 py-1.5 text-xs font-semibold text-emerald-800 hover:bg-emerald-500 hover:text-white hover:border-emerald-500 transition-all duration-200 disabled:opacity-50"
disabled={!canCreateMemo || isCreating}
onClick={(e) => {
e.stopPropagation();
@@ -497,7 +498,8 @@ export const TemplatesPane = ({
<Button
type="button"
size="sm"
- className="bg-emerald-600 hover:bg-emerald-700 text-white gap-1.5 font-semibold"
+ variant="solid"
+ className="gap-1.5 font-semibold"
disabled={!canCreateMemo || isCreating}
onClick={() => {
const onUse = previewTemplate.onUse;
diff --git a/apps/web/src/components/dialogs/TemplatesDialog.tsx b/apps/web/src/components/dialogs/TemplatesDialog.tsx
index e9524c4f..fbb20636 100644
--- a/apps/web/src/components/dialogs/TemplatesDialog.tsx
+++ b/apps/web/src/components/dialogs/TemplatesDialog.tsx
@@ -88,7 +88,7 @@ export const TemplatesDialog = ({
/>
<div className="flex justify-end gap-2">
<Button type="button" size="sm" variant="ghost" onClick={cancelEditing}><X className="mr-1 h-4 w-4" />{t("common.cancel")}</Button>
- <Button type="button" size="sm" className="bg-emerald-600 hover:bg-emerald-700 text-white" onClick={() => void saveEditing()} disabled={!draft.name.trim()}><Check className="mr-1 h-4 w-4" />{t("common.save")}</Button>
+ <Button type="button" size="sm" variant="solid" onClick={() => void saveEditing()} disabled={!draft.name.trim()}><Check className="mr-1 h-4 w-4" />{t("common.save")}</Button>
</div>
</div>
)}
diff --git a/apps/web/src/components/settings/DataExportCard.tsx b/apps/web/src/components/settings/DataExportCard.tsx
index 81838b9f..3081e808 100644
--- a/apps/web/src/components/settings/DataExportCard.tsx
+++ b/apps/web/src/components/settings/DataExportCard.tsx
@@ -39,7 +39,7 @@ const Progress = ({ progress }: { progress: EdgeEverZipProgress }) => {
const percentage = progress.total > 0 ? Math.round((progress.completed / progress.total) * 100) : 0;
return (
<div className="h-1.5 overflow-hidden rounded-full bg-slate-200">
- <div className="h-full rounded-full bg-emerald-600 transition-[width]" style={{ width: `${percentage}%` }} />
+ <div className="h-full rounded-full bg-emerald-500 transition-[width]" style={{ width: `${percentage}%` }} />
</div>
);
};
diff --git a/apps/web/src/components/settings/McpConfigCard.tsx b/apps/web/src/components/settings/McpConfigCard.tsx
index 8c68f810..b5b4974c 100644
--- a/apps/web/src/components/settings/McpConfigCard.tsx
+++ b/apps/web/src/components/settings/McpConfigCard.tsx
@@ -76,7 +76,6 @@ const McpExampleDialog = () => {
<Button
size="md"
variant="solid"
- className="bg-emerald-600 text-white hover:bg-emerald-700"
type="button"
onClick={() => void handleCopy()}
>
@@ -132,7 +131,7 @@ const AccessLevelPicker = ({ value, onChange }: AccessLevelPickerProps) => {
/>
<span
aria-hidden="true"
- className={cn("h-1.5 w-1.5 rounded-full", checked ? "bg-emerald-600" : "bg-slate-400")}
+ className={cn("h-1.5 w-1.5 rounded-full", checked ? "bg-emerald-500" : "bg-slate-400")}
/>
{t(`mcp.accessLevels.${option}.label`)}
</label>
@@ -404,7 +403,7 @@ export const McpConfigCard = () => {
<Button
size="sm"
variant="solid"
- className="h-9 shrink-0 gap-1 bg-emerald-600 px-3.5 text-xs text-white hover:bg-emerald-700"
+ className="h-9 shrink-0 gap-1 px-3.5 text-xs"
type="submit"
disabled={createMutation.isPending || !name.trim()}
>
diff --git a/apps/web/src/components/settings/PasswordCard.tsx b/apps/web/src/components/settings/PasswordCard.tsx
index 72a11955..f49f4b59 100644
--- a/apps/web/src/components/settings/PasswordCard.tsx
+++ b/apps/web/src/components/settings/PasswordCard.tsx
@@ -122,7 +122,7 @@ export const PasswordCard = ({ authRequired, demoMode }: PasswordCardProps) => {
>
{feedback?.message}
</p>
- <Button className="w-full bg-emerald-600 text-white hover:bg-emerald-700 sm:w-auto lg:h-9 lg:px-3" type="submit" disabled={isSubmitting}>
+ <Button className="w-full sm:w-auto lg:h-9 lg:px-3" variant="solid" type="submit" disabled={isSubmitting}>
{isSubmitting ? t("password.changing") : t("password.change")}
</Button>
</div>
diff --git a/apps/web/src/components/settings/WebDavBackupCard.tsx b/apps/web/src/components/settings/WebDavBackupCard.tsx
index a7dcfa53..fa680d31 100644
--- a/apps/web/src/components/settings/WebDavBackupCard.tsx
+++ b/apps/web/src/components/settings/WebDavBackupCard.tsx
@@ -27,7 +27,7 @@ const Progress = ({ progress }: { progress: EdgeEverZipProgress }) => {
const percentage = progress.total > 0 ? Math.round((progress.completed / progress.total) * 100) : 0;
return (
<div className="h-1.5 overflow-hidden rounded-full bg-slate-200">
- <div className="h-full rounded-full bg-emerald-600 transition-[width]" style={{ width: `${percentage}%` }} />
+ <div className="h-full rounded-full bg-emerald-500 transition-[width]" style={{ width: `${percentage}%` }} />
</div>
);
};
diff --git a/apps/web/src/components/ui/badge.tsx b/apps/web/src/components/ui/badge.tsx
index d7bb9d0f..e76d9a36 100644
--- a/apps/web/src/components/ui/badge.tsx
+++ b/apps/web/src/components/ui/badge.tsx
@@ -7,7 +7,7 @@ const badgeVariants = cva(
{
variants: {
variant: {
- default: "border-transparent bg-emerald-600 text-white",
+ default: "border-transparent bg-emerald-500 text-white",
secondary: "border-transparent bg-slate-100 text-slate-900",
destructive: "border-transparent bg-red-600 text-white",
outline: "border-slate-200 text-slate-950",
diff --git a/apps/web/src/lib/ui-palette.test.mjs b/apps/web/src/lib/ui-palette.test.mjs
index c7aba89f..f90d5ef1 100644
--- a/apps/web/src/lib/ui-palette.test.mjs
+++ b/apps/web/src/lib/ui-palette.test.mjs
@@ -7,10 +7,13 @@ const globals = readFileSync(new URL("../styles/globals.css", import.meta.url),
describe("application color system", () => {
test("uses the same restrained brand green throughout the application", () => {
const mobileEditor = readFileSync(new URL("../styles/mobile-markdown-editor.css", import.meta.url), "utf8");
+ const button = readFileSync(new URL("../components/ui/button.tsx", import.meta.url), "utf8");
expect(globals).toContain("--brand-green: #16a06e;");
+ expect(globals).toContain("--brand-green-500-rgb: 22 160 110;");
expect(globals).not.toContain("--brand-green: #00a82d;");
expect(mobileEditor).toContain("color: #16a06e;");
+ expect(button).toContain('solid: "bg-emerald-500 text-white hover:bg-emerald-600 border-emerald-500"');
expect(contrastRatio("#11694a", "#f0f8f4")).toBeGreaterThanOrEqual(4.5);
});
diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.css
index fffbf3c2..860b525d 100644
--- a/apps/web/src/styles/globals.css
+++ b/apps/web/src/styles/globals.css
@@ -387,6 +387,7 @@ html[data-edgeever-extension-theme] .divide-slate-200 > :not([hidden]) ~ :not([h
border-color: var(--edgeever-theme-border, #e2e8f0);
}
+html[data-edgeever-extension-theme] .bg-emerald-500,
html[data-edgeever-extension-theme] .bg-emerald-600,
html[data-edgeever-extension-theme] .bg-emerald-700 {
background-color: var(--edgeever-theme-accent, #16a06e);