]> Untitled Git - lemmy.git/commitdiff
Some UI fixes.
authorDessalines <tyhou13@gmx.com>
Sat, 8 Aug 2020 03:17:37 +0000 (23:17 -0400)
committerDessalines <tyhou13@gmx.com>
Sat, 8 Aug 2020 03:17:37 +0000 (23:17 -0400)
ansible/VERSION
docker/prod/docker-compose.yml
docker/travis/docker_push.sh
server/src/version.rs
ui/assets/css/main.css
ui/src/components/navbar.tsx
ui/src/components/post-listing.tsx
ui/src/utils.ts

index 287008c5a19384c6313fc87acb74ba6f5a595aeb..4b374c6c1497afd256095d822dc95cdbfba7965b 100644 (file)
@@ -1 +1 @@
-v0.7.43
+v0.7.45
index 2b5215e90eeaa3e4ef21577f63ba40ef3161f121..d93845addea44b6ab8a9a195ee25f19480b35875 100644 (file)
@@ -12,7 +12,7 @@ services:
     restart: always
 
   lemmy:
-    image: dessalines/lemmy:v0.7.43
+    image: dessalines/lemmy:v0.7.45
     ports:
       - "127.0.0.1:8536:8536"
     restart: always
index 867f49131b7d6095f778917125afa51339aad4df..eb2c959df68cee618e3f401ada00256ca4701d67 100644 (file)
@@ -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.43
-docker push dessalines/lemmy:v0.7.43
+  dessalines/lemmy:v0.7.45
+docker push dessalines/lemmy:v0.7.45
index 02045fb5cc75802f322c4f02c8d614edc34d8ae7..1aa5bc41f6bab949718af05e3250e88a8fae26ea 100644 (file)
@@ -1 +1 @@
-pub const VERSION: &str = "v0.7.43";
+pub const VERSION: &str = "v0.7.45";
index 2fed68a39e8eab9c99c8e91676e6ea2a5eb3929a..5367c62226c2a40d0371279dea0f9ba0a7442312 100644 (file)
   margin-top: -10px;
 }
 
+.custom-select {
+  -moz-appearance: none;
+}
+
 .md-div p {
   overflow: hidden;
   text-overflow: ellipsis;
index 5d1deb9fe45867251a5a1f22baf85cc053c97fba..676ab8d4f4050cd6041ef833bbff4081134738aa 100644 (file)
@@ -369,7 +369,7 @@ export class Navbar extends Component<any, NavbarState> {
                 </>
               ) : (
                 <ul class="navbar-nav my-2">
-                  <li className="nav-item">
+                  <li className="ml-2 nav-item">
                     <Link
                       class="btn btn-success"
                       to="/login"
index c338a6182edbe37ab9d3de6f064a004be9c81640..5e5d0a16faabc6aea627943b80b1fd9031fd7f85 100644 (file)
@@ -515,9 +515,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
         </li>
         {(showVotes || this.state.upvotes !== this.state.score) && (
           <>
-            <li className="list-inline-item">•</li>
             <span
-              class="unselectable pointer mr-2"
+              class="unselectable pointer ml-3"
               data-tippy-content={this.pointsTippy}
             >
               <li className="list-inline-item">
@@ -527,8 +526,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                   }`}
                   onClick={linkEvent(this, this.handlePostLike)}
                 >
-                  <svg class="small icon icon-inline mr-1">
-                    <use xlinkHref="#icon-arrow-up"></use>
+                  <svg class="small icon icon-inline mx-1">
+                    <use xlinkHref="#icon-arrow-up1"></use>
                   </svg>
                   {this.state.upvotes}
                 </a>
@@ -540,8 +539,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                   }`}
                   onClick={linkEvent(this, this.handlePostDisLike)}
                 >
-                  <svg class="small icon icon-inline mr-1">
-                    <use xlinkHref="#icon-arrow-down"></use>
+                  <svg class="small icon icon-inline mx-1">
+                    <use xlinkHref="#icon-arrow-down1"></use>
                   </svg>
                   {this.state.downvotes}
                 </a>
index 5e0ec47d456e7f59d95c8d30121e1c749d2dc00b..0053209522f88fa996862daa56a9f90f8a8b1b49 100644 (file)
@@ -980,12 +980,17 @@ function randomHsl() {
   return `hsla(${Math.random() * 360}, 100%, 50%, 1)`;
 }
 
-export function previewLines(text: string, lines: number = 3): string {
-  // Use lines * 2 because markdown requires 2 lines
+export function previewLines(
+  text: string,
+  maxChars: number = 300,
+  maxLines: number = 1
+): string {
   return (
     text
+      .slice(0, maxChars)
       .split('\n')
-      .slice(0, lines * 2)
+      // Use lines * 2 because markdown requires 2 lines
+      .slice(0, maxLines * 2)
       .join('\n') + '...'
   );
 }