mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-26 04:39:53 +01:00
fix: keep function dialog footer accessible
This commit is contained in:
parent
7475ea2b2d
commit
16b6841710
2 changed files with 19 additions and 1 deletions
|
|
@ -656,6 +656,7 @@ export default {
|
||||||
.drawer-footer {
|
.drawer-footer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
z-index: 2;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-top: 1px solid #e8e8e8;
|
border-top: 1px solid #e8e8e8;
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@ const correctWordApiSource = await readFile(
|
||||||
new URL('../src/apis/module/correctWord.js', import.meta.url),
|
new URL('../src/apis/module/correctWord.js', import.meta.url),
|
||||||
'utf8',
|
'utf8',
|
||||||
);
|
);
|
||||||
|
const functionDialogSource = await readFile(
|
||||||
|
new URL('../src/components/FunctionDialog.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(
|
||||||
|
|
@ -61,3 +65,16 @@ 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('function dialog footer stays above the expanding MCP tools section', () => {
|
||||||
|
const mcpLayer = functionDialogSource.match(
|
||||||
|
/\.mcp-access-point\s*\{[^}]*z-index:\s*(\d+);/s,
|
||||||
|
);
|
||||||
|
const footerLayer = functionDialogSource.match(
|
||||||
|
/\.drawer-footer\s*\{[^}]*z-index:\s*(\d+);/s,
|
||||||
|
);
|
||||||
|
|
||||||
|
assert.ok(mcpLayer, 'MCP section should define its stacking layer');
|
||||||
|
assert.ok(footerLayer, 'drawer footer should define its stacking layer');
|
||||||
|
assert.ok(Number(footerLayer[1]) > Number(mcpLayer[1]));
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue