Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
06daa0e
feat(navbar): ensure nav-bar width and box-sizing are set correctly
Nero978 Aug 22, 2026
a1862f2
feat(layout): restructure AppLayout component with NavBar and SiderBa…
Nero978 Aug 22, 2026
b284395
feat(SiderBar): add SiderBar component with dynamic menu items and ro…
Nero978 Aug 22, 2026
b7c3658
feat(i18n): add menu translations for dashboard, account, records, an…
Nero978 Aug 22, 2026
40fe7e9
fix(NavBar): correct size binding for user avatar component
Nero978 Aug 22, 2026
17c8689
fix(SiderBar): correct binding for selected menu item and fix variabl…
Nero978 Aug 22, 2026
80aff7e
feat(router): add account route with title translation
Nero978 Aug 22, 2026
82614c8
feat(layout): enhance AppLayout structure with class bindings for bet…
Nero978 Aug 22, 2026
6fc6c72
feat(account): add AccountView component with user and organization d…
Nero978 Aug 22, 2026
54bc470
feat(i18n): add account localization strings for en-US, zh-CN, and zh-TW
Nero978 Aug 22, 2026
312ec1b
fix(footer): add margin-top to footer for improved spacing
Nero978 Aug 22, 2026
7595c17
feat(account): update header font size in AccountView for better visi…
Nero978 Aug 22, 2026
6f0fe02
feat(dashboard): add forecast section with real-time data and localiz…
Nero978 Aug 22, 2026
9365f17
feat(SiderBar): update menu item from 'records' to 'transactions' for…
Nero978 Aug 22, 2026
aafad63
feat(SendView): add send transaction form with visual representation
Nero978 Aug 22, 2026
b4c8476
feat(assets): add asset meta data
Nero978 Aug 22, 2026
e319133
feat(i18n): add asset and transaction related localization for net po…
Nero978 Aug 22, 2026
55a166e
feat(router): add routes for send and transactions views with localiz…
Nero978 Aug 22, 2026
94f4dd7
feat(DashboardView): add net positions, asset requirements, and liqui…
Nero978 Aug 22, 2026
4291c9a
feat(LanguageSelector): add language selector component and integrate…
Nero978 Aug 22, 2026
e401bd1
feat(AccountView): center-align text in summary title
Nero978 Aug 22, 2026
102d598
feat(DashboardView): enhance dashboard layout with grid system and lo…
Nero978 Aug 22, 2026
6e02b2e
feat(DashboardView): update dashboard components and localization for…
Nero978 Aug 22, 2026
4bcf362
feat(AccountView, SendView): change background position to fixed and …
Nero978 Aug 22, 2026
867ada7
feat(DashboardView): update font family for stat item and asset list …
Nero978 Aug 22, 2026
95bfbf3
feat(assets, SendView): update asset metadata and change receive asse…
Nero978 Aug 22, 2026
47faac6
feat(TradeVisual): enhance asset display by adding asset names and sy…
Nero978 Aug 22, 2026
0719832
feat(Transactions): add transaction list and detail views with locali…
Nero978 Aug 22, 2026
9582d74
feat(Verify): add transaction verification feature with UI and locali…
Nero978 Aug 22, 2026
36ab500
feat(VerifyView): enhance input and button size for better usability
Nero978 Aug 22, 2026
6b9ca93
feat(TransactionDetailPanel, VerifyView): adjust layout and styling f…
Nero978 Aug 23, 2026
46b4cf0
feat(TransactionDetailPanel): add transaction progress display with l…
Nero978 Aug 23, 2026
4d152df
feat: enhance asset amount formatting and improve asset code handling…
Nero978 Aug 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions src/components/LanguageSelector.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<template>
<div class="language-selector">
<earth-icon class="icon" size="32" />
<t-select borderless auto-width :value="locale" @change="handleLocaleChange">
<t-option
v-for="option in localeOptions"
:key="option.value"
:label="option.label"
:value="option.value"
/>
</t-select>
</div>
</template>

<script setup>
import { useLocale } from '@/utils/i18n'
import { EarthIcon } from 'tdesign-icons-vue-next'

const { locale, localeOptions, changeLocale } = useLocale()

function handleLocaleChange(newLocale) {
changeLocale(newLocale)
}
</script>

<style scoped>
.language-selector {
width: fit-content;
display: flex;
align-items: center;
gap: 0.5rem;
}

.language-selector .icon {
color: var(--td-brand-color);
}
</style>
43 changes: 41 additions & 2 deletions src/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
:max-height="400"
direction="left"
>
<t-avatar class="user-avatar" :size="32">
<t-avatar class="user-avatar" size="32">
<template #icon>
<UserIcon />
</template>
Expand All @@ -50,6 +50,13 @@
<span>{{ $t('navbar.item.dashboard') }}</span>
</t-dropdown-item>

