From adf755f0b2ba750a2cec28d694fd4c22f7cb27a7 Mon Sep 17 00:00:00 2001 From: sim1222 Date: Thu, 16 Jun 2022 18:41:04 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=84=E3=81=A3=E3=81=B1=E3=81=84=E3=82=A2?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=83=87=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/index.js | 7 +- package.json | 2 +- packages/backend/src/server/web/boot.js | 3 + packages/client/src/scripts/theme.ts | 2 + packages/client/src/store.ts | 4 +- .../client/src/themes/d-simkey-noglass.json5 | 78 +++++++++++++++++++ .../client/src/themes/l-simkey-noglass.json5 | 50 ++++++++++++ .../src/ui/_common_/sidebar-for-mobile.vue | 3 + packages/client/src/ui/_common_/sidebar.vue | 3 + 9 files changed, 146 insertions(+), 6 deletions(-) create mode 100644 packages/client/src/themes/d-simkey-noglass.json5 create mode 100644 packages/client/src/themes/l-simkey-noglass.json5 diff --git a/locales/index.js b/locales/index.js index 94ae935ff..8d0f80909 100644 --- a/locales/index.js +++ b/locales/index.js @@ -56,11 +56,12 @@ module.exports = Object.entries(locales) .reduce((a, [k ,v]) => (a[k] = (() => { const [lang] = k.split('-'); switch (k) { - case 'ja-JP': return v; - case 'ja-NY': + case 'ja-NY': return v; + case 'ja-JP': case 'ja-KS': - case 'en-US': return merge(locales['ja-JP'], v); + case 'en-US': return merge(locales['ja-NY'], v); default: return merge( + locales['ja-NY'], locales['ja-JP'], locales['en-US'], locales[`${lang}-${primaries[lang]}`] || {}, diff --git a/package.json b/package.json index dcdf82f08..c9b0c1ea7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.111.1-simkey-v11", + "version": "12.111.1-simkey-v12", "codename": "indigo", "repository": { "type": "git", diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js index 94329e11c..01f81ee3b 100644 --- a/packages/backend/src/server/web/boot.js +++ b/packages/backend/src/server/web/boot.js @@ -32,6 +32,9 @@ if (lang == null || !supportedLangs.includes(lang)) { if (supportedLangs.includes(navigator.language)) { lang = navigator.language; + if (lang === 'ja-JP') { + lang = 'ja-NY'; + } } else { lang = supportedLangs.find(x => x.split('-')[0] === navigator.language); diff --git a/packages/client/src/scripts/theme.ts b/packages/client/src/scripts/theme.ts index 1fba118e7..42328dc53 100644 --- a/packages/client/src/scripts/theme.ts +++ b/packages/client/src/scripts/theme.ts @@ -19,6 +19,7 @@ export const themeProps = Object.keys(lightTheme.props).filter(key => !key.start export const getBuiltinThemes = () => Promise.all( [ 'l-simkey', + 'l-simkey-noglass', 'l-light', 'l-coffee', 'l-apricot', @@ -28,6 +29,7 @@ export const getBuiltinThemes = () => Promise.all( 'l-sushi', 'd-simkey', + 'd-simkey-noglass', 'd-dark', 'd-persimmon', 'd-astro', diff --git a/packages/client/src/store.ts b/packages/client/src/store.ts index 3afdf42b0..64195ce69 100644 --- a/packages/client/src/store.ts +++ b/packages/client/src/store.ts @@ -255,8 +255,8 @@ type Plugin = { /** * 常にメモリにロードしておく必要がないような設定情報を保管するストレージ(非リアクティブ) */ -import lightTheme from '@/themes/l-light.json5'; -import darkTheme from '@/themes/d-dark.json5'; +import lightTheme from '@/themes/l-simkey.json5'; +import darkTheme from '@/themes/d-simkey.json5'; export class ColdDeviceStorage { public static default = { diff --git a/packages/client/src/themes/d-simkey-noglass.json5 b/packages/client/src/themes/d-simkey-noglass.json5 new file mode 100644 index 000000000..f00c7ac32 --- /dev/null +++ b/packages/client/src/themes/d-simkey-noglass.json5 @@ -0,0 +1,78 @@ +{ + id: '971cb22e-c9e6-4a7d-92f9-87cc0ddda561', + base: 'dark', + name: 'simkey Astro Dark-NoGlass', + author: 'sim1222', + props: { + bg: 'rgba(35, 33, 37, 1)', + fg: '#efdab9', + cwBg: '#687390', + cwFg: '#393f4f', + link: '#78b0a0', + warn: '#ecb637', + badge: '#31b1ce', + error: '#ec4137', + focus: ':alpha<0.3<@accent', + navBg: '@panel', + navFg: '@fg', + panel: 'rgba(42, 39, 43, 1)', + accent: '#81c08b', + header: ':alpha<0.7<@bg', + infoBg: '#253142', + infoFg: '#fff', + renote: '#659CC8', + shadow: 'rgba(0, 0, 0, 0.3)', + divider: 'rgba(255, 255, 255, 0.1)', + hashtag: '#ff9156', + mention: '#ffd152', + modalBg: 'rgba(0, 0, 0, 0.5)', + success: '#86b300', + buttonBg: 'rgba(255, 255, 255, 0.05)', + acrylicBg: ':alpha<0.5<@bg', + cwHoverBg: '#707b97', + indicator: '@accent', + mentionMe: '#fb5d38', + messageBg: '@bg', + navActive: '@accent', + infoWarnBg: '#42321c', + infoWarnFg: '#ffbd3e', + navHoverFg: ':lighten<17<@fg', + dateLabelFg: '@fg', + inputBorder: 'rgba(255, 255, 255, 0.1)', + inputBorderHover: 'rgba(255, 255, 255, 0.2)', + panelBorder: '" solid 1px var(--divider)', + accentDarken: ':darken<10<@accent', + acrylicPanel: ':alpha<0.5<@panel', + navIndicator: '@accent', + accentLighten: ':lighten<10<@accent', + buttonHoverBg: 'rgba(255, 255, 255, 0.1)', + buttonGradateA: '@accent', + buttonGradateB: ':hue<-20<@accent', + driveFolderBg: ':alpha<0.3<@accent', + fgHighlighted: ':lighten<3<@fg', + panelHeaderBg: ':lighten<3<@panel', + panelHeaderFg: '@fg', + htmlThemeColor: '@bg', + panelHighlight: ':lighten<3<@panel', + listItemHoverBg: 'rgba(255, 255, 255, 0.03)', + scrollbarHandle: 'rgba(255, 255, 255, 0.2)', + wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', + panelHeaderDivider: 'rgba(0, 0, 0, 0)', + scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', + X2: ':darken<2<@panel', + X3: 'rgba(255, 255, 255, 0.05)', + X4: 'rgba(255, 255, 255, 0.1)', + X5: 'rgba(255, 255, 255, 0.05)', + X6: 'rgba(255, 255, 255, 0.15)', + X7: 'rgba(255, 255, 255, 0.05)', + X8: ':lighten<5<@accent', + X9: ':darken<5<@accent', + X10: ':alpha<0.4<@accent', + X11: 'rgba(0, 0, 0, 0.3)', + X12: 'rgba(255, 255, 255, 0.1)', + X13: 'rgba(255, 255, 255, 0.15)', + X14: ':alpha<0.5<@navBg', + X15: ':alpha<0<@panel', + X16: ':alpha<0.7<@panel', + }, +} diff --git a/packages/client/src/themes/l-simkey-noglass.json5 b/packages/client/src/themes/l-simkey-noglass.json5 new file mode 100644 index 000000000..7e5a84917 --- /dev/null +++ b/packages/client/src/themes/l-simkey-noglass.json5 @@ -0,0 +1,50 @@ +{ + id: '2626d839-8579-4b44-80a4-39af123ff74a', + name: 'simkey Vivid Light-NoGlass', + author: 'sim1222', + base: 'light', + props: { + bg: 'rgba(250, 250, 250, 0.7)', + fg: '#444', + cwBg: '#b1b9c1', + cwFg: '#fff', + link: '#ff9400', + panel: 'rgba(255, 255, 255, 0.6)', + accent: '#81c08b', + header: ':alpha<0.7<@panel', + infoBg: '#e5f5ff', + infoFg: '#72818a', + renote: '#659CC8', + shadow: 'rgba(0, 0, 0, 0.1)', + divider: 'rgba(0, 0, 0, 0.08)', + hashtag: '#92d400', + mention: '@accent', + modalBg: 'rgba(0, 0, 0, 0.3)', + buttonBg: 'rgba(0, 0, 0, 0.05)', + cwHoverBg: '#bbc4ce', + mentionMe: '@mention', + infoWarnBg: '#fff0db', + infoWarnFg: '#8f6e31', + navHoverFg: ':darken<17<@fg', + inputBorder: 'rgba(0, 0, 0, 0.1)', + inputBorderHover: 'rgba(0, 0, 0, 0.2)', + buttonHoverBg: 'rgba(0, 0, 0, 0.1)', + fgHighlighted: ':darken<3<@fg', + fgTransparent: ':alpha<0.5<@fg', + panelHighlight: ':darken<3<@panel', + listItemHoverBg: 'rgba(0, 0, 0, 0.03)', + scrollbarHandle: 'rgba(0, 0, 0, 0.2)', + wallpaperOverlay: 'rgba(255, 255, 255, 0.5)', + fgTransparentWeak: ':alpha<0.75<@fg', + panelHeaderDivider: '@divider', + scrollbarHandleHover: 'rgba(0, 0, 0, 0.4)', + X3: 'rgba(0, 0, 0, 0.05)', + X4: 'rgba(0, 0, 0, 0.1)', + X5: 'rgba(0, 0, 0, 0.05)', + X6: 'rgba(0, 0, 0, 0.25)', + X7: 'rgba(0, 0, 0, 0.05)', + X11: 'rgba(0, 0, 0, 0.1)', + X12: 'rgba(0, 0, 0, 0.1)', + X13: 'rgba(0, 0, 0, 0.15)', + }, +} diff --git a/packages/client/src/ui/_common_/sidebar-for-mobile.vue b/packages/client/src/ui/_common_/sidebar-for-mobile.vue index 41d083723..4e5f00366 100644 --- a/packages/client/src/ui/_common_/sidebar-for-mobile.vue +++ b/packages/client/src/ui/_common_/sidebar-for-mobile.vue @@ -81,6 +81,9 @@ export default defineComponent({ $avatar-size: 32px; $avatar-margin: 8px; + backdrop-filter: var(--blur, blur(8px)); + -webkit-backdrop-filter: var(--blur, blur(8px)); + > div { > .divider { diff --git a/packages/client/src/ui/_common_/sidebar.vue b/packages/client/src/ui/_common_/sidebar.vue index d65e776d8..e5809f6ba 100644 --- a/packages/client/src/ui/_common_/sidebar.vue +++ b/packages/client/src/ui/_common_/sidebar.vue @@ -88,6 +88,9 @@ function more(ev: MouseEvent) { width: $nav-width; box-sizing: border-box; + backdrop-filter: var(--blur, blur(8px)); + -webkit-backdrop-filter: var(--blur, blur(8px)); + > div { position: fixed; top: 0;