mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-26 04:39:53 +01:00
fix(manager-web): keep model navigation scrollable on short screens
This commit is contained in:
parent
fdf280f84a
commit
855a64cbb9
2 changed files with 20 additions and 0 deletions
|
|
@ -613,6 +613,8 @@ export default {
|
||||||
.nav-panel {
|
.nav-panel {
|
||||||
min-width: 242px;
|
min-width: 242px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow-y: auto;
|
||||||
border-right: 1px solid #ebeef5;
|
border-right: 1px solid #ebeef5;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
120deg,
|
120deg,
|
||||||
|
|
@ -629,6 +631,7 @@ export default {
|
||||||
|
|
||||||
.nav-panel .el-menu-item {
|
.nav-panel .el-menu-item {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
flex-shrink: 0;
|
||||||
background: #e9f0ff;
|
background: #e9f0ff;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
border-radius: 4px 0 0 4px !important;
|
border-radius: 4px 0 0 4px !important;
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,10 @@ const functionDialogSource = await readFile(
|
||||||
new URL('../src/components/FunctionDialog.vue', import.meta.url),
|
new URL('../src/components/FunctionDialog.vue', import.meta.url),
|
||||||
'utf8',
|
'utf8',
|
||||||
);
|
);
|
||||||
|
const modelConfigSource = await readFile(
|
||||||
|
new URL('../src/views/ModelConfig.vue', import.meta.url),
|
||||||
|
'utf8',
|
||||||
|
);
|
||||||
|
|
||||||
test('address-book permission state consistently uses the target device MAC', () => {
|
test('address-book permission state consistently uses the target device MAC', () => {
|
||||||
assert.match(
|
assert.match(
|
||||||
|
|
@ -66,6 +70,19 @@ test('correct-word pagination maps the UI page size to the backend limit query',
|
||||||
assert.doesNotMatch(correctWordApiSource, /pageSize: params\.pageSize/);
|
assert.doesNotMatch(correctWordApiSource, /pageSize: params\.pageSize/);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('model navigation keeps all entries reachable on short screens', () => {
|
||||||
|
const navStyles = modelConfigSource.match(/\.nav-panel\s*\{([^}]*)\}/)?.[1];
|
||||||
|
const itemStyles = modelConfigSource.match(
|
||||||
|
/\.nav-panel\s+\.el-menu-item\s*\{([^}]*)\}/,
|
||||||
|
)?.[1];
|
||||||
|
|
||||||
|
assert.ok(navStyles, 'model navigation should define its layout');
|
||||||
|
assert.ok(itemStyles, 'model menu items should define their layout');
|
||||||
|
assert.match(navStyles, /box-sizing:\s*border-box;/);
|
||||||
|
assert.match(navStyles, /overflow-y:\s*auto;/);
|
||||||
|
assert.match(itemStyles, /flex-shrink:\s*0;/);
|
||||||
|
});
|
||||||
|
|
||||||
test('function dialog footer stays above the expanding MCP tools section', () => {
|
test('function dialog footer stays above the expanding MCP tools section', () => {
|
||||||
const mcpLayer = functionDialogSource.match(
|
const mcpLayer = functionDialogSource.match(
|
||||||
/\.mcp-access-point\s*\{[^}]*z-index:\s*(\d+);/s,
|
/\.mcp-access-point\s*\{[^}]*z-index:\s*(\d+);/s,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue