Add advanced generation options with Explicit and Smart modes

- Implemented `AdvancedGenerationOptions` component for toggling Explicit and Smart modes with confirmation dialogs.
- Integrated generation options into `GhostWriter`, `DraftCompanion`, and `ShortStoryGenerator`.
- Introduced `ToggleWithConfirmation` component for user interaction with alerts.
- Updated `InputField` to support centered alignment for better layout flexibility.
- Localized Explicit and Smart mode strings in English and French.
- Enhanced content preview logic to filter placeholder text before display.
- Added `autoUpdater` initialization checks and refactored updater setup for improved reliability.
This commit is contained in:
natreex
2026-01-17 23:26:22 -05:00
parent 0020b3abbd
commit c62a7eb0f7
11 changed files with 335 additions and 34 deletions

View File

@@ -14,6 +14,7 @@ interface InputFieldProps {
actionLabel?: string
actionIcon?: IconDefinition
hint?: string,
centered?: boolean,
}
export default function InputField(
@@ -27,11 +28,12 @@ export default function InputField(
action,
actionLabel,
actionIcon,
hint
hint,
centered = false
}: InputFieldProps) {
return (
<div className={'flex flex-col'}>
<div className={'flex justify-between items-center mb-2 lg:mb-3 flex-wrap gap-2'}>
<div className={`flex flex-col ${centered ? 'items-center' : ''}`}>
<div className={`flex items-center mb-2 lg:mb-3 flex-wrap gap-2 ${centered ? 'justify-center' : 'justify-between'}`}>
{
fieldName && (
<h3 className="text-text-primary text-xl font-[ADLaM Display] font-medium mb-2 flex items-center gap-2">
@@ -64,7 +66,7 @@ export default function InputField(
</span>
)}
</div>
<div className="flex justify-between items-center gap-2">
<div className={`flex items-center gap-2 ${centered ? 'justify-center' : 'justify-between'}`}>
{input}
{
addButtonCallBack && (