diff --git a/src/components/extension-installed-modal.tsx b/src/components/extension-installed-modal.tsx index 4218ebff..32e9f08e 100644 --- a/src/components/extension-installed-modal.tsx +++ b/src/components/extension-installed-modal.tsx @@ -1,4 +1,3 @@ -import { domAnimation, LazyMotion, m } from 'framer-motion' import { useState } from 'react' import { FaExternalLinkAlt } from 'react-icons/fa' import keepItImage from '@/assets/keep-it.png' @@ -11,32 +10,10 @@ interface ExtensionInstalledModalProps { onClose: () => void onGetStarted: () => void } - -type Step = number - export function ExtensionInstalledModal({ show, onGetStarted, }: ExtensionInstalledModalProps) { - const [currentStep, setCurrentStep] = useState(1) - const totalSteps = 3 - - const renderStepContent = () => { - switch (currentStep) { - case 1: - if (import.meta.env.FIREFOX) { - return - } - return - case 2: - return - case 3: - return - default: - return null - } - } - return ( - - - {renderStepContent()} - - - - + {import.meta.env.FIREFOX ? ( + + ) : ( + + )} ) } -interface StepIndicatorProps { - totalSteps: number - currentStep: Step -} -const StepIndicator = ({ totalSteps, currentStep }: StepIndicatorProps) => ( -
- {Array.from({ length: totalSteps }).map((_, index) => ( -
-) - interface StepOneProps { - setCurrentStep: (step: Step) => void + onGetStarted: () => void } -const StepOne = ({ setCurrentStep }: StepOneProps) => { +const StepOne = ({ onGetStarted }: StepOneProps) => { return ( <>

- به ویجتی‌فای خوش آمدید! 🎉 + به ویجتیفای خوش آمدید! 🎉

@@ -119,7 +60,7 @@ const StepOne = ({ setCurrentStep }: StepOneProps) => {

@@ -129,135 +70,20 @@ const StepOne = ({ setCurrentStep }: StepOneProps) => { ) } -interface StepFooterDisableProps { - setCurrentStep: (step: Step) => void -} -const StepFooterDisable = ({ setCurrentStep }: StepFooterDisableProps) => { - const [counter, setCounter] = useState(5) - - useEffect(() => { - const interval = setInterval(() => { - setCounter((prev) => { - if (prev <= 1) { - clearInterval(interval) - return 0 - } - return prev - 1 - }) - }, 1000) - return () => clearInterval(interval) - }, []) - - return ( - <> -

-

- مخفی کردن نوار پایین مرورگر -

-
- -
-
- نحوه مخفی کردن نوار پایین مرورگر -
-
- -
-

- 💡 برای زیبایی بیشتر، میتونید نوار خاکستری پایین مرورگر رو مانند این - تصویر مخفی کنید -

-
- - {counter === 0 ? ( - - ) : ( -
- لطفاً صبر کنید... {counter} ثانیه -
- )} - - ) -} - -interface StepThreeProps { - onGetStarted: () => void -} -const StepThree = ({ onGetStarted }: StepThreeProps) => { - return ( - <> - -

- آماده شروع هستید؟ -

-
- - -

- بریم که یک تجربه جدید و جذاب را شروع کنیم! 😎 -

-
- -
- -
- - ) -} - interface StepFirefoxConsentProps { - setCurrentStep: (step: Step) => void + onGetStarted: () => void } -const StepFirefoxConsent = ({ setCurrentStep }: StepFirefoxConsentProps) => { +const StepFirefoxConsent = ({ onGetStarted }: StepFirefoxConsentProps) => { const [isAccepted, setIsAccepted] = useState(false) const handleDecline = () => { if (browser.management?.uninstallSelf) { @@ -273,7 +99,7 @@ const StepFirefoxConsent = ({ setCurrentStep }: StepFirefoxConsentProps) => { return (

Privacy Notice

-

خلاصه سیاست حریم خصوصی ویجتی‌فای:

+

خلاصه سیاست حریم خصوصی ویجتیفای:

@@ -346,7 +172,7 @@ const StepFirefoxConsent = ({ setCurrentStep }: StepFirefoxConsentProps) => { 🚫 حذف افزونه

حمایت مالی

- کمک به توسعه ویجتی‌فای + کمک به توسعه ویجتیفای

@@ -147,7 +147,7 @@ export function AboutUsTab() {
- © ویجتی‌فای - تمامی حقوق محفوظ است + © ویجتیفای - تمامی حقوق محفوظ است
) diff --git a/src/layouts/setting/tabs/appearance/components/theme-selector.tsx b/src/layouts/setting/tabs/appearance/components/theme-selector.tsx index 4d2bb649..c1314a43 100644 --- a/src/layouts/setting/tabs/appearance/components/theme-selector.tsx +++ b/src/layouts/setting/tabs/appearance/components/theme-selector.tsx @@ -107,7 +107,7 @@ export function ThemeSelector({ fetched_themes }: Props) { return (
-

تم ظاهری ویجتی‌فای را انتخاب کنید.

+

تم ظاهری ویجتیفای را انتخاب کنید.

{themes.map((item) => ( diff --git a/src/layouts/setting/tabs/shortcuts/shortcuts.tsx b/src/layouts/setting/tabs/shortcuts/shortcuts.tsx index d0f8b460..0a5d7315 100644 --- a/src/layouts/setting/tabs/shortcuts/shortcuts.tsx +++ b/src/layouts/setting/tabs/shortcuts/shortcuts.tsx @@ -73,7 +73,7 @@ export function ShortcutsTab() {

- کلیدهای میانبر افزونه ویجتی‌فای برای استفاده راحت‌تر و سریع‌تر + کلیدهای میانبر افزونه ویجتیفای برای استفاده راحت‌تر و سریع‌تر

{Object.entries(categories).map(([category, categoryShortcuts]) => ( diff --git a/src/layouts/widgets/todos/expandable-todo-input.tsx b/src/layouts/widgets/todos/expandable-todo-input.tsx index 4dcf3803..966c1241 100644 --- a/src/layouts/widgets/todos/expandable-todo-input.tsx +++ b/src/layouts/widgets/todos/expandable-todo-input.tsx @@ -14,6 +14,7 @@ import { PriorityButton } from '@/components/priority-options/priority-options' import Analytics from '@/analytics' import { Chip } from '@/components/chip.component' import { useGetTags } from '@/services/hooks/todo/get-tags.hook' +import { useAuth } from '@/context/auth.context' interface ExpandableTodoInputProps { todoText: string @@ -26,10 +27,11 @@ export function ExpandableTodoInput({ onChangeTodoText, onAddTodo, }: ExpandableTodoInputProps) { + const { isAuthenticated } = useAuth() const [isExpanded, setIsExpanded] = useState(false) const [priority, setPriority] = useState(TodoPriority.Medium) const [category, setCategory] = useState('') - const { data: fetchedTags } = useGetTags(true) + const { data: fetchedTags } = useGetTags(isAuthenticated) const [notes, setNotes] = useState('') const [isTagTooltipOpen, setIsTagTooltipOpen] = useState(false) const [selectedDate, setSelectedDate] = useState() diff --git a/src/layouts/widgets/tools/translate/components/platform-modal.tsx b/src/layouts/widgets/tools/translate/components/platform-modal.tsx index 1daf3e4e..2d1131fa 100644 --- a/src/layouts/widgets/tools/translate/components/platform-modal.tsx +++ b/src/layouts/widgets/tools/translate/components/platform-modal.tsx @@ -45,7 +45,7 @@ export function PlatformModal({ isOpen, onClose, platform }: PlatformModalProps)

- ویجتی‌فای هیچگونه نقشی در ترجمه ندارد. ترجمه توسط{' '} + ویجتیفای هیچگونه نقشی در ترجمه ندارد. ترجمه توسط{' '}

diff --git a/src/pages/home.tsx b/src/pages/home.tsx index a8e40ac0..063189ac 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -18,10 +18,44 @@ import { ContentSection } from './home/content-section' const steps: Step[] = [ { - target: 'body', - content: - 'به ویجتی‌فای خوش آمدید! بیایید با هم قسمت‌های مختلف افزونه را بررسی کنیم تا با امکانات آن آشنا شوید.', + target: '#chrome-footer', + content: ( +
+

+ خلوت کردن فضای مرورگر +

+ +

+ برای مخفی کردن این نوار، کافیست روی آن{' '} + راست کلیک کرده و گزینه + زیر را انتخاب کنید: +

+ +
+ نحوه مخفی کردن نوار پایین مرورگر +
+
+ + {/* نام دقیق گزینه برای تطبیق سریع چشم کاربر */} +
+ + "Hide footer on New Tab page" + +
+
+ ), disableBeacon: true, + showSkipButton: true, + styles: { + options: { + width: 320, + zIndex: 10000, + }, + }, }, { target: '#settings-button',