mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
fix(openapi + story): better UI + translations
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
'@fumadocs/language': minor
|
||||
'fumadocs-ui': minor
|
||||
'@fumadocs/base-ui': minor
|
||||
'fumadocs-openapi': minor
|
||||
'@fumadocs/story': minor
|
||||
---
|
||||
|
||||
Use new translations API
|
||||
@@ -237,7 +237,11 @@ export function FieldInput({
|
||||
{typeof item === 'string' ? item : JSON.stringify(item, null, 2)}
|
||||
</SelectItem>
|
||||
))}
|
||||
{!isRequired && <SelectItem value="-1">{t('Unset')}</SelectItem>}
|
||||
{!isRequired && (
|
||||
<SelectItem value="-1">
|
||||
{<span className="text-fd-muted-foreground">{t('Unset')}</span>}
|
||||
</SelectItem>
|
||||
)}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
);
|
||||
@@ -255,7 +259,11 @@ export function FieldInput({
|
||||
<SelectContent>
|
||||
<SelectItem value="true">True</SelectItem>
|
||||
<SelectItem value="false">False</SelectItem>
|
||||
{!isRequired && <SelectItem value="undefined">{t('Unset')}</SelectItem>}
|
||||
{!isRequired && (
|
||||
<SelectItem value="undefined">
|
||||
<span className="text-fd-muted-foreground">{t('Unset')}</span>
|
||||
</SelectItem>
|
||||
)}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
);
|
||||
|
||||
@@ -13,6 +13,7 @@ export default defineConfig({
|
||||
'./src/utils/{id-to-title,url}.ts',
|
||||
],
|
||||
unbundle: true,
|
||||
ignoreWatch: ['src/.translations/**'],
|
||||
dts: {
|
||||
sourcemap: false,
|
||||
},
|
||||
|
||||
@@ -9,6 +9,7 @@ export default defineConfig({
|
||||
target: 'es2023',
|
||||
entry: ['./src/{index,i18n}.ts', './src/ui/index.tsx', './src/server/index.tsx'],
|
||||
unbundle: true,
|
||||
ignoreWatch: ['src/.translations/**'],
|
||||
dts: {
|
||||
sourcemap: false,
|
||||
},
|
||||
|
||||
@@ -19,6 +19,7 @@ export default defineConfig({
|
||||
],
|
||||
fixedExtension: false,
|
||||
unbundle: true,
|
||||
ignoreWatch: ['src/.translations/**'],
|
||||
dts: {
|
||||
sourcemap: false,
|
||||
},
|
||||
|
||||
@@ -80,7 +80,7 @@ const translations = {
|
||||
'Select(playground)': '选择',
|
||||
'Selected(playground)': '已选取',
|
||||
'Show Property(playground)': '显示属性',
|
||||
'Unset(playground)': '取消设置',
|
||||
'Unset(playground)': '无',
|
||||
'Upload(playground)': '上传',
|
||||
'Value in(schema UI)': '值于',
|
||||
|
||||
@@ -189,7 +189,7 @@ const translations = {
|
||||
'Remove Item(arg form)(aria-label)': '移除项目',
|
||||
'Reset(story error boundary)': '重置',
|
||||
'True(arg form)': '是',
|
||||
'Unset(arg form)': '取消设置',
|
||||
'Unset(arg form)': '无',
|
||||
} satisfies Translations;
|
||||
|
||||
/**
|
||||
|
||||
@@ -80,7 +80,7 @@ const translations = {
|
||||
'Select(playground)': '選擇',
|
||||
'Selected(playground)': '已選取',
|
||||
'Show Property(playground)': '顯示屬性',
|
||||
'Unset(playground)': '取消設定',
|
||||
'Unset(playground)': '無',
|
||||
'Upload(playground)': '上傳',
|
||||
'Value in(schema UI)': '值於',
|
||||
|
||||
@@ -189,7 +189,7 @@ const translations = {
|
||||
'Remove Item(arg form)(aria-label)': '移除項目',
|
||||
'Reset(story error boundary)': '重設',
|
||||
'True(arg form)': '是',
|
||||
'Unset(arg form)': '取消設定',
|
||||
'Unset(arg form)': '無',
|
||||
} satisfies Translations;
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,6 +20,7 @@ export default defineConfig({
|
||||
'./src/requests/generators/*.ts',
|
||||
],
|
||||
unbundle: true,
|
||||
ignoreWatch: ['src/.translations/**'],
|
||||
dts: {
|
||||
sourcemap: false,
|
||||
},
|
||||
|
||||
@@ -20,6 +20,7 @@ export default defineConfig({
|
||||
],
|
||||
fixedExtension: false,
|
||||
unbundle: true,
|
||||
ignoreWatch: ['src/.translations/**'],
|
||||
dts: {
|
||||
sourcemap: false,
|
||||
},
|
||||
|
||||
@@ -175,7 +175,11 @@ export function FieldInput({
|
||||
{member.label}
|
||||
</SelectItem>
|
||||
))}
|
||||
{!isRequired && <SelectItem value="-1">{t('Unset')}</SelectItem>}
|
||||
{!isRequired && (
|
||||
<SelectItem value="-1">
|
||||
<span className="text-fd-muted-foreground">{t('Unset')}</span>
|
||||
</SelectItem>
|
||||
)}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
);
|
||||
@@ -193,7 +197,11 @@ export function FieldInput({
|
||||
<SelectContent>
|
||||
<SelectItem value="true">{t('True')}</SelectItem>
|
||||
<SelectItem value="false">{t('False')}</SelectItem>
|
||||
{!isRequired && <SelectItem value="undefined">{t('Unset')}</SelectItem>}
|
||||
{!isRequired && (
|
||||
<SelectItem value="undefined">
|
||||
<span className="text-fd-muted-foreground">{t('Unset')}</span>
|
||||
</SelectItem>
|
||||
)}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
);
|
||||
|
||||
@@ -13,6 +13,7 @@ export default defineConfig({
|
||||
'./src/webpack/story.ts',
|
||||
],
|
||||
unbundle: true,
|
||||
ignoreWatch: ['src/.translations/**'],
|
||||
dts: {
|
||||
sourcemap: false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user