Skip to content

Commit

Permalink
show initializating
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Sep 23, 2018
1 parent 73da67c commit c5d0a35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/components/Imjoy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@
<md-divider></md-divider>
<md-menu md-size="medium">
<md-button class="md-icon-button" :class="plugin.running?'md-accent':''" md-menu-trigger>
<md-icon v-if="plugin.config.icon">{{plugin.config.icon}}</md-icon>
<md-progress-spinner v-if="plugin.initializing" class="md-accent" :md-diameter="20" md-mode="indeterminate"></md-progress-spinner>
<md-icon v-else-if="plugin.config.icon">{{plugin.config.icon}}</md-icon>
<md-icon v-else>extension</md-icon>
<md-tooltip>show more options for the plugin</md-tooltip>
</md-button>
Expand Down
4 changes: 4 additions & 0 deletions web/static/jailed/jailed.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ function randId() {
this._path = config.url;
this._initialInterface = _interface||{};
this._disconnected = true
this.initializing = false;
this.running = false;
this._connect();
};
Expand All @@ -776,6 +777,7 @@ function randId() {
this.name = config.name;
this.type = config.type;
this.mode = config.mode || 'webworker';
this.initializing = false;
this.running = false;
this._initialInterface = _interface||{};
this._disconnected = true;
Expand Down Expand Up @@ -809,6 +811,7 @@ function randId() {
}
else{
this._connection = new Connection(this.id, this.mode, this.config);
this.initializing = true;
this._connection.whenInit(function(){
me._init();
});
Expand All @@ -823,6 +826,7 @@ function randId() {
DynamicPlugin.prototype._init =
Plugin.prototype._init = function() {
this._site = new JailedSite(this._connection, this.id, this.mode == 'pyworker'?'python':'javascript');
this.initializing = false;

var me = this;
this._site.onDisconnect(function() {
Expand Down

0 comments on commit c5d0a35

Please sign in to comment.