Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
feat: init node rewards modules (#678)
Browse files Browse the repository at this point in the history
* feat: init node rewards modules

* fix: clean up comment
  • Loading branch information
AnthonyLaw authored Jun 11, 2022
1 parent 631def2 commit 35b428f
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import './modules/domainNameSystem';
import './modules/importWalletQrCode';
import './modules/NEMonster';
import './modules/catapultOptin';
import './modules/nodeRewardsProgram';

// Create and bootstrap application
const requires = [
Expand Down Expand Up @@ -116,6 +117,7 @@ const requires = [
'app.dnsSearch',
'app.NEMonster',
'app.importWalletQrCode',
'app.nodeRewardsProgram',
'app.catapultOptin'
];

Expand Down
4 changes: 2 additions & 2 deletions src/app/modules/home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h1 ng-bind="::$ctrl.appName"></h1>
<i class="fa fa-th fa-4x"></i>
</div>
<div class="col-md-1" ng-mouseover="$ctrl.showInfo = 5">
<img src="images/symbol.jpg" style="width: 4em;"></i>
<img src="images/nem-logo.png" style="width: 4em;"></i>
</div>
<div class="col-md-1" ng-mouseover="$ctrl.showInfo = 6">
<i class="fa fa-chain fa-4x"></i>
Expand Down Expand Up @@ -56,7 +56,7 @@ <h1 ng-bind="::$ctrl.appName"></h1>
<p>{{ 'PORTAL_HARVESTING_TEXT' | translate }}</p>
</div>
<div ng-show="$ctrl.showInfo === 5">
<p>{{ 'PORTAL_CATAPULTOPTIN_TEXT' | translate }}</p>
<p>{{ 'PORTAL_NODE_REWARDS_PROGRAM_TEXT' | translate }}</p>
</div>
<div ng-show="$ctrl.showInfo === 6">
<p>{{ 'PORTAL_APOSTILLE_TEXT' | translate }}</p>
Expand Down
4 changes: 4 additions & 0 deletions src/app/modules/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ function EnglishProvider($translateProvider) {
PORTAL_ADDRESS_BOOK_BTN: 'Manage address book',
PORTAL_INVOICE_TEXT: 'Create an invoice to share via QR code',
PORTAL_SIGNED_MSG_TEXT: 'Create and verify signed messages to authenticate account ownership without transacting.',
PORTAL_NODE_REWARDS_PROGRAM_TITLE: 'Node Rewards Program',
PORTAL_NODE_REWARDS_PROGRAM_TEXT: 'Use this module to enroll to NEM Node Rewards Program. Please, read more ',
PORTAL_NODE_REWARDS_PROGRAM_TEXT_LINK: 'here.',
PORTAL_NODE_REWARDS_PROGRAM_BTN_1: 'Check & Enroll to Program',

// ADDRESS BOOK MODULE
ADDRESS_BOOK_TITLE: 'Address book',
Expand Down
14 changes: 14 additions & 0 deletions src/app/modules/nodeRewardsProgram/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import angular from 'angular';

// Create the module where our functionality can attach
const nodeRewardsProgramModule = angular.module('app.nodeRewardsProgram', []);

// Include our UI-Router config settings
import NodeRewardsProgramConfig from './nodeRewardsProgram.config';
nodeRewardsProgramModule.config(NodeRewardsProgramConfig);

// Controllers
import NodeRewardsProgramCtrl from './nodeRewardsProgram.controller';
nodeRewardsProgramModule.controller('NodeRewardsProgramCtrl', NodeRewardsProgramCtrl);

export default nodeRewardsProgramModule;
14 changes: 14 additions & 0 deletions src/app/modules/nodeRewardsProgram/nodeRewardsProgram.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
function NodeRewardsProgramConfig($stateProvider) {
'ngInject';

$stateProvider
.state('app.nodeRewardsProgram', {
url: '/nodeRewardsProgram',
controller: 'NodeRewardsProgramCtrl',
controllerAs: '$ctrl',
templateUrl: 'modules/nodeRewardsProgram/nodeRewardsProgram.html',
title: 'Node Rewards Program'
});
};

export default NodeRewardsProgramConfig;
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
class NodeRewardsProgramCtrl {

/**
* Initialize dependencies and properties
*
* @params {services} - Angular services to inject
*/
constructor(Wallet, DataStore) {
'ngInject';

//// Module dependencies region ////

this._Wallet = Wallet;
this._DataStore = DataStore;

//// End dependencies region ////
}

}

export default NodeRewardsProgramCtrl;
9 changes: 4 additions & 5 deletions src/app/modules/portal/portal.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,17 @@ <h5>{{ 'PORTAL_MOSAIC_TITLE' | translate }}</h5>
<div class="col-sm-4">
<div class="panel-heading row">
<div class="col-sm-3">
<img src="images/symbol.jpg"/>
<img src="images/nem-logo.png"/>
</div>
<div class="col-sm-9">
<h5>{{ 'PORTAL_CATAPULTOPTIN_TITLE' | translate }}</h5>
<h5>{{ 'PORTAL_NODE_REWARDS_PROGRAM_TITLE' | translate }}</h5>
</div>
</div>
<div class="panel-body">
<p>{{ 'PORTAL_CATAPULTOPTIN_TEXT' | translate }} <a href="https://nemplatform.com/symbol-migration" target="_blank" style="color: rgba(0, 0, 0, 0.4); text-decoration: underline;">{{ 'PORTAL_CATAPULTOPTIN_TEXT_LINK' | translate }}</a></p>
<p>{{ 'PORTAL_NODE_REWARDS_PROGRAM_TEXT' | translate }} <a href="https://nem-supernode.netlify.app" target="_blank" style="color: rgba(0, 0, 0, 0.4); text-decoration: underline;">{{ 'PORTAL_NODE_REWARDS_PROGRAM_TEXT_LINK' | translate }}</a></p>
</div>
<div class="panelFooter">
<p ng-hide="!$ctrl._DataStore.account.metaData.meta.cosignatories.length" class="text-danger">{{ 'PORTAL_CATAPULTOPTIN_MULTISIG_TEXT' | translate }}</p>
<button class="btn" ui-sref="app.catapultOptin" ng-hide="$ctrl._DataStore.account.metaData.meta.cosignatories.length">{{ 'PORTAL_CATAPULTOPTIN_BTN_1' | translate }}</button>
<button class="btn" ui-sref="app.nodeRewardsProgram">{{ 'PORTAL_NODE_REWARDS_PROGRAM_BTN_1' | translate }}</button>
</div>
</div>
</div>
Expand Down
Binary file added src/images/nem-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 35b428f

Please sign in to comment.