Remove unused OfflineIndicator, OfflineSyncDetails, and OfflineSyncManager components

- Deleted obsolete offline-related components as they are no longer in use.
- Simplified imports and removed related context dependencies.
- Updated synchronization and toggle switch handling in `CharacterComponent`, `WorldSetting`, and `LocationComponent` to improve consistency.
This commit is contained in:
natreex
2026-01-15 19:26:09 -05:00
parent 2e6b30c632
commit da03f221ae
9 changed files with 68 additions and 608 deletions

View File

@@ -14,6 +14,8 @@ import {LocalSyncQueueContext, LocalSyncQueueContextProps} from "@/context/SyncQ
import {BooksSyncContext, BooksSyncContextProps} from "@/context/BooksSyncContext";
import {SyncedBook} from "@/lib/models/SyncedBook";
import ToggleSwitch from "@/components/form/ToggleSwitch";
import InputField from "@/components/form/InputField";
import {faToggleOn} from "@fortawesome/free-solid-svg-icons";
interface CharacterDetailProps {
selectedCharacter: CharacterProps | null;
@@ -366,13 +368,20 @@ export function CharacterComponent({showToggle = true}: {showToggle?: boolean},
return (
<div className="space-y-5">
{showToggle && (
<div className="bg-secondary/20 rounded-xl p-4 shadow-inner border border-secondary/30">
<ToggleSwitch
enabled={toolEnabled}
setEnabled={handleToggleTool}
label={t('characterComponent.enableTool')}
description={t('characterComponent.enableToolDescription')}
<div className="bg-secondary/20 rounded-xl p-5 shadow-inner border border-secondary/30">
<InputField
icon={faToggleOn}
fieldName={t('characterComponent.enableTool')}
input={
<ToggleSwitch
checked={toolEnabled}
onChange={async (checked: boolean): Promise<void> => handleToggleTool(checked)}
/>
}
/>
<p className="text-muted text-sm mt-2">
{t('characterComponent.enableToolDescription')}
</p>
</div>
)}
{toolEnabled && (