feat: 支持创作入口公告配置

This commit is contained in:
2026-06-03 03:31:45 +08:00
parent 1cb11bc1dd
commit 70ff18ad90
52 changed files with 3045 additions and 504 deletions

View File

@@ -52,3 +52,31 @@ describe('index stylesheet unread dots', () => {
}
});
});
describe('index stylesheet draft mobile cards', () => {
it('disables long-press text selection on the whole mobile draft tab', () => {
const css = readIndexCss();
const mobileQueryIndex = css.indexOf('@media (max-width: 639px)');
expect(mobileQueryIndex).toBeGreaterThanOrEqual(0);
const draftPanelSelector =
'#platform-tab-panel-saves,\n #platform-tab-panel-saves *';
const draftPanelSelectorIndex = css.indexOf(draftPanelSelector, mobileQueryIndex);
expect(draftPanelSelectorIndex).toBeGreaterThanOrEqual(0);
const draftPanelBlock = getCssBlock(css, draftPanelSelector);
expect(draftPanelBlock).toContain('-webkit-user-select: none;');
expect(draftPanelBlock).toContain('user-select: none;');
expect(draftPanelBlock).toContain('-webkit-touch-callout: none;');
const editableSelector =
"#platform-tab-panel-saves :is(input, textarea, [contenteditable='true'])";
const editableSelectorIndex = css.indexOf(editableSelector, mobileQueryIndex);
expect(editableSelectorIndex).toBeGreaterThanOrEqual(0);
const editableBlock = getCssBlock(css, editableSelector);
expect(editableBlock).toContain('-webkit-user-select: text;');
expect(editableBlock).toContain('user-select: text;');
expect(editableBlock).toContain('-webkit-touch-callout: default;');
});
});