diff --git a/client/src/app/base/Menu.tsx b/client/src/app/base/Menu.tsx index f9fa4284..69c2dfa8 100644 --- a/client/src/app/base/Menu.tsx +++ b/client/src/app/base/Menu.tsx @@ -1,7 +1,7 @@ import {Trans} from '@lingui/macro'; import {Icon} from 'react-exo/icon'; import {useStyles, createStyleSheet} from 'react-native-unistyles'; -import {View, Text, StyleSheet} from 'react-native'; +import {View, ScrollView, Text, StyleSheet} from 'react-native'; import {useLists} from 'tasks/hooks/useLists'; import {MenuItem} from './MenuItem'; import config from 'config'; @@ -15,71 +15,78 @@ export function Menu(props: MenuProps) { const taskLists = useLists(); const hasDevMenu = __DEV__ || config.LIB_NAME === 'react-exo'; return ( - - Dashboard} - icon={} - tab={props.tabs} - /> - Calendar} - icon={} - tab={props.tabs} - /> - Tasks} - icon={} - tab={props.tabs} - /> - {props.tabs ? null : taskLists.map(({id, complete}) => - • {id}} - striked={complete} - /> - )} - - {hasDevMenu && - <> + + + Design} - icon={} + path="/" + label={Dashboard} + icon={} tab={props.tabs} /> Library} - icon={} + path="/calendar" + label={Calendar} + icon={} tab={props.tabs} /> - - } - Settings} - icon={} - tab={props.tabs} - /> + Tasks} + icon={} + tab={props.tabs} + /> + {props.tabs ? null : taskLists.map(({id, complete}) => + • {id}} + striked={complete} + /> + )} + + {hasDevMenu && + <> + Design} + icon={} + tab={props.tabs} + /> + Library} + icon={} + tab={props.tabs} + /> + + } + Settings} + icon={} + tab={props.tabs} + /> + + ); } const stylesheet = createStyleSheet(theme => ({ + bg: { + flex: 1, + backgroundColor: theme.colors.secondary, + }, root: { flex: 1, padding: 10, borderRightWidth: StyleSheet.hairlineWidth, borderColor: theme.colors.border, - backgroundColor: theme.colors.secondary, }, rootTabs: { flexDirection: 'row', diff --git a/client/src/events/routes/ScreenCalendar.tsx b/client/src/events/routes/ScreenCalendar.tsx index e9c3adbc..f5f211b6 100644 --- a/client/src/events/routes/ScreenCalendar.tsx +++ b/client/src/events/routes/ScreenCalendar.tsx @@ -28,7 +28,6 @@ export default function ScreenCalendar() { const stylesheet = createStyleSheet(_theme => ({ root: { flex: 1, - marginHorizontal: 'auto', paddingHorizontal: _theme.display.space5, maxWidth: 800, }, diff --git a/client/src/home/base/Prompt.tsx b/client/src/home/base/AiPrompt.tsx similarity index 97% rename from client/src/home/base/Prompt.tsx rename to client/src/home/base/AiPrompt.tsx index edde3f79..442a862a 100644 --- a/client/src/home/base/Prompt.tsx +++ b/client/src/home/base/AiPrompt.tsx @@ -14,7 +14,7 @@ import {Icon} from 'react-exo/icon'; const DEFAULT_MODEL = 'llama3-8b-8192'; -export function Prompt() { +export function AiPrompt() { const {i18n} = useLingui(); const [model] = useGroqModel(); const [apiKey] = useGroqKey(); @@ -46,7 +46,7 @@ export function Prompt() { e.nativeEvent.text && ai.prompt(e.nativeEvent.text, multiline)} onKeyPress={(e) => ai.navigate(e, multiline ? () => setMultiline(false) : undefined)} diff --git a/client/src/home/hooks/useWeather.ts b/client/src/home/hooks/useWeather.ts index efcaf164..961d7f99 100644 --- a/client/src/home/hooks/useWeather.ts +++ b/client/src/home/hooks/useWeather.ts @@ -8,7 +8,7 @@ export function useWeather() { const [weather, setWeather] = useState(null); const [lat, lon] = useLocation(); - // Update once + // Update when location changes useEffect(() => { console.log(lat, lon); if (!lat || !lon) return; diff --git a/client/src/home/routes/ScreenHome.tsx b/client/src/home/routes/ScreenHome.tsx index f5df0011..11ee3a63 100644 --- a/client/src/home/routes/ScreenHome.tsx +++ b/client/src/home/routes/ScreenHome.tsx @@ -6,7 +6,7 @@ import {useClock} from 'home/hooks/useClock'; import {useWeather} from 'home/hooks/useWeather'; import {useDisplayName} from 'settings/hooks/useDisplayName'; import {getDayGreeting} from 'home/utils/time'; -import {Prompt} from 'home/base/Prompt'; +import {AiPrompt} from 'home/base/AiPrompt'; import {Page} from 'app/base/Page'; export default function ScreenHome() { @@ -31,7 +31,7 @@ export default function ScreenHome() { }> - + ); } diff --git a/translations/ar.po b/translations/ar.po index 244f077f..ed8ecf57 100644 --- a/translations/ar.po +++ b/translations/ar.po @@ -42,13 +42,16 @@ msgstr "هل أنت متأكد أنك تريد إعادة تعيين سجل ال msgid "Ask anything..." msgstr "استعلام أي شيء..." +#: ../../client/src/home/base/AiPrompt.tsx:49 +msgid "Ask anything... (or / for commands)" +msgstr "" + #: ../../client/src/settings/routes/ScreenSettings.tsx:100 #: ../../client/src/settings/routes/ScreenSettings.tsx:128 msgid "Auto" msgstr "تلقائي" -#: ../../client/src/app/base/Menu.tsx:30 -#: ../../client/src/settings/routes/ScreenSettings.tsx:250 +#: ../../client/src/app/base/Menu.tsx:32 msgid "Calendar" msgstr "تقويم" @@ -60,7 +63,7 @@ msgstr "إعادة تعيين بيانات التقويم" msgid "Dark" msgstr "داكن" -#: ../../client/src/app/base/Menu.tsx:24 +#: ../../client/src/app/base/Menu.tsx:26 msgid "Dashboard" msgstr "لوحة المعلومات" @@ -92,8 +95,7 @@ msgstr "حذف المسجيلات" msgid "Delete the local database." msgstr "حذف قاعدة البيانات المحلية." -#: ../../client/src/app/base/Menu.tsx:54 -#: ../../client/src/dev/routes/ScreenDesign.tsx:11 +#: ../../client/src/app/base/Menu.tsx:56 msgid "Design" msgstr "تصميم" @@ -149,8 +151,7 @@ msgstr "معرف النموذج Groq" msgid "Language" msgstr "لغة" -#: ../../client/src/app/base/Menu.tsx:60 -#: ../../client/src/dev/routes/ScreenLibrary.tsx:15 +#: ../../client/src/app/base/Menu.tsx:62 msgid "Library" msgstr "مكتبة" @@ -162,7 +163,7 @@ msgstr "فاتح" msgid "Manage your settings" msgstr "إدارة إعداداتك" -#: ../../client/src/home/base/Prompt.tsx:49 +#: ../../client/src/home/base/AiPrompt.tsx:49 msgid "Please set your Groq API Key" msgstr "يرجى تعيين مفتاح API Groq الخاص بك" @@ -202,13 +203,11 @@ msgstr "إختر وضع التطبيق." msgid "Set a display name for yourself." msgstr "أعيد تعيين اسم العرض ليستعلمك." -#: ../../client/src/app/base/Menu.tsx:68 -#: ../../client/src/settings/routes/ScreenSettings.tsx:55 +#: ../../client/src/app/base/Menu.tsx:70 msgid "Settings" msgstr "إعدادات" -#: ../../client/src/app/base/Menu.tsx:36 -#: ../../client/src/tasks/routes/TaskList.tsx:13 +#: ../../client/src/app/base/Menu.tsx:38 msgid "Tasks" msgstr "مسجيلات" @@ -220,11 +219,11 @@ msgstr "حرارة" msgid "Theme" msgstr "وضع" -#: ../../client/src/home/routes/ScreenHome.tsx:23 +#: ../../client/src/home/routes/ScreenHome.tsx:22 msgid "Welcome, {displayName}" msgstr "مرحبا بك {displayName}" -#: ../../client/src/home/routes/ScreenHome.tsx:24 +#: ../../client/src/home/routes/ScreenHome.tsx:23 msgid "Welcome, Human" msgstr "مرحبا بك الشخص" diff --git a/translations/en.po b/translations/en.po index 2e5e56c6..3ce3b9f4 100644 --- a/translations/en.po +++ b/translations/en.po @@ -42,13 +42,16 @@ msgstr "Are you sure you want to reset your prompt history?" msgid "Ask anything..." msgstr "Ask anything..." +#: ../../client/src/home/base/AiPrompt.tsx:49 +msgid "Ask anything... (or / for commands)" +msgstr "Ask anything... (or / for commands)" + #: ../../client/src/settings/routes/ScreenSettings.tsx:100 #: ../../client/src/settings/routes/ScreenSettings.tsx:128 msgid "Auto" msgstr "Auto" -#: ../../client/src/app/base/Menu.tsx:30 -#: ../../client/src/settings/routes/ScreenSettings.tsx:250 +#: ../../client/src/app/base/Menu.tsx:32 msgid "Calendar" msgstr "Calendar" @@ -60,7 +63,7 @@ msgstr "Calendar Data Reset" msgid "Dark" msgstr "Dark" -#: ../../client/src/app/base/Menu.tsx:24 +#: ../../client/src/app/base/Menu.tsx:26 msgid "Dashboard" msgstr "Dashboard" @@ -92,8 +95,7 @@ msgstr "Delete Prompts" msgid "Delete the local database." msgstr "Delete the local database." -#: ../../client/src/app/base/Menu.tsx:54 -#: ../../client/src/dev/routes/ScreenDesign.tsx:11 +#: ../../client/src/app/base/Menu.tsx:56 msgid "Design" msgstr "Design" @@ -149,8 +151,7 @@ msgstr "Groq Model ID" msgid "Language" msgstr "Language" -#: ../../client/src/app/base/Menu.tsx:60 -#: ../../client/src/dev/routes/ScreenLibrary.tsx:15 +#: ../../client/src/app/base/Menu.tsx:62 msgid "Library" msgstr "Library" @@ -162,7 +163,7 @@ msgstr "Light" msgid "Manage your settings" msgstr "Manage your settings" -#: ../../client/src/home/base/Prompt.tsx:49 +#: ../../client/src/home/base/AiPrompt.tsx:49 msgid "Please set your Groq API Key" msgstr "Please set your Groq API Key" @@ -202,13 +203,11 @@ msgstr "Select the theme for the app." msgid "Set a display name for yourself." msgstr "Set a display name for yourself." -#: ../../client/src/app/base/Menu.tsx:68 -#: ../../client/src/settings/routes/ScreenSettings.tsx:55 +#: ../../client/src/app/base/Menu.tsx:70 msgid "Settings" msgstr "Settings" -#: ../../client/src/app/base/Menu.tsx:36 -#: ../../client/src/tasks/routes/TaskList.tsx:13 +#: ../../client/src/app/base/Menu.tsx:38 msgid "Tasks" msgstr "Tasks" @@ -220,11 +219,11 @@ msgstr "Temperature" msgid "Theme" msgstr "Theme" -#: ../../client/src/home/routes/ScreenHome.tsx:23 +#: ../../client/src/home/routes/ScreenHome.tsx:22 msgid "Welcome, {displayName}" msgstr "Welcome, {displayName}" -#: ../../client/src/home/routes/ScreenHome.tsx:24 +#: ../../client/src/home/routes/ScreenHome.tsx:23 msgid "Welcome, Human" msgstr "Welcome, Human" diff --git a/translations/ja.po b/translations/ja.po index 46bfc630..b8bf0cb0 100644 --- a/translations/ja.po +++ b/translations/ja.po @@ -42,13 +42,16 @@ msgstr "プロンプト履歴をリセットしますか?" msgid "Ask anything..." msgstr "なにか聞いてみましょう..." +#: ../../client/src/home/base/AiPrompt.tsx:49 +msgid "Ask anything... (or / for commands)" +msgstr "" + #: ../../client/src/settings/routes/ScreenSettings.tsx:100 #: ../../client/src/settings/routes/ScreenSettings.tsx:128 msgid "Auto" msgstr "自動" -#: ../../client/src/app/base/Menu.tsx:30 -#: ../../client/src/settings/routes/ScreenSettings.tsx:250 +#: ../../client/src/app/base/Menu.tsx:32 msgid "Calendar" msgstr "カレンダー" @@ -60,7 +63,7 @@ msgstr "カレンダーデータをリセット" msgid "Dark" msgstr "ダーク" -#: ../../client/src/app/base/Menu.tsx:24 +#: ../../client/src/app/base/Menu.tsx:26 msgid "Dashboard" msgstr "ダッシュボード" @@ -92,8 +95,7 @@ msgstr "プロンプトを削除" msgid "Delete the local database." msgstr "ローカルデータベースを削除" -#: ../../client/src/app/base/Menu.tsx:54 -#: ../../client/src/dev/routes/ScreenDesign.tsx:11 +#: ../../client/src/app/base/Menu.tsx:56 msgid "Design" msgstr "デザイン" @@ -149,8 +151,7 @@ msgstr "GroqモデルID" msgid "Language" msgstr "言語" -#: ../../client/src/app/base/Menu.tsx:60 -#: ../../client/src/dev/routes/ScreenLibrary.tsx:15 +#: ../../client/src/app/base/Menu.tsx:62 msgid "Library" msgstr "ライブラリ" @@ -162,7 +163,7 @@ msgstr "ライト" msgid "Manage your settings" msgstr "設定を管理" -#: ../../client/src/home/base/Prompt.tsx:49 +#: ../../client/src/home/base/AiPrompt.tsx:49 msgid "Please set your Groq API Key" msgstr "Groq APIキーを設定" @@ -202,13 +203,11 @@ msgstr "アプリのテーマを選択" msgid "Set a display name for yourself." msgstr "自分の表示名を設定" -#: ../../client/src/app/base/Menu.tsx:68 -#: ../../client/src/settings/routes/ScreenSettings.tsx:55 +#: ../../client/src/app/base/Menu.tsx:70 msgid "Settings" msgstr "設定" -#: ../../client/src/app/base/Menu.tsx:36 -#: ../../client/src/tasks/routes/TaskList.tsx:13 +#: ../../client/src/app/base/Menu.tsx:38 msgid "Tasks" msgstr "タスク" @@ -220,11 +219,11 @@ msgstr "温度" msgid "Theme" msgstr "テーマ" -#: ../../client/src/home/routes/ScreenHome.tsx:23 +#: ../../client/src/home/routes/ScreenHome.tsx:22 msgid "Welcome, {displayName}" msgstr "ようこそ、{displayName}" -#: ../../client/src/home/routes/ScreenHome.tsx:24 +#: ../../client/src/home/routes/ScreenHome.tsx:23 msgid "Welcome, Human" msgstr "ようこそ、人間" diff --git a/translations/ru.po b/translations/ru.po index ffa7b5e9..9cfe9556 100644 --- a/translations/ru.po +++ b/translations/ru.po @@ -42,13 +42,16 @@ msgstr "Вы уверены, что хотите сбросить историю msgid "Ask anything..." msgstr "Задайте любой вопрос..." +#: ../../client/src/home/base/AiPrompt.tsx:49 +msgid "Ask anything... (or / for commands)" +msgstr "" + #: ../../client/src/settings/routes/ScreenSettings.tsx:100 #: ../../client/src/settings/routes/ScreenSettings.tsx:128 msgid "Auto" msgstr "Авто" -#: ../../client/src/app/base/Menu.tsx:30 -#: ../../client/src/settings/routes/ScreenSettings.tsx:250 +#: ../../client/src/app/base/Menu.tsx:32 msgid "Calendar" msgstr "Календарь" @@ -60,7 +63,7 @@ msgstr "Сброс данных календаря" msgid "Dark" msgstr "Тёмное" -#: ../../client/src/app/base/Menu.tsx:24 +#: ../../client/src/app/base/Menu.tsx:26 msgid "Dashboard" msgstr "Панель" @@ -92,8 +95,7 @@ msgstr "Удалить приглашения" msgid "Delete the local database." msgstr "Удалить локальную базу данных." -#: ../../client/src/app/base/Menu.tsx:54 -#: ../../client/src/dev/routes/ScreenDesign.tsx:11 +#: ../../client/src/app/base/Menu.tsx:56 msgid "Design" msgstr "Дизайн" @@ -149,8 +151,7 @@ msgstr "Идентификатор модели Groq" msgid "Language" msgstr "Язык" -#: ../../client/src/app/base/Menu.tsx:60 -#: ../../client/src/dev/routes/ScreenLibrary.tsx:15 +#: ../../client/src/app/base/Menu.tsx:62 msgid "Library" msgstr "Библиотека" @@ -162,7 +163,7 @@ msgstr "Светлое" msgid "Manage your settings" msgstr "Управление настройками" -#: ../../client/src/home/base/Prompt.tsx:49 +#: ../../client/src/home/base/AiPrompt.tsx:49 msgid "Please set your Groq API Key" msgstr "Пожалуйста, установите ключ API Groq" @@ -202,13 +203,11 @@ msgstr "Выберите тему для приложения." msgid "Set a display name for yourself." msgstr "Установите отображаемое имя для себя." -#: ../../client/src/app/base/Menu.tsx:68 -#: ../../client/src/settings/routes/ScreenSettings.tsx:55 +#: ../../client/src/app/base/Menu.tsx:70 msgid "Settings" msgstr "Настройки" -#: ../../client/src/app/base/Menu.tsx:36 -#: ../../client/src/tasks/routes/TaskList.tsx:13 +#: ../../client/src/app/base/Menu.tsx:38 msgid "Tasks" msgstr "Задачи" @@ -220,11 +219,11 @@ msgstr "Температура" msgid "Theme" msgstr "Тема" -#: ../../client/src/home/routes/ScreenHome.tsx:23 +#: ../../client/src/home/routes/ScreenHome.tsx:22 msgid "Welcome, {displayName}" msgstr "Добро пожаловать, {displayName}" -#: ../../client/src/home/routes/ScreenHome.tsx:24 +#: ../../client/src/home/routes/ScreenHome.tsx:23 msgid "Welcome, Human" msgstr "Добро пожаловать, Человек"