Skip to content

Commit

Permalink
create new dashboard for rebranding (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkNerdi authored Sep 13, 2023
1 parent 876b25e commit 0b9dc4b
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/desktop/features/wallet.features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const walletFeatures: IWalletFeatures = {
enabled: true,
},
},
newDashboard: {
enabled: false,
},
walletConnect: {
enabled: false,
},
Expand Down
2 changes: 2 additions & 0 deletions packages/desktop/views/dashboard/Dashboard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
import { Governance } from './governance'
import { Settings } from './settings'
import { Wallet } from './wallet'
import { NewDashboard } from './new-dashboard'
import { DashboardDrawerRouterView } from './drawers'
const tabs = {
wallet: Wallet,
newDashboard: NewDashboard,
settings: Settings,
collectibles: Collectibles,
governance: Governance,
Expand Down
15 changes: 15 additions & 0 deletions packages/desktop/views/dashboard/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
},
]
: []),
...(features?.wallet?.newDashboard?.enabled
? [
{
icon: IconEnum.Wallet,
label: localize('tabs.wallet'),
route: DashboardRoute.NewDashboard,
onClick: openNewDashboard,
},
]
: []),
...(features?.collectibles?.enabled
? [
{
Expand Down Expand Up @@ -67,6 +77,11 @@
resetAllRouters()
}
function openNewDashboard(): void {
resetAllRouters()
$dashboardRouter.goTo(DashboardRoute.NewDashboard)
}
function openCollectibles(): void {
resetAllRouters()
$dashboardRouter.goTo(DashboardRoute.Collectibles)
Expand Down
18 changes: 18 additions & 0 deletions packages/desktop/views/dashboard/new-dashboard/NewDashboard.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script lang="ts">
import { Pane } from '@ui'
import { selectedAccount } from '@core/account/stores'
</script>

{#if $selectedAccount}
<wallet-container
class="w-full h-full flex flex-nowrap p-8 relative flex-1
bg-gray-50 dark:bg-gray-900 justify-center items-center"
>
{#key $selectedAccount?.index}
<div class="h-full w-full flex flex-col gap-8">
<Pane>Balance section</Pane>
<Pane classes="flex-grow">Activity/Token section</Pane>
</div>
{/key}
</wallet-container>
{/if}
1 change: 1 addition & 0 deletions packages/desktop/views/dashboard/new-dashboard/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as NewDashboard } from './NewDashboard.svelte'
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export enum DashboardRoute {
Wallet = 'wallet',
NewDashboard = 'newDashboard',
Collectibles = 'collectibles',
Developer = 'developer',
Governance = 'governance',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface IWalletFeatures extends IFeatureFlag {
sendAndReceive: IFeatureFlag & {
nft: IFeatureFlag
}
newDashboard: IFeatureFlag
walletConnect: IFeatureFlag
assets: IFeatureFlag & {
burnToken: IFeatureFlag
Expand Down

0 comments on commit 0b9dc4b

Please sign in to comment.