diff --git a/.dockerignore b/.dockerignore index d7177be49..a29cd2ec2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,5 +2,5 @@ ui/node_modules ui/dist server/target docker/dev/volumes -docker/federation-test/volumes +docker/federation/volumes .git diff --git a/README.md b/README.md index d576e5be7..723d535ff 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,9 @@ Each lemmy server can set its own moderation policy; appointing site-wide admins Lemmy is free, open-source software, meaning no advertising, monetizing, or venture capital, ever. Your donations directly support full-time development of the project. -- [Support on Liberapay.](https://liberapay.com/Lemmy) +- [Support on Liberapay](https://liberapay.com/Lemmy). - [Support on Patreon](https://www.patreon.com/dessalines). +- [Support on OpenCollective](https://opencollective.com/lemmy). - [List of Sponsors](https://dev.lemmy.ml/sponsors). ### Crypto diff --git a/ansible/VERSION b/ansible/VERSION index 48861fee4..25690dbe8 100644 --- a/ansible/VERSION +++ b/ansible/VERSION @@ -1 +1 @@ -v0.6.45 +v0.6.49 diff --git a/docker/dev/dev_deploy.sh b/docker/dev/dev_deploy.sh deleted file mode 100755 index ef41434b3..000000000 --- a/docker/dev/dev_deploy.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# Building from the dev branch for dev servers -git checkout dev - -# Rebuilding dev docker -docker-compose build -docker tag dev_lemmy:latest dessalines/lemmy:dev -docker push dessalines/lemmy:dev - -# SSH and pull it -ssh $LEMMY_USER@$LEMMY_HOST "cd ~/git/lemmy/docker/dev && docker pull dessalines/lemmy:dev && docker-compose up -d" diff --git a/docker/dev/test_deploy.sh b/docker/dev/test_deploy.sh new file mode 100755 index 000000000..1ae91f654 --- /dev/null +++ b/docker/dev/test_deploy.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Rebuilding dev docker +docker-compose build +docker tag dev_lemmy:latest dessalines/lemmy:test +docker push dessalines/lemmy:test + +# Run the playbook +pushd ../../../lemmy-ansible +ansible-playbook -i test playbooks/site.yml --vault-password-file vault_pass +popd diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index a1b361622..905514653 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -12,7 +12,7 @@ services: restart: always lemmy: - image: dessalines/lemmy:v0.6.45 + image: dessalines/lemmy:v0.6.49 ports: - "127.0.0.1:8536:8536" restart: always diff --git a/server/src/version.rs b/server/src/version.rs index c2717a78e..f02e9ae5f 100644 --- a/server/src/version.rs +++ b/server/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "v0.6.45"; +pub const VERSION: &str = "v0.6.49"; diff --git a/ui/assets/css/main.css b/ui/assets/css/main.css index 1c8206e35..bf249e5bf 100644 --- a/ui/assets/css/main.css +++ b/ui/assets/css/main.css @@ -156,7 +156,7 @@ hr { } .emoji { - height: 1.2em !important; + max-height: 1.2em !important; } .text-wrap-truncate { diff --git a/ui/package.json b/ui/package.json index 7d946614c..25ee2e00d 100644 --- a/ui/package.json +++ b/ui/package.json @@ -14,6 +14,7 @@ }, "keywords": [], "dependencies": { + "@joeattardi/emoji-button": "^2.12.1", "@types/autosize": "^3.0.6", "@types/js-cookie": "^2.2.5", "@types/jwt-decode": "^2.2.1", diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx index ae3e7cfc3..5239eb2c7 100644 --- a/ui/src/components/comment-form.tsx +++ b/ui/src/components/comment-form.tsx @@ -17,10 +17,12 @@ import { toast, setupTribute, wsJsonToRes, + emojiPicker, } from '../utils'; import { WebSocketService, UserService } from '../services'; import autosize from 'autosize'; import Tribute from 'tributejs/src/Tribute.js'; +import emojiShortName from 'emoji-short-name'; import { i18n } from '../i18next'; interface CommentFormProps { @@ -69,6 +71,8 @@ export class CommentForm extends Component { super(props, context); this.tribute = setupTribute(); + this.setupEmojiPicker(); + this.state = this.emptyState; if (this.props.node) { @@ -209,6 +213,15 @@ export class CommentForm extends Component { )} + + + + + @@ -216,6 +229,20 @@ export class CommentForm extends Component { ); } + setupEmojiPicker() { + emojiPicker.on('emoji', twemojiHtmlStr => { + if (this.state.commentForm.content == null) { + this.state.commentForm.content = ''; + } + var el = document.createElement('div'); + el.innerHTML = twemojiHtmlStr; + let nativeUnicode = (el.childNodes[0] as HTMLElement).getAttribute('alt'); + let shortName = `:${emojiShortName[nativeUnicode]}:`; + this.state.commentForm.content += shortName; + this.setState(this.state); + }); + } + handleFinished() { this.state.previewMode = false; this.state.loading = false; @@ -242,6 +269,10 @@ export class CommentForm extends Component { i.setState(i.state); } + handleEmojiPickerClick(_i: CommentForm, event: any) { + emojiPicker.togglePicker(event.target); + } + handleCommentContentChange(i: CommentForm, event: any) { i.state.commentForm.content = event.target.value; i.setState(i.state); diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index 47920b9b4..912d8e589 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -34,9 +34,11 @@ import { randomStr, setupTribute, setupTippy, + emojiPicker, } from '../utils'; import autosize from 'autosize'; import Tribute from 'tributejs/src/Tribute.js'; +import emojiShortName from 'emoji-short-name'; import Selectr from 'mobius1-selectr'; import { i18n } from '../i18next'; @@ -92,6 +94,8 @@ export class PostForm extends Component { this.fetchPageTitle = debounce(this.fetchPageTitle).bind(this); this.tribute = setupTribute(); + this.setupEmojiPicker(); + this.state = this.emptyState; if (this.props.post) { @@ -191,7 +195,7 @@ export class PostForm extends Component {