Skip to content

Commit

Permalink
fix layout align (#1059)
Browse files Browse the repository at this point in the history
  • Loading branch information
samaradel authored Sep 4, 2023
1 parent f51cbca commit 735df7e
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 32 deletions.
76 changes: 48 additions & 28 deletions packages/dashboard/src/Dashboard.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
<!-- eslint-disable vue/no-v-text-v-html-on-component -->
<template>
<v-app>
<div>
<v-app-bar :class="{ 'sidebar-opened': !mini, 'ml-4 ': !mini }" color="#064663" dense dark fixed height="65">
<v-app-bar-nav-icon></v-app-bar-nav-icon>

<v-toolbar-title class="font-weight-bold" @click="redirectToHomePage" style="cursor: pointer"
>Threefold Chain</v-toolbar-title
>

<v-spacer>
<div class="d-flex align-center justify-start">
<TftSwapPrice v-if="!loadingAPI" />
<FundsCard v-if="$store.state.credentials.initialized && $store.state.credentials.balance" />
</div>
</v-spacer>
<div class="d-flex align-center">
<div class="d-flex" style="align-items: center">
<v-btn icon @click="toggle_dark_mode">
<v-icon>mdi-theme-light-dark</v-icon>
</v-btn>

<TfChainConnector />
</div>
<v-app-bar :class="{ 'sidebar-opened': !mini, 'ml-4 ': !mini }" color="#064663" dense dark fixed height="65">
<v-app-bar-nav-icon></v-app-bar-nav-icon>

<v-toolbar-title class="font-weight-bold" @click="redirectToHomePage" style="cursor: pointer"
>Threefold Chain</v-toolbar-title
>

<v-spacer>
<div class="d-flex align-center justify-start">
<TftSwapPrice v-if="!loadingAPI" />
<FundsCard v-if="$store.state.credentials.initialized && $store.state.credentials.balance" />
</div>
</v-app-bar>
</div>
</v-spacer>
<div class="d-flex align-center">
<div class="d-flex" style="align-items: center">
<v-btn icon @click="toggle_dark_mode">
<v-icon>mdi-theme-light-dark</v-icon>
</v-btn>

<TfChainConnector />
</div>
</div>
</v-app-bar>

<v-navigation-drawer
app
Expand Down Expand Up @@ -162,9 +160,21 @@
</div>
</v-navigation-drawer>

<div :style="'padding-left:' + (mini ? '56px' : '300px')">
<!-- <div :style="'padding-left:' + (mini ? '56px' : '300px')">
<router-view />
</div>
</div> -->

<v-content class="mt-15">
<v-container fluid>
<v-row class="fill-height">
<v-col>
<transition name="fade">
<router-view></router-view>
</transition>
</v-col>
</v-row>
</v-container>
</v-content>

<v-footer padless fixed>
<v-card class="flex" flat tile>
Expand Down Expand Up @@ -338,14 +348,24 @@ export default class Dashboard extends Vue {
icon: "account-arrow-right-outline",
showBeforeLogIn: false,
},
{ label: "farms", path: "account-farms", icon: "silo", showBeforeLogIn: false },
{
label: "farms",
path: "account-farms",
icon: "silo",
showBeforeLogIn: false,
},
{
label: "dedicated nodes",
path: "account-nodes",
icon: "resistor-nodes",
showBeforeLogIn: false,
},
{ label: "dao", path: "account-dao", icon: "note-check-outline", showBeforeLogIn: false },
{
label: "dao",
path: "account-dao",
icon: "note-check-outline",
showBeforeLogIn: false,
},
],
},
{
Expand Down
6 changes: 3 additions & 3 deletions packages/dashboard/src/explorer/components/Layout.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<v-container>
<v-container fluid>
<h1>
{{ pageName }}
</h1>
<v-divider />
<br />
<v-row>
<v-col :cols="screen_max_1400 ? 12 : 3" :order="screen_max_1400 ? 1 : undefined" v-if="!noFilter">
<v-col :cols="screen_max_1400 ? 12 : 2" :order="screen_max_1400 ? 1 : undefined" v-if="!noFilter">
<h3>Filters</h3>
<br />
<v-row>
Expand All @@ -21,7 +21,7 @@
<slot name="active-filters"></slot>
</section>
</v-col>
<v-col :cols="screen_max_1400 ? 12 : 9" class="table-container">
<v-col :cols="screen_max_1400 ? 12 : 10" class="table-container">
<slot name="table"></slot>
</v-col>
</v-row>
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard/src/explorer/views/Nodes.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<Layout pageName="Nodes" class="custom-layout">
<Layout pageName="Nodes">
<template v-slot:filters>
<LayoutFilters :items="filters.map(f => f.label)" v-model="activeFiltersList" />
</template>
Expand Down

0 comments on commit 735df7e

Please sign in to comment.