Skip to content

Commit

Permalink
fix: display active developer console functionality first
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarkhanzadian committed Aug 9, 2024
1 parent 3b56cc1 commit 925f20b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 86 deletions.
87 changes: 39 additions & 48 deletions apps/mobile/src/app/wallet/developer-console/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { AddWalletModal } from '@/components/add-wallet/add-wallet-modal';
import { ApproverModal } from '@/components/browser/approval-ux-modal';
import { BrowserMessage } from '@/components/browser/browser-in-use';
import { PressableListItem, TitleListItem } from '@/components/developer-console/list-items';
import { PressableListItem } from '@/components/developer-console/list-items';
import { useToastContext } from '@/components/toast/toast-context';
import { APP_ROUTES } from '@/constants';
import { usePushNotifications } from '@/hooks/use-push-notifications';
Expand Down Expand Up @@ -55,55 +55,46 @@ export default function DeveloperConsoleScreen() {
paddingHorizontal: theme.spacing['3'],
paddingTop: theme.spacing['5'],
paddingBottom: theme.spacing['5'] + bottom,
gap: theme.spacing[5],
gap: theme.spacing[2],
}}
>
<Box gap="2">
<TitleListItem title={t`Open dummy page`} />
<PressableListItem title={t`Drawer`} />
<PressableListItem title={t`Page`} />
<PressableListItem
title={t`Toggle theme` + ': Current ' + settings.theme}
onPress={() => settings.toggleTheme()}
/>
<PressableListItem
onPress={() => addWalletModalRef.current?.present()}
title={t`Create wallet`}
/>
<PressableListItem
title="Wallet management"
onPress={() => router.navigate(APP_ROUTES.WalletDeveloperConsoleWalletManager)}
/>
</Box>
<Box gap="2">
<TitleListItem title={t`Trigger API presets`} />
<PressableListItem
title={t`getAddresses`}
onPress={() =>
setGetAddressesMessage({
jsonrpc: '2.0',
id: 'string',
method: 'getAddresses',
})
}
/>
<PressableListItem title="signMessage" />
<PressableListItem title="transferBtc" />
<PressableListItem title="signPsbt" />
<PressableListItem title="stx_signTransaction" />
<PressableListItem title="stx_signMessage" />
</Box>
<Box gap="2">
<TitleListItem title={t`Trigger other functionality`} />
<PressableListItem
title={t`register for Push notifications`}
onPress={registerPushNotifications}
/>
<PressableListItem
title={t`schedule dummy notifications in 3s`}
onPress={() => _scheduleTestNotification(3)}
/>
</Box>
<PressableListItem
title={t`Toggle theme` + ': Current ' + settings.theme}
onPress={() => settings.toggleTheme()}
/>
<PressableListItem
onPress={() => addWalletModalRef.current?.present()}
title={t`Create wallet`}
/>
<PressableListItem
title="Wallet management"
onPress={() => router.navigate(APP_ROUTES.WalletDeveloperConsoleWalletManager)}
/>
<PressableListItem
title={t`getAddresses`}
onPress={() =>
setGetAddressesMessage({
jsonrpc: '2.0',
id: 'string',
method: 'getAddresses',
})
}
/>
<PressableListItem
title={t`register for Push notifications`}
onPress={registerPushNotifications}
/>
<PressableListItem
title={t`schedule dummy notifications in 3s`}
onPress={() => _scheduleTestNotification(3)}
/>
<PressableListItem title="signMessage" />
<PressableListItem title="transferBtc" />
<PressableListItem title="signPsbt" />
<PressableListItem title="stx_signTransaction" />
<PressableListItem title="stx_signMessage" />
<PressableListItem title={t`Drawer`} />
<PressableListItem title={t`Page`} />
</ScrollView>
<ApproverModal
message={getAddressesMessage}
Expand Down
26 changes: 7 additions & 19 deletions apps/mobile/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ msgstr "Add Wallet"
msgid "Continue"
msgstr "Continue"

