= {
},
};
-const inputCls =
- "w-full rounded-lg border border-slate-700 bg-slate-950 px-2 py-1 text-sm text-white outline-none focus:border-emerald-500";
+// Form-control base classes (#22).
+const inputCls = "sg-field w-full";
export function TrackerProfileEditor({
tracker,
@@ -303,7 +303,7 @@ export function TrackerProfileEditor({
onChange={(e) => patchRow(axis, r.key, { kind: e.target.value as DraftTerm["kind"] })}
aria-label={t("trackers.trackerProfileEditor.rows.kindAria")}
title={t("trackers.trackerProfileEditor.rows.kindTitle")}
- className={`${inputCls} w-24 shrink-0 text-xs`}
+ className={`${inputCls} sg-select w-24 shrink-0 text-xs`}
>
{(Object.keys(KIND_LABEL_KEY) as TermKind[]).map((k) => (
@@ -515,7 +515,7 @@ function Proposal({
disabled={!ok}
onChange={() => onToggle(key)}
aria-label={t("trackers.trackerProfileEditor.proposal.applyAria", { label: t(labelKey), id: it.id })}
- className="accent-sky-500"
+ className="sg-check"
/>
{it.id}
>
)}
@@ -303,7 +303,7 @@ export function ImportPreviewView({
checked={overwrite.has(key)}
onChange={() => onToggle(key)}
aria-label={t("trackers.trackerProfileExchange.useFileItemAria", { label: t(labelKey), id: it.id })}
- className="accent-emerald-500"
+ className="sg-check"
/>
{t("trackers.trackerProfileExchange.useFromFile")}
@@ -389,7 +389,7 @@ function DescriptionImportRow({ item, asked, onToggle }: { item: ImportDescripti
checked={asked}
onChange={onToggle}
aria-label={t("trackers.trackerProfileExchange.descUseFileAria")}
- className="accent-emerald-500"
+ className="sg-check"
/>
{t("trackers.trackerProfileExchange.useFromFile")}
@@ -451,7 +451,7 @@ function ImageHostImportRow({ item, asked, onToggle }: { item: ImportImageHost;
checked={asked}
onChange={onToggle}
aria-label={t("trackers.trackerProfileExchange.imageHostUseFileAria")}
- className="accent-emerald-500"
+ className="sg-check"
/>
{t("trackers.trackerProfileExchange.useFromFile")}
diff --git a/portal/src/components/TrackersPanel.tsx b/portal/src/components/TrackersPanel.tsx
index a4d5d5f..85d37af 100644
--- a/portal/src/components/TrackersPanel.tsx
+++ b/portal/src/components/TrackersPanel.tsx
@@ -117,8 +117,8 @@ export function TrackersPanel({ can, onLogout }: { can: (perm: string) => boolea
}
}
- const inputCls =
- "w-full rounded-lg border border-slate-700 bg-slate-950 px-3 py-2 text-sm text-white outline-none focus:border-emerald-500";
+ // Form-control base classes (#22).
+ const inputCls = "sg-field w-full";
return (
@@ -281,7 +281,7 @@ export function TrackersPanel({ can, onLogout }: { can: (perm: string) => boolea
type="checkbox"
checked={form.isDefault}
onChange={(e) => set("isDefault")(e.target.checked)}
- className="accent-emerald-500"
+ className="sg-check"
/>
{t("trackers.trackersPanel.form.setDefault")}
diff --git a/portal/src/pages/AddTorrent.tsx b/portal/src/pages/AddTorrent.tsx
index bdaa7b1..21c9f0a 100644
--- a/portal/src/pages/AddTorrent.tsx
+++ b/portal/src/pages/AddTorrent.tsx
@@ -237,7 +237,7 @@ function AddExisting({ onLogout }: { onLogout: () => void }) {
type="file"
accept=".torrent"
multiple
- className="hidden"
+ className="sg-field hidden"
onChange={(e) => {
addFiles(Array.from(e.target.files ?? []));
e.target.value = ""; // allows re-selecting the same file
@@ -275,7 +275,7 @@ function AddExisting({ onLogout }: { onLogout: () => void }) {
onChange={(e) => setMagnet(e.target.value)}
placeholder={"magnet:?xt=urn:btih:…\nmagnet:?xt=urn:btih:…"}
rows={3}
- className="w-full resize-y rounded-lg border border-slate-700 bg-slate-950 px-3 py-2 font-mono text-xs text-white outline-none focus:border-emerald-500"
+ className="sg-textarea text-xs w-full resize-y font-mono"
/>
@@ -569,7 +569,7 @@ function PublishContent({ onLogout }: { onLogout: () => void }) {
ref={inputRef}
type="file"
multiple
- className="hidden"
+ className="sg-field hidden"
onChange={(e) => {
addFiles(Array.from(e.target.files ?? []));
e.target.value = "";
@@ -603,7 +603,7 @@ function PublishContent({ onLogout }: { onLogout: () => void }) {
value={name}
onChange={(e) => setName(e.target.value)}
placeholder={t("torrents.addTorrent.torrentNamePlaceholder")}
- className="w-full rounded-lg border border-slate-700 bg-slate-950 px-3 py-2 text-sm text-white outline-none focus:border-emerald-500"
+ className="sg-field w-full"
/>
{selTracker?.source && (
@@ -618,7 +618,7 @@ function PublishContent({ onLogout }: { onLogout: () => void }) {