mirror of https://github.com/keeweb/keeweb.git
Move platform check to FeatureDetector
This commit is contained in:
parent
ff65ef6cc6
commit
aec6129041
|
@ -35,6 +35,9 @@ const FeatureDetector = {
|
|||
},
|
||||
canCopyReadonlyInput: function() {
|
||||
return !(/CriOS/i.test(navigator.userAgent));
|
||||
},
|
||||
supportsTitleBarStyles: function () {
|
||||
return this.isMac;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -82,10 +82,8 @@ const SettingsGeneralView = Backbone.View.extend({
|
|||
const updateFound = UpdateModel.instance.get('updateStatus') === 'found';
|
||||
const updateManual = UpdateModel.instance.get('updateManual');
|
||||
const storageProviders = this.getStorageProviders();
|
||||
const platform = (typeof process !== 'undefined') ? process.platform : 'web';
|
||||
|
||||
this.renderTemplate({
|
||||
platform: platform,
|
||||
themes: this.allThemes,
|
||||
activeTheme: AppSettingsModel.instance.get('theme'),
|
||||
locales: this.allLocales,
|
||||
|
@ -117,6 +115,7 @@ const SettingsGeneralView = Backbone.View.extend({
|
|||
updateManual: updateManual,
|
||||
releaseNotesLink: Links.ReleaseNotes,
|
||||
colorfulIcons: AppSettingsModel.instance.get('colorfulIcons'),
|
||||
supportsTitleBarStyles: FeatureDetector.supportsTitleBarStyles,
|
||||
titlebarStyle: AppSettingsModel.instance.get('titlebarStyle'),
|
||||
storageProviders: storageProviders
|
||||
});
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<option value="2" {{#ifeq fontSize 2}}selected{{/ifeq}}>{{res 'setGenFontSizeLargest'}}</option>
|
||||
</select>
|
||||
</div>
|
||||
{{#ifeq platform 'darwin'}}
|
||||
{{#if supportsTitleBarStyles}}
|
||||
<div>
|
||||
<label for="settings__general-titlebar-style">{{res 'setGenTitlebarStyle'}}:</label>
|
||||
<select class="settings__general-titlebar-style settings__select input-base" id="settings__general-titlebar-style">
|
||||
|
@ -73,7 +73,7 @@
|
|||
<option value="hidden-inset" {{#ifeq titlebarStyle 'hidden-inset'}}selected{{/ifeq}}>{{res 'setGenTitlebarStyleHiddenInset'}}</option>
|
||||
</select>
|
||||
</div>
|
||||
{{/ifeq}}
|
||||
{{/if}}
|
||||
<div>
|
||||
<input type="checkbox" class="settings__input input-base settings__general-expand" id="settings__general-expand" {{#if expandGroups}}checked{{/if}} />
|
||||
<label for="settings__general-expand">{{res 'setGenShowSubgroups'}}</label>
|
||||
|
|
Loading…
Reference in New Issue