diff --git a/html/src/app.js b/html/src/app.js index b38082f4..88bd61e0 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -6441,7 +6441,28 @@ CefSharp.BindObjectAsync( if (D.visible === false) { return; } - if (command === 'New Instance') { + if (command === 'Refresh') { + D.loading = true; + API.getWorld({ + worldId: D.id + }).catch((err) => { + D.loading = false; + D.visible = false; + throw err; + }).then((args) => { + if (D.id === args.ref.id) { + D.loading = false; + D.ref = args.ref; + D.isFavorite = API.cachedFavoritesByObjectId.has(D.id); + D.rooms = []; + this.applyWorldDialogInstances(); + if (args.cache) { + API.getWorld(args.params); + } + } + return args; + }); + } else if (command === 'New Instance') { this.showNewInstanceDialog(D.$location.tag); } else if (command === 'Add Favorite') { this.showFavoriteDialog('world', D.id); diff --git a/html/src/index.pug b/html/src/index.pug index 1ce9ce4f..e3f68fff 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -784,7 +784,8 @@ html el-dropdown(trigger="click" @command="worldDialogCommand" size="small" style="margin-left:5px") el-button(type="default" icon="el-icon-more" circle) el-dropdown-menu(#default="dropdown") - el-dropdown-item(icon="el-icon-s-flag" command="New Instance") New Instance + el-dropdown-item(icon="el-icon-refresh" command="Refresh") Refresh + el-dropdown-item(icon="el-icon-s-flag" command="New Instance" divided) New Instance el-dropdown-item(v-if="API.currentUser.$homeLocation && API.currentUser.$homeLocation.worldId === worldDialog.id" icon="el-icon-magic-stick" command="Reset Home" divided) Reset Home el-dropdown-item(v-else icon="el-icon-s-home" command="Make Home" divided) Make Home el-tabs