Commit 60f2a3bb authored by Nick Stenning's avatar Nick Stenning

Update copy, comments from "sign in/out" to "log in/out"

parent 41904b1b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/** /**
* Provides functions for retrieving and caching API tokens required by * Provides functions for retrieving and caching API tokens required by
* API requests and signing out of the API. * API requests and logging out of the API.
*/ */
var queryString = require('query-string'); var queryString = require('query-string');
...@@ -12,7 +12,7 @@ var INITIAL_TOKEN = { ...@@ -12,7 +12,7 @@ var INITIAL_TOKEN = {
userid: undefined, userid: undefined,
// Promise for the API token for 'userid'. // Promise for the API token for 'userid'.
// This is initialized when fetchOrReuseToken() is called and // This is initialized when fetchOrReuseToken() is called and
// reset when signing out via logout() // reset when logging out via logout()
token: undefined, token: undefined,
}; };
...@@ -106,9 +106,9 @@ function clearCache() { ...@@ -106,9 +106,9 @@ function clearCache() {
// @ngInject // @ngInject
function authService(flash, session) { function authService(flash, session) {
/** /**
* Sign out from the API and clear any cached tokens. * Log out from the API and clear any cached tokens.
* *
* @return {Promise<void>} - A promise for when signout has completed. * @return {Promise<void>} - A promise for when logout has completed.
*/ */
function logout() { function logout() {
return session.logout({}).$promise return session.logout({}).$promise
...@@ -116,7 +116,7 @@ function authService(flash, session) { ...@@ -116,7 +116,7 @@ function authService(flash, session) {
clearCache(); clearCache();
}) })
.catch(function(err) { .catch(function(err) {
flash.error('Sign out failed!'); flash.error('Log out failed!');
throw err; throw err;
}); });
} }
......
...@@ -388,7 +388,7 @@ function AnnotationController( ...@@ -388,7 +388,7 @@ function AnnotationController(
vm.save = function() { vm.save = function() {
if (!vm.annotation.user) { if (!vm.annotation.user) {
flash.info('Please sign in to save your annotations.'); flash.info('Please log in to save your annotations.');
return Promise.resolve(); return Promise.resolve();
} }
if (!vm.hasContent() && vm.isShared()) { if (!vm.hasContent() && vm.isShared()) {
......
...@@ -11,7 +11,7 @@ module.exports = function () { ...@@ -11,7 +11,7 @@ module.exports = function () {
restrict: 'E', restrict: 'E',
scope: { scope: {
/** /**
* Called when the user clicks on the "Sign in" text. * Called when the user clicks on the "Log in" text.
*/ */
onLogin: '&', onLogin: '&',
}, },
......
...@@ -19,11 +19,11 @@ module.exports = function () { ...@@ -19,11 +19,11 @@ module.exports = function () {
*/ */
onShowHelpPanel: '&', onShowHelpPanel: '&',
/** /**
* Called when the user clicks on the "Sign in" text. * Called when the user clicks on the "Log in" text.
*/ */
onLogin: '&', onLogin: '&',
/** /**
* Called when the user clicks on the "Sign out" text. * Called when the user clicks on the "Log out" text.
*/ */
onLogout: '&', onLogout: '&',
/** /**
......
...@@ -9,7 +9,7 @@ module.exports = { ...@@ -9,7 +9,7 @@ module.exports = {
/** The list of groups changed */ /** The list of groups changed */
GROUPS_CHANGED: 'groupsChanged', GROUPS_CHANGED: 'groupsChanged',
/** The signed-in user changed */ /** The logged-in user changed */
USER_CHANGED: 'userChanged', USER_CHANGED: 'userChanged',
/** /**
* The session state was updated. * The session state was updated.
......
<header class="annotation-header" ng-if="!vm.user()"> <header class="annotation-header" ng-if="!vm.user()">
<strong>You must be signed in to create annotations.</strong> <strong>You must be logged in to create annotations.</strong>
</header> </header>
<div ng-keydown="vm.onKeydown($event)" ng-if="vm.user()"> <div ng-keydown="vm.onKeydown($event)" ng-if="vm.user()">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
To reply or make your own annotations on this document, To reply or make your own annotations on this document,
<a class="loggedout-message__link" href="{{vm.serviceUrl}}register" target="_blank">create a free account</a> <a class="loggedout-message__link" href="{{vm.serviceUrl}}register" target="_blank">create a free account</a>
or or
<a class="loggedout-message__link" href="" ng-click="vm.onLogin()">sign in</a>. <a class="loggedout-message__link" href="" ng-click="vm.onLogin()">log in</a>.
</span> </span>
<span class="loggedout-message-logo"> <span class="loggedout-message-logo">
<a href="https://hypothes.is"> <a href="https://hypothes.is">
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</div> </div>
<div class="form-actions-buttons"> <div class="form-actions-buttons">
<button class="btn btn-primary" type="submit" name="login" <button class="btn btn-primary" type="submit" name="login"
status-button="login">Sign in</button> status-button="login">Log in</button>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<span class="signin-text" <span class="signin-text"
ng-if="vm.newStyle && vm.auth.status === 'signed-out'"> ng-if="vm.newStyle && vm.auth.status === 'signed-out'">
<a href="{{vm.serviceUrl}}register" target="_blank">Sign up</a> <a href="{{vm.serviceUrl}}register" target="_blank">Sign up</a>
/ <a href="" ng-click="vm.onLogin()">Sign in</a> / <a href="" ng-click="vm.onLogin()">Log in</a>
</span> </span>
<div ng-if="vm.newStyle" <div ng-if="vm.newStyle"
class="pull-right signin-control-menu" class="pull-right signin-control-menu"
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</li> </li>
<li class="dropdown-menu__row" ng-if="vm.auth.status === 'signed-in'"> <li class="dropdown-menu__row" ng-if="vm.auth.status === 'signed-in'">
<a class="dropdown-menu__link dropdown-menu__link--subtle" <a class="dropdown-menu__link dropdown-menu__link--subtle"
href="" ng-click="vm.onLogout()">Sign out</a> href="" ng-click="vm.onLogout()">Log out</a>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<!-- Old controls --> <!-- Old controls -->
<span ng-if="!vm.newStyle && vm.auth.status === 'unknown'"></span> <span ng-if="!vm.newStyle && vm.auth.status === 'unknown'"></span>
<span ng-if="!vm.newStyle && vm.auth.status === 'signed-out'"> <span ng-if="!vm.newStyle && vm.auth.status === 'signed-out'">
<a href="" ng-click="vm.onLogin()">Sign in</a> <a href="" ng-click="vm.onLogin()">Log in</a>
</span> </span>
<div ng-if="!vm.newStyle" <div ng-if="!vm.newStyle"
class="pull-right signin-control-menu" class="pull-right signin-control-menu"
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
target="_blank">My Annotations</a> target="_blank">My Annotations</a>
</li> </li>
<li class="dropdown-menu__row" ng-if="vm.auth.status === 'signed-in'"> <li class="dropdown-menu__row" ng-if="vm.auth.status === 'signed-in'">
<a class="dropdown-menu__link" href="" ng-click="vm.onLogout()">Sign out</a> <a class="dropdown-menu__link" href="" ng-click="vm.onLogout()">Log out</a>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
This annotation is not available. This annotation is not available.
<br> <br>
You may need to You may need to
<a class="loggedout-message__link" href="" ng-click="login()">sign in</a> <a class="loggedout-message__link" href="" ng-click="login()">log in</a>
to see it. to see it.
</span> </span>
<span ng-if="auth.status === 'signed-in'"> <span ng-if="auth.status === 'signed-in'">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment