diff --git a/app/scripts/models/app-model.js b/app/scripts/models/app-model.js index 92da98bc..c50ebb05 100644 --- a/app/scripts/models/app-model.js +++ b/app/scripts/models/app-model.js @@ -13,7 +13,8 @@ var Backbone = require('backbone'), Storage = require('../storage'), Timeouts = require('../const/timeouts'), IdGenerator = require('../util/id-generator'), - Logger = require('../util/logger'); + Logger = require('../util/logger'), + FeatureDetector = require('../util/feature-detector'); require('../mixins/protected-value-ex'); @@ -29,6 +30,7 @@ var AppModel = Backbone.Model.extend({ this.sort = 'title'; this.settings = AppSettingsModel.instance; this.activeEntryId = null; + this.isBeta = FeatureDetector.isBeta(); this.listenTo(Backbone, 'refresh', this.refresh); this.listenTo(Backbone, 'set-filter', this.setFilter); diff --git a/app/scripts/util/feature-detector.js b/app/scripts/util/feature-detector.js index 47f94344..e347284b 100644 --- a/app/scripts/util/feature-detector.js +++ b/app/scripts/util/feature-detector.js @@ -21,6 +21,9 @@ var FeatureDetector = { }, canCopyReadonlyInput: function() { return !(/CriOS/i.test(navigator.userAgent)); + }, + isBeta: function() { + return window.location.href.toLowerCase().indexOf('beta.') > 0; } }; diff --git a/app/scripts/util/locale.js b/app/scripts/util/locale.js index 0f125c23..d7dd69ce 100644 --- a/app/scripts/util/locale.js +++ b/app/scripts/util/locale.js @@ -41,6 +41,8 @@ var Locale = { alertCopy: 'Copy', alertClose: 'Close', + appBeta: 'WARNING: beta version, only for preview', + footerOpen: 'Open / New', footerSyncError: 'Sync error', footerTitleHelp: 'Help', diff --git a/app/scripts/views/app-view.js b/app/scripts/views/app-view.js index f65d0875..59e696cc 100644 --- a/app/scripts/views/app-view.js +++ b/app/scripts/views/app-view.js @@ -82,7 +82,9 @@ var AppView = Backbone.View.extend({ }, render: function () { - this.$el.html(this.template()); + this.$el.html(this.template({ + beta: this.model.isBeta + })); this.setTheme(); this.views.listWrap.setElement(this.$el.find('.app__list-wrap')).render(); this.views.menu.setElement(this.$el.find('.app__menu')).render(); diff --git a/app/styles/areas/_app.scss b/app/styles/areas/_app.scss index 8e38e362..a8e639a9 100644 --- a/app/styles/areas/_app.scss +++ b/app/styles/areas/_app.scss @@ -102,4 +102,13 @@ @include flex(0 0 auto); @include th { border-top: light-border(); } } + + &__beta { + padding: $base-padding; + text-align: center; + @include th { + background-color: error-color(); + color: text-contrast-color(error-color()); + } + } } diff --git a/app/templates/app.hbs b/app/templates/app.hbs index ad6a60f5..8edf91d1 100644 --- a/app/templates/app.hbs +++ b/app/templates/app.hbs @@ -1,4 +1,5 @@
+ {{#if beta}}
{{res 'appBeta'}}
{{/if}}
diff --git a/release-notes.md b/release-notes.md index 585906dd..99aac7e2 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,5 +1,9 @@ Release notes ------------- +##### v1.1.0 (Q2 2016) +Storage providers, usability improvements +`+` beta version app + ##### v1.0.0 (2016-02-12) Performance, stability and quality improvements `+` track changes in local files