Rename variables

This commit is contained in:
Kane York 2015-09-15 12:25:29 -07:00
parent 62444b9a13
commit 41721b0898
3 changed files with 11 additions and 9 deletions

View File

@ -136,14 +136,14 @@ const ScreenTrack = Ember.Object.extend({
}); });
} else { } else {
// Anonymous viewer - save to localStorage // Anonymous viewer - save to localStorage
const store = this.get('keyValueStore'); const storage = this.get('keyValueStore');
// Save total time // Save total time
const existingTime = store.getInt('anon-topic-time'); const existingTime = storage.getInt('anon-topic-time');
store.setItem('anon-topic-time', existingTime + this.get('topicTime')); storage.setItem('anon-topic-time', existingTime + this.get('topicTime'));
// Save unique topic IDs up to a max // Save unique topic IDs up to a max
let topicIds = store.get('anon-topic-ids'); let topicIds = storage.get('anon-topic-ids');
if (topicIds) { if (topicIds) {
topicIds = topicIds.split(',').map(e => parseInt(e)); topicIds = topicIds.split(',').map(e => parseInt(e));
} else { } else {
@ -151,13 +151,15 @@ const ScreenTrack = Ember.Object.extend({
} }
if (topicIds.indexOf(topicId) === -1 && topicIds.length < ANON_MAX_TOPIC_IDS) { if (topicIds.indexOf(topicId) === -1 && topicIds.length < ANON_MAX_TOPIC_IDS) {
topicIds.push(topicId); topicIds.push(topicId);
store.setItem('anon-topic-ids', topicIds.join(',')); storage.setItem('anon-topic-ids', topicIds.join(','));
} }
// Inform the observer // Inform the observer
if (this.get('anonFlushCallback')) { if (this.get('anonFlushCallback')) {
this.get('anonFlushCallback')(); this.get('anonFlushCallback')();
} }
// No need to call controller.readPosts()
} }
this.set('topicTime', 0); this.set('topicTime', 0);

View File

@ -5,8 +5,8 @@
<a {{action "neverShow"}}>{{i18n "signup_cta.hide_forever"}}</a> <a {{action "neverShow"}}>{{i18n "signup_cta.hide_forever"}}</a>
</p> </p>
{{else}} {{else}}
<p>{{i18n "signup_cta.line_1"}}</p> <p>{{i18n "signup_cta.intro"}}</p>
<p>{{i18n "signup_cta.line_2"}}</p> <p>{{i18n "signup_cta.value_prop"}}</p>
<p>{{signupMethodsTranslated}}</p> <p>{{signupMethodsTranslated}}</p>
<div class="buttons"> <div class="buttons">

View File

@ -717,8 +717,8 @@ en:
hide_session: "Remind me tomorrow" hide_session: "Remind me tomorrow"
hide_forever: "Never show this again" hide_forever: "Never show this again"
hidden_for_session: "OK, I'll ask you tomorrow. You can always click the 'Log In' button to create an account, too." hidden_for_session: "OK, I'll ask you tomorrow. You can always click the 'Log In' button to create an account, too."
line_1: Looks like you're enjoying the forum, but you're not signed up for an account. intro: Hey there! Looks like you're enjoying the forum, but you're not signed up for an account.
line_2: Logged-in users get their last read position in every topic saved, so you come right back where you left off. You can also "Watch" topics so that you get a notification whenever a new post is made, and you can give likes to others' posts. value_prop: Logged-in users get their last read position in every topic saved, so you come right back where you left off. You can also "Watch" topics so that you get a notification whenever a new post is made, and you can give likes to others' posts.
methods: methods:
sso: "Use your account on the main site to log in." sso: "Use your account on the main site to log in."
only_email: "Signing up is easy: you just need a valid email account and a password." only_email: "Signing up is easy: you just need a valid email account and a password."