Skip to content

Commit

Permalink
admin/metaが取得できてない場合はインスタンス情報を更新できないように
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Dec 5, 2020
1 parent e33badf commit bf8d702
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/client/app/admin/views/instance.vue
Expand Up @@ -142,6 +142,7 @@ export default Vue.extend({
data() {
return {
fetched: false,
url,
host: toUnicode(host),
maintainerName: null,
Expand Down Expand Up @@ -233,6 +234,13 @@ export default Vue.extend({
this.enableServiceWorker = meta.enableServiceWorker;
this.swPublicKey = meta.swPublickey;
this.swPrivateKey = meta.swPrivateKey;
this.fetched = true;
}).catch(e => {
this.$root.dialog({
type: 'error',
text: 'meta fetch failed'
});
});
},
Expand Down Expand Up @@ -267,6 +275,14 @@ export default Vue.extend({
},
updateMeta() {
if (!this.fetched) {
this.$root.dialog({
type: 'error',
text: 'Cannot continue because meta fetch has failed'
});
return;
}
this.$root.api('admin/update-meta', {
maintainerName: this.maintainerName,
maintainerEmail: this.maintainerEmail,
Expand Down

0 comments on commit bf8d702

Please sign in to comment.