[Client] ✌️

This commit is contained in:
syuilo 2017-06-13 06:27:32 +09:00
parent 8008ad1720
commit 7ff0a5360c
6 changed files with 17 additions and 13 deletions

View File

@ -221,7 +221,7 @@ desktop:
attach-media-from-local: "Attach media from your pc"
attach-media-from-drive: "Attach media from the drive"
attach-cancel: "Cancel attachment"
insert-the-cat: "Insert a cat"
insert-a-kao: "v(‘ω’)v"
create-poll: "Create a poll"
text-remain: "{} chars remaining"

View File

@ -221,7 +221,7 @@ desktop:
attach-media-from-local: "PCからメディアを添付"
attach-media-from-drive: "ドライブからメディアを添付"
attach-cancel: "添付取り消し"
insert-the-cat: "猫挿入"
insert-a-kao: "v(‘ω’)v"
create-poll: "投票を作成"
text-remain: "のこり{}文字"

View File

@ -0,0 +1,5 @@
export default () => [
'(=^・・^=)',
'v(‘ω’)v',
'🐡( '-' 🐡 )フグパンチ!!!!'
][Math.floor(Math.random() * 3)];

View File

@ -1 +0,0 @@
export default () => '(=^・・^=)';

View File

@ -16,7 +16,7 @@
<mk-uploader ref="uploader"/>
<button ref="upload" title="%i18n:desktop.tags.mk-post-form.attach-media-from-local%" onclick={ selectFile }><i class="fa fa-upload"></i></button>
<button ref="drive" title="%i18n:desktop.tags.mk-post-form.attach-media-from-drive%" onclick={ selectFileFromDrive }><i class="fa fa-cloud"></i></button>
<button class="cat" title="%i18n:desktop.tags.mk-post-form.insert-the-cat%" onclick={ cat }><i class="fa fa-smile-o"></i></button>
<button class="kao" title="%i18n:desktop.tags.mk-post-form.insert-a-kao%" onclick={ kao }><i class="fa fa-smile-o"></i></button>
<button class="poll" title="%i18n:desktop.tags.mk-post-form.create-poll%" onclick={ addPoll }><i class="fa fa-pie-chart"></i></button>
<p class="text-count { over: refs.text.value.length > 1000 }">{ '%i18n:desktop.tags.mk-post-form.text-remain%'.replace('{}', 1000 - refs.text.value.length) }</p>
<button class={ wait: wait } ref="submit" disabled={ wait || (refs.text.value.length == 0 && files.length == 0 && !poll && !repost) } onclick={ post }>
@ -258,7 +258,7 @@
[ref='upload']
[ref='drive']
.cat
.kao
.poll
display inline-block
cursor pointer
@ -306,7 +306,7 @@
</style>
<script>
import getCat from '../../common/scripts/get-cat';
import getKao from '../../common/scripts/get-kao';
import notify from '../scripts/notify';
import Autocomplete from '../scripts/autocomplete';
@ -500,8 +500,8 @@
});
};
this.cat = () => {
this.refs.text.value += getCat();
this.kao = () => {
this.refs.text.value += getKao();
};
this.on('update', () => {

View File

@ -23,7 +23,7 @@
<mk-uploader ref="uploader"/>
<button ref="upload" onclick={ selectFile }><i class="fa fa-upload"></i></button>
<button ref="drive" onclick={ selectFileFromDrive }><i class="fa fa-cloud"></i></button>
<button class="cat" onclick={ cat }><i class="fa fa-smile-o"></i></button>
<button class="kao" onclick={ kao }><i class="fa fa-smile-o"></i></button>
<button class="poll" onclick={ addPoll }><i class="fa fa-pie-chart"></i></button>
<input ref="file" type="file" accept="image/*" multiple="multiple" onchange={ changeFile }/>
</div>
@ -165,7 +165,7 @@
> [ref='upload']
> [ref='drive']
.cat
.kao
.poll
display inline-block
padding 0
@ -182,7 +182,7 @@
</style>
<script>
import getCat from '../../common/scripts/get-cat';
import getKao from '../../common/scripts/get-kao';
this.mixin('api');
@ -285,8 +285,8 @@
this.unmount();
};
this.cat = () => {
this.refs.text.value += getCat();
this.kao = () => {
this.refs.text.value += getKao();
};
</script>
</mk-post-form>