diff --git a/VERSION.properties b/VERSION.properties index 164d6982..90187fe1 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.20.0 +client.version=1.20.1 server.version=1.16.0 diff --git a/shine-UI/js/services/theme-service.js b/shine-UI/js/services/theme-service.js index ee8027f3..64251680 100644 --- a/shine-UI/js/services/theme-service.js +++ b/shine-UI/js/services/theme-service.js @@ -48,6 +48,26 @@ export const PALETTE_PRESETS = { 'reaction-active': '#5d4fc4', danger: '#b3304a', success: '#2d7552', warning: '#8a5a0e', info: '#2f5f9e', }, }, + // TG · Midnight — спокойная тёмно-синяя палитра по мотивам Telegram Android. + // Только цвета: никаких изменений в навигации, компонентах и логике сообщений. + // Светлый вариант нужен, чтобы «Авто» работало по существующим правилам. + tg_midnight: { + label: 'TG · Midnight', + dark: { + background: '#151e27', surface: '#1d2733', 'surface-selected': '#2c4358', 'surface-raised': '#263646', + 'text-primary': '#f0f3f7', 'text-secondary': '#8494a5', + 'border-subtle': '#293643', 'border-control': '#547086', + accent: '#2596e8', 'on-accent': '#ffffff', action: '#69b9f0', 'bubble-out': '#456f69', + 'reaction-active': '#69b9f0', danger: '#f06e7a', success: '#7ad4ad', warning: '#f1bc74', info: '#73bff1', + }, + light: { + background: '#f1f5f9', surface: '#ffffff', 'surface-selected': '#dceefa', 'surface-raised': '#e9f2f9', + 'text-primary': '#192a39', 'text-secondary': '#667e90', + 'border-subtle': '#dae4ec', 'border-control': '#91aabc', + accent: '#248ed0', 'on-accent': '#ffffff', action: '#167fbf', 'bubble-out': '#d9f0e9', + 'reaction-active': '#248ed0', danger: '#c33c51', success: '#267f59', warning: '#976315', info: '#297eb7', + }, + }, club: { label: 'Индиго', dark: { diff --git a/shine-UI/tests/tg-midnight-theme.test.mjs b/shine-UI/tests/tg-midnight-theme.test.mjs new file mode 100644 index 00000000..0255e06e --- /dev/null +++ b/shine-UI/tests/tg-midnight-theme.test.mjs @@ -0,0 +1,28 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { + PALETTE_PRESETS, PALETTE_ROLES, resolvePalette, +} from '../js/services/theme-service.js'; + +const settings = (preset) => ({ preset, custom: { dark: {}, light: {} } }); + +test('новая палитра доступна в настройках, а стандартная сохранена', () => { + assert.equal(PALETTE_PRESETS.tg_midnight.label, 'TG · Midnight'); + assert.equal(PALETTE_PRESETS.aurora.label, 'Сияние'); +}); + +test('каждая роль в тёмном и светлом TG содержит корректный HEX', () => { + for (const mode of ['dark', 'light']) { + const result = resolvePalette(mode, settings('tg_midnight')); + for (const { id } of PALETTE_ROLES) { + assert.match(result[id], /^#[0-9a-f]{6}$/i, `${mode}/${id}`); + } + } +}); + +test('у тёмной темы синий акцент и отдельный цвет исходящего сообщения', () => { + const c = resolvePalette('dark', settings('tg_midnight')); + assert.equal(c.background, '#151e27'); + assert.equal(c.accent, '#2596e8'); + assert.equal(c['bubble-out'], '#456f69'); +});