From 9613df6fe406bee053531f526557b43db867ff3f Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Mon, 27 Sep 2021 18:15:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=9D=E9=9F=B3=E6=9C=AA=E6=9D=A5?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- registry.json | 9 ++++++++ web/package.json | 1 + .../com.msgbyte.theme.miku/manifest.json | 9 ++++++++ .../com.msgbyte.theme.miku/package.json | 7 +++++++ .../com.msgbyte.theme.miku/src/index.ts | 7 +++++++ .../com.msgbyte.theme.miku/src/theme.less | 21 +++++++++++++++++++ .../com.msgbyte.theme.miku/tsconfig.json | 11 ++++++++++ 7 files changed, 65 insertions(+) create mode 100644 web/plugins/com.msgbyte.theme.miku/manifest.json create mode 100644 web/plugins/com.msgbyte.theme.miku/package.json create mode 100644 web/plugins/com.msgbyte.theme.miku/src/index.ts create mode 100644 web/plugins/com.msgbyte.theme.miku/src/theme.less create mode 100644 web/plugins/com.msgbyte.theme.miku/tsconfig.json diff --git a/registry.json b/registry.json index 39b3d4fd..4b48d02b 100644 --- a/registry.json +++ b/registry.json @@ -7,5 +7,14 @@ "author": "msgbyte", "description": "为聊天提供喵语言对话功能", "requireRestart": true + }, + { + "label": "Miku初音未来主题", + "name": "com.msgbyte.theme.miku", + "url": "/plugins/com.msgbyte.theme.miku/index.js", + "version": "0.0.0", + "author": "msgbyte", + "description": "初音未来主题", + "requireRestart": true } ] diff --git a/web/package.json b/web/package.json index ad8afa26..f3b97d61 100644 --- a/web/package.json +++ b/web/package.json @@ -11,6 +11,7 @@ "dev": "cross-env TS_NODE_PROJECT='tsconfig.node.json' NODE_ENV=development webpack serve", "serve": "npx http-server ./dist", "postinstall": "node plugins/install.js", + "plugins:new": "ministar createPlugin", "plugins:all": "ministar buildPlugin all", "plugins:watch": "ministar watchPlugin all" }, diff --git a/web/plugins/com.msgbyte.theme.miku/manifest.json b/web/plugins/com.msgbyte.theme.miku/manifest.json new file mode 100644 index 00000000..e6271201 --- /dev/null +++ b/web/plugins/com.msgbyte.theme.miku/manifest.json @@ -0,0 +1,9 @@ +{ + "label": "Miku初音未来主题", + "name": "com.msgbyte.theme.miku", + "url": "/plugins/com.msgbyte.theme.miku/index.js", + "version": "0.0.0", + "author": "msgbyte", + "description": "初音未来主题", + "requireRestart": true +} diff --git a/web/plugins/com.msgbyte.theme.miku/package.json b/web/plugins/com.msgbyte.theme.miku/package.json new file mode 100644 index 00000000..7c78c853 --- /dev/null +++ b/web/plugins/com.msgbyte.theme.miku/package.json @@ -0,0 +1,7 @@ +{ + "name": "@plugins/com.msgbyte.theme.miku", + "main": "src/index.ts", + "version": "0.0.0", + "private": true, + "dependencies": {} +} \ No newline at end of file diff --git a/web/plugins/com.msgbyte.theme.miku/src/index.ts b/web/plugins/com.msgbyte.theme.miku/src/index.ts new file mode 100644 index 00000000..a6b93c97 --- /dev/null +++ b/web/plugins/com.msgbyte.theme.miku/src/index.ts @@ -0,0 +1,7 @@ +import { regPluginColorScheme } from '@capital/common'; +import './theme.less'; + +regPluginColorScheme({ + label: 'Miku 葱', + name: 'light+miku', +}); diff --git a/web/plugins/com.msgbyte.theme.miku/src/theme.less b/web/plugins/com.msgbyte.theme.miku/src/theme.less new file mode 100644 index 00000000..fc0d59ac --- /dev/null +++ b/web/plugins/com.msgbyte.theme.miku/src/theme.less @@ -0,0 +1,21 @@ +#tailchat-app.theme-miku { + @primary-color: #39C5BB; + + --tc-primary-color: #39C5BB; + + .bg-navbar-light { + background-color: @primary-color; + + .bg-gray-400 { + background-color: darken(@primary-color, 10%); + } + } + + .bg-sidebar-light { + background-color: lighten(@primary-color, 20%); + } + + .bg-content-light { + background-color: lighten(@primary-color, 40%); + } +} diff --git a/web/plugins/com.msgbyte.theme.miku/tsconfig.json b/web/plugins/com.msgbyte.theme.miku/tsconfig.json new file mode 100644 index 00000000..beb3c60f --- /dev/null +++ b/web/plugins/com.msgbyte.theme.miku/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "baseUrl": "./src", + "esModuleInterop": true, + "jsx": "react", + "paths": { + "@capital/*": ["../../../src/plugin/*"], + } + } +}