From 7e2d994f975e9e572ce20b2a213604d9beaf3e4d Mon Sep 17 00:00:00 2001 From: Nikita-Polyakov Date: Mon, 28 Jun 2021 12:31:24 +0300 Subject: [PATCH 1/4] add tokens view with simple render whitelist --- src/consts/index.ts | 7 +++- src/router/index.ts | 5 +++ src/views/Tokens.vue | 82 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 src/views/Tokens.vue diff --git a/src/consts/index.ts b/src/consts/index.ts index 8d5ce45a2..24c8eba0f 100644 --- a/src/consts/index.ts +++ b/src/consts/index.ts @@ -69,7 +69,8 @@ export enum PageNames { PageNotFound = 'PageNotFound', Bridge = 'Bridge', BridgeTransaction = 'BridgeTransaction', - BridgeTransactionsHistory = 'BridgeTransactionsHistory' + BridgeTransactionsHistory = 'BridgeTransactionsHistory', + Tokens = 'Tokens' } export enum Components { @@ -157,6 +158,10 @@ const OtherPagesMenu: Array = [ { icon: 'file-file-text-24', title: PageNames.About + }, + { + icon: 'file-file-text-24', + title: PageNames.Tokens } ] diff --git a/src/router/index.ts b/src/router/index.ts index 623f478dd..f7102aeac 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -80,6 +80,11 @@ const routes: Array = [ name: PageNames.Rewards, component: lazyView(PageNames.Rewards) }, + { + path: '/tokens', + name: PageNames.Tokens, + component: lazyView(PageNames.Tokens) + }, { path: '/stats', name: PageNames.Stats diff --git a/src/views/Tokens.vue b/src/views/Tokens.vue new file mode 100644 index 000000000..57c37a1d3 --- /dev/null +++ b/src/views/Tokens.vue @@ -0,0 +1,82 @@ + + + + + From ada4b15025203c100414524051c7d3fef66178c2 Mon Sep 17 00:00:00 2001 From: Stefan Popov Date: Fri, 2 Jul 2021 11:27:53 +0400 Subject: [PATCH 2/4] Update soramitsuUI.ts --- src/plugins/soramitsuUI.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/soramitsuUI.ts b/src/plugins/soramitsuUI.ts index 9b49c1f55..0900535f1 100644 --- a/src/plugins/soramitsuUI.ts +++ b/src/plugins/soramitsuUI.ts @@ -37,6 +37,8 @@ const components = [ Components.SSlider, Components.STab, Components.STabs, + Components.STable, + Components.STableColumn, Components.STooltip ] From 5c81964a9125be7455775f68767f4a22aa4e43be Mon Sep 17 00:00:00 2001 From: Nikita-Polyakov Date: Wed, 7 Jul 2021 13:43:40 +0300 Subject: [PATCH 3/4] update according to design --- src/consts/index.ts | 2 +- src/lang/en.json | 9 +- src/lang/messages.ts | 9 +- src/plugins/soramitsuUI.ts | 4 + src/views/Tokens.vue | 179 +++++++++++++++++++++++++++++-------- 5 files changed, 164 insertions(+), 39 deletions(-) diff --git a/src/consts/index.ts b/src/consts/index.ts index 24c8eba0f..13c261bd6 100644 --- a/src/consts/index.ts +++ b/src/consts/index.ts @@ -160,7 +160,7 @@ const OtherPagesMenu: Array = [ title: PageNames.About }, { - icon: 'file-file-text-24', + icon: 'various-bone-24', title: PageNames.Tokens } ] diff --git a/src/lang/en.json b/src/lang/en.json index 0dafd6c39..54b0ee264 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -258,7 +258,8 @@ "About": "About", "Stats": "Stats", "Support": "Support", - "CreatePair": "Create Pair" + "CreatePair": "Create Pair", + "Tokens": "Tokens" }, "social": { "twitter": "Twitter", @@ -624,6 +625,12 @@ "outputMessage": "Output is estimated. If the price changes more than {slippageTolerance}% your transaction will revert.", "confirmTitle": "You will receive" }, + "tokens": { + "title": "Listed Tokens", + "symbol": "Symbol", + "name": "Name", + "assetId": "Asset ID" + }, "dexSettings": { "title": "Transaction settings", "marketAlgorithm": "@.upper:marketAlgorithmText", diff --git a/src/lang/messages.ts b/src/lang/messages.ts index e657459fa..4b8f914f1 100644 --- a/src/lang/messages.ts +++ b/src/lang/messages.ts @@ -62,7 +62,8 @@ export default { [PageNames.About]: 'About', [PageNames.Stats]: 'Stats', [PageNames.Support]: 'Support', - [PageNames.CreatePair]: 'Create Pair' + [PageNames.CreatePair]: 'Create Pair', + [PageNames.Tokens]: 'Tokens' }, social: { twitter: 'Twitter', @@ -443,6 +444,12 @@ export default { outputMessage: 'Output is estimated. If the price changes more than {slippageTolerance}% your transaction will revert.', confirmTitle: 'You will receive' }, + tokens: { + title: 'Listed Tokens', + symbol: 'Symbol', + name: 'Name', + assetId: 'Asset ID' + }, dexSettings: { title: 'Transaction settings', marketAlgorithm: '@.upper:marketAlgorithmText', diff --git a/src/plugins/soramitsuUI.ts b/src/plugins/soramitsuUI.ts index 0084d17ed..a5889f898 100644 --- a/src/plugins/soramitsuUI.ts +++ b/src/plugins/soramitsuUI.ts @@ -31,6 +31,8 @@ import SSlider from '@soramitsu/soramitsu-js-ui/src/components/Slider' import SSwitch from '@soramitsu/soramitsu-js-ui/src/components/Switch' import STab from '@soramitsu/soramitsu-js-ui/src/components/Tab/STab' import STabs from '@soramitsu/soramitsu-js-ui/src/components/Tab/STabs' +import STable from '@soramitsu/soramitsu-js-ui/src/components/Table/STable' +import STableColumn from '@soramitsu/soramitsu-js-ui/src/components/Table/STableColumn' import STooltip from '@soramitsu/soramitsu-js-ui/src/components/Tooltip' import store from '@/store' @@ -63,6 +65,8 @@ Vue.use(SSlider) Vue.use(SSwitch) Vue.use(STab) Vue.use(STabs) +Vue.use(STable) +Vue.use(STableColumn) Vue.use(STooltip) Vue.prototype.$prompt = MessageBox.prompt Vue.prototype.$alert = MessageBox.alert diff --git a/src/views/Tokens.vue b/src/views/Tokens.vue index 57c37a1d3..194d19c61 100644 --- a/src/views/Tokens.vue +++ b/src/views/Tokens.vue @@ -1,29 +1,60 @@