summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-06-22 20:35:09 -0400
committerDessalines <tyhou13@gmx.com>2020-06-22 20:35:09 -0400
commite3484de3b898d6d51f22e7456842362501fd1f5b (patch)
tree97c34ef0538141b60ef39a1f38900b670ce3d374
parent132e3534de7cad9e636466a0f66534a1fe3274ef (diff)
parentbca76f1f2f4f45ff46b1289d794d61d7fa977922 (diff)
Merge branch 'master' into iav-arm-musl-dessalines
-rw-r--r--RELEASES.md5
-rw-r--r--ansible/VERSION2
-rw-r--r--docker/prod/docker-compose.yml2
-rw-r--r--server/src/version.rs2
-rw-r--r--ui/src/components/comment-form.tsx6
-rw-r--r--ui/src/components/comment-node.tsx47
-rw-r--r--ui/src/components/community-form.tsx6
-rw-r--r--ui/src/components/inbox.tsx20
-rw-r--r--ui/src/components/post-form.tsx12
-rw-r--r--ui/src/components/private-message-form.tsx8
-rw-r--r--ui/src/components/site-form.tsx8
-rw-r--r--ui/src/version.ts2
12 files changed, 75 insertions, 45 deletions
diff --git a/RELEASES.md b/RELEASES.md
index 25c30861..44de088a 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1,4 +1,4 @@
-# Lemmy v0.7.0 Release (2020-06-2X)
+# Lemmy v0.7.0 Release (2020-06-22)
## Breaking Change to our image server: Pictshare to Pict-rs migration guide
@@ -17,10 +17,11 @@ You'll also have to update your nginx config, use the [one here](https://github.
*You'll have to log in again to pick up your avatar*
-Apart from that, we've closed [~90 issues!](https://github.com/LemmyNet/lemmy/milestone/16?closed=1), including:
+Apart from that, we've closed [~100 issues!](https://github.com/LemmyNet/lemmy/milestone/16?closed=1), including:
- Site-wide list of recent comments.
- Reconnecting websockets.
+- Swapped out pictshare for [pict-rs](https://git.asonix.dog/asonix/pict-rs).
- Lots more themes, including a default light one.
- Expandable embeds for post links (and thumbnails), from iframely.
- Better icons.
diff --git a/ansible/VERSION b/ansible/VERSION
index ed232128..66dedace 100644
--- a/ansible/VERSION
+++ b/ansible/VERSION
@@ -1 +1 @@
-v0.6.79
+v0.6.82
diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml
index 863ff593..bee5d75e 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.79
+ image: dessalines/lemmy:v0.6.82
ports:
- "127.0.0.1:8536:8536"
restart: always
diff --git a/server/src/version.rs b/server/src/version.rs
index a27f3acb..d7d3193d 100644
--- a/server/src/version.rs
+++ b/server/src/version.rs
@@ -1 +1 @@
-pub const VERSION: &str = "v0.6.79";
+pub const VERSION: &str = "v0.6.82";
diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx
index 79aa91bd..24bfb7cb 100644
--- a/ui/src/components/comment-form.tsx
+++ b/ui/src/components/comment-form.tsx
@@ -61,7 +61,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
buttonTitle: !this.props.node
? capitalizeFirstLetter(i18n.t('post'))
: this.props.edit
- ? capitalizeFirstLetter(i18n.t('edit'))
+ ? capitalizeFirstLetter(i18n.t('save'))
: capitalizeFirstLetter(i18n.t('reply')),
previewMode: false,
loading: false,
@@ -138,7 +138,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
/>
{this.state.previewMode && (
<div
- className="md-div"
+ className="card card-body md-div"
dangerouslySetInnerHTML={mdToHtml(
this.state.commentForm.content
)}
@@ -151,7 +151,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
<button
type="submit"
class="btn btn-sm btn-secondary mr-2"
- disabled={this.props.disabled}
+ disabled={this.props.disabled || this.state.loading}
>
{this.state.loading ? (
<svg class="icon icon-spinner spin">
diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx
index 4a063307..4d29fe17 100644
--- a/ui/src/components/comment-node.tsx
+++ b/ui/src/components/comment-node.tsx
@@ -132,7 +132,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
>
<div
id={`comment-${node.comment.id}`}
- className={`details comment-node border-top border-light ${
+ className={`details comment-node border-top border-light py-2 ${
this.isCommentNew ? 'mark' : ''
}`}
style={
@@ -148,7 +148,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
'ml-2'
}`}
>
- <div class="d-flex flex-wrap align-items-center mb-1 mt-1 text-muted small">
+ <div class="d-flex flex-wrap align-items-center text-muted small">
<span class="mr-2">
<UserListing
user={{
@@ -296,25 +296,6 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
)}
<button
class="btn btn-link btn-animate text-muted"
- onClick={linkEvent(this, this.handleSaveCommentClick)}
- data-tippy-content={
- node.comment.saved ? i18n.t('unsave') : i18n.t('save')
- }
- >
- {this.state.saveLoading ? (
- this.loadingIcon
- ) : (
- <svg
- class={`icon icon-inline ${
- node.comment.saved && 'text-warning'
- }`}
- >
- <use xlinkHref="#icon-star"></use>
- </svg>
- )}
- </button>
- <button
- class="btn btn-link btn-animate text-muted"
onClick={linkEvent(this, this.handleReplyClick)}
data-tippy-content={i18n.t('reply')}
>
@@ -349,6 +330,30 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
)}
{!this.props.showContext && this.linkBtn}
<button
+ class="btn btn-link btn-animate text-muted"
+ onClick={linkEvent(
+ this,
+ this.handleSaveCommentClick
+ )}
+ data-tippy-content={
+ node.comment.saved
+ ? i18n.t('unsave')
+ : i18n.t('save')
+ }
+ >
+ {this.state.saveLoading ? (
+ this.loadingIcon
+ ) : (
+ <svg
+ class={`icon icon-inline ${
+ node.comment.saved && 'text-warning'
+ }`}
+ >
+ <use xlinkHref="#icon-star"></use>
+ </svg>
+ )}
+ </button>
+ <button
className="btn btn-link btn-animate text-muted"
onClick={linkEvent(this, this.handleViewSource)}
data-tippy-content={i18n.t('view_source')}
diff --git a/ui/src/components/community-form.tsx b/ui/src/components/community-form.tsx
index eedc2003..90e12738 100644
--- a/ui/src/components/community-form.tsx
+++ b/ui/src/components/community-form.tsx
@@ -207,7 +207,11 @@ export class CommunityForm extends Component<
)}
<div class="form-group row">
<div class="col-12">
- <button type="submit" class="btn btn-secondary mr-2">
+ <button
+ type="submit"
+ class="btn btn-secondary mr-2"
+ disabled={this.state.loading}
+ >
{this.state.loading ? (
<svg class="icon icon-spinner spin">
<use xlinkHref="#icon-spinner"></use>
diff --git a/ui/src/components/inbox.tsx b/ui/src/components/inbox.tsx
index 4fa1498a..edbacd51 100644
--- a/ui/src/components/inbox.tsx
+++ b/ui/src/components/inbox.tsx
@@ -123,7 +123,10 @@ export class Inbox extends Component<any, InboxState> {
this.state.unreadOrAll == UnreadOrAll.Unread && (
<ul class="list-inline mb-1 text-muted small font-weight-bold">
<li className="list-inline-item">
- <span class="pointer" onClick={this.markAllAsRead}>
+ <span
+ class="pointer"
+ onClick={linkEvent(this, this.markAllAsRead)}
+ >
{i18n.t('mark_all_as_read')}
</span>
</li>
@@ -392,8 +395,14 @@ export class Inbox extends Component<any, InboxState> {
this.refetch();
}
- markAllAsRead() {
+ markAllAsRead(i: Inbox) {
WebSocketService.Instance.markAllAsRead();
+ i.state.replies = [];
+ i.state.mentions = [];
+ i.state.messages = [];
+ i.sendUnreadCount();
+ window.scrollTo(0, 0);
+ i.setState(i.state);
}
parseMessage(msg: WebSocketJsonResponse) {
@@ -447,12 +456,7 @@ export class Inbox extends Component<any, InboxState> {
this.setState(this.state);
setupTippy();
} else if (res.op == UserOperation.MarkAllAsRead) {
- this.state.replies = [];
- this.state.mentions = [];
- this.state.messages = [];
- this.sendUnreadCount();
- window.scrollTo(0, 0);
- this.setState(this.state);
+ // Moved to be instant
} else if (res.op == UserOperation.EditComment) {
let data = res.data as CommentResponse;
editCommentRes(data, this.state.replies);
diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx
index d424538b..c507ab3e 100644
--- a/ui/src/components/post-form.tsx
+++ b/ui/src/components/post-form.tsx
@@ -284,7 +284,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
/>
{this.state.previewMode && (
<div
- className="md-div"
+ className="card card-body md-div"
dangerouslySetInnerHTML={mdToHtml(this.state.postForm.body)}
/>
)}
@@ -360,7 +360,9 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
<div class="form-group row">
<div class="col-sm-10">
<button
- disabled={!this.state.postForm.community_id}
+ disabled={
+ !this.state.postForm.community_id || this.state.loading
+ }
type="submit"
class="btn btn-secondary mr-2"
>
@@ -406,6 +408,12 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
handlePostSubmit(i: PostForm, event: any) {
event.preventDefault();
+
+ // Coerce empty url string to undefined
+ if (i.state.postForm.url && i.state.postForm.url === '') {
+ i.state.postForm.url = undefined;
+ }
+
if (i.props.post) {
WebSocketService.Instance.editPost(i.state.postForm);
} else {
diff --git a/ui/src/components/private-message-form.tsx b/ui/src/components/private-message-form.tsx
index 7667f5a1..496f3ae5 100644
--- a/ui/src/components/private-message-form.tsx
+++ b/ui/src/components/private-message-form.tsx
@@ -154,7 +154,7 @@ export class PrivateMessageForm extends Component<
/>
{this.state.previewMode && (
<div
- className="md-div"
+ className="card card-body md-div"
dangerouslySetInnerHTML={mdToHtml(
this.state.privateMessageForm.content
)}
@@ -183,7 +183,11 @@ export class PrivateMessageForm extends Component<
)}
<div class="form-group row">
<div class="offset-sm-2 col-sm-10">
- <button type="submit" class="btn btn-secondary mr-2">
+ <button
+ type="submit"
+ class="btn btn-secondary mr-2"
+ disabled={this.state.loading}
+ >
{this.state.loading ? (
<svg class="icon icon-spinner spin">
<use xlinkHref="#icon-spinner"></use>
diff --git a/ui/src/components/site-form.tsx b/ui/src/components/site-form.tsx
index f0c80585..a51286c8 100644
--- a/ui/src/components/site-form.tsx
+++ b/ui/src/components/site-form.tsx
@@ -78,7 +78,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
<form onSubmit={linkEvent(this, this.handleCreateSiteSubmit)}>
<h5>{`${
this.props.site
- ? capitalizeFirstLetter(i18n.t('edit'))
+ ? capitalizeFirstLetter(i18n.t('save'))
: capitalizeFirstLetter(i18n.t('name'))
} ${i18n.t('your_site')}`}</h5>
<div class="form-group row">
@@ -175,7 +175,11 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div>
<div class="form-group row">
<div class="col-12">
- <button type="submit" class="btn btn-secondary mr-2">
+ <button
+ type="submit"
+ class="btn btn-secondary mr-2"
+ disabled={this.state.loading}
+ >
{this.state.loading ? (
<svg class="icon icon-spinner spin">
<use xlinkHref="#icon-spinner"></use>
diff --git a/ui/src/version.ts b/ui/src/version.ts
index 50df125c..ed281fde 100644
--- a/ui/src/version.ts
+++ b/ui/src/version.ts
@@ -1 +1 @@
-export const version: string = 'v0.6.79';
+export const version: string = 'v0.6.82';