From fc285bb6457b6fde6cd40854c7b5178255cc1e09 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 13 Feb 2023 20:21:42 -0800 Subject: [PATCH] fix: :lipstick: admin overview style --- package.json | 2 +- packages/backend/src/misc/gen-identicon.ts | 56 ++++++++++++------- packages/client/src/components/MkHeatmap.vue | 2 +- .../src/pages/admin/overview.active-users.vue | 4 +- .../src/pages/admin/overview.moderators.vue | 2 +- .../src/pages/admin/overview.queue.chart.vue | 8 +-- 6 files changed, 45 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 3da6e94d6..dbb304cb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "13.2.0-dev8", + "version": "13.2.0-dev9", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/backend/src/misc/gen-identicon.ts b/packages/backend/src/misc/gen-identicon.ts index 79297f8f2..fecdb4062 100644 --- a/packages/backend/src/misc/gen-identicon.ts +++ b/packages/backend/src/misc/gen-identicon.ts @@ -11,26 +11,42 @@ const size = 128; // px const n = 5; // resolution const margin = size / 4; const colors = [ - ["#FF512F", "#DD2476"], - ["#FF61D2", "#FE9090"], - ["#72FFB6", "#10D164"], - ["#FD8451", "#FFBD6F"], - ["#305170", "#6DFC6B"], - ["#00C0FF", "#4218B8"], - ["#009245", "#FCEE21"], - ["#0100EC", "#FB36F4"], - ["#FDABDD", "#374A5A"], - ["#38A2D7", "#561139"], - ["#121C84", "#8278DA"], - ["#5761B2", "#1FC5A8"], - ["#FFDB01", "#0E197D"], - ["#FF3E9D", "#0E1F40"], - ["#766eff", "#00d4ff"], - ["#9bff6e", "#00d4ff"], - ["#ff6e94", "#00d4ff"], - ["#ffa96e", "#00d4ff"], - ["#ffa96e", "#ff009d"], - ["#ffdd6e", "#ff009d"], + ["#eb6f92", "#b4637a"], + ["#f6c177", "#ea9d34"], + ["#ebbcba", "#d7827e"], + ["#31748f", "#286983"], + ["#9ccfd8", "#56949f"], + ["#c4a7e7", "#907aa9"], + ["#eb6f92", "#f6c177"], + ["#eb6f92", "#ebbcba"], + ["#eb6f92", "#31748f"], + ["#eb6f92", "#9ccfd8"], + ["#eb6f92", "#c4a7e7"], + ["#f6c177", "#eb6f92"], + ["#f6c177", "#ebbcba"], + ["#f6c177", "#31748f"], + ["#f6c177", "#9ccfd8"], + ["#f6c177", "#c4a7e7"], + ["#ebbcba", "#eb6f92"], + ["#ebbcba", "#f6c177"], + ["#ebbcba", "#31748f"], + ["#ebbcba", "#9ccfd8"], + ["#ebbcba", "#c4a7e7"], + ["#31748f", "#eb6f92"], + ["#31748f", "#f6c177"], + ["#31748f", "#ebbcba"], + ["#31748f", "#9ccfd8"], + ["#31748f", "#c4a7e7"], + ["#9ccfd8", "#eb6f92"], + ["#9ccfd8", "#f6c177"], + ["#9ccfd8", "#ebbcba"], + ["#9ccfd8", "#31748f"], + ["#9ccfd8", "#c4a7e7"], + ["#c4a7e7", "#eb6f92"], + ["#c4a7e7", "#f6c177"], + ["#c4a7e7", "#ebbcba"], + ["#c4a7e7", "#31748f"], + ["#c4a7e7", "#9ccfd8"], ]; const actualSize = size - margin * 2; diff --git a/packages/client/src/components/MkHeatmap.vue b/packages/client/src/components/MkHeatmap.vue index 036a2eb49..02f5c7aed 100644 --- a/packages/client/src/components/MkHeatmap.vue +++ b/packages/client/src/components/MkHeatmap.vue @@ -90,7 +90,7 @@ async function renderChart() { await nextTick(); - const color = defaultStore.state.darkMode ? '#b4e900' : '#86b300'; + const color = defaultStore.state.darkMode ? '#ebbcba' : '#d7827e'; // 視覚上の分かりやすさのため上から最も大きい3つの値の平均を最大値とする const max = values.slice().sort((a, b) => b - a).slice(0, 3).reduce((a, b) => a + b, 0) / 3; diff --git a/packages/client/src/pages/admin/overview.active-users.vue b/packages/client/src/pages/admin/overview.active-users.vue index 3ec7694f2..ee8f42c43 100644 --- a/packages/client/src/pages/admin/overview.active-users.vue +++ b/packages/client/src/pages/admin/overview.active-users.vue @@ -53,8 +53,8 @@ async function renderChart() { const vLineColor = defaultStore.state.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)'; - const colorRead = '#3498db'; - const colorWrite = '#2ecc71'; + const colorRead = '#eb6f92'; + const colorWrite = '#f6c177'; const max = Math.max(...raw.read); diff --git a/packages/client/src/pages/admin/overview.moderators.vue b/packages/client/src/pages/admin/overview.moderators.vue index 445217d82..1a5160172 100644 --- a/packages/client/src/pages/admin/overview.moderators.vue +++ b/packages/client/src/pages/admin/overview.moderators.vue @@ -22,7 +22,7 @@ let fetching = $ref(true); onMounted(async () => { moderators = await os.api('admin/show-users', { - sort: '+lastActiveDate', + sort: '+updatedAt', state: 'adminOrModerator', limit: 30, }); diff --git a/packages/client/src/pages/admin/overview.queue.chart.vue b/packages/client/src/pages/admin/overview.queue.chart.vue index 0162d5366..46d030687 100644 --- a/packages/client/src/pages/admin/overview.queue.chart.vue +++ b/packages/client/src/pages/admin/overview.queue.chart.vue @@ -57,10 +57,10 @@ const label = '?' as never; const color = - props.type === 'process' ? '#00E396' : - props.type === 'active' ? '#00BCD4' : - props.type === 'delayed' ? '#E53935' : - props.type === 'waiting' ? '#FFB300' : + props.type === 'process' ? '#c4a7e7' : + props.type === 'active' ? '#31748f' : + props.type === 'delayed' ? '#eb6f92' : + props.type === 'waiting' ? '#f6c177' : '?' as never; onMounted(() => {