Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/assets/scss/_global-components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ input[disabled].toggle-switch:checked + label:after { background-color: lighten(
ul { &.pagination { li { a { font-size: $font-size-sm; } } } }
}
.pagination-wrap {
float: right;
float: left;
@include break-mobile-sm {
float: unset;
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/HeaderComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ header {
height: 2rem;
width: 2rem;
border: 2px solid $border-color;
object-fit: cover;
object-fit: contain;
}
}
}
Expand Down
29 changes: 21 additions & 8 deletions src/components/layout/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,32 @@ export default {
// Case 2: Truncate Tail
// 1 2 3 4 5 [6] 7 8 ... 14 15 16
if (truncate && v.currentPage <= 6)
ellipsis = [{ index: 9, nextIndex: v.pageCount - 2 }]
if (v.mobile)
ellipsis = [{ index: 4, nextIndex: v.pageCount - 2 }]
else
ellipsis = [{ index: 9, nextIndex: v.pageCount - 2 }]

// Case 3: Truncate Head
// 1 2 3 ... 9 10 [11] 12 13 14 15 16
else if (truncate && v.currentPage >= v.pageCount - 5)
ellipsis = [{ index: 4, nextIndex: v.pageCount - 8 }]
if (v.mobile)
ellipsis = [{ index: 4, nextIndex: v.pageCount - 2 }]
else
ellipsis = [{ index: 4, nextIndex: v.pageCount - 8 }]

// Case 4: Truncate Head and Tail
// 1 2 3 ... 7 8 [9] 10 11 ... 14 15 16
else if (truncate && v.currentPage > 6 && v.currentPage < v.pageCount - 5)
ellipsis = [
{ index: 4, nextIndex: v.currentPage - 2 },
{ index: v.currentPage + 3, nextIndex: v.pageCount - 2 }
]
else if (truncate && v.currentPage > 6 && v.currentPage < v.pageCount - 5)
if (v.mobile)
ellipsis = [
{ index: 2, nextIndex: v.currentPage - 1 },
{ index: v.currentPage + 2, nextIndex: v.pageCount }
]
else
ellipsis = [
{ index: 4, nextIndex: v.currentPage - 2 },
{ index: v.currentPage + 3, nextIndex: v.pageCount - 2 }
]

generatePageKeys(ellipsis)
}
Expand Down Expand Up @@ -153,7 +165,8 @@ export default {
pageInput: null,
paginationKeys: [],
currentPage: props.page,
pageCount: computed(() => Math.ceil(props.count / props.limit) || 1)
pageCount: computed(() => Math.ceil(props.count / props.limit) || 1),
mobile: window.innerWidth <= window.mobile_break_width
})

