From ac94cf91df8142a4d927f19a944393bf243863e0 Mon Sep 17 00:00:00 2001 From: syuilo <syuilotan@yahoo.co.jp> Date: Tue, 13 Jun 2017 06:27:32 +0900 Subject: [PATCH] [Client] :v: --- locales/en.yml | 2 +- locales/ja.yml | 2 +- src/web/app/common/scripts/get-cao.js | 5 +++++ src/web/app/common/scripts/get-cat.js | 1 - src/web/app/desktop/tags/post-form.tag | 10 +++++----- src/web/app/mobile/tags/post-form.tag | 10 +++++----- 6 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 src/web/app/common/scripts/get-cao.js delete mode 100644 src/web/app/common/scripts/get-cat.js diff --git a/locales/en.yml b/locales/en.yml index b4c94ad470..a01392809e 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -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" diff --git a/locales/ja.yml b/locales/ja.yml index db247f8e54..d55e690e91 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -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: "のこり{}文字" diff --git a/src/web/app/common/scripts/get-cao.js b/src/web/app/common/scripts/get-cao.js new file mode 100644 index 0000000000..0b77ee285a --- /dev/null +++ b/src/web/app/common/scripts/get-cao.js @@ -0,0 +1,5 @@ +export default () => [ + '(=^・・^=)', + 'v(‘ω’)v', + '🐡( '-' 🐡 )フグパンチ!!!!' +][Math.floor(Math.random() * 3)]; diff --git a/src/web/app/common/scripts/get-cat.js b/src/web/app/common/scripts/get-cat.js deleted file mode 100644 index cad42c88c8..0000000000 --- a/src/web/app/common/scripts/get-cat.js +++ /dev/null @@ -1 +0,0 @@ -export default () => '(=^・・^=)'; diff --git a/src/web/app/desktop/tags/post-form.tag b/src/web/app/desktop/tags/post-form.tag index 024cd095e5..6a363d67cd 100644 --- a/src/web/app/desktop/tags/post-form.tag +++ b/src/web/app/desktop/tags/post-form.tag @@ -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', () => { diff --git a/src/web/app/mobile/tags/post-form.tag b/src/web/app/mobile/tags/post-form.tag index 239473703b..28c7796840 100644 --- a/src/web/app/mobile/tags/post-form.tag +++ b/src/web/app/mobile/tags/post-form.tag @@ -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>