diff --git a/components/ProjectSettingsModal.tsx b/components/ProjectSettingsModal.tsx index f2db43511..67634021b 100644 --- a/components/ProjectSettingsModal.tsx +++ b/components/ProjectSettingsModal.tsx @@ -42,20 +42,11 @@ export const ProjectSettingsModal: React.FC = ({ const { data: projectData, isLoading, - isError, refetch } = useProjectStatuses(projectId); - React.useEffect(() => { - if (isError) { - RNAlert.alert(t('error'), t('projectSettingsLoadError')); - onClose(); - } - }, [isError, onClose, t]); - - if (isError) { - return null; - } + const areSwitchesDisabled = + isLoading || isSubmitting || !isOwner || !projectData; const handleToggleStatus = async (statusType: TProjectStatusType) => { if (!projectData || isSubmitting) return; @@ -125,7 +116,7 @@ export const ProjectSettingsModal: React.FC = ({ } value={projectData?.private ?? false} onChange={() => handleToggleStatus('private')} - disabled={isLoading || !isOwner} + disabled={areSwitchesDisabled} icon={projectData?.private ? LockIcon : UnlockIcon} /> @@ -138,7 +129,7 @@ export const ProjectSettingsModal: React.FC = ({ } value={projectData?.visible ?? false} onChange={() => handleToggleStatus('visible')} - disabled={isLoading || !isOwner} + disabled={areSwitchesDisabled} icon={projectData?.visible ? EyeIcon : EyeOffIcon} /> @@ -151,7 +142,7 @@ export const ProjectSettingsModal: React.FC = ({ } value={projectData?.active ?? false} onChange={() => handleToggleStatus('active')} - disabled={isLoading || !isOwner} + disabled={areSwitchesDisabled} icon={projectData?.active ? CheckCircleIcon : XCircleIcon} /> diff --git a/components/icons/FiaIcon.tsx b/components/icons/FiaIcon.tsx index 9fee0fea5..a1465853c 100644 --- a/components/icons/FiaIcon.tsx +++ b/components/icons/FiaIcon.tsx @@ -4,53 +4,27 @@ import Svg, { Path } from 'react-native-svg'; /** * Custom FIA icon matching the LucideIcon interface. - * Three overlapping chevrons: up (^), down (V), and right (>), - * arranged to interlock without touching — the FIA logo. - * - * Coordinates derived from the official FIA SVG, scaled to fill 24×24 - * with slight horizontal spacing added between each chevron pair. + * Three interlocking chevrons from the official FIA logo. */ const FiaIcon: LucideIcon = React.forwardRef< React.ComponentRef, LucideProps ->( - ( - { - color = 'currentColor', - size = 24, - strokeWidth = 2.5, - absoluteStrokeWidth, - ...rest - }, - ref - ) => { - const sw = absoluteStrokeWidth - ? (Number(strokeWidth) * 24) / Number(size) - : strokeWidth; - - return ( - - {/* Chevron UP (^): peak at (7.1, 5.3) */} - - {/* Chevron DOWN (V): peak at (12.8, 18.7) */} - - {/* Chevron RIGHT (>): tip at (23.4, 11.0), arms extended to match UP peak and DOWN tip */} - - - ); - } -); +>(({ color = 'currentColor', size = 24, ...rest }, ref) => { + return ( + + + + + + ); +}); FiaIcon.displayName = 'FiaIcon'; diff --git a/services/localizations.ts b/services/localizations.ts index e0b817b00..8ed77d40f 100644 --- a/services/localizations.ts +++ b/services/localizations.ts @@ -7034,17 +7034,17 @@ export const localizations = { mandarin: '更新项目活动状态失败' }, projectSettingsLoadError: { - english: 'Error loading quest settings.', - french: 'Erreur lors du chargement des paramètres de quête.', - spanish: 'Error al cargar la configuración de quest.', - brazilian_portuguese: 'Erro ao carregar as configurações da quest.', - tok_pisin: 'I no inap load quest settings.', - indonesian: 'Gagal memuat pengaturan quest.', - nepali: 'क्वेस्ट सेटिङहरू लोड गर्दा त्रुटि।', - hindi: 'क्वेस्ट सेटिंग लोड करने में त्रुटि।', - burmese: 'စွမ်းဆောင်ရည် ဆက်တင်များကို ဖွင့်ရာတွင် အမှားအယွင်း။', - thai: 'เกิดข้อผิดพลาดในการโหลดการตั้งค่าเควสต์', - mandarin: '加载任务设置时出错。' + english: 'Error loading project settings.', + french: 'Erreur lors du chargement des paramètres du projet.', + spanish: 'Error al cargar la configuración del proyecto.', + brazilian_portuguese: 'Erro ao carregar as configurações do projeto.', + tok_pisin: 'I no inap load project settings.', + indonesian: 'Gagal memuat pengaturan proyek.', + nepali: 'प्रोजेक्ट सेटिङहरू लोड गर्दा त्रुटि।', + hindi: 'प्रोजेक्ट सेटिंग लोड करने में त्रुटि।', + burmese: 'ပရောဂျက် ဆက်တင်များကို ဖွင့်ရာတွင် အမှားအယွင်း။', + thai: 'เกิดข้อผิดพลาดในการโหลดการตั้งค่าโปรเจกต์', + mandarin: '加载项目设置时出错。' }, projectSettings: { english: 'Project Settings',