Add some reactions

This commit is contained in:
syuilo 2017-05-28 20:12:22 +09:00
parent fae3f87c1b
commit 6db070fd0f
8 changed files with 28 additions and 1 deletions

View file

@ -18,6 +18,9 @@ common:
hmm: "Hmm...?" hmm: "Hmm...?"
surprise: "Wow" surprise: "Wow"
congrats: "Congrats!" congrats: "Congrats!"
angry: "Angry"
confused: "Confused"
pudding: "Pudding"
input-message-here: "Enter message here" input-message-here: "Enter message here"
send: "Send" send: "Send"

View file

@ -18,6 +18,9 @@ common:
hmm: "ふぅ~む" hmm: "ふぅ~む"
surprise: "わお" surprise: "わお"
congrats: "おめでとう" congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
pudding: "Pudding"
input-message-here: "ここにメッセージを入力" input-message-here: "ここにメッセージを入力"
send: "送信" send: "送信"

View file

@ -26,7 +26,10 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
'laugh', 'laugh',
'hmm', 'hmm',
'surprise', 'surprise',
'congrats' 'congrats',
'angry',
'confused',
'pudding'
]).$; ]).$;
if (reactionErr) return rej('invalid reaction param'); if (reactionErr) return rej('invalid reaction param');

View file

@ -5,6 +5,10 @@
<virtual if={ opts.reaction == 'hmm' }><img src="/assets/reactions/hmm.png" alt="%i18n:common.reactions.hmm%"></virtual> <virtual if={ opts.reaction == 'hmm' }><img src="/assets/reactions/hmm.png" alt="%i18n:common.reactions.hmm%"></virtual>
<virtual if={ opts.reaction == 'surprise' }><img src="/assets/reactions/surprise.png" alt="%i18n:common.reactions.surprise%"></virtual> <virtual if={ opts.reaction == 'surprise' }><img src="/assets/reactions/surprise.png" alt="%i18n:common.reactions.surprise%"></virtual>
<virtual if={ opts.reaction == 'congrats' }><img src="/assets/reactions/congrats.png" alt="%i18n:common.reactions.congrats%"></virtual> <virtual if={ opts.reaction == 'congrats' }><img src="/assets/reactions/congrats.png" alt="%i18n:common.reactions.congrats%"></virtual>
<virtual if={ opts.reaction == 'angry' }><img src="/assets/reactions/angry.png" alt="%i18n:common.reactions.angry%"></virtual>
<virtual if={ opts.reaction == 'confused' }><img src="/assets/reactions/confused.png" alt="%i18n:common.reactions.confused%"></virtual>
<virtual if={ opts.reaction == 'pudding' }><img src="/assets/reactions/pudding.png" alt="%i18n:common.reactions.pudding%"></virtual>
<style> <style>
:scope :scope
display inline display inline

View file

@ -9,6 +9,9 @@
<button onclick={ react.bind(null, 'hmm') } onmouseover={ onmouseover } onmouseout={ onmouseout } tabindex="4" title="%i18n:common.reactions.hmm%"><mk-reaction-icon reaction='hmm'></mk-reaction-icon></button> <button onclick={ react.bind(null, 'hmm') } onmouseover={ onmouseover } onmouseout={ onmouseout } tabindex="4" title="%i18n:common.reactions.hmm%"><mk-reaction-icon reaction='hmm'></mk-reaction-icon></button>
<button onclick={ react.bind(null, 'surprise') } onmouseover={ onmouseover } onmouseout={ onmouseout } tabindex="5" title="%i18n:common.reactions.surprise%"><mk-reaction-icon reaction='surprise'></mk-reaction-icon></button> <button onclick={ react.bind(null, 'surprise') } onmouseover={ onmouseover } onmouseout={ onmouseout } tabindex="5" title="%i18n:common.reactions.surprise%"><mk-reaction-icon reaction='surprise'></mk-reaction-icon></button>
<button onclick={ react.bind(null, 'congrats') } onmouseover={ onmouseover } onmouseout={ onmouseout } tabindex="6" title="%i18n:common.reactions.congrats%"><mk-reaction-icon reaction='congrats'></mk-reaction-icon></button> <button onclick={ react.bind(null, 'congrats') } onmouseover={ onmouseover } onmouseout={ onmouseout } tabindex="6" title="%i18n:common.reactions.congrats%"><mk-reaction-icon reaction='congrats'></mk-reaction-icon></button>
<button onclick={ react.bind(null, 'angry') } onmouseover={ onmouseover } onmouseout={ onmouseout } tabindex="4" title="%i18n:common.reactions.angry%"><mk-reaction-icon reaction='angry'></mk-reaction-icon></button>
<button onclick={ react.bind(null, 'confused') } onmouseover={ onmouseover } onmouseout={ onmouseout } tabindex="5" title="%i18n:common.reactions.confused%"><mk-reaction-icon reaction='confused'></mk-reaction-icon></button>
<button onclick={ react.bind(null, 'pudding') } onmouseover={ onmouseover } onmouseout={ onmouseout } tabindex="6" title="%i18n:common.reactions.pudding%"><mk-reaction-icon reaction='pudding'></mk-reaction-icon></button>
</div> </div>
</div> </div>
<style> <style>
@ -76,6 +79,8 @@
> div > div
padding 4px padding 4px
width 240px
text-align center
> button > button
width 40px width 40px

BIN
src/web/assets/reactions/angry.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
src/web/assets/reactions/confused.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
src/web/assets/reactions/pudding.png (Stored with Git LFS) Normal file

Binary file not shown.