Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PW-686: Charts - Add Chart for 1 Token (XYK Pool) #719

Merged
merged 11 commits into from
Jul 4, 2022
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@
"dependencies": {
"@metamask/detect-provider": "^1.2.0",
"@soramitsu/soraneo-wallet-web": "^1.10.1",
"@vue/composition-api": "^1.6.2",
"@walletconnect/web3-provider": "^1.6.6",
"core-js": "^3.6.4",
"direct-vuex": "^0.12.1",
"echarts": "^5.3.2",
"ethers": "^5.5.4",
"lodash": "^4.17.21",
"vue": "^2.6.14",
"vue-class-component": "^7.2.6",
"vue-echarts": "^6.0.3",
"vue-i18n": "^8.11.2",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.5.3",
Expand Down
2 changes: 1 addition & 1 deletion public/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"FEATURE_FLAGS": {
"moonpay": true,
"charts": false
"charts": true
},
"FAUCET_URL": "https://faucet.dev.sora2.tachi.soramitsu.co.jp/",
"SUBQUERY_ENDPOINT": "https://api.subquery.network/sq/sora-xor/sora-dev",
Expand Down
41 changes: 39 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<s-design-system-provider :value="libraryDesignSystem" id="app" class="app">
<app-header :loading="loading" @toggle-menu="toggleMenu" />
<div class="app-main">
<div :class="appClasses">
<app-menu
:visible="menuVisibility"
:on-select="goTo"
Expand Down Expand Up @@ -191,6 +191,19 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin)
return this.$route.name === PageNames.About;
}

get isSwapPage(): boolean {
return this.$route.name === PageNames.Swap;
}

get appClasses(): Array<string> {
const baseClass = 'app-main';
const cssClasses: Array<string> = [baseClass];
if (this.isSwapPage) {
cssClasses.push(`${baseClass}--swap`);
}
return cssClasses;
}

get blockNumberFormatted(): string {
return new FPNumber(this.blockNumber).toLocaleString();
}
Expand Down Expand Up @@ -448,6 +461,30 @@ ul ul {
i.icon-divider {
@include icon-styles;
}

@include desktop {
.app-main.app-main--swap {
.app-menu {
position: relative;
}
.app-content {
width: 100%;
.app-disclaimer {
margin-left: $basic-spacing-small * 3;
}
}
}
.swap-container {
.el-form {
flex-shrink: 0;
}
.el-form,
.container--charts {
margin-right: $basic-spacing-small;
margin-left: $basic-spacing-small;
}
}
}
</style>

<style lang="scss" scoped>
Expand Down Expand Up @@ -544,7 +581,7 @@ $sora-logo-width: 173.7px;
}
}

@include tablet {
@include desktop {
.app-footer {
flex-direction: row;
.app-disclaimer {
Expand Down
Loading