@@ -377,6 +382,19 @@ export default Vue.extend({
this.visibleUsers = erase(user, this.visibleUsers);
},
+ async emoji() {
+ const Picker = await import('./emoji-picker-dialog.vue').then(m => m.default);
+ const button = this.$refs.emoji;
+ const rect = button.getBoundingClientRect();
+ const vm = this.$root.new(Picker, {
+ x: button.offsetWidth + rect.left + window.pageXOffset,
+ y: rect.top + window.pageYOffset
+ });
+ vm.$once('chosen', emoji => {
+ insertTextAtCursor(this.$refs.text, emoji);
+ });
+ },
+
post() {
this.posting = true;
@@ -469,7 +487,7 @@ export default Vue.extend({
> .content
> input
- > textarea
+ > .textarea > textarea
display block
width 100%
padding 12px
@@ -498,27 +516,48 @@ export default Vue.extend({
> input
margin-bottom 8px
- > textarea
- margin 0
- max-width 100%
- min-width 100%
- min-height 84px
+ > .textarea
+ > .emoji
+ position absolute
+ top 0
+ right 0
+ padding 10px
+ font-size 18px
+ color var(--text)
+ opacity 0.5
- &:hover
- & + *
- & + * + *
- border-color var(--primaryAlpha02)
- transition border-color .1s ease
+ &:hover
+ color var(--textHighlighted)
+ opacity 1
- &:focus
- & + *
- & + * + *
- border-color var(--primaryAlpha05)
- transition border-color 0s ease
+ &:active
+ color var(--primary)
+ opacity 1
- &.with
- border-bottom solid 1px var(--primaryAlpha01) !important
- border-radius 4px 4px 0 0
+ > textarea
+ margin 0
+ max-width 100%
+ min-width 100%
+ min-height 84px
+
+ &:hover
+ & + *
+ & + * + *
+ border-color var(--primaryAlpha02)
+ transition border-color .1s ease
+
+ &:focus
+ & + *
+ & + * + *
+ border-color var(--primaryAlpha05)
+ transition border-color 0s ease
+
+ & + .emoji
+ opacity 0.7
+
+ &.with
+ border-bottom solid 1px var(--primaryAlpha01) !important
+ border-radius 4px 4px 0 0
> .visibleUsers
margin-bottom 8px
diff --git a/src/client/theme/dark.json5 b/src/client/theme/dark.json5
index 150b6f599..446eac557 100644
--- a/src/client/theme/dark.json5
+++ b/src/client/theme/dark.json5
@@ -18,6 +18,7 @@
secondary: '$secondary',
bg: ':darken<8<$secondary',
text: '$text',
+ textHighlighted: ':lighten<7<$text',
scrollbarTrack: ':darken<5<$secondary',
scrollbarHandle: ':lighten<5<$secondary',
diff --git a/src/client/theme/light.json5 b/src/client/theme/light.json5
index 28b9ba783..4a182c242 100644
--- a/src/client/theme/light.json5
+++ b/src/client/theme/light.json5
@@ -18,6 +18,7 @@
secondary: '$secondary',
bg: ':darken<8<$secondary',
text: '$text',
+ textHighlighted: ':darken<7<$text',
scrollbarTrack: '#fff',
scrollbarHandle: '#00000033',