summaryrefslogtreecommitdiff
path: root/src/client/app/common
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-12-02 15:26:56 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-12-02 15:26:56 +0900
commitbb14895fd8249247be0d89fe053b62be2dfdeabf (patch)
treeaa40b9ad7f54652ae79648e37ecd93c4008f8974 /src/client/app/common
parent:art: (diff)
downloadmisskey-bb14895fd8249247be0d89fe053b62be2dfdeabf.tar.gz
misskey-bb14895fd8249247be0d89fe053b62be2dfdeabf.tar.bz2
misskey-bb14895fd8249247be0d89fe053b62be2dfdeabf.zip
[Client] Resolve #2225
Diffstat (limited to 'src/client/app/common')
-rw-r--r--src/client/app/common/views/components/alert.vue22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/client/app/common/views/components/alert.vue b/src/client/app/common/views/components/alert.vue
index d48defe8a7..abbdb8536e 100644
--- a/src/client/app/common/views/components/alert.vue
+++ b/src/client/app/common/views/components/alert.vue
@@ -2,9 +2,12 @@
<div class="felqjxyj" :class="{ splash }">
<div class="bg" ref="bg" @click="onBgClick"></div>
<div class="main" ref="main">
- <div class="icon" :class="type"><fa :icon="icon"/></div>
+ <div class="icon" v-if="type" :class="type"><fa :icon="icon"/></div>
<header v-if="title" v-html="title"></header>
<div class="body" v-if="text" v-html="text"></div>
+ <ui-select v-if="select" v-model="selectedValue">
+ <option v-for="item in select.items" :value="item.value">{{ item.text }}</option>
+ </ui-select>
<ui-horizon-group no-grow class="buttons fit-bottom" v-if="!splash">
<ui-button @click="ok" primary autofocus>OK</ui-button>
<ui-button @click="cancel" v-if="showCancelButton">Cancel</ui-button>
@@ -33,6 +36,9 @@ export default Vue.extend({
type: String,
required: false
},
+ select: {
+ required: false
+ },
showCancelButton: {
type: Boolean,
default: false
@@ -43,6 +49,12 @@ export default Vue.extend({
}
},
+ data() {
+ return {
+ selectedValue: null
+ };
+ },
+
computed: {
icon(): any {
switch (this.type) {
@@ -83,7 +95,8 @@ export default Vue.extend({
methods: {
ok() {
- this.$emit('ok');
+ const result = this.select ? this.selectedValue : true;
+ this.$emit('ok', result);
this.close();
},
@@ -180,8 +193,11 @@ export default Vue.extend({
display block
margin 0 auto
+ & + header
+ margin-top 16px
+
> header
- margin 16px 0 8px 0
+ margin 0 0 8px 0
font-weight bold
font-size 20px