-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui): permissions on intro & updated settings with anon id (#1128)
Description --- - add `created_at` field to app_config to check if it's the first ever run of the app or not (to hide permissions toggle on the Intro screens on subsequent runs) - added Application Information settings section in General Settings to display the `anon_id` which can be copied - tightened up General Settings styling a little Motivation and Context --- resolves: - #1123 - #1114 How Has This Been Tested? --- - locally: https://github.com/user-attachments/assets/410b1168-d926-4fde-b8a2-3aa346fed434 What process can a PR reviewer use to test or verify this change? --- re. #1123: - reset everything/remove app_config and start app - should show permissions toggle on the intro screens - on any runs after that (not after reset) it shouldn't show on intro screens re. #1114: - your app anon_id should be viewable and copy-able(?) from general settings
- Loading branch information
1 parent
2a043c4
commit 55a0ce2
Showing
21 changed files
with
99 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/containers/floating/Settings/sections/general/AppDataSettings.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { IconButton } from '@app/components/elements/buttons/IconButton'; | ||
import { Stack } from '@app/components/elements/Stack'; | ||
import { Typography } from '@app/components/elements/Typography'; | ||
import { useCopyToClipboard } from '@app/hooks/helpers/useCopyToClipboard'; | ||
import { useAppConfigStore } from '@app/store/useAppConfigStore'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { IoCheckmarkOutline, IoCopyOutline } from 'react-icons/io5'; | ||
import { SettingsGroupContent, SettingsGroupTitle } from '../../components/SettingsGroup.styles.ts'; | ||
|
||
export default function AppDataSettings() { | ||
const { t } = useTranslation('settings'); | ||
const { isCopied, copyToClipboard } = useCopyToClipboard(); | ||
const anon_id = useAppConfigStore((s) => s.anon_id); | ||
|
||
return ( | ||
<> | ||
<SettingsGroupTitle> | ||
<Typography variant="h6">{t('application-info')}</Typography> | ||
</SettingsGroupTitle> | ||
{anon_id && ( | ||
<SettingsGroupContent> | ||
<Stack direction="row" alignItems="center" justifyContent="flex-start"> | ||
{/* eslint-disable-next-line i18next/no-literal-string */} | ||
<Typography variant="p">Anon ID: {anon_id}</Typography> | ||
<IconButton onClick={() => copyToClipboard(anon_id)} size="small"> | ||
{!isCopied ? <IoCopyOutline /> : <IoCheckmarkOutline />} | ||
</IconButton> | ||
</Stack> | ||
</SettingsGroupContent> | ||
)} | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.