Skip to content

Commit

Permalink
chore: update broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Mar 9, 2024
1 parent 80fd32a commit 9c6b11c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
18 changes: 17 additions & 1 deletion app/src/components/admin/assemblies/BroadcastTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ import {
import { useTranslation } from "react-i18next";
import { extractMessage } from "@/utils/processor.ts";
import { Button } from "@/components/ui/button.tsx";
import { Eye, Loader2, MoreVertical, Plus, RotateCcw } from "lucide-react";
import {
AlertCircle,
Eye,
Loader2,
MoreVertical,
Plus,
RotateCcw,
} from "lucide-react";
import { useToast } from "@/components/ui/use-toast.ts";
import {
Dialog,
Expand All @@ -38,6 +45,7 @@ import {
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu.tsx";
import EditorProvider from "@/components/EditorProvider.tsx";
import { Alert, AlertDescription } from "@/components/ui/alert.tsx";

type CreateBroadcastDialogProps = {
onCreated?: () => void;
Expand Down Expand Up @@ -162,6 +170,7 @@ function BroadcastTable() {
<Button
variant={`outline`}
size={`icon`}
className={`select-none`}
onClick={async () => {
setData(await getBroadcastList());
}}
Expand All @@ -173,6 +182,13 @@ function BroadcastTable() {
onCreated={async () => setData(await getBroadcastList())}
/>
</div>
<Alert className={`pb-2 mb-4`}>
<AlertCircle className={`h-4 w-4`} />
<AlertDescription className={`break-all whitespace-pre-wrap`}>
{t("admin.broadcast-tip")}
</AlertDescription>
</Alert>

{data.length ? (
<Table>
<TableHeader>
Expand Down
1 change: 1 addition & 0 deletions app/src/resources/i18n/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@
"broadcast-content": "公告内容",
"create-broadcast": "发布公告",
"broadcast-placeholder": "请输入通知内容 (支持 Markdown / HTML)",
"broadcast-tip": "通知仅会显示最新一条,并且只会通知一次。系统设置中可设置站点公告,首次接收将会弹窗显示于首页并支持后续查看。",
"post": "发布",
"post-success": "发布成功",
"post-success-prompt": "公告发布成功。",
Expand Down
3 changes: 2 additions & 1 deletion app/src/resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,8 @@
"billing": "Income",
"chatnio-format-only": "This format is unique to Chat Nio",
"exit": "Log out of the background",
"view": "View"
"view": "View",
"broadcast-tip": "Notifications will only show the most recent one and will only be notified once. Site announcements can be set in the system settings. The pop-up window will be displayed on the homepage for the first time and subsequent viewing will be supported."
},
"mask": {
"title": "Mask Settings",
Expand Down
3 changes: 2 additions & 1 deletion app/src/resources/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,8 @@
"billing": "収入",
"chatnio-format-only": "このフォーマットはChat Nioに固有です",
"exit": "バックグラウンドからログアウト",
"view": "確認"
"view": "確認",
"broadcast-tip": "通知には最新の通知のみが表示され、一度だけ通知されます。サイトのお知らせは、システム設定で設定できます。ポップアップウィンドウがホームページに初めて表示され、その後の表示がサポートされます。"
},
"mask": {
"title": "プリセット設定",
Expand Down
3 changes: 2 additions & 1 deletion app/src/resources/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,8 @@
"billing": "Доходы",
"chatnio-format-only": "Этот формат уникален для Chat Nio",
"exit": "Выйти из фонового режима",
"view": "проверить"
"view": "проверить",
"broadcast-tip": "Уведомления будут отображаться только самые последние и будут уведомлены только один раз. Объявления сайта можно задать в системных настройках. Всплывающее окно будет отображаться на главной странице в первый раз и будет поддерживаться последующий просмотр."
},
"mask": {
"title": "Настройки маски",
Expand Down

0 comments on commit 9c6b11c

Please sign in to comment.