mirror of https://github.com/keeweb/keeweb.git
fix #644: plugin gallery load button
This commit is contained in:
parent
413b643d4b
commit
196bb3385b
|
@ -477,6 +477,7 @@
|
|||
"setPlTranslate": "Or you can {}",
|
||||
"setPlTranslateLink": "translate the app to your language",
|
||||
"setPlAutoUpdate": "Update automatically",
|
||||
"setPlLoadGallery": "Load plugin gallery",
|
||||
|
||||
"setAboutTitle": "About",
|
||||
"setAboutBuilt": "This app is built with these awesome tools",
|
||||
|
|
|
@ -28,7 +28,8 @@ const SettingsPluginsView = Backbone.View.extend({
|
|||
'change select.settings__plugins-plugin-input': 'pluginSettingChange',
|
||||
'change input[type=checkbox].settings__plugins-plugin-input': 'pluginSettingChange',
|
||||
'input input[type=text].settings__plugins-plugin-input': 'pluginSettingChange',
|
||||
'change .settings__plugins-plugin-updates': 'autoUpdateChange'
|
||||
'change .settings__plugins-plugin-updates': 'autoUpdateChange',
|
||||
'click .settings__plugins-gallery-load-btn': 'loadPluginGalleryClick'
|
||||
},
|
||||
|
||||
searchStr: null,
|
||||
|
@ -39,7 +40,6 @@ const SettingsPluginsView = Backbone.View.extend({
|
|||
initialize() {
|
||||
this.listenTo(PluginManager, 'change', this.render.bind(this));
|
||||
this.listenTo(Backbone, 'plugin-gallery-load-complete', this.render.bind(this));
|
||||
PluginGallery.loadPlugins();
|
||||
},
|
||||
|
||||
render() {
|
||||
|
@ -108,6 +108,14 @@ const SettingsPluginsView = Backbone.View.extend({
|
|||
return true;
|
||||
},
|
||||
|
||||
loadPluginGalleryClick() {
|
||||
if (PluginGallery.loading) {
|
||||
return;
|
||||
}
|
||||
PluginGallery.loadPlugins();
|
||||
this.render();
|
||||
},
|
||||
|
||||
installClick() {
|
||||
const installBtn = this.$el.find('.settings_plugins-install-btn');
|
||||
const urlTextBox = this.$el.find('#settings__plugins-install-url');
|
||||
|
|
|
@ -200,6 +200,9 @@
|
|||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
&-gallery-load-btn {
|
||||
margin-top: $base-padding-h;
|
||||
}
|
||||
&-gallery-plugin {
|
||||
position: relative;
|
||||
width: calc(50% - 40px);
|
||||
|
|
|
@ -149,6 +149,8 @@
|
|||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{else}}
|
||||
<button class="settings__plugins-gallery-load-btn" {{#if galleryLoading}}disabled="disabled"{{/if}}>{{res 'setPlLoadGallery'}}</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
<h2>{{res 'setPlInstallUrlTitle'}}</h2>
|
||||
|
|
Loading…
Reference in New Issue