Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #227 from UN-OCHA/dev
Browse files Browse the repository at this point in the history
Production 2020-07-29
  • Loading branch information
rupl authored Jul 29, 2020
2 parents b6051c9 + 8e263bf commit a6f1937
Show file tree
Hide file tree
Showing 22 changed files with 21 additions and 806 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hid_app2",
"version": "2.2.9",
"version": "2.2.11",
"description": "HID Client application",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -52,7 +52,7 @@
"karma-coverage": "^2.0.1",
"karma-jasmine": "^2.0.1",
"karma-ng-html2js-preprocessor": "^1.0.0",
"lodash": ">=4.17.15",
"lodash": ">=4.17.19",
"minimatch": ">=3.0.2",
"minimist": ">=1.2.5",
"mkdirp": "^1.0.4",
Expand Down
2 changes: 1 addition & 1 deletion src/app/common/AppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
};

function hideHeaderFooter () {
return ($location.path() === '/start' || $location.path() === '/tutorial' || $location.path() === '/kiosk') ? true : false;
return ($location.path() === '/start' || $location.path() === '/kiosk') ? true : false;
}

thisScope.hideHeaderFooter = hideHeaderFooter();
Expand Down
8 changes: 0 additions & 8 deletions src/app/components/auth/AuthController.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@
// New user first login (login is set to false in registration)
if (!thisScope.currentUser.appMetadata.hid.login) {
onFirstLogin();
//$location.path('/start');
return;
}

//HIDv1 user first login (login is already set to true)
if (thisScope.currentUser.appMetadata.hid.login && !thisScope.currentUser.appMetadata.hid.viewedTutorial) {
$location.path('/tutorial');
return;
}

Expand All @@ -62,7 +55,6 @@

// Users registering via auth dont have metadata set until first login
onFirstLogin();
//$location.path('/start');
}

thisScope.login = function(tfaCode, trustDevice) {
Expand Down
13 changes: 0 additions & 13 deletions src/app/components/auth/AuthController.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
appMetadata: {
hid: {
login: true,
viewedTutorial: true
}
}
};
Expand Down Expand Up @@ -157,18 +156,6 @@
});
});

describe('A HID v1 user on their first login', function () {
beforeEach(function () {
setUpController(hidV1FirstLoginUser);
scope.login();
scope.$digest();
});

it('should go to the tutorial', function () {
expect($location.path).toHaveBeenCalledWith('/tutorial');
});
});

describe('A user who registered using auth on their first login', function () {
beforeEach(function () {
setUpController(authUser);
Expand Down
8 changes: 0 additions & 8 deletions src/app/components/auth/_login.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
max-width: 200px;
}

.login__video {
display: none;
}

.t-login-btn {
max-width: 50%;
margin-left: 1em;
Expand Down Expand Up @@ -35,8 +31,4 @@
margin-bottom: $base-unit*10;
}

.login__video {
display: block;
padding-top: $base-unit*3;
}
}
10 changes: 1 addition & 9 deletions src/app/components/auth/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>

<div class="row" class="login">
<div class="col-sm-8 offset-sm-2 col-md-6 offset-md-3 col-lg-6 offset-lg-0">
<div class="col-sm-8 offset-sm-2 col-md-6 offset-md-3 col-lg-6">
<div class="page-header page-header--login">
<h1 class="page-header__heading login__heading" translate>Log in to Humanitarian ID.</h1>
</div>
Expand All @@ -29,12 +29,4 @@ <h1 class="page-header__heading login__heading" translate>Log in to Humanitarian
<p><a href="/password_reset" translate>Forgot/Reset password</a></p>
</form>
</div>
<div class="col-lg-6 login__video">
<video-player
ar="35xf6ljcWnE"
en="60dKwkaq_Sw"
es="78Rav6I8F80"
fr="niGYi77tJQM"
></video-player>
</div>
</div>
47 changes: 0 additions & 47 deletions src/app/components/start/TutorialController.js

This file was deleted.

55 changes: 0 additions & 55 deletions src/app/components/start/_tutorial.scss

This file was deleted.

92 changes: 0 additions & 92 deletions src/app/components/start/tutorial.html

This file was deleted.

9 changes: 5 additions & 4 deletions src/app/components/user/UserEditController.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,11 +569,12 @@
updateCurrentUser();
saveUser('login');
}
if (thisScope.currentStep === lastStep) {
$location.path('/tutorial');
return;
}

thisScope.currentStep = thisScope.currentStep + 1;

if (thisScope.currentStep === 5) {
$location.path('/landing');
}
}

thisScope.changePermission = function (key) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/user/UsersController.js
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@
User.syncGSS(body)
.then(function (resp) {
var msg = gettextCatalog.getString('A synchronized Google Sheet was created. Find it at: ');
msg += '<a href="https://docs.google.com/spreadsheets/d/' + resp.data.spreadsheet + '/edit" target="_blank">' + 'https://docs.google.com/spreadsheets/d/' + resp.data.spreadsheet + '/edit' + '</a>';
msg += '<a href="https://docs.google.com/spreadsheets/d/' + resp.data.spreadsheet + '/edit" target="_blank" rel="noopener">' + 'https://docs.google.com/spreadsheets/d/' + resp.data.spreadsheet + '/edit' + '</a>';
alertService.pageAlert('success', msg);
})
.catch(function (err) {
Expand Down
3 changes: 1 addition & 2 deletions src/app/components/user/users-export.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
<script type="text/ng-template" id="exportEmailsModal.html">
<div class="modal-header">
<h3 class="modal-title" id="modal-title" translate>Copy Email Addresses</h3>
<p><span translate>Please email responsibly. Follow our</span> <a href="http://about.humanitarian.id/code-of-conduct" target="_blank" translate>Code of conduct</a></p>
<p><span translate>Please email responsibly. Follow our</span> <a href="http://about.humanitarian.id/code-of-conduct" target="_blank" rel="noopener" translate>Code of conduct</a></p>
<button type="button" class="btn-transparent modal-close" ng-click="closeExportEmailslModal()">
<icon name="cancel" text="Close"></icon>
</button>
</div>
<div class="modal-body" id="modal-body">

<textarea rows="15" cols="100">{{emailsText}}</textarea>
</div>
</script>
Expand Down
15 changes: 0 additions & 15 deletions src/app/components/video/_video.scss

This file was deleted.

Loading

0 comments on commit a6f1937

Please sign in to comment.