summaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-05 14:09:12 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-05 14:09:12 +0900
commitca30798910958f71517d12bd4816542830813e1f (patch)
tree5044bb0bbe0b071c50fd212fec9ce46b9528774e /src/web
parentv3980 (diff)
downloadmisskey-ca30798910958f71517d12bd4816542830813e1f.tar.gz
misskey-ca30798910958f71517d12bd4816542830813e1f.tar.bz2
misskey-ca30798910958f71517d12bd4816542830813e1f.zip
:v:
Diffstat (limited to 'src/web')
-rw-r--r--src/web/app/desktop/views/components/post-form-window.vue6
-rw-r--r--src/web/app/desktop/views/components/post-form.vue6
-rw-r--r--src/web/app/mobile/views/components/post-form.vue12
3 files changed, 20 insertions, 4 deletions
diff --git a/src/web/app/desktop/views/components/post-form-window.vue b/src/web/app/desktop/views/components/post-form-window.vue
index 31a07a890e..d0b115e852 100644
--- a/src/web/app/desktop/views/components/post-form-window.vue
+++ b/src/web/app/desktop/views/components/post-form-window.vue
@@ -14,7 +14,8 @@
@posted="onPosted"
@change-uploadings="onChangeUploadings"
@change-attached-media="onChangeMedia"
- @geo-attached="onGeoAttached"/>
+ @geo-attached="onGeoAttached"
+ @geo-dettached="onGeoDettached"/>
</mk-window>
</template>
@@ -45,6 +46,9 @@ export default Vue.extend({
onGeoAttached(geo) {
this.geo = geo;
},
+ onGeoDettached() {
+ this.geo = null;
+ },
onPosted() {
(this.$refs.window as any).close();
}
diff --git a/src/web/app/desktop/views/components/post-form.vue b/src/web/app/desktop/views/components/post-form.vue
index 22ed52b399..42d11709f9 100644
--- a/src/web/app/desktop/views/components/post-form.vue
+++ b/src/web/app/desktop/views/components/post-form.vue
@@ -27,7 +27,7 @@
<button class="drive" title="%i18n:desktop.tags.mk-post-form.attach-media-from-drive%" @click="chooseFileFromDrive">%fa:cloud%</button>
<button class="kao" title="%i18n:desktop.tags.mk-post-form.insert-a-kao%" @click="kao">%fa:R smile%</button>
<button class="poll" title="%i18n:desktop.tags.mk-post-form.create-poll%" @click="poll = true">%fa:chart-pie%</button>
- <button class="geo" title="位置情報を添付する" @click="setGeo">%fa:map-marker-alt%</button>
+ <button class="geo" title="位置情報を添付する" @click="geo ? removeGeo : setGeo">%fa:map-marker-alt%</button>
<p class="text-count" :class="{ over: text.length > 1000 }">{{ '%i18n:desktop.tags.mk-post-form.text-remain%'.replace('{}', 1000 - text.length) }}</p>
<button :class="{ posting }" class="submit" :disabled="!canPost" @click="post">
{{ posting ? '%i18n:desktop.tags.mk-post-form.posting%' : submitText }}<mk-ellipsis v-if="posting"/>
@@ -210,6 +210,10 @@ export default Vue.extend({
enableHighAccuracy: true
});
},
+ removeGeo() {
+ this.geo = null;
+ this.$emit('geo-dettached');
+ },
post() {
this.posting = true;
diff --git a/src/web/app/mobile/views/components/post-form.vue b/src/web/app/mobile/views/components/post-form.vue
index 35e581f317..9af7b7267e 100644
--- a/src/web/app/mobile/views/components/post-form.vue
+++ b/src/web/app/mobile/views/components/post-form.vue
@@ -4,6 +4,7 @@
<button class="cancel" @click="cancel">%fa:times%</button>
<div>
<span class="text-count" :class="{ over: text.length > 1000 }">{{ 1000 - text.length }}</span>
+ <span class="geo" v-if="geo">%fa:map-marker-alt%</span>
<button class="submit" :disabled="posting" @click="post">{{ reply ? '返信' : '%i18n:mobile.tags.mk-post-form.submit%' }}</button>
</div>
</header>
@@ -23,7 +24,7 @@
<button class="drive" @click="chooseFileFromDrive">%fa:cloud%</button>
<button class="kao" @click="kao">%fa:R smile%</button>
<button class="poll" @click="poll = true">%fa:chart-pie%</button>
- <button class="geo" @click="setGeo">%fa:map-marker-alt%</button>
+ <button class="geo" @click="geo ? removeGeo : setGeo">%fa:map-marker-alt%</button>
<input ref="file" class="file" type="file" accept="image/*" multiple="multiple" @change="onChangeFile"/>
</div>
</div>
@@ -99,6 +100,9 @@ export default Vue.extend({
enableHighAccuracy: true
});
},
+ removeGeo() {
+ this.geo = null;
+ },
clear() {
this.text = '';
this.files = [];
@@ -172,10 +176,14 @@ export default Vue.extend({
position absolute
top 0
right 0
+ color #657786
> .text-count
line-height 50px
- color #657786
+
+ > .geo
+ margin 0 8px
+ line-height 50px
> .submit
margin 8px