From 566bf8d38e9821cc85e2a70d01cb458e609e232d Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Thu, 8 Feb 2024 15:16:35 -0800 Subject: [PATCH] Share Link: font size setting --- src/apps/link/LinkChat.tsx | 4 +-- src/apps/link/LinkChatMenuItems.tsx | 26 ++++++++++++------- .../settings-ui/SettingContentScaling.tsx | 10 ++++--- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/src/apps/link/LinkChat.tsx b/src/apps/link/LinkChat.tsx index e9dd79eb0..ab778632e 100644 --- a/src/apps/link/LinkChat.tsx +++ b/src/apps/link/LinkChat.tsx @@ -72,9 +72,9 @@ export function LinkChat(props: { conversation: DConversation, storedAt: Date, e flexGrow: 1, backgroundColor: themeBgAppDarker, display: 'flex', flexFlow: 'column nowrap', minHeight: 96, alignItems: 'center', - gap: { xs: 4, md: 5, xl: 6 }, + gap: { xs: 3, md: 5, xl: 6 }, px: { xs: 2 }, - py: { xs: 4, md: 5, xl: 6 }, + py: { xs: 3, md: 5, xl: 6 }, }}> {/* Title Card */} diff --git a/src/apps/link/LinkChatMenuItems.tsx b/src/apps/link/LinkChatMenuItems.tsx index 230d6c9cc..c347a24a5 100644 --- a/src/apps/link/LinkChatMenuItems.tsx +++ b/src/apps/link/LinkChatMenuItems.tsx @@ -4,9 +4,12 @@ import { shallow } from 'zustand/shallow'; import { ListDivider, ListItemDecorator, MenuItem, Switch, Typography } from '@mui/joy'; import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline'; +import { SettingContentScaling } from '../settings-modal/settings-ui/SettingContentScaling'; + import { useUIPreferencesStore } from '~/common/state/store-ui'; import { useChatShowSystemMessages } from '../chat/store-app-chat'; +import { useIsMobile } from '~/common/components/useMatchMedia'; /** @@ -20,6 +23,7 @@ export function LinkChatMenuItems(props: { }) { // external state + const isMobile = useIsMobile(); const [showSystemMessages, setShowSystemMessages] = useChatShowSystemMessages(); const { renderMarkdown, setRenderMarkdown, @@ -48,6 +52,8 @@ export function LinkChatMenuItems(props: { return <> + + setShowSystemMessages(!showSystemMessages)} sx={{ justifyContent: 'space-between' }}> System message @@ -81,15 +87,17 @@ export function LinkChatMenuItems(props: { /> - - - Show Keys - - - + {!isMobile && ( + + + Show Deletion Keys + + + + )} diff --git a/src/apps/settings-modal/settings-ui/SettingContentScaling.tsx b/src/apps/settings-modal/settings-ui/SettingContentScaling.tsx index 28c00d71d..66c930dfc 100644 --- a/src/apps/settings-modal/settings-ui/SettingContentScaling.tsx +++ b/src/apps/settings-modal/settings-ui/SettingContentScaling.tsx @@ -8,15 +8,17 @@ import { FormLabelStart } from '~/common/components/forms/FormLabelStart'; import { useUIPreferencesStore } from '~/common/state/store-ui'; -export function SettingContentScaling() { +export function SettingContentScaling(props: { noLabel?: boolean }) { // external state const [contentScaling, setContentScaling] = useUIPreferencesStore(state => [state.contentScaling, state.setContentScaling], shallow); return ( - - + + {!props.noLabel && ( + + )}