summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-02-18 22:14:51 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-02-18 22:14:51 +0900
commit43ee5267c2111257889849bcf0ead7fc82a326db (patch)
treeb1de0cb296853dc8432872eb12e8d35cc68744b6 /src
parentwip (diff)
downloadmisskey-43ee5267c2111257889849bcf0ead7fc82a326db.tar.gz
misskey-43ee5267c2111257889849bcf0ead7fc82a326db.tar.bz2
misskey-43ee5267c2111257889849bcf0ead7fc82a326db.zip
wip
Diffstat (limited to 'src')
-rw-r--r--src/web/app/desktop/api/input.ts3
-rw-r--r--src/web/app/desktop/views/components/choose-file-from-drive-window.vue2
-rw-r--r--src/web/app/desktop/views/components/drive-file.vue3
-rw-r--r--src/web/app/desktop/views/components/drive-nav-folder.vue7
-rw-r--r--src/web/app/desktop/views/components/input-dialog.vue16
5 files changed, 19 insertions, 12 deletions
diff --git a/src/web/app/desktop/api/input.ts b/src/web/app/desktop/api/input.ts
index a5ab07138a..ce26a8112f 100644
--- a/src/web/app/desktop/api/input.ts
+++ b/src/web/app/desktop/api/input.ts
@@ -8,7 +8,8 @@ export default function(opts) {
title: o.title,
placeholder: o.placeholder,
default: o.default,
- type: o.type || 'text'
+ type: o.type || 'text',
+ allowEmpty: o.allowEmpty
}
}).$mount();
d.$once('done', text => {
diff --git a/src/web/app/desktop/views/components/choose-file-from-drive-window.vue b/src/web/app/desktop/views/components/choose-file-from-drive-window.vue
index 89058bc3eb..2322827459 100644
--- a/src/web/app/desktop/views/components/choose-file-from-drive-window.vue
+++ b/src/web/app/desktop/views/components/choose-file-from-drive-window.vue
@@ -41,7 +41,7 @@ export default Vue.extend({
this.files = [file];
this.ok();
},
- onChangeselection(files) {
+ onChangeSelection(files) {
this.files = files;
},
upload() {
diff --git a/src/web/app/desktop/views/components/drive-file.vue b/src/web/app/desktop/views/components/drive-file.vue
index 0681b5f036..772b9baf5e 100644
--- a/src/web/app/desktop/views/components/drive-file.vue
+++ b/src/web/app/desktop/views/components/drive-file.vue
@@ -148,7 +148,8 @@ export default Vue.extend({
(this as any).apis.input({
title: '%i18n:desktop.tags.mk-drive-browser-file-contextmenu.rename-file%',
placeholder: '%i18n:desktop.tags.mk-drive-browser-file-contextmenu.input-new-file-name%',
- default: this.file.name
+ default: this.file.name,
+ allowEmpty: false
}).then(name => {
(this as any).api('drive/files/update', {
file_id: this.file.id,
diff --git a/src/web/app/desktop/views/components/drive-nav-folder.vue b/src/web/app/desktop/views/components/drive-nav-folder.vue
index b6eb36535f..44821087af 100644
--- a/src/web/app/desktop/views/components/drive-nav-folder.vue
+++ b/src/web/app/desktop/views/components/drive-nav-folder.vue
@@ -15,13 +15,18 @@
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
- props: ['folder', 'browser'],
+ props: ['folder'],
data() {
return {
hover: false,
draghover: false
};
},
+ computed: {
+ browser(): any {
+ return this.$parent;
+ }
+ },
methods: {
onClick() {
this.browser.move(this.folder);
diff --git a/src/web/app/desktop/views/components/input-dialog.vue b/src/web/app/desktop/views/components/input-dialog.vue
index 99a9df1062..a735ce0f31 100644
--- a/src/web/app/desktop/views/components/input-dialog.vue
+++ b/src/web/app/desktop/views/components/input-dialog.vue
@@ -3,14 +3,13 @@
<span slot="header" :class="$style.header">
%fa:i-cursor%{{ title }}
</span>
- <div slot="content">
- <div :class="$style.body">
- <input ref="text" v-model="text" :type="type" @keydown="onKeydown" :placeholder="placeholder"/>
- </div>
- <div :class="$style.actions">
- <button :class="$style.cancel" @click="cancel">キャンセル</button>
- <button :class="$style.ok" disabled="!allowEmpty && text.length == 0" @click="ok">決定</button>
- </div>
+
+ <div :class="$style.body">
+ <input ref="text" v-model="text" :type="type" @keydown="onKeydown" :placeholder="placeholder"/>
+ </div>
+ <div :class="$style.actions">
+ <button :class="$style.cancel" @click="cancel">キャンセル</button>
+ <button :class="$style.ok" :disabled="!allowEmpty && text.length == 0" @click="ok">決定</button>
</div>
</mk-window>
</template>
@@ -44,6 +43,7 @@ export default Vue.extend({
mounted() {
if (this.default) this.text = this.default;
this.$nextTick(() => {
+ console.log(this);
(this.$refs.text as any).focus();
});
},