feat: implement enableUnfinishedFeatures flag and hidden preferences button
This commit is contained in:
@@ -16,6 +16,7 @@ SF_NEXT_VERSION_SERVER=http://localhost:3000
|
|||||||
DEV_DEFAULT_SYNC_SERVER=https://sync.standardnotes.org
|
DEV_DEFAULT_SYNC_SERVER=https://sync.standardnotes.org
|
||||||
DEV_NEXT_VERSION_SYNC_SERVER=https://api.standardnotes.com
|
DEV_NEXT_VERSION_SYNC_SERVER=https://api.standardnotes.com
|
||||||
DEV_EXTENSIONS_MANAGER_LOCATION=public/extensions/extensions-manager/dist/index.html
|
DEV_EXTENSIONS_MANAGER_LOCATION=public/extensions/extensions-manager/dist/index.html
|
||||||
|
ENABLE_UNFINISHED_FEATURES=false
|
||||||
|
|
||||||
# NewRelic (Optional)
|
# NewRelic (Optional)
|
||||||
NEW_RELIC_ENABLED=false
|
NEW_RELIC_ENABLED=false
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { isDesktopApplication, isDev } from '@/utils';
|
import { isDesktopApplication } from '@/utils';
|
||||||
import pull from 'lodash/pull';
|
import pull from 'lodash/pull';
|
||||||
import {
|
import {
|
||||||
ApplicationEvent,
|
ApplicationEvent,
|
||||||
@@ -48,8 +48,8 @@ export enum EventSource {
|
|||||||
type ObserverCallback = (event: AppStateEvent, data?: any) => Promise<void>;
|
type ObserverCallback = (event: AppStateEvent, data?: any) => Promise<void>;
|
||||||
|
|
||||||
export class AppState {
|
export class AppState {
|
||||||
readonly enableUnfinishedFeatures =
|
readonly enableUnfinishedFeatures: boolean = (window as any)
|
||||||
isDev || location.host.includes('app-dev.standardnotes.org');
|
?._enable_unfinished_features;
|
||||||
|
|
||||||
$rootScope: ng.IRootScopeService;
|
$rootScope: ng.IRootScopeService;
|
||||||
$timeout: ng.ITimeoutService;
|
$timeout: ng.ITimeoutService;
|
||||||
@@ -98,11 +98,11 @@ export class AppState {
|
|||||||
this,
|
this,
|
||||||
this.appEventObserverRemovers
|
this.appEventObserverRemovers
|
||||||
);
|
);
|
||||||
(this.tags = new TagsState(application, this.appEventObserverRemovers)),
|
this.tags = new TagsState(application, this.appEventObserverRemovers);
|
||||||
(this.noAccountWarning = new NoAccountWarningState(
|
this.noAccountWarning = new NoAccountWarningState(
|
||||||
application,
|
application,
|
||||||
this.appEventObserverRemovers
|
this.appEventObserverRemovers
|
||||||
));
|
);
|
||||||
this.searchOptions = new SearchOptionsState(
|
this.searchOptions = new SearchOptionsState(
|
||||||
application,
|
application,
|
||||||
this.appEventObserverRemovers
|
this.appEventObserverRemovers
|
||||||
|
|||||||
@@ -18,6 +18,11 @@
|
|||||||
ng-if='ctrl.showAccountMenu',
|
ng-if='ctrl.showAccountMenu',
|
||||||
application='ctrl.application'
|
application='ctrl.application'
|
||||||
)
|
)
|
||||||
|
.sk-app-bar-item(
|
||||||
|
ng-click='ctrl.clickPreferences()'
|
||||||
|
ng-if='ctrl.appState.enableUnfinishedFeatures'
|
||||||
|
)
|
||||||
|
.sk-label.title Preferences
|
||||||
.sk-app-bar-item
|
.sk-app-bar-item
|
||||||
a.no-decoration.sk-label.title(
|
a.no-decoration.sk-label.title(
|
||||||
href='https://standardnotes.com/help',
|
href='https://standardnotes.com/help',
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
window._extensions_manager_location = "<%= ENV['EXTENSIONS_MANAGER_LOCATION'] %>";
|
window._extensions_manager_location = "<%= ENV['EXTENSIONS_MANAGER_LOCATION'] %>";
|
||||||
window._batch_manager_location = "<%= ENV['BATCH_MANAGER_LOCATION'] %>";
|
window._batch_manager_location = "<%= ENV['BATCH_MANAGER_LOCATION'] %>";
|
||||||
window._bugsnag_api_key = "<%= ENV['BUGSNAG_API_KEY'] %>";
|
window._bugsnag_api_key = "<%= ENV['BUGSNAG_API_KEY'] %>";
|
||||||
|
window._enable_unfinished_features = "<%= ENV['ENABLE_UNFINISHED_FEATURES'] %>"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<% if Rails.env.development? %>
|
<% if Rails.env.development? %>
|
||||||
|
|||||||
@@ -33,12 +33,14 @@
|
|||||||
data-next-version-sync-server="<%= env.DEV_NEXT_VERSION_SYNC_SERVER || env.DEV_DEFAULT_SYNC_SERVER %>"
|
data-next-version-sync-server="<%= env.DEV_NEXT_VERSION_SYNC_SERVER || env.DEV_DEFAULT_SYNC_SERVER %>"
|
||||||
data-extensions-manager-location="<%= env.DEV_EXTENSIONS_MANAGER_LOCATION %>"
|
data-extensions-manager-location="<%= env.DEV_EXTENSIONS_MANAGER_LOCATION %>"
|
||||||
data-bugsnag-api-key="<%= env.DEV_BUGSNAG_API_KEY %>"
|
data-bugsnag-api-key="<%= env.DEV_BUGSNAG_API_KEY %>"
|
||||||
|
data-enable-unfinished-features="<%= env.ENABLE_UNFINISHED_FEATURES %>"
|
||||||
>
|
>
|
||||||
<script>
|
<script>
|
||||||
window._default_sync_server = document.body.dataset.defaultSyncServer || "https://sync.standardnotes.org";
|
window._default_sync_server = document.body.dataset.defaultSyncServer || "https://sync.standardnotes.org";
|
||||||
window._next_version_sync_server = document.body.dataset.nextVersionSyncServer || "https://api.standardnotes.com";
|
window._next_version_sync_server = document.body.dataset.nextVersionSyncServer || "https://api.standardnotes.com";
|
||||||
window._extensions_manager_location = document.body.dataset.extensionsManagerLocation || "public/extensions/extensions-manager/dist/index.html";
|
window._extensions_manager_location = document.body.dataset.extensionsManagerLocation || "public/extensions/extensions-manager/dist/index.html";
|
||||||
window._bugsnag_api_key = document.body.dataset.bugsnagApiKey;
|
window._bugsnag_api_key = document.body.dataset.bugsnagApiKey;
|
||||||
|
window._enable_unfinished_features = document.body.dataset.enableUnfinishedFeatures === 'true';
|
||||||
</script>
|
</script>
|
||||||
<application-group-view />
|
<application-group-view />
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user