mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-25 03:56:44 -06:00
✌️
This commit is contained in:
parent
51e71d5870
commit
ca30798910
3 changed files with 20 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue