sync: update from private repo (e62f5c7)
CI / build-and-test (push) Has been cancelled

This commit is contained in:
oss-sync
2026-06-11 01:52:48 +00:00
parent 000a2474aa
commit d061ad08d8
237 changed files with 8441 additions and 5549 deletions
@@ -1,4 +1,5 @@
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useDashboardWidgets } from '../../hooks/useDashboardWidgets';
import { WidgetTabBar, WORKER_TAB_SLUG } from './WidgetTabBar';
import { WorkerStatusWidget } from './WorkerStatusWidget';
@@ -20,6 +21,7 @@ export function SideInfoPanel({
collapsed,
onToggleCollapse,
}: Props) {
const { t } = useTranslation('dashboard');
const { widgets, create, update, remove } = useDashboardWidgets();
const [localActive, setLocalActive] = useState<string>(WORKER_TAB_SLUG);
const activeSlug = activeSlugProp ?? localActive;
@@ -37,7 +39,7 @@ export function SideInfoPanel({
onSelect={setActive}
onAdd={() => setDialogOpen(true)}
onDeleteWidget={async (w) => {
if (!window.confirm(`"${w.title}" を削除しますか?`)) return;
if (!window.confirm(t('panel.deleteConfirm', { title: w.title }))) return;
await remove.mutateAsync(w.id);
if (activeSlug === w.slug) setActive(WORKER_TAB_SLUG);
}}
@@ -64,7 +66,7 @@ export function SideInfoPanel({
/>
)}
{activeSlug !== WORKER_TAB_SLUG && !activeWidget && (
<div className="p-3 text-xs text-slate-500"></div>
<div className="p-3 text-xs text-slate-500">{t('panel.widgetNotFound')}</div>
)}
</div>
)}