diff --git a/ansible/VERSION b/ansible/VERSION index d02286842..cd1e6d9f2 100644 --- a/ansible/VERSION +++ b/ansible/VERSION @@ -1 +1 @@ -v0.7.35 +v0.7.39 diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index eaaa6b79e..4f66292c3 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -60,6 +60,9 @@ server { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # Cuts off the trailing slash on URLs to make them valid + rewrite ^(.+)/+$ $1 permanent; + # WebSocket support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; diff --git a/docker/federation/nginx.conf b/docker/federation/nginx.conf index 2093297eb..573067981 100644 --- a/docker/federation/nginx.conf +++ b/docker/federation/nginx.conf @@ -17,6 +17,9 @@ http { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # Cuts off the trailing slash on URLs to make them valid + rewrite ^(.+)/+$ $1 permanent; + # WebSocket support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -57,6 +60,9 @@ http { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # Cuts off the trailing slash on URLs to make them valid + rewrite ^(.+)/+$ $1 permanent; + # WebSocket support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -97,6 +103,9 @@ http { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # Cuts off the trailing slash on URLs to make them valid + rewrite ^(.+)/+$ $1 permanent; + # WebSocket support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index 334d76f95..2cd8007d6 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.7.35 + image: dessalines/lemmy:v0.7.39 ports: - "127.0.0.1:8536:8536" restart: always diff --git a/docker/travis/docker_push.sh b/docker/travis/docker_push.sh index 71999bfe1..d75fd1dc7 100644 --- a/docker/travis/docker_push.sh +++ b/docker/travis/docker_push.sh @@ -1,5 +1,5 @@ #!/bin/sh echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker tag dessalines/lemmy:travis \ - dessalines/lemmy:v0.7.35 -docker push dessalines/lemmy:v0.7.35 + dessalines/lemmy:v0.7.39 +docker push dessalines/lemmy:v0.7.39 diff --git a/docs/src/contributing_local_development.md b/docs/src/contributing_local_development.md index 9bdeff9ad..b95c308da 100644 --- a/docs/src/contributing_local_development.md +++ b/docs/src/contributing_local_development.md @@ -1,7 +1,7 @@ ### Install build requirements #### Ubuntu ``` -sudo apt install git cargo libssl-dev pkg-config libpq-dev yarn curl gnupg2 +sudo apt install git cargo libssl-dev pkg-config libpq-dev yarn curl gnupg2 espeak # install yarn curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list diff --git a/server/src/version.rs b/server/src/version.rs index 6b06cf4eb..af98df213 100644 --- a/server/src/version.rs +++ b/server/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "v0.7.35"; +pub const VERSION: &str = "v0.7.39"; diff --git a/ui/assets/css/main.css b/ui/assets/css/main.css index e6e6bed27..d7e730d37 100644 --- a/ui/assets/css/main.css +++ b/ui/assets/css/main.css @@ -87,6 +87,10 @@ line-height: 1.0; } +.post-title a:visited { + color: var(--gray) !important; +} + .icon { display: inline-flex; width: 1em; diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx index 01222b27c..5597f58ee 100644 --- a/ui/src/components/comment-form.tsx +++ b/ui/src/components/comment-form.tsx @@ -144,6 +144,9 @@ export class CommentForm extends Component { // This only finishes this form, if the randomly generated form_id matches the one received if (this.state.commentForm.form_id == data.form_id) { this.setState({ finished: true }); + + // Necessary because it broke tribute for some reaso + this.setState({ finished: false }); } } } diff --git a/ui/src/components/inbox.tsx b/ui/src/components/inbox.tsx index eff7efcf1..ecc9223c3 100644 --- a/ui/src/components/inbox.tsx +++ b/ui/src/components/inbox.tsx @@ -275,21 +275,21 @@ export class Inbox extends Component { ); } + combined(): Array { + return [ + ...this.state.replies, + ...this.state.mentions, + ...this.state.messages, + ].sort((a, b) => b.published.localeCompare(a.published)); + } + all() { - let combined: Array = []; - - combined.push(...this.state.replies); - combined.push(...this.state.mentions); - combined.push(...this.state.messages); - - // Sort it - combined.sort((a, b) => b.published.localeCompare(a.published)); - return (
- {combined.map(i => + {this.combined().map(i => isCommentType(i) ? ( { enableDownvotes={this.state.site.enable_downvotes} /> ) : ( - + ) )}
@@ -325,6 +325,7 @@ export class Inbox extends Component {
{this.state.mentions.map(mention => ( { return (
{this.state.messages.map(message => ( - + ))}
); @@ -565,7 +566,6 @@ export class Inbox extends Component { } else if (data.comment.creator_id == UserService.Instance.user.id) { toast(i18n.t('reply_sent')); } - this.setState(this.state); } else if (res.op == UserOperation.CreatePrivateMessage) { let data = res.data as PrivateMessageResponse; if (data.message.recipient_id == UserService.Instance.user.id) { @@ -597,7 +597,10 @@ export class Inbox extends Component { this.state.replies.filter(r => !r.read).length + this.state.mentions.filter(r => !r.read).length + this.state.messages.filter( - r => !r.read && r.creator_id !== UserService.Instance.user.id + r => + UserService.Instance.user && + !r.read && + r.creator_id !== UserService.Instance.user.id ).length ); } diff --git a/ui/src/components/markdown-textarea.tsx b/ui/src/components/markdown-textarea.tsx index 002d7c86b..0a7f904aa 100644 --- a/ui/src/components/markdown-textarea.tsx +++ b/ui/src/components/markdown-textarea.tsx @@ -25,6 +25,7 @@ interface MarkdownTextAreaProps { onSubmit?(msg: { val: string; formId: string }): any; onContentChange?(val: string): any; onReplyCancel?(): any; + hideNavigationWarnings?: boolean; } interface MarkdownTextAreaState { @@ -78,7 +79,7 @@ export class MarkdownTextArea extends Component< } componentDidUpdate() { - if (this.state.content) { + if (!this.props.hideNavigationWarnings && this.state.content) { window.onbeforeunload = () => true; } else { window.onbeforeunload = undefined; @@ -110,7 +111,10 @@ export class MarkdownTextArea extends Component< render() { return (
- +