refactor(web): migrate feature screens to design tokens + radius token (#49)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ export function SelectVocabularyPrompt() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<div className="flex h-full items-center justify-center p-4 text-sm text-neutral-400">
|
||||
<div className="flex h-full items-center justify-center p-4 text-sm text-muted-foreground">
|
||||
{t("vocab.selectPrompt")}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -45,20 +45,20 @@ export function VocabularyList() {
|
||||
</Button>
|
||||
</div>
|
||||
{create.isError && (
|
||||
<p role="alert" className="text-xs text-red-600">
|
||||
<p role="alert" className="text-xs text-destructive">
|
||||
{t("form.rejected")}
|
||||
</p>
|
||||
)}
|
||||
</form>
|
||||
<ul className="flex-1 overflow-auto">
|
||||
{isLoading && (
|
||||
<li className="p-3 text-sm text-neutral-400">…</li>
|
||||
<li className="p-3 text-sm text-muted-foreground">…</li>
|
||||
)}
|
||||
{isError && (
|
||||
<li className="p-3 text-sm text-red-600">{t("vocab.loadError")}</li>
|
||||
<li className="p-3 text-sm text-destructive">{t("vocab.loadError")}</li>
|
||||
)}
|
||||
{data?.length === 0 && (
|
||||
<li className="p-3 text-sm text-neutral-500">{t("vocab.empty")}</li>
|
||||
<li className="p-3 text-sm text-muted-foreground">{t("vocab.empty")}</li>
|
||||
)}
|
||||
{data?.map((v) => (
|
||||
<li key={v.id} className="flex items-center gap-1 border-b pr-2">
|
||||
@@ -85,7 +85,7 @@ export function VocabularyList() {
|
||||
{t("form.cancel")}
|
||||
</Button>
|
||||
{renameVocabulary.isError && (
|
||||
<p role="alert" className="text-xs text-red-600">
|
||||
<p role="alert" className="text-xs text-destructive">
|
||||
{t("form.rejected")}
|
||||
</p>
|
||||
)}
|
||||
@@ -95,7 +95,7 @@ export function VocabularyList() {
|
||||
<NavLink
|
||||
to={`/vocabularies/${v.id}`}
|
||||
className={({ isActive }) =>
|
||||
`block flex-1 px-3 py-2 text-sm ${isActive ? "bg-indigo-50" : "hover:bg-neutral-50"}`
|
||||
`block flex-1 px-3 py-2 text-sm ${isActive ? "bg-primary/10" : "hover:bg-muted"}`
|
||||
}
|
||||
>
|
||||
{v.key}
|
||||
|
||||
@@ -49,18 +49,18 @@ export function VocabularyTerms() {
|
||||
|
||||
return (
|
||||
<div className="overflow-auto p-4">
|
||||
<h3 className="mb-2 text-sm font-medium uppercase text-neutral-500">
|
||||
<h3 className="mb-2 label-caption">
|
||||
{t("vocab.terms")}
|
||||
</h3>
|
||||
<ul className="mb-4">
|
||||
{isLoading && (
|
||||
<li className="text-sm text-neutral-400">…</li>
|
||||
<li className="text-sm text-muted-foreground">…</li>
|
||||
)}
|
||||
{isError && (
|
||||
<li className="text-sm text-red-600">{t("vocab.loadError")}</li>
|
||||
<li className="text-sm text-destructive">{t("vocab.loadError")}</li>
|
||||
)}
|
||||
{!isLoading && !isError && terms?.length === 0 && (
|
||||
<li className="text-sm text-neutral-500">{t("vocab.noTerms")}</li>
|
||||
<li className="text-sm text-muted-foreground">{t("vocab.noTerms")}</li>
|
||||
)}
|
||||
{terms?.map((term) => (
|
||||
<TermRow key={term.id} vocabularyId={id} term={term} lang={lang} />
|
||||
@@ -78,12 +78,12 @@ export function VocabularyTerms() {
|
||||
/>
|
||||
</div>
|
||||
{error && (
|
||||
<p role="alert" className="text-xs text-red-600">
|
||||
<p role="alert" className="text-xs text-destructive">
|
||||
{t("form.required")}
|
||||
</p>
|
||||
)}
|
||||
{addTerm.isError && (
|
||||
<p role="alert" className="text-xs text-red-600">
|
||||
<p role="alert" className="text-xs text-destructive">
|
||||
{t("form.rejected")}
|
||||
</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user