M9 S5 (frontend): shared BaseModal for the standard modals + BaseInput in Account
- BaseModal.vue (new): the backdrop + dialog-panel shell (dimmed fixed overlay, bordered rounded panel, role=dialog, close on Escape + backdrop mousedown). Caller sizes/pads/shadows the panel via `panelClass`, picks start/center `align`, and sets an `ariaLabel` for header-less panels. - LabelsModal, CommandPalette, and the AppShell keyboard-shortcuts overlay drop their hand-rolled backdrop+panel shells and slot their content into BaseModal (~12 lines of overlay boilerplate each → gone). - NoteEditor deliberately keeps its own shell: its backdrop mousedown is drag-guarded and its Esc/⌘-Enter handling is bespoke (unsaved-edit safety), so folding it in would risk regressing the app's core editing surface (rule 28). - AccountView's one device-name field now uses the shared BaseInput. SettingsView is intentionally NOT converted — its rows are a horizontal label+control pattern (checkbox/number/text, direct value mutation), a different shape than BaseInput's vertical form field. Frontend-only; CI vue-tsc is the type/template gate (no local typecheck, rule 10). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRgehjoz7Yv8LkUfADxACm
This commit is contained in:
@@ -3,6 +3,7 @@ import { onMounted, ref } from "vue";
|
||||
import { useDevicesStore } from "../stores/devices";
|
||||
import { useUiStore } from "../stores/ui";
|
||||
import BaseButton from "../components/BaseButton.vue";
|
||||
import BaseInput from "../components/BaseInput.vue";
|
||||
import Icon from "../components/Icon.vue";
|
||||
|
||||
// Per-user (not admin) management of linked native clients — the Tauri desktop and
|
||||
@@ -124,18 +125,13 @@ onMounted(load);
|
||||
|
||||
<!-- Create a device token -->
|
||||
<form class="mb-8 flex items-end gap-3" @submit.prevent="link">
|
||||
<div class="flex flex-1 flex-col gap-1">
|
||||
<label for="device-name" class="text-sm font-medium text-neutral-800 dark:text-neutral-200"
|
||||
>Link a new device</label
|
||||
>
|
||||
<input
|
||||
id="device-name"
|
||||
v-model="newName"
|
||||
type="text"
|
||||
placeholder="e.g. My laptop, Pixel phone"
|
||||
class="rounded-lg border border-neutral-300 bg-white px-3 py-2 text-sm text-neutral-900 shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-brand dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-100"
|
||||
/>
|
||||
</div>
|
||||
<BaseInput
|
||||
id="device-name"
|
||||
v-model="newName"
|
||||
label="Link a new device"
|
||||
placeholder="e.g. My laptop, Pixel phone"
|
||||
class="flex-1"
|
||||
/>
|
||||
<BaseButton type="submit" :loading="creating">Create token</BaseButton>
|
||||
</form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user