mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-05-20 07:40:35 +08:00
- Redis 页面重构为工作台样式,统一左右面板、工具条和详情区层级 - 接入 light/dark/透明模式主题参数,修复 Redis 页面与全局主题不一致问题 - 新增文件夹递归勾选、全选全部、分组全选/取消全选能力 - 支持 Redis Key 右键菜单重命名并同步更新树节点、选中态和详情面板 - 修复 type=none 时读取失败问题,过期或已删除 Key 自动提示并移出列表 - 接管 Redis Tree 展开箭头渲染,修复 switcher 命中区错位和悬浮白线问题 - 统一工具、代理、主题、关于、筛选、新建组和新建连接等弹层主题 - refs #231
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import { strict as assert } from 'node:assert';
|
|
|
|
import { buildRedisWorkbenchTheme } from './redisViewerWorkbenchTheme';
|
|
|
|
const darkTheme = buildRedisWorkbenchTheme({
|
|
darkMode: true,
|
|
opacity: 0.72,
|
|
blur: 14,
|
|
});
|
|
|
|
assert.equal(darkTheme.isDark, true);
|
|
assert.match(darkTheme.panelBg, /^rgba\(/);
|
|
assert.match(darkTheme.toolbarPrimaryBg, /^linear-gradient\(/);
|
|
assert.notEqual(darkTheme.actionDangerBg, darkTheme.actionSecondaryBg);
|
|
assert.notEqual(darkTheme.treeSelectedBg, darkTheme.treeHoverBg);
|
|
assert.match(darkTheme.appBg, /rgba\(15, 15, 17,/);
|
|
assert.match(darkTheme.panelBg, /rgba\(24, 24, 28,/);
|
|
assert.match(darkTheme.panelBgStrong, /rgba\(31, 31, 36,/);
|
|
assert.equal(darkTheme.backdropFilter, 'blur(14px)');
|
|
|
|
const lightTheme = buildRedisWorkbenchTheme({
|
|
darkMode: false,
|
|
opacity: 1,
|
|
blur: 0,
|
|
});
|
|
|
|
assert.equal(lightTheme.isDark, false);
|
|
assert.match(lightTheme.panelBg, /^rgba\(/);
|
|
assert.match(lightTheme.contentEmptyBg, /^linear-gradient\(/);
|
|
assert.notEqual(lightTheme.textPrimary, lightTheme.textSecondary);
|
|
assert.notEqual(lightTheme.statusTagBg, lightTheme.statusTagMutedBg);
|
|
assert.equal(lightTheme.backdropFilter, 'none');
|
|
|
|
console.log('redisViewerWorkbenchTheme tests passed');
|