mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-15 08:54:01 +00:00
Some UI fixes.
This commit is contained in:
parent
9c3776d034
commit
992b3ca95b
8 changed files with 23 additions and 15 deletions
2
ansible/VERSION
vendored
2
ansible/VERSION
vendored
|
@ -1 +1 @@
|
||||||
v0.7.43
|
v0.7.45
|
||||||
|
|
2
docker/prod/docker-compose.yml
vendored
2
docker/prod/docker-compose.yml
vendored
|
@ -12,7 +12,7 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
lemmy:
|
lemmy:
|
||||||
image: dessalines/lemmy:v0.7.43
|
image: dessalines/lemmy:v0.7.45
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8536:8536"
|
- "127.0.0.1:8536:8536"
|
||||||
restart: always
|
restart: always
|
||||||
|
|
4
docker/travis/docker_push.sh
vendored
4
docker/travis/docker_push.sh
vendored
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
docker tag dessalines/lemmy:travis \
|
docker tag dessalines/lemmy:travis \
|
||||||
dessalines/lemmy:v0.7.43
|
dessalines/lemmy:v0.7.45
|
||||||
docker push dessalines/lemmy:v0.7.43
|
docker push dessalines/lemmy:v0.7.45
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
pub const VERSION: &str = "v0.7.43";
|
pub const VERSION: &str = "v0.7.45";
|
||||||
|
|
4
ui/assets/css/main.css
vendored
4
ui/assets/css/main.css
vendored
|
@ -32,6 +32,10 @@
|
||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.custom-select {
|
||||||
|
-moz-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
.md-div p {
|
.md-div p {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
2
ui/src/components/navbar.tsx
vendored
2
ui/src/components/navbar.tsx
vendored
|
@ -369,7 +369,7 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<ul class="navbar-nav my-2">
|
<ul class="navbar-nav my-2">
|
||||||
<li className="nav-item">
|
<li className="ml-2 nav-item">
|
||||||
<Link
|
<Link
|
||||||
class="btn btn-success"
|
class="btn btn-success"
|
||||||
to="/login"
|
to="/login"
|
||||||
|
|
11
ui/src/components/post-listing.tsx
vendored
11
ui/src/components/post-listing.tsx
vendored
|
@ -515,9 +515,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
</li>
|
</li>
|
||||||
{(showVotes || this.state.upvotes !== this.state.score) && (
|
{(showVotes || this.state.upvotes !== this.state.score) && (
|
||||||
<>
|
<>
|
||||||
<li className="list-inline-item">•</li>
|
|
||||||
<span
|
<span
|
||||||
class="unselectable pointer mr-2"
|
class="unselectable pointer ml-3"
|
||||||
data-tippy-content={this.pointsTippy}
|
data-tippy-content={this.pointsTippy}
|
||||||
>
|
>
|
||||||
<li className="list-inline-item">
|
<li className="list-inline-item">
|
||||||
|
@ -527,8 +526,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
}`}
|
}`}
|
||||||
onClick={linkEvent(this, this.handlePostLike)}
|
onClick={linkEvent(this, this.handlePostLike)}
|
||||||
>
|
>
|
||||||
<svg class="small icon icon-inline mr-1">
|
<svg class="small icon icon-inline mx-1">
|
||||||
<use xlinkHref="#icon-arrow-up"></use>
|
<use xlinkHref="#icon-arrow-up1"></use>
|
||||||
</svg>
|
</svg>
|
||||||
{this.state.upvotes}
|
{this.state.upvotes}
|
||||||
</a>
|
</a>
|
||||||
|
@ -540,8 +539,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
}`}
|
}`}
|
||||||
onClick={linkEvent(this, this.handlePostDisLike)}
|
onClick={linkEvent(this, this.handlePostDisLike)}
|
||||||
>
|
>
|
||||||
<svg class="small icon icon-inline mr-1">
|
<svg class="small icon icon-inline mx-1">
|
||||||
<use xlinkHref="#icon-arrow-down"></use>
|
<use xlinkHref="#icon-arrow-down1"></use>
|
||||||
</svg>
|
</svg>
|
||||||
{this.state.downvotes}
|
{this.state.downvotes}
|
||||||
</a>
|
</a>
|
||||||
|
|
11
ui/src/utils.ts
vendored
11
ui/src/utils.ts
vendored
|
@ -980,12 +980,17 @@ function randomHsl() {
|
||||||
return `hsla(${Math.random() * 360}, 100%, 50%, 1)`;
|
return `hsla(${Math.random() * 360}, 100%, 50%, 1)`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function previewLines(text: string, lines: number = 3): string {
|
export function previewLines(
|
||||||
// Use lines * 2 because markdown requires 2 lines
|
text: string,
|
||||||
|
maxChars: number = 300,
|
||||||
|
maxLines: number = 1
|
||||||
|
): string {
|
||||||
return (
|
return (
|
||||||
text
|
text
|
||||||
|
.slice(0, maxChars)
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.slice(0, lines * 2)
|
// Use lines * 2 because markdown requires 2 lines
|
||||||
|
.slice(0, maxLines * 2)
|
||||||
.join('\n') + '...'
|
.join('\n') + '...'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue