From c95c048c8b9c7515887ba3ae2d9f53a9063da46d Mon Sep 17 00:00:00 2001 From: Natanael Rodriguez Ramos Date: Wed, 6 Sep 2023 09:51:18 +0100 Subject: [PATCH] light page improvements --- src/config/_default/config.toml | 6 + src/themes/ivpn-v3/assets/js/api/api.js | 5 +- src/themes/ivpn-v3/assets/js/app.js | 2 +- .../assets/js/components/SelectLocations.vue | 14 +- .../js/components/SelectLocationsMulti.vue | 237 ++++++++++++++++-- .../ivpn-v3/assets/js/store/module_auth.js | 2 +- .../assets/js/views/Account/Account.vue | 18 +- .../assets/js/views/Account/AddFunds.vue | 10 +- .../assets/js/views/Account/Invoice.vue | 12 +- .../assets/js/views/Account/Payment.vue | 13 +- .../js/views/Account/PortForwarding.vue | 14 +- .../assets/js/views/Account/Settings.vue | 16 +- .../assets/js/views/Account/ThankYouLight.vue | 27 +- .../assets/js/views/Account/Wireguard.vue | 13 +- .../js/views/Account/WireguardConfig.vue | 9 +- .../assets/js/views/OnePageCheckout.vue | 176 ++++++++----- 16 files changed, 480 insertions(+), 94 deletions(-) diff --git a/src/config/_default/config.toml b/src/config/_default/config.toml index 1e9becfd5..3fae752c0 100644 --- a/src/config/_default/config.toml +++ b/src/config/_default/config.toml @@ -102,6 +102,12 @@ disableKinds = ["sitemap", "taxonomyTerm"] url = "/signup/" weight = 5 + [[menu.footercolone]] + identifier = "light" + name = "IVPN Light" + url = "/light/" + weight = 5 + [[menu.footercolone]] identifier = "wireguard" name = "WireGuard® VPN" diff --git a/src/themes/ivpn-v3/assets/js/api/api.js b/src/themes/ivpn-v3/assets/js/api/api.js index e82bd6f69..665dd443b 100644 --- a/src/themes/ivpn-v3/assets/js/api/api.js +++ b/src/themes/ivpn-v3/assets/js/api/api.js @@ -396,12 +396,15 @@ export default { async createLightInvoice(priceID, exitServer, entryServer, privateKey, publicKey) { + if( !Array.isArray(entryServer) ) { + entryServer = [ entryServer ] + } let response = await this.Post('/web/accounts/btc/create-light-invoice', { price_id: priceID, private_key: privateKey, public_key: publicKey, exit_server: exitServer, - entry_server: [ entryServer ] + entry_server: entryServer }) return response diff --git a/src/themes/ivpn-v3/assets/js/app.js b/src/themes/ivpn-v3/assets/js/app.js index ecd8760f4..3b2580899 100644 --- a/src/themes/ivpn-v3/assets/js/app.js +++ b/src/themes/ivpn-v3/assets/js/app.js @@ -47,7 +47,7 @@ const app = createApp({ computed: { ...mapState({ isAuthenticated: state => state.auth.isAuthenticated, - isLegacy: state => state.auth.isLegacy + isLegacy: state => state.auth.isLegacy, }) } }) diff --git a/src/themes/ivpn-v3/assets/js/components/SelectLocations.vue b/src/themes/ivpn-v3/assets/js/components/SelectLocations.vue index 50697cd95..dfa28ef10 100644 --- a/src/themes/ivpn-v3/assets/js/components/SelectLocations.vue +++ b/src/themes/ivpn-v3/assets/js/components/SelectLocations.vue @@ -169,7 +169,7 @@ export default { @media (max-width: $brk-mobile-xs) { } @include light-theme(( - background: $white, + background: #FFFFFF, color: $black )); @@ -239,4 +239,16 @@ export default { color: #FFFFFF )); } + +.vs__dropdown-option--disabled{ + @include light-theme(( + background: #FFFFFF, + color: #222226 + )); + + @include dark-theme(( + background: #202020, + color: #FFFFFF + )); +} \ No newline at end of file diff --git a/src/themes/ivpn-v3/assets/js/components/SelectLocationsMulti.vue b/src/themes/ivpn-v3/assets/js/components/SelectLocationsMulti.vue index ccba5eaa0..b61728878 100644 --- a/src/themes/ivpn-v3/assets/js/components/SelectLocationsMulti.vue +++ b/src/themes/ivpn-v3/assets/js/components/SelectLocationsMulti.vue @@ -1,30 +1,48 @@