<t-dropdown-item value="language" @click="languageDialogVisible = true">
<template #prefixIcon>
<TranslateIcon />
</template>
<span>{{ $t('navbar.item.language') }}</span>
</t-dropdown-item>

<t-dropdown-item
value="logout"
theme="error"
Expand All @@ -71,15 +78,38 @@
</div>
</template>
</t-head-menu>

<t-dialog
v-model:visible="languageDialogVisible"
:header="$t('navbar.item.language')"
:close-btn="true"
:footer="false"
attach="body"
width="360px"
>
<div class="language-dialog-content">
<LanguageSelector />
</div>
</t-dialog>
</t-header>
</template>

<script setup>
import { UserIcon, LoginIcon, LogoutIcon, Dashboard1Icon } from 'tdesign-icons-vue-next'
import { ref } from 'vue'
import {
UserIcon,
LoginIcon,
LogoutIcon,
Dashboard1Icon,
TranslateIcon,
} from 'tdesign-icons-vue-next'
import { useAuthStore } from '@/stores/auth'
import { MessagePlugin } from 'tdesign-vue-next'
import LanguageSelector from '@/components/LanguageSelector.vue'

const authStore = useAuthStore()

const languageDialogVisible = ref(false)
</script>

<style scoped>
Expand All @@ -93,6 +123,8 @@ const authStore = useAuthStore()
}

.nav-bar {
width: 100%;
box-sizing: border-box;
background-color: transparent;
}

Expand All @@ -117,4 +149,11 @@ const authStore = useAuthStore()
.user-avatar {
cursor: pointer;
}

.language-dialog-content {
display: flex;
justify-content: center;
align-items: center;
padding: 2rem 0;
}
</style>
31 changes: 3 additions & 28 deletions src/components/PageFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,7 @@
<div class="footer-bottom">
<span>© {{ currentYear }} NettedX {{ t('footer.rights') }}</span>

<div class="language-selector">
<earth-icon class="icon" size="32" />
<t-select borderless auto-width :value="locale" @change="handleLocaleChange">
<t-option
v-for="option in localeOptions"
:key="option.value"
:label="option.label"
:value="option.value"
/>
</t-select>
</div>
<LanguageSelector />
</div>

<div class="language-wrapper"></div>
Expand All @@ -46,14 +36,10 @@
<script setup>
import { computed } from 'vue'
import { useLocale } from '@/utils/i18n'
import { EarthIcon } from 'tdesign-icons-vue-next'
const { locale, t, localeOptions, changeLocale } = useLocale()
import LanguageSelector from '@/components/LanguageSelector.vue'
const { t } = useLocale()

const currentYear = computed(() => new Date().getFullYear())

function handleLocaleChange(newLocale) {
changeLocale(newLocale)
}
</script>

<style scoped>
Expand Down Expand Up @@ -137,15 +123,4 @@ function handleLocaleChange(newLocale) {
padding: 1rem 0;
box-sizing: border-box;
}

.language-selector {
width: fit-content;
display: flex;
align-items: center;
gap: 0.5rem;
}

.language-selector .icon {
color: var(--td-brand-color);
}
</style>
71 changes: 71 additions & 0 deletions src/components/SiderBar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<template>
<t-aside style="border-top: 1px solid var(--component-border)">
<t-menu theme="light" v-model="selectedValue" style="margin-right: 50px" height="550px">
<t-menu-item v-for="item in menuItems" :key="item.value" :value="item.value" :to="item.path">
<template #icon>
<t-icon :name="item.icon" />
</template>
{{ item.label }}
</t-menu-item>
</t-menu>
</t-aside>
</template>

<script setup>
import { ref, computed, watch } from 'vue'
import { useLocale } from '@/utils/i18n'
import { useRoute } from 'vue-router'

const { t } = useLocale()

const route = useRoute()

const selectedValue = ref('dashboard')

const menuItems = computed(() => [
{
value: 'dashboard',
label: t('menu.dashboard'),
icon: 'dashboard',
path: '/dashboard',
},
{
value: 'send',
label: t('menu.send'),
icon: 'send',
path: '/send',
},
{
value: 'transactions',
label: t('menu.transactions'),
icon: 'tree-list',
path: '/transactions',
},
{
value: 'verify',
label: t('menu.verify'),
icon: 'verified',
path: '/verify',
},
{
value: 'account',
label: t('menu.account'),
icon: 'user',
path: '/account',
},
])

// 根据route的路径来设置选中的菜单项
watch(
() => route.path,
(newPath) => {
const selectedItem = menuItems.value.find((item) => newPath.startsWith(item.path))
if (selectedItem) {
selectedValue.value = selectedItem.value
}
},
{ immediate: true },
)
</script>

<style scoped></style>
Loading
Loading