Skip to content

Commit

Permalink
Add release notes link (#697)
Browse files Browse the repository at this point in the history
* add translations

* refactoring text links
  • Loading branch information
Nikita-Polyakov authored May 24, 2022
1 parent e843334 commit 0d2f247
Show file tree
Hide file tree
Showing 25 changed files with 88 additions and 39 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "polkaswap-exchange-web",
"version": "1.9.0",
"repository": {
"type": "git",
"url": "https://github.com/sora-xor/polkaswap-exchange-web.git"
},
"license": "Apache-2.0",
"private": true,
"author": "[email protected] <[email protected]>",
Expand Down
49 changes: 36 additions & 13 deletions src/components/App/Menu/AppInfoPopper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,14 @@
<s-divider />
<div>
<a
class="app-info-link app-info-link--wiki"
v-for="(link, index) in sortedTextLinks"
:key="index"
class="app-info-link app-info-link--text"
target="_blank"
rel="nofollow noopener"
:href="t('helpDialog.privacyPolicyLink')"
:href="link.href"
>
<span>{{ t('helpDialog.privacyPolicy') }}</span>
</a>
<a
class="app-info-link app-info-link--wiki"
target="_blank"
rel="nofollow noopener"
:href="t('helpDialog.termsOfServiceLink')"
>
<span>{{ t('helpDialog.termsOfService') }}</span>
<span>{{ link.title }}</span>
</a>
</div>
<div class="app-info__versions">
Expand All @@ -50,12 +44,26 @@ import { api, mixins } from '@soramitsu/soraneo-wallet-web';
import TranslationMixin from '@/components/mixins/TranslationMixin';
import { app, SocialNetworkLinks } from '@/consts';
import { app, SocialNetworkLinks, Links } from '@/consts';
@Component
export default class AppInfoPopper extends Mixins(TranslationMixin, mixins.LoadingMixin) {
readonly SocialNetworkLinks = SocialNetworkLinks;
readonly app = app;
readonly textLinks: Array<{ title: string; href: string }> = [
{
title: this.t('helpDialog.privacyPolicy'),
href: Links.privacy,
},
{
title: this.t('releaseNotesText'),
href: Links.releaseNotes,
},
{
title: this.t('helpDialog.termsOfService'),
href: Links.terms,
},
];
specVersion: Nullable<number> = null;
Expand All @@ -66,6 +74,21 @@ export default class AppInfoPopper extends Mixins(TranslationMixin, mixins.Loadi
this.specVersion = Number(specVersion);
});
}
get sortedTextLinks(): Array<{ title: string; href: string }> {
return this.textLinks.sort((a, b) => {
const nameA = a.title.toUpperCase();
const nameB = b.title.toUpperCase();
if (nameA < nameB) {
return -1;
}
if (nameA > nameB) {
return 1;
}
return 0;
});
}
}
</script>

