Bump app version to 0.5.0 and implement offline mode support across components

- Added offline detection logic with `OfflineContext` to improve app functionality in offline scenarios.
- Integrated Tauri IPC functions to handle local tool settings and character attributes when offline.
- Refined indentation logic in `TextEditor` for better compatibility with WebKit engines.
- Removed unused `indent` property and related settings in editor components to simplify configuration.
- Updated locale files with improved translation consistency and parameterized placeholders.
This commit is contained in:
natreex
2026-03-24 22:45:10 -04:00
parent a114592ac9
commit cfd08e3261
23 changed files with 410 additions and 409 deletions

View File

@@ -1,6 +1,6 @@
'use client'
import React, {ChangeEvent, useCallback, useContext, useEffect, useMemo} from 'react';
import {Baseline, CaseSensitive, Eye, Indent, Palette, Type} from 'lucide-react';
import {Baseline, CaseSensitive, Eye, Palette, Type} from 'lucide-react';
import {useTranslations} from '@/lib/i18n';
import SelectBox from "@/components/form/SelectBox";
import Button from "@/components/ui/Button";
@@ -13,7 +13,6 @@ interface UserEditorSettingsProps {
export interface EditorDisplaySettings {
zoomLevel: number;
indent: number;
lineHeight: number;
theme: 'clair' | 'sombre' | 'sépia';
fontFamily: 'lora' | 'serif' | 'sans-serif' | 'monospace';
@@ -31,7 +30,6 @@ function isValidFontFamily(value: string): value is EditorDisplaySettings['fontF
const defaultSettings: EditorDisplaySettings = {
zoomLevel: 3,
indent: 30,
lineHeight: 1.5,
theme: 'sombre',
fontFamily: 'lora',
@@ -130,29 +128,6 @@ export default function UserEditorSettings({settings, onSettingsChange}: UserEdi
/>
</div>
<div>
<label className="flex items-center gap-2 mb-2 text-text-primary">
<Indent className="text-muted w-5 h-5" strokeWidth={1.75}/>
{t("userEditorSettings.indent")}
</label>
<div className="space-y-2">
<input
type="range"
min={0}
max={50}
step={5}
value={settings.indent}
onChange={(e: ChangeEvent<HTMLInputElement>): void => handleSettingChange('indent', Number(e.target.value))}
className="w-full accent-primary"
/>
<div className="flex justify-between text-sm text-muted">
<span>{t("userEditorSettings.indentNone")}</span>
<span className="text-text-primary font-medium">{settings.indent}px</span>
<span>{t("userEditorSettings.indentMax")}</span>
</div>
</div>
</div>
<div>
<label className="flex items-center gap-2 mb-2 text-text-primary">
<Baseline className="text-muted w-5 h-5" strokeWidth={1.75}/>