diff --git a/CHANGELOG.md b/CHANGELOG.md index 17b622381b068c5b304bbebabc75464ca7684155..ac5d697be5591ee973b29f6b635722a81bec69bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ unreleased * AP: attributedTo, to, cc ㌠Array ã‚„ Object ã®ãƒ‘ターンã«å¯¾å¿œ * AP: object type ㌠Audio, Document, Image, Page, Video ã®ãƒ‘ターンã«å¯¾å¿œ * フォãƒãƒ¼è§£é™¤æ™‚ã«ç¢ºèªãƒ€ã‚¤ã‚¢ãƒã‚°ã‚’表示ã™ã‚‹ã‚ˆã†ã« +* ユーザー入力ダイアãƒã‚°ã§ã€å…¥åŠ›æ™‚ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®å˜åœ¨ã‚’確èªã™ã‚‹ã‚ˆã†ã« ### ðŸ›Fixes * 自分ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®ãƒ«ãƒ¼ãƒˆURIã¸ã®ãƒªãƒ³ã‚¯ãŒç„¡ã«ãªã‚‹å•é¡Œã‚’ä¿®æ£ diff --git a/src/client/app/common/views/components/dialog.vue b/src/client/app/common/views/components/dialog.vue index a577da5a21a7639e714d7b931fd939372834b8a7..ed94fe5f35361c1a823a192c3151784b89998c9d 100644 --- a/src/client/app/common/views/components/dialog.vue +++ b/src/client/app/common/views/components/dialog.vue @@ -33,7 +33,7 @@ </template> </ui-select> <ui-horizon-group no-grow class="buttons fit-bottom" v-if="!splash && (showOkButton || showCancelButton)"> - <ui-button @click="ok" v-if="showOkButton" primary :autofocus="!input && !select && !user">{{ (showCancelButton || input || select || user) ? $t('@.ok') : $t('@.got-it') }}</ui-button> + <ui-button @click="ok" v-if="showOkButton" primary :autofocus="!input && !select && !user" :disabled="!canOk">{{ (showCancelButton || input || select || user) ? $t('@.ok') : $t('@.got-it') }}</ui-button> <ui-button @click="cancel" v-if="showCancelButton || input || select || user">{{ $t('@.cancel') }}</ui-button> </ui-horizon-group> </template> @@ -99,11 +99,26 @@ export default Vue.extend({ inputValue: this.input && this.input.default ? this.input.default : null, userInputValue: null, selectedValue: this.select ? this.select.items ? this.select.items[0].value : this.select.groupedItems[0].items[0].value : null, + canOk: true, faTimesCircle, faQuestionCircle }; }, + watch: { + userInputValue() { + if (this.user) { + this.$root.api('users/show', parseAcct(this.userInputValue)).then(u => { + this.canOk = u != null; + }).catch(() => { + this.canOk = false; + }); + } + } + }, + mounted() { + if (this.user) this.canOk = false; + this.$nextTick(() => { (this.$refs.bg as any).style.pointerEvents = 'auto'; anime({ @@ -131,6 +146,7 @@ export default Vue.extend({ methods: { async ok() { + if (!this.canOk) return; if (!this.showOkButton) return; if (this.user) {