Expand Down Expand Up @@ -132,7 +155,7 @@ $social-link-min-height: 34px;
min-height: $social-link-min-height;
}
&--wiki {
&--text {
& + & {
margin-top: $basic-spacing-small;
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/HelpDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<dialog-base :visible.sync="isVisible" :title="t('helpDialog.title')">
<div class="help-block help-links">
<div v-for="(link, index) in links" :key="index">
<a class="help-links-item" :href="link.url" target="_blank">
<a class="help-links-item" :href="link.href" target="_blank">
<span>{{ link.title }}</span>
</a>
<s-divider v-if="index !== links.length - 1" class="help-links-item_divider" />
Expand All @@ -25,7 +25,7 @@ import TranslationMixin from './mixins/TranslationMixin';
import DialogMixin from './mixins/DialogMixin';
import DialogBase from './DialogBase.vue';
import { app } from '@/consts';
import { app, Links } from '@/consts';
@Component({
components: {
Expand All @@ -36,14 +36,14 @@ export default class HelpDialog extends Mixins(TranslationMixin, DialogMixin) {
readonly appVersion = app.version;
readonly appEmail = app.email;
readonly links = [
readonly links: Array<{ title: string; href: string }> = [
{
title: this.t('helpDialog.termsOfService'),
url: this.t('helpDialog.termsOfServiceLink'),
href: Links.terms,
},
{
title: this.t('helpDialog.privacyPolicy'),
url: this.t('helpDialog.privacyPolicyLink'),
href: Links.privacy,
},
];
}
Expand Down
1 change: 1 addition & 0 deletions src/consts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const Links = {
marketMaker: 'https://medium.com/polkaswap/pswap-rewards-part-3-polkaswap-market-making-rebates-1856f62ccfaa',
terms: 'https://wiki.sora.org/polkaswap/terms',
privacy: 'https://wiki.sora.org/polkaswap/privacy',
releaseNotes: pkg.repository.url.replace('.git', '/releases/latest'),
};

export const ObjectInit = () => null;
Expand Down
3 changes: 2 additions & 1 deletion src/lang/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Získejte SORA Wallet",
"header": "Stáhněte si peněženku SORA s <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span>",
"info": "Swap tokeny z různých sítí - SORA, Ethereum, Polkadot, Kusama. Poskytněte fond likvidity a získejte % z poplatků za směnu."
}
},
"releaseNotesText": "Poznámky k vydání"
}
3 changes: 2 additions & 1 deletion src/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Hole dir die SORA Wallet",
"header": "Lade die SORA Wallet mit <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span> -Funktionen herunter",
"info": "Tausche Token aus verschiedenen Netzwerken aus - SORA, Ethereum, Polkadot, Kusama. Stelle einen Liquiditätspool bereit und verdiene % an Börsengebühren."
}
},
"releaseNotesText": "Versionshinweise"
}
3 changes: 2 additions & 1 deletion src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Get SORA Wallet",
"header": "Download SORA Wallet with <span class=\"popup-info__headline--highlight\">Polkaswap<\/span> features",
"info": "Swap tokens from different networks - SORA, Ethereum, Polkadot, Kusama. Provide liquidity pool and earn % from exchange fees."
}
},
"releaseNotesText": "Release notes"
}
3 changes: 2 additions & 1 deletion src/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Obtén SORA Wallet",
"header": "Descargue la billetera de SORA con características de <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span>",
"info": "Intercambie tokens de diferentes redes: SORA, Ethereum, Polkadot, Kusama. Proporcione liquidez a la pool y gane un % de las tarifas de cambio."
}
},
"releaseNotesText": "Notas de lanzamiento"
}
3 changes: 2 additions & 1 deletion src/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Obtenez SORA Wallet",
"header": "Téléchargez le portefeuille SORA avec les fonctionnalités <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span>",
"info": "Échangez des jetons de différents réseaux - SORA, Ethereum, Polkadot, Kusama. Fournissez un pool de liquidités et gagnez% des frais de change."
}
},
"releaseNotesText": "Notes de version"
}
3 changes: 2 additions & 1 deletion src/lang/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Preuzmite SORA Wallet",
"header": "Preuzmite SORA Novčanik sa značajkama <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span>",
"info": "Zamijenite tokene s različitih mreža - SORA, Ethereum, Polkadot, Kusama. Osigurajte fond likvidnosti i zaradite % od naknada za razmjenu."
}
},
"releaseNotesText": "Bilješke o izdanju"
}
3 changes: 2 additions & 1 deletion src/lang/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Szerezze be a SORA Wallet",
"header": "A SORA Wallet letöltése <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span> funkcióival",
"info": "Cserélje ki a tokeneket különböző hálózatokból - SORA, Ethereum, Polkadot, Kusama. Biztosítson likviditási készletet, és keressen %-ot a cseredíjakból."
}
},
"releaseNotesText": "Kiadási megjegyzések"
}
3 changes: 2 additions & 1 deletion src/lang/hy.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Ստացեք SORA Wallet",
"header": "Ներբեռնեք SORA դրամապանակը <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span> հատկանիշներով",
"info": "Փոխանակեք նշաններ տարբեր ցանցերից՝ SORA, Ethereum, Polkadot, Kusama: Ապահովեք իրացվելիության ֆոնդ և վաստակեք տոկոս փոխանակման վճարներից:"
}
},
"releaseNotesText": "Թողարկման նշումներ"
}
3 changes: 2 additions & 1 deletion src/lang/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Dapatkan Dompet SORA",
"header": "Unduh SORA Wallet dengan fitur <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span>",
"info": "Tukar token dari jaringan yang berbeda - SORA, Ethereum, Polkadot, Kusama. Sediakan kumpulan likuiditas dan dapatkan % dari biaya pertukaran."
}
},
"releaseNotesText": "Catatan rilis"
}
3 changes: 2 additions & 1 deletion src/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Ottieni SORA Wallet",
"header": "Scarica SORA Wallet con <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span>",
"info": "Scambia token da reti diverse: SORA, Ethereum, Polkadot, Kusama. Fornisci un pool di liquidità e guadagna % dalle commissioni di cambio."
}
},
"releaseNotesText": "Note di rilascio"
}
1 change: 1 addition & 0 deletions src/lang/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default {
selectNodeText: 'Select node',
bridgeText: 'Bridge',
comingSoonText: 'Coming Soon',
releaseNotesText: 'Release notes',
memorandum: 'Polkaswap Memorandum and Terms of Services',
memorandumLink:
'<a href="@:helpDialog.termsOfServiceLink" target="_blank" rel="nofollow noopener" class="link" title="@:memorandum">@:memorandum</a>',
Expand Down
3 changes: 2 additions & 1 deletion src/lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Download de SORA Wallet",
"header": "Download SORA Wallet met <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span> -functies",
"info": "Ruil tokens van verschillende netwerken - SORA, Ethereum, Polkadot, Kusama. Bied een liquiditeitspool en verdien % aan wisselkosten."
}
},
"releaseNotesText": "Release-opmerkingen"
}
3 changes: 2 additions & 1 deletion src/lang/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Få SORA Wallet",
"header": "Last ned SORA Wallet med <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span> funksjoner",
"info": "Bytt ut tokens fra forskjellige nettverk - SORA, Ethereum, Polkadot, Kusama. Gi likviditetspool og tjen % fra vekslingsgebyrer."
}
},
"releaseNotesText": "Utgivelsesnotater"
}
3 changes: 2 additions & 1 deletion src/lang/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Pobierz SORA Wallet",
"header": "Pobierz portfel SORA z <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span>",
"info": "Zamień tokeny z różnych sieci - SORA, Ethereum, Polkadot, Kusama. Zapewnij pulę płynności i zarabiaj % na opłatach za wymianę."
}
},
"releaseNotesText": "Informacje o wydaniu"
}
3 changes: 2 additions & 1 deletion src/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Получить SORA Wallet",
"header": "Загрузите кошелек SORA с функциями <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span>",
"info": "Обмен токенами из разных сетей — SORA, Ethereum, Polkadot, Kusama. Обеспечьте пул ликвидности и зарабатывайте % от биржевых комиссий."
}
},
"releaseNotesText": "О версии приложения"
}
3 changes: 2 additions & 1 deletion src/lang/sk.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Získajte SORA Wallet",
"header": "Stiahnite si peňaženku SORA s <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span>",
"info": "Vymieňajte si tokeny z rôznych sietí – SORA, Ethereum, Polkadot, Kusama. Poskytnite fond likvidity a získajte % z poplatkov za výmenu."
}
},
"releaseNotesText": "Poznámky k vydaniu"
}
3 changes: 2 additions & 1 deletion src/lang/sr.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Преузмите СОРА Валлет",
"header": "Преузмите СОРА новчаник са <span class=\"popup-info__headline--highlight\"> Полкасвап <\/span>",
"info": "Замените токене са различитих мрежа - СОРА, Етхереум, Полкадот, Кусама. Обезбедите фонд ликвидности и зарадите % од провизија."
}
},
"releaseNotesText": "Напомене о издању"
}
3 changes: 2 additions & 1 deletion src/lang/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Skaffa SORA Wallet",
"header": "Ladda ner SORA Wallet med <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span> funktioner",
"info": "Byt ut tokens från olika nätverk - SORA, Ethereum, Polkadot, Kusama. Bidra med likviditet i en pool och tjäna % från växlingsavgifter."
}
},
"releaseNotesText": "Utgåvan"
}
5 changes: 3 additions & 2 deletions src/lang/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@
},
"bridge": {
"title": "Cầu nối HASHI",
"info": "Chuyển token giữa mạng @:soraText và @:(ethereumText).",
"info": "Chuyển token giữa mạng @:soraText và @:ethereumText.",
"balance": "Số dư",
"connectWallet": "@:connectWalletText",
"connected": "@:connectedText",
Expand Down Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Tải xuống Ví SORA",
"header": "Tải xuống Ví SORA với các tính năng của <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span>",
"info": "Hoán đổi token từ các mạng khác nhau - SORA, Ethereum, Polkadot, Kusama. Cung cấp pool thanh khoản và kiếm % từ phí giao dịch."
}
},
"releaseNotesText": "Ghi chú phát hành"
}
3 changes: 2 additions & 1 deletion src/lang/yo.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "Ṣe igbasilẹ apamọwọ SORA",
"header": "Ṣe igbasilẹ apamọwọ SORA pẹlu <span class=\"popup-info__headline--highlight\"> Polkaswap <\/span> awọn ẹya ara ẹrọ",
"info": "Siwopu àmi lati yatọ si nẹtiwọki - SORA, Ethereum, Polkadot, Kusama. Pese adagun oloomi ati jo'gun% lati awọn idiyele paṣipaarọ."
}
},
"releaseNotesText": "Awọn akọsilẹ idasilẹ"
}
3 changes: 2 additions & 1 deletion src/lang/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,5 +952,6 @@
"sideMenu": "获取 SORA 钱包",
"header": "下载具有<span class=\"popup-info__headline--highlight\"> Polkaswap <\/span>功能的 SORA 钱包",
"info": "交换来自不同网络的代币 - SORA、以太坊、Polkadot、Kusama。提供流动资金池并从交易所费用中赚取 %。"
}
},
"releaseNotesText": "发行说明"
}

0 comments on commit 0d2f247

Please sign in to comment.