mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-02-04 04:30:06 +00:00
fix: language code conversion (#53)
This commit is contained in:
1
.github/workflows/auto-format-commit.yml
vendored
1
.github/workflows/auto-format-commit.yml
vendored
@@ -6,6 +6,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-fix:
|
auto-fix:
|
||||||
|
if: github.actor != 'weblate'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { createCron, updateCron } from "@/api/cron"
|
import { createCron, updateCron } from "@/api/cron"
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
|
import { Checkbox } from "@/components/ui/checkbox"
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogClose,
|
DialogClose,
|
||||||
@@ -19,6 +20,7 @@ import {
|
|||||||
FormMessage,
|
FormMessage,
|
||||||
} from "@/components/ui/form"
|
} from "@/components/ui/form"
|
||||||
import { Input } from "@/components/ui/input"
|
import { Input } from "@/components/ui/input"
|
||||||
|
import { Label } from "@/components/ui/label"
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area"
|
import { ScrollArea } from "@/components/ui/scroll-area"
|
||||||
import {
|
import {
|
||||||
Select,
|
Select,
|
||||||
@@ -250,6 +252,26 @@ export const CronCard: React.FC<CronCardProps> = ({ data, mutate }) => {
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="push_successful"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="flex items-center space-x-2">
|
||||||
|
<FormControl>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<Checkbox
|
||||||
|
checked={field.value}
|
||||||
|
onCheckedChange={field.onChange}
|
||||||
|
/>
|
||||||
|
<Label className="text-sm">
|
||||||
|
{t("PushSuccessful")}
|
||||||
|
</Label>
|
||||||
|
</div>
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
<DialogFooter className="justify-end">
|
<DialogFooter className="justify-end">
|
||||||
<DialogClose asChild>
|
<DialogClose asChild>
|
||||||
<Button type="button" className="my-2" variant="secondary">
|
<Button type="button" className="my-2" variant="secondary">
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ export const ServerCard: React.FC<ServerCardProps> = ({ data, mutate }) => {
|
|||||||
onCheckedChange={field.onChange}
|
onCheckedChange={field.onChange}
|
||||||
/>
|
/>
|
||||||
<Label className="text-sm">
|
<Label className="text-sm">
|
||||||
{t("Enable") + t("DDNS")}
|
{t("EnableDDNS")}
|
||||||
</Label>
|
</Label>
|
||||||
</div>
|
</div>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|||||||
@@ -162,5 +162,7 @@
|
|||||||
"Official": "Official",
|
"Official": "Official",
|
||||||
"CommunityThemeWarning": "You are using a community theme",
|
"CommunityThemeWarning": "You are using a community theme",
|
||||||
"CommunityThemeDescription": "This theme is provided by the community, use at your own risk",
|
"CommunityThemeDescription": "This theme is provided by the community, use at your own risk",
|
||||||
"Cancel": "Cancel"
|
"Cancel": "Cancel",
|
||||||
|
"EnableDDNS": "Enable DDNS",
|
||||||
|
"PushSuccessful": "Push if Successful"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,5 +162,7 @@
|
|||||||
"Official": "Ufficiale",
|
"Official": "Ufficiale",
|
||||||
"CommunityThemeWarning": "Questo tema appartiene alla comunità",
|
"CommunityThemeWarning": "Questo tema appartiene alla comunità",
|
||||||
"CommunityThemeDescription": "Questo tema viene fornito dalla comunità, utilizzalo a tuo rischio e pericolo",
|
"CommunityThemeDescription": "Questo tema viene fornito dalla comunità, utilizzalo a tuo rischio e pericolo",
|
||||||
"Cancel": "Annulla"
|
"Cancel": "Annulla",
|
||||||
|
"EnableDDNS": "Abilita DDNS",
|
||||||
|
"PushSuccessful": "Esegui il push se ha successo"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,5 +162,7 @@
|
|||||||
"Official": "官方",
|
"Official": "官方",
|
||||||
"CommunityThemeWarning": "正在使用社区主题",
|
"CommunityThemeWarning": "正在使用社区主题",
|
||||||
"CommunityThemeDescription": "社区主题未经官方审计,需自行甄别风险",
|
"CommunityThemeDescription": "社区主题未经官方审计,需自行甄别风险",
|
||||||
"Cancel": "取消"
|
"Cancel": "取消",
|
||||||
|
"EnableDDNS": "启用 DDNS",
|
||||||
|
"PushSuccessful": "推送成功的通知"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,5 +162,7 @@
|
|||||||
"Official": "官方",
|
"Official": "官方",
|
||||||
"CommunityThemeWarning": "正在使用社區主題",
|
"CommunityThemeWarning": "正在使用社區主題",
|
||||||
"CommunityThemeDescription": "社群主題未經官方審計,需自行甄別風險",
|
"CommunityThemeDescription": "社群主題未經官方審計,需自行甄別風險",
|
||||||
"Cancel": "取消"
|
"Cancel": "取消",
|
||||||
|
"EnableDDNS": "啟用 DDNS",
|
||||||
|
"PushSuccessful": "推送成功的通知"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ export default function ServerPage() {
|
|||||||
accessorFn: (row) => row.host.version || t("Unknown"),
|
accessorFn: (row) => row.host.version || t("Unknown"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: t("Enable") + t("DDNS"),
|
header: t("EnableDDNS"),
|
||||||
accessorKey: "enableDDNS",
|
accessorKey: "enableDDNS",
|
||||||
accessorFn: (row) => row.enable_ddns ?? false,
|
accessorFn: (row) => row.enable_ddns ?? false,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ export default function SettingsPage() {
|
|||||||
defaultValues: config
|
defaultValues: config
|
||||||
? {
|
? {
|
||||||
...config,
|
...config,
|
||||||
|
language: config.language.replace("_", "-"),
|
||||||
site_name: config.site_name || "",
|
site_name: config.site_name || "",
|
||||||
user_template:
|
user_template:
|
||||||
config.user_template ||
|
config.user_template ||
|
||||||
|
|||||||
Reference in New Issue
Block a user