diff --git a/openspec/specs/internship-catalog-ui/spec.md b/openspec/specs/internship-catalog-ui/spec.md index 0606127..2201907 100644 --- a/openspec/specs/internship-catalog-ui/spec.md +++ b/openspec/specs/internship-catalog-ui/spec.md @@ -55,7 +55,7 @@ #### Scenario: Телеграм не привязан - **GIVEN** Телеграм не привязан - **WHEN** пользователь открывает страницу -- **THEN** у галочки регулярного поиска подпись просит сначала привязать Телеграм +- **THEN** у галочки регулярного поиска рядом с галочкой в одной строке одна короткая подсказка «Сначала привяжите Телеграм», без дубля ниже #### Scenario: Поиск ещё не запускался - **GIVEN** поиск не запускался и нужен код доступа diff --git a/public/filters.js b/public/filters.js index 5859b3d..42663b1 100644 --- a/public/filters.js +++ b/public/filters.js @@ -92,9 +92,7 @@ export function settingsSummary(s) { * @returns {string} */ export function enabledHint(linked) { - return linked - ? "Раз в сутки сервис сам ищет стажировки и присылает в Телеграм только новые." - : "Галочка станет доступна после привязки Телеграма: сначала нажмите «Привязать Телеграм»."; + return linked ? "" : "Сначала привяжите Телеграм"; } /** diff --git a/public/index.html b/public/index.html index 81e7e70..28fbe58 100644 --- a/public/index.html +++ b/public/index.html @@ -59,10 +59,10 @@ + -
diff --git a/public/style.css b/public/style.css index 70ef7bc..3b134cc 100644 --- a/public/style.css +++ b/public/style.css @@ -48,5 +48,6 @@ a { color: var(--accent); } .settings { margin: 24px 0; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; } .settings h2 { margin: 0 0 8px; font-size: 1.1rem; } .settings .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; } -.settings .inline { display: inline-flex; gap: 6px; align-items: center; } +.settings .inline { display: inline-flex; flex-direction: row; gap: 6px; align-items: center; cursor: pointer; font-size: 1rem; color: var(--text); } +.settings .inline input { padding: 0; margin: 0; } .muted-badge { background: transparent; color: var(--muted); border: 1px solid var(--border); } diff --git a/test/page.test.ts b/test/page.test.ts index 02e31a2..bbd572b 100644 --- a/test/page.test.ts +++ b/test/page.test.ts @@ -141,7 +141,8 @@ describe("Requirement: Запуск поиска со страницы", () => { describe("Requirement: Подписи и пустые состояния", () => { it("Scenario: Телеграм не привязан", async () => { await loadPage(); - await vi.waitFor(() => expect($("enabled-hint").textContent).toContain("после привязки Телеграма")); + await vi.waitFor(() => expect($("enabled-hint").textContent).toBe("Сначала привяжите Телеграм")); + expect($("enabled").closest("label")?.textContent).toContain("Искать раз в сутки"); }); it("Scenario: Поиск ещё не запускался", async () => {