From bda10fa45e2e5536e6e31f8fe8c02b8f4cf92c71 Mon Sep 17 00:00:00 2001 From: DawnRatel <85299799+Ratel-pwn@users.noreply.github.com> Date: Fri, 25 Sep 2026 17:00:19 +0800 Subject: [PATCH] feat(workbench): add optional workspace logos and color badges to browser tabs (#11035) * feat: add optional workspace favicon and identification color Signed-off-by: Ratel-pwn <2448574643@qq.com> * refactor: simplify workspace identification color control Signed-off-by: Ratel-pwn <2448574643@qq.com> * fix: preserve logo size when overlaying favicon color Signed-off-by: Ratel-pwn <2448574643@qq.com> * fix(workbench): separate favicon badge with a transparent cutout Signed-off-by: Ratel-pwn <2448574643@qq.com> * fix(workbench): restore workspace favicon before app startup Signed-off-by: Ratel-pwn <2448574643@qq.com> --------- Signed-off-by: Ratel-pwn <2448574643@qq.com> --- dev/prod/src/index.ejs | 29 +- dev/prod/src/platform.ts | 7 +- models/setting/src/index.ts | 3 + .../src/___tests___/workspaceIdentity.test.ts | 106 ++++++++ packages/presentation/src/index.ts | 1 + .../presentation/src/workspaceIdentity.ts | 251 ++++++++++++++++++ plugins/setting-assets/lang/cs.json | 5 + plugins/setting-assets/lang/de.json | 5 + plugins/setting-assets/lang/en.json | 5 + plugins/setting-assets/lang/es.json | 5 + plugins/setting-assets/lang/fr.json | 5 + plugins/setting-assets/lang/it.json | 5 + plugins/setting-assets/lang/ja.json | 5 + plugins/setting-assets/lang/ko.json | 5 + plugins/setting-assets/lang/pl.json | 5 + plugins/setting-assets/lang/pt-br.json | 5 + plugins/setting-assets/lang/pt.json | 5 + plugins/setting-assets/lang/ru.json | 5 + plugins/setting-assets/lang/tr.json | 5 + plugins/setting-assets/lang/zh.json | 5 + .../src/components/General.svelte | 10 +- .../components/WorkspaceIdentityColor.svelte | 161 +++++++++++ plugins/setting/src/index.ts | 9 + .../src/components/Workbench.svelte | 2 + .../src/components/WorkspaceFavicon.svelte | 25 ++ plugins/workbench-resources/src/utils.ts | 3 +- 26 files changed, 670 insertions(+), 7 deletions(-) create mode 100644 packages/presentation/src/___tests___/workspaceIdentity.test.ts create mode 100644 packages/presentation/src/workspaceIdentity.ts create mode 100644 plugins/setting-resources/src/components/WorkspaceIdentityColor.svelte create mode 100644 plugins/workbench-resources/src/components/WorkspaceFavicon.svelte diff --git a/dev/prod/src/index.ejs b/dev/prod/src/index.ejs index 96a11cc581..87229f8a45 100644 --- a/dev/prod/src/index.ejs +++ b/dev/prod/src/index.ejs @@ -4,10 +4,35 @@