From c00aadfa9d19728264a17115e064fdf0bd858e0a Mon Sep 17 00:00:00 2001 From: ALFAcashier <32351813+ALFAcashier@users.noreply.github.com> Date: Thu, 13 Feb 2020 14:37:00 +0300 Subject: [PATCH] add ALFAcashier exchange --- src/app/app.js | 1 + .../alfacashier/alfacashier.config.js | 15 ++++++++++++ .../alfacashier/alfacashier.controller.js | 24 +++++++++++++++++++ .../exchanges/alfacashier/alfacashier.html | 11 +++++++++ src/app/modules/exchanges/index.js | 14 ++++++++++- src/app/modules/languages/en.js | 4 ++-- src/app/modules/portal/portal.html | 4 +++- src/sass/_new.scss | 18 ++++++++++++++ 8 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 src/app/modules/exchanges/alfacashier/alfacashier.config.js create mode 100644 src/app/modules/exchanges/alfacashier/alfacashier.controller.js create mode 100644 src/app/modules/exchanges/alfacashier/alfacashier.html diff --git a/src/app/app.js b/src/app/app.js index 7f51aedb..83f5c15e 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -86,6 +86,7 @@ const requires = [ 'chart.js', 'pascalprecht.translate', 'app.lang', + 'app.alfacashier', 'app.changelly', 'app.addressBook', 'app.importanceTransfer', diff --git a/src/app/modules/exchanges/alfacashier/alfacashier.config.js b/src/app/modules/exchanges/alfacashier/alfacashier.config.js new file mode 100644 index 00000000..1200f01c --- /dev/null +++ b/src/app/modules/exchanges/alfacashier/alfacashier.config.js @@ -0,0 +1,15 @@ +function AlfacashierConfig($stateProvider) { + 'ngInject'; + + $stateProvider + .state('app.alfacashier', { + url: '/alfacashier-buy-xem', + controller: 'AlfacashierCtrl', + controllerAs: '$ctrl', + templateUrl: 'modules/exchanges/alfacashier/alfacashier.html', + title: 'Buy XEM on ALFAcashier' + }); + +}; + +export default AlfacashierConfig; diff --git a/src/app/modules/exchanges/alfacashier/alfacashier.controller.js b/src/app/modules/exchanges/alfacashier/alfacashier.controller.js new file mode 100644 index 00000000..148f618c --- /dev/null +++ b/src/app/modules/exchanges/alfacashier/alfacashier.controller.js @@ -0,0 +1,24 @@ +class AlfacashierCtrl { + + /** + * Initialize dependencies and properties + * + * @params {services} - Angular services to inject + */ + constructor(Wallet) { + 'ngInject'; + + //// Module dependencies region //// + + this._Wallet = Wallet; + + //// End dependencies region //// + + // Open the ALFAcashier widget in a new window + let child = window.open("https://widget.alfacashier.io/?from_currency=bitcoin&to_currency=nem&source_amount=0.1&address="+ this._Wallet.currentAccount.address +"&no_payment_id&rid=2f7a9357",'1418115287605','width=700,height=630,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=0,left=0,top=0,noopener=1'); + child.opener = null; + } + +} + +export default AlfacashierCtrl; diff --git a/src/app/modules/exchanges/alfacashier/alfacashier.html b/src/app/modules/exchanges/alfacashier/alfacashier.html new file mode 100644 index 00000000..1a662bab --- /dev/null +++ b/src/app/modules/exchanges/alfacashier/alfacashier.html @@ -0,0 +1,11 @@ +
{{ 'PORTAL_EXCHANGE_TEXT' | translate }}
- \ No newline at end of file + diff --git a/src/sass/_new.scss b/src/sass/_new.scss index 023a9af7..3653127e 100644 --- a/src/sass/_new.scss +++ b/src/sass/_new.scss @@ -1194,6 +1194,24 @@ textarea { } } +/*** ALFACASHIER WIDGET ***/ + #alfacashierwidget { + margin-top: $pad * 3; + } +.explorer-home-page, .explorer-apostilles, .explorer-namespaces-mosaics-page, .explorer-accounts, explorer-transactions { + overflow: hidden; + li { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } +} +.explorerNav { + li { + overflow: visible; + } +} + /*** CHANGELLY WIDGET ***/ #changwidget { margin-top: $pad * 3;