feat: 添加链上地址页面,更新路由配置并优化用户信息组件链接
This commit is contained in:
@@ -6,6 +6,10 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: "/",
|
||||
redirect: "/layout/riwa",
|
||||
},
|
||||
{
|
||||
path: "/:pathMatch(.*)*",
|
||||
redirect: "/layout/riwa",
|
||||
},
|
||||
{
|
||||
path: "/layout",
|
||||
component: () => import("@/components/layout/default.vue"),
|
||||
@@ -28,6 +32,10 @@ const routes: Array<RouteRecordRaw> = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/onchain-address",
|
||||
component: () => import("@/views/onchain-address/index.vue"),
|
||||
},
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
|
||||
@@ -1,6 +1,71 @@
|
||||
/* For information on how to create your own theme, please refer to:
|
||||
http://ionicframework.com/docs/theming/ */
|
||||
|
||||
:root {
|
||||
--ion-color-primary: #0d0d0d;
|
||||
--ion-color-primary-rgb: 13, 13, 13;
|
||||
--ion-color-primary-contrast: #ffffff;
|
||||
--ion-color-primary-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-primary-shade: #0b0b0b;
|
||||
--ion-color-primary-tint: #252525;
|
||||
|
||||
--ion-color-secondary: #4a4a4a;
|
||||
--ion-color-secondary-rgb: 74, 74, 74;
|
||||
--ion-color-secondary-contrast: #ffffff;
|
||||
--ion-color-secondary-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-secondary-shade: #414141;
|
||||
--ion-color-secondary-tint: #5c5c5c;
|
||||
|
||||
--ion-color-tertiary: #666666;
|
||||
--ion-color-tertiary-rgb: 102, 102, 102;
|
||||
--ion-color-tertiary-contrast: #ffffff;
|
||||
--ion-color-tertiary-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-tertiary-shade: #5a5a5a;
|
||||
--ion-color-tertiary-tint: #757575;
|
||||
|
||||
--ion-color-success: #2dd55b;
|
||||
--ion-color-success-rgb: 45, 213, 91;
|
||||
--ion-color-success-contrast: #000000;
|
||||
--ion-color-success-contrast-rgb: 0, 0, 0;
|
||||
--ion-color-success-shade: #28bb50;
|
||||
--ion-color-success-tint: #42d96b;
|
||||
|
||||
--ion-color-warning: #ffc409;
|
||||
--ion-color-warning-rgb: 255, 196, 9;
|
||||
--ion-color-warning-contrast: #000000;
|
||||
--ion-color-warning-contrast-rgb: 0, 0, 0;
|
||||
--ion-color-warning-shade: #e0ac08;
|
||||
--ion-color-warning-tint: #ffca22;
|
||||
|
||||
--ion-color-danger: #c5000f;
|
||||
--ion-color-danger-rgb: 197, 0, 15;
|
||||
--ion-color-danger-contrast: #ffffff;
|
||||
--ion-color-danger-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-danger-shade: #ad000d;
|
||||
--ion-color-danger-tint: #cb1a27;
|
||||
|
||||
--ion-color-light: #f6f8fc;
|
||||
--ion-color-light-rgb: 246, 248, 252;
|
||||
--ion-color-light-contrast: #000000;
|
||||
--ion-color-light-contrast-rgb: 0, 0, 0;
|
||||
--ion-color-light-shade: #d8dade;
|
||||
--ion-color-light-tint: #f7f9fc;
|
||||
|
||||
--ion-color-medium: #5f5f5f;
|
||||
--ion-color-medium-rgb: 95, 95, 95;
|
||||
--ion-color-medium-contrast: #ffffff;
|
||||
--ion-color-medium-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-medium-shade: #545454;
|
||||
--ion-color-medium-tint: #6f6f6f;
|
||||
|
||||
--ion-color-dark: #2f2f2f;
|
||||
--ion-color-dark-rgb: 47, 47, 47;
|
||||
--ion-color-dark-contrast: #ffffff;
|
||||
--ion-color-dark-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-dark-shade: #292929;
|
||||
--ion-color-dark-tint: #444444;
|
||||
}
|
||||
|
||||
:root {
|
||||
--ion-font-family:
|
||||
-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
|
||||
|
||||
127
src/views/onchain-address/index.vue
Normal file
127
src/views/onchain-address/index.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<script lang='ts' setup>
|
||||
import { copyOutline, qrCodeOutline, shareOutline } from "ionicons/icons";
|
||||
|
||||
const { user } = useAuth();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<IonPage>
|
||||
<IonHeader>
|
||||
<IonToolbar class="toolbar">
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button default-href="/layout/user" />
|
||||
</ion-buttons>
|
||||
<ion-title>My Onchain Address</ion-title>
|
||||
</IonToolbar>
|
||||
</IonHeader>
|
||||
<IonContent :fullscreen="true" class="ion-padding">
|
||||
<div class="content-wrapper">
|
||||
<div class="container">
|
||||
<div class="user-info">
|
||||
<div class="avatar-wrapper">
|
||||
<ion-avatar class="avatar">
|
||||
<img alt="User avatar" :src="user?.image || 'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg'">
|
||||
</ion-avatar>
|
||||
</div>
|
||||
<IonText class="user-email">
|
||||
{{ user?.email }}
|
||||
</IonText>
|
||||
</div>
|
||||
|
||||
<div class="ion-text-center address-info">
|
||||
<ion-icon :icon="qrCodeOutline" class="qr-code" />
|
||||
<div class="ion-margin-top">
|
||||
<ion-text color="secondary">
|
||||
<div>Onchain address</div>
|
||||
</ion-text>
|
||||
<ion-text>
|
||||
<div>0x1234567890abcdef1234</div>
|
||||
</ion-text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ion-margin-top ion-text-center operations">
|
||||
<ion-button fill="clear">
|
||||
<ion-icon slot="start" :icon="shareOutline" />
|
||||
Share
|
||||
</ion-button>
|
||||
<ion-button fill="clear">
|
||||
<ion-icon slot="start" :icon="copyOutline" />
|
||||
Copy
|
||||
</ion-button>
|
||||
</div>
|
||||
</div>
|
||||
</IonContent>
|
||||
</IonPage>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.content-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
--background: #f4f6f8;
|
||||
--border-color: #c6c5c5;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.content-wrapper {
|
||||
--background: #232324;
|
||||
--border-color: #3a3a3b;
|
||||
}
|
||||
}
|
||||
.container {
|
||||
width: 80vw;
|
||||
height: 80vw;
|
||||
max-width: 500px;
|
||||
max-height: 500px;
|
||||
border-radius: 14px;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
background-color: var(--background);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
.user-email {
|
||||
margin-top: 4px;
|
||||
font-weight: 500;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
.user-info {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.avatar-wrapper {
|
||||
background-color: var(--background);
|
||||
padding: 4px;
|
||||
border-radius: 100%;
|
||||
width: fit-content;
|
||||
}
|
||||
.avatar {
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
.address-info {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.qr-code {
|
||||
width: 50vw;
|
||||
height: 50vw;
|
||||
max-width: 250px;
|
||||
max-height: 250px;
|
||||
}
|
||||
.operations {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
}
|
||||
</style>
|
||||
@@ -19,7 +19,7 @@ const { user } = useAuth();
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="link">
|
||||
<div class="link" @click="$router.push('/onchain-address')">
|
||||
<ion-icon :icon="qrCodeOutline" class="qr-code" />
|
||||
<ion-icon :icon="chevronForwardOutline" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user