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

View File

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

View File

@ -717,8 +717,8 @@ en:
hide_session: "Remind me tomorrow"
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."
line_1: 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.
intro: Hey there! Looks like you're enjoying the forum, but you're not signed up for an account.
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:
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."