fix(app): align Settings controls and version metadata

The editor select referenced an undefined style class, and the renderer hard-coded 0.1.0 instead of reading Electron app metadata.
This commit is contained in:
tommy0103
2026-08-03 21:34:14 +08:00
committed by tommy0103
parent cb191cfad4
commit 23adfa3847
5 changed files with 77 additions and 5 deletions
+19
View File
@@ -0,0 +1,19 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
const source = readFileSync(
new URL('../app/src/renderer/src/views/Settings.vue', import.meta.url),
'utf8',
);
test('Settings reads the displayed version from the settings payload', () => {
assert.doesNotMatch(source, /const version = ref\(['"]0\.1\.0['"]\)/);
assert.match(source, /version\.value = s\.version/);
});
test('Editor selector uses the themed Settings control vocabulary', () => {
assert.match(source, /<select class="path-field select-field"/);
assert.match(source, /\.select-field\s*\{[^}]*appearance:\s*none/s);
assert.match(source, /\.select-control::after\s*\{/);
});