#: src/app/wallet/developer-console/index.tsx:71
#: src/app/wallet/developer-console/index.tsx:67
msgid "Create wallet"
msgstr "Create wallet"

#: src/app/waiting-list/waiting-list.tsx:255
msgid "Done"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:63
#: src/app/wallet/developer-console/index.tsx:96
msgid "Drawer"
msgstr "Drawer"

Expand All @@ -66,7 +66,7 @@ msgstr "Enable device security"
msgid "Follow us"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:81
#: src/app/wallet/developer-console/index.tsx:74
msgid "getAddresses"
msgstr "getAddresses"

Expand All @@ -78,11 +78,7 @@ msgstr "Invalid words: {0}"
msgid "Notify me when it's ready"
msgstr "Notify me when it's ready"

#: src/app/wallet/developer-console/index.tsx:62
msgid "Open dummy page"
msgstr "Open dummy page"

#: src/app/wallet/developer-console/index.tsx:64
#: src/app/wallet/developer-console/index.tsx:97
msgid "Page"
msgstr "Page"

Expand All @@ -94,11 +90,11 @@ msgstr "Paste"
msgid "Receive"
msgstr "Receive"

#: src/app/wallet/developer-console/index.tsx:99
#: src/app/wallet/developer-console/index.tsx:84
msgid "register for Push notifications"
msgstr "register for Push notifications"

#: src/app/wallet/developer-console/index.tsx:103
#: src/app/wallet/developer-console/index.tsx:88
msgid "schedule dummy notifications in 3s"
msgstr "schedule dummy notifications in 3s"

Expand All @@ -122,18 +118,10 @@ msgstr ""
msgid "Swap"
msgstr "Swap"

#: src/app/wallet/developer-console/index.tsx:66
#: src/app/wallet/developer-console/index.tsx:62
msgid "Toggle theme"
msgstr "Toggle theme"

#: src/app/wallet/developer-console/index.tsx:79
msgid "Trigger API presets"
msgstr "Trigger API presets"

#: src/app/wallet/developer-console/index.tsx:97
msgid "Trigger other functionality"
msgstr "Trigger other functionality"

#: src/components/browser/browser-empty-state.tsx:149
msgid "Type URL or search"
msgstr ""
Expand Down
26 changes: 7 additions & 19 deletions apps/mobile/src/locales/pseudo-locale/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ msgstr ""
msgid "Continue"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:71
#: src/app/wallet/developer-console/index.tsx:67
msgid "Create wallet"
msgstr ""

#: src/app/waiting-list/waiting-list.tsx:255
msgid "Done"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:63
#: src/app/wallet/developer-console/index.tsx:96
msgid "Drawer"
msgstr ""

Expand All @@ -61,7 +61,7 @@ msgstr ""
msgid "Follow us"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:81
#: src/app/wallet/developer-console/index.tsx:74
msgid "getAddresses"
msgstr ""

Expand All @@ -73,11 +73,7 @@ msgstr ""
msgid "Notify me when it's ready"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:62
msgid "Open dummy page"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:64
#: src/app/wallet/developer-console/index.tsx:97
msgid "Page"
msgstr ""

Expand All @@ -89,11 +85,11 @@ msgstr ""
msgid "Receive"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:99
#: src/app/wallet/developer-console/index.tsx:84
msgid "register for Push notifications"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:103
#: src/app/wallet/developer-console/index.tsx:88
msgid "schedule dummy notifications in 3s"
msgstr ""

Expand All @@ -117,18 +113,10 @@ msgstr ""
msgid "Swap"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:66
#: src/app/wallet/developer-console/index.tsx:62
msgid "Toggle theme"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:79
msgid "Trigger API presets"
msgstr ""

#: src/app/wallet/developer-console/index.tsx:97
msgid "Trigger other functionality"
msgstr ""

#: src/components/browser/browser-empty-state.tsx:149
msgid "Type URL or search"
msgstr ""
Expand Down

0 comments on commit 925f20b

Please sign in to comment.