]> Untitled Git - lemmy.git/commitdiff
Merge branch 'master' into iav-arm-musl-dessalines
authorDessalines <tyhou13@gmx.com>
Tue, 23 Jun 2020 00:35:09 +0000 (20:35 -0400)
committerDessalines <tyhou13@gmx.com>
Tue, 23 Jun 2020 00:35:09 +0000 (20:35 -0400)
12 files changed:
RELEASES.md
ansible/VERSION
docker/prod/docker-compose.yml
server/src/version.rs
ui/src/components/comment-form.tsx
ui/src/components/comment-node.tsx
ui/src/components/community-form.tsx
ui/src/components/inbox.tsx
ui/src/components/post-form.tsx
ui/src/components/private-message-form.tsx
ui/src/components/site-form.tsx
ui/src/version.ts

index 25c30861a7dfd9dd010b03348bae22ef88218a4e..44de088aa56eb064e210817430106a22b4feb4e0 100644 (file)
@@ -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.
index ed2321280fe8d9a027d1bee9c12d7536274e7805..66dedacebdf246f26d08265cbdcef1c7baae69a5 100644 (file)
@@ -1 +1 @@
-v0.6.79
+v0.6.82
index 863ff593b544106130515acaeb3080fc4091fbc4..bee5d75e3ccb76f0fd9d3f29e315af31511ca9bc 100644 (file)
@@ -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
index a27f3acb9f0ec2663dad6dccd9b8f4e829b04c78..d7d3193d6d9c12b3e4f98accfa0ac45f7c7cc9dc 100644 (file)
@@ -1 +1 @@
-pub const VERSION: &str = "v0.6.79";
+pub const VERSION: &str = "v0.6.82";
index 79aa91bdd061720a2095da203e6dd2ce8a6e8788..24bfb7cbb775caa6cc9a5e14dfa44ff44fe7a1cd 100644 (file)
@@ -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">
index 4a063307c1a570d606ef1b491a77dbd2234d0423..4d29fe173208a4753c7e91279836c91f5a5070c4 100644 (file)
@@ -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={{
@@ -294,25 +294,6 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                           )}
                         </button>
                       )}
-                      <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)}
@@ -348,6 +329,30 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                             </button>
                           )}
                           {!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)}
index eedc2003808533a8af6727a8795a2fa3ff6b0226..90e127383aee6c59deaaef1985db1413d7a5fa3c 100644 (file)
@@ -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>
index 4fa1498ac4eede6f685cbad554fbf295120c1cd6..edbacd518c5ffff473d86a30ae470f48f0eda9dd 100644 (file)
@@ -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);
index d424538bdf7e451a98af85b4b1d35c2ef395895f..c507ab3e700378c83bfb82916276c61aa032ae03 100644 (file)
@@ -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 {
index 7667f5a11f46b7f00aa59728913eb60512f79170..496f3ae5755b491b90e99c244ee3db70fc57f09b 100644 (file)
@@ -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>
index f0c80585e5dea23c8c791b1108fff636043ba12a..a51286c81cd54972fda3a0bd12b156ad0060a020 100644 (file)
@@ -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>
index 50df125c533f6f8d138d0816f5f64a5cf6b4eb37..ed281fdebc3ebedb3dc8c54c47c44741bb93ae75 100644 (file)
@@ -1 +1 @@
-export const version: string = 'v0.6.79';
+export const version: string = 'v0.6.82';