Toasts, logo icons, shared table toolbar with search, and a density toggle
Feedback: toasts confirm common actions, and a page's error or success message that appears out of view is also shown as a toast. Icons: the tab, app and home-screen icons are the house from the logo; a dev instance gets a coloured dot on its tab icon. Tables: Secrets, Admin Links, IP Addresses and Alerts share one toolbar (search, filters, row count, actions, Export CSV); twelve more tables get a multi-word search box; long tables keep their column headings in view on wide screens. Density: Compact / Normal / Roomy in the user menu, remembered per browser. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7d56ad18b7
commit
617dc1ea2f
56 files changed
+757
-158
No files matched your search
@@ -7,6 +7,8 @@ import { useSortable } from "../hooks/useSortable";
|
||||
import SortableTh from "../components/SortableTh";
|
||||
import { downloadCsv } from "../utils/csv";
|
||||
import { confirmDialog } from "../utils/dialogs";
|
||||
import { ErrorNotice } from "../components/Notice";
|
||||
import { toast } from "../utils/toast";
|
||||
|
||||
const TYPE_LABELS: Record<IntegrationType, string> = {
|
||||
tailscale: "Tailscale",
|
||||
@@ -61,6 +63,7 @@ export default function Integrations({ user }: { user: CurrentUser }) {
|
||||
async function toggleEnabled(i: IntegrationSummary) {
|
||||
try {
|
||||
await api.integrations.update(i.id, { enabled: !i.enabled });
|
||||
toast.success(`${i.name} ${i.enabled ? "disabled" : "enabled"}.`);
|
||||
loadIntegrations();
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : String(err));
|
||||
@@ -83,6 +86,7 @@ export default function Integrations({ user }: { user: CurrentUser }) {
|
||||
if (!(await confirmDialog({ title: "Delete integration", message: `Delete integration "${i.name}"?`, confirmLabel: "Delete", danger: true }))) return;
|
||||
try {
|
||||
await api.integrations.remove(i.id);
|
||||
toast.success(`Deleted ${i.name}.`);
|
||||
loadIntegrations();
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : String(err));
|
||||
@@ -116,7 +120,7 @@ export default function Integrations({ user }: { user: CurrentUser }) {
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{error && <div className="alert alert-danger">{error}</div>}
|
||||
<ErrorNotice error={error} />
|
||||
|
||||
{editingIntegration ? (
|
||||
<IntegrationEditForm
|
||||
|
||||
Reference in new issue
Block a user