buildPages()
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/profile/UpdateAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default {
width: 100%; height: 100%;
text-align: center;
&.rect {
img { height: 80px; width: 120px; object-fit: cover;}
img { height: 80px; width: 120px; object-fit: contain;}
}
&.circle {
img { height: 120px; width: 120px; border-radius: 100%; object-fit: cover; }
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/IgnoredSettingsPartial.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ table.striped.ignored-users {
img {
height: 1.5rem;
width: 1.5rem;
object-fit: cover;
object-fit: contain;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/Mentions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export default {
height: 3.125rem;
width: 3.125rem;
border: 2px solid $border-color;
object-fit: cover;
object-fit: contain;
}
}
}
Expand Down
13 changes: 9 additions & 4 deletions src/views/Posts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
</svg>
</span>
<router-link :to="{ path: '/profile/' + post.user.username.toLowerCase() }">
<img :src="post.avatar || defaultAvatar" @error="$event.target.src=defaultAvatar" />
<img :src="'https://bitcointalk.org' + post.avatar || defaultAvatar" @error="$event.target.src=defaultAvatar" />
</router-link>
</div>
<router-link :to="{ path: '/profile/' + post.user.username.toLowerCase() }">
Expand Down Expand Up @@ -1405,7 +1405,7 @@ ad-viewer {
height: calc(#{$postUserWidth} / 1.5);

img {
object-fit: cover;
object-fit: contain;
}

.online {
Expand Down Expand Up @@ -1738,8 +1738,13 @@ ad-viewer {
margin-bottom: 3rem;
}

.thread-data .post-block .post-user {
display: none;
.thread-data .post-block-grid {
flex-direction: column;
.post-user.user-avatar {
width: calc(#{$postUserWidth}/2);
height: calc(#{$postUserWidth}/2);
}

}
.thread-data .post-block .post-content {
margin-left: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/views/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ export default {
width: 100%;
}
&.rect img {
object-fit: cover;
object-fit: contain;
height: calc(#{$avatar-width} / 1.5);
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/views/Threads.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@

<td class="last-post">
<span v-if="thread.last_deleted">deleted</span>
<router-link v-if="!thread.last_deleted" :to="{ path: '/profile/' + thread.last_post_username.toLowerCase() }"><img class="avatar-small" :class="defaultAvatarShape" :src="thread.last_post_avatar || defaultAvatar" @error="$event.target.src=defaultAvatar" /></router-link>
<router-link v-if="!thread.last_deleted" :to="{ path: '/profile/' + thread.last_post_username.toLowerCase() }"><img class="avatar-small" :class="defaultAvatarShape" :src="'https://bitcointalk.org/' + thread.last_post_avatar || defaultAvatar" @error="$event.target.src=defaultAvatar" /></router-link>
<router-link v-if="!thread.last_deleted" :to="{ path: '/profile/' + thread.last_post_username.toLowerCase() }">
<span v-html="thread.last_post_username"></span>
</router-link> posted on
Expand Down Expand Up @@ -202,20 +202,20 @@

<td class="last-post" v-if="thread.user.username">
<span v-if="thread.last_deleted">deleted</span>
<router-link v-if="!thread.last_deleted" :to="{ path: '/profile/' + thread.last_post_username.toLowerCase() }"><img class="avatar-small" :class="defaultAvatar" :src="thread.last_post_avatar || defaultAvatar" @error="$event.target.src=defaultAvatar" /></router-link>
<router-link v-if="!thread.last_deleted" :to="{ path: '/profile/' + thread.last_post_username.toLowerCase() }"><img class="avatar-small" :class="defaultAvatar" :src="'https://bitcointalk.org/' + thread.last_post_avatar || defaultAvatar" @error="$event.target.src=defaultAvatar" /></router-link>
<router-link v-if="!thread.last_deleted" :to="{ path: '/profile/' + thread.last_post_username.toLowerCase() }"><span v-html="thread.last_post_username"></span></router-link> posted on <router-link :to="{ name: 'Posts', params: { threadSlug: thread.slug }, query: { start: thread.last_post_position }, hash: '#' + thread.last_post_id }"><span>{{humanDate(thread.last_post_created_at)}}</span>.</router-link>
<router-link v-if="thread.has_new_post" :to="{ name: 'Posts', params: { threadSlug: thread.slug }, query: { start: thread.latest_unread_position }, hash: '#' + thread.latest_unread_post_id }">(Last unread post)</router-link>
</td>
</tr>
</tbody>
</table>

<pagination v-if="threadData.data?.board" class="hide-mobile" :page="threadData.data.page" :limit="threadData.data.limit" :count="threadData.data.board.thread_count - threadData.data.board.sticky_thread_count"></pagination>
</div>

<div class="mobile-pagination" v-if="threadData.data?.board">
<div class="pagination-wrap">
<pagination v-if="threadData.data?.board" :page="threadData.data.page" :limit="threadData.data.limit" :count="threadData.data.board.thread_count - threadData.data.board.sticky_thread_count"></pagination>
<div class="actions-bottom">
<div class="actions-bottom-grid">
<div id="pagination-bottom" class="pagination-bottom">
<pagination v-if="threadData.data?.board" :page="threadData.data.page" :limit="threadData.data.limit" :count="threadData.data.board.thread_count - (threadData.data.board.sticky_thread_count ? threadData.data.board.sticky_thread_count : 0)"></pagination>
</div>
</div>
</div>

Expand Down Expand Up @@ -572,7 +572,7 @@ export default {
.threads-posted-in {
.actions-bottom {
.pagination-bottom {
justify-self: end;
justify-self: start;
}

@media screen and (max-width: 1280px) {
Expand Down