forked from mirror/pixelfed
Merge pull request #2368 from pixelfed/staging
Update Hashtag.vue, add nsfw toggle. Fixes #2225
This commit is contained in:
commit
8d3356a830
|
@ -82,6 +82,7 @@
|
||||||
- Updated PostComponent.vue, improve MetroUI and fixes ([#2363](https://github.com/pixelfed/pixelfed/issues/2363)). ([0c8ebf26](https://github.com/pixelfed/pixelfed/commit/0c8ebf26))
|
- Updated PostComponent.vue, improve MetroUI and fixes ([#2363](https://github.com/pixelfed/pixelfed/issues/2363)). ([0c8ebf26](https://github.com/pixelfed/pixelfed/commit/0c8ebf26))
|
||||||
- Updated Timeline.vue, fixes ([#2363](https://github.com/pixelfed/pixelfed/issues/2363)). ([f53f10fd](https://github.com/pixelfed/pixelfed/commit/f53f10fd))
|
- Updated Timeline.vue, fixes ([#2363](https://github.com/pixelfed/pixelfed/issues/2363)). ([f53f10fd](https://github.com/pixelfed/pixelfed/commit/f53f10fd))
|
||||||
- Updated Profile.vue, add atom feed link to context menu. Fixes ([#2313](https://github.com/pixelfed/pixelfed/issues/2313)). ([89f29072](https://github.com/pixelfed/pixelfed/commit/89f29072))
|
- Updated Profile.vue, add atom feed link to context menu. Fixes ([#2313](https://github.com/pixelfed/pixelfed/issues/2313)). ([89f29072](https://github.com/pixelfed/pixelfed/commit/89f29072))
|
||||||
|
- Update Hashtag.vue, add nsfw toggle. Fixes ([#2225](https://github.com/pixelfed/pixelfed/issues/2225)). ([e5aa506c](https://github.com/pixelfed/pixelfed/commit/e5aa506c))
|
||||||
|
|
||||||
## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9)
|
## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9)
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -18,7 +18,7 @@ class StatusHashtagTransformer extends Fractal\TransformerAbstract
|
||||||
'id' => (int) $status->id,
|
'id' => (int) $status->id,
|
||||||
'type' => $status->type,
|
'type' => $status->type,
|
||||||
'url' => $status->url(),
|
'url' => $status->url(),
|
||||||
'thumb' => $status->thumb(),
|
'thumb' => $status->thumb(true),
|
||||||
'filter' => $status->firstMedia()->filter_class,
|
'filter' => $status->firstMedia()->filter_class,
|
||||||
'sensitive' => (bool) $status->is_nsfw,
|
'sensitive' => (bool) $status->is_nsfw,
|
||||||
'like_count' => $status->likes_count,
|
'like_count' => $status->likes_count,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -15,7 +15,7 @@
|
||||||
"/js/compose-classic.js": "/js/compose-classic.js?id=283f19c895f4118a2a8b",
|
"/js/compose-classic.js": "/js/compose-classic.js?id=283f19c895f4118a2a8b",
|
||||||
"/js/developers.js": "/js/developers.js?id=f75deca5ccf47d43eb07",
|
"/js/developers.js": "/js/developers.js?id=f75deca5ccf47d43eb07",
|
||||||
"/js/discover.js": "/js/discover.js?id=1bc0d0b9d96e5b320f1d",
|
"/js/discover.js": "/js/discover.js?id=1bc0d0b9d96e5b320f1d",
|
||||||
"/js/hashtag.js": "/js/hashtag.js?id=e6b41cab117cb03c7d2a",
|
"/js/hashtag.js": "/js/hashtag.js?id=7e57442cbe641b10bfae",
|
||||||
"/js/loops.js": "/js/loops.js?id=ac610897b12207c829b9",
|
"/js/loops.js": "/js/loops.js?id=ac610897b12207c829b9",
|
||||||
"/js/mode-dot.js": "/js/mode-dot.js?id=1225a9aac7a93d5d232f",
|
"/js/mode-dot.js": "/js/mode-dot.js?id=1225a9aac7a93d5d232f",
|
||||||
"/js/profile.js": "/js/profile.js?id=538bdcaaa31033adc07c",
|
"/js/profile.js": "/js/profile.js?id=538bdcaaa31033adc07c",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="profile-header row my-5">
|
<div class="profile-header row my-5">
|
||||||
<div class="col-12 col-md-3">
|
<div class="col-12 col-md-3">
|
||||||
<div class="profile-avatar">
|
<div class="profile-avatar">
|
||||||
<div class="bg-pixelfed mb-3 d-flex align-items-center justify-content-center display-4 font-weight-bold text-white" style="width: 172px; height: 172px; border-radius: 100%">#</div>
|
<div class="bg-primary mb-3 d-flex align-items-center justify-content-center display-4 font-weight-bold text-white" style="width: 172px; height: 172px; border-radius: 100%">#</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-9 d-flex align-items-center">
|
<div class="col-12 col-md-9 d-flex align-items-center">
|
||||||
|
@ -12,14 +12,20 @@
|
||||||
<div class="username-bar pb-2">
|
<div class="username-bar pb-2">
|
||||||
<p class="tag-header mb-0">#{{hashtag}}</p>
|
<p class="tag-header mb-0">#{{hashtag}}</p>
|
||||||
<p class="lead"><span class="font-weight-bold">{{tags.length ? hashtagCount : '0'}}</span> posts</p>
|
<p class="lead"><span class="font-weight-bold">{{tags.length ? hashtagCount : '0'}}</span> posts</p>
|
||||||
<p v-if="authenticated && tags.length" class="pt-3">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<button v-if="!following" type="button" class="btn btn-primary font-weight-bold py-1 px-5" @click="followHashtag">
|
<p v-if="authenticated && tags.length" class="pt-3 mr-4">
|
||||||
Follow
|
<button v-if="!following" type="button" class="btn btn-primary font-weight-bold py-1 px-5" @click="followHashtag">
|
||||||
</button>
|
Follow
|
||||||
<button v-else type="button" class="btn btn-outline-secondary font-weight-bold py-1 px-5" @click="unfollowHashtag">
|
</button>
|
||||||
Unfollow
|
<button v-else type="button" class="btn btn-outline-secondary font-weight-bold py-1 px-5" @click="unfollowHashtag">
|
||||||
</button>
|
Unfollow
|
||||||
</p>
|
</button>
|
||||||
|
</p>
|
||||||
|
<div class="custom-control custom-switch">
|
||||||
|
<input type="checkbox" class="custom-control-input" id="nsfwSwitch" v-model="forceNsfw">
|
||||||
|
<label class="custom-control-label font-weight-bold text-muted" for="nsfwSwitch">Show NSFW Content</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,7 +36,8 @@
|
||||||
<div v-for="(tag, index) in top" class="col-4 p-0 p-sm-2 p-md-3 hashtag-post-square">
|
<div v-for="(tag, index) in top" class="col-4 p-0 p-sm-2 p-md-3 hashtag-post-square">
|
||||||
<a class="card info-overlay card-md-border-0" :href="tag.status.url">
|
<a class="card info-overlay card-md-border-0" :href="tag.status.url">
|
||||||
<div :class="[tag.status.filter ? 'square ' + tag.status.filter : 'square']">
|
<div :class="[tag.status.filter ? 'square ' + tag.status.filter : 'square']">
|
||||||
<div class="square-content" :style="'background-image: url('+tag.status.thumb+')'"></div>
|
<div v-if="tag.status.sensitive && forceNsfw == false" class="square-content" :style="'background-image: url(/storage/no-preview.png)'"></div>
|
||||||
|
<div v-else class="square-content" :style="'background-image: url('+tag.status.thumb+')'"></div>
|
||||||
<div class="info-overlay-text">
|
<div class="info-overlay-text">
|
||||||
<h5 class="text-white m-auto font-weight-bold">
|
<h5 class="text-white m-auto font-weight-bold">
|
||||||
<span class="pr-4">
|
<span class="pr-4">
|
||||||
|
@ -50,7 +57,8 @@
|
||||||
<div v-for="(tag, index) in tags" class="col-4 p-0 p-sm-2 p-md-3 hashtag-post-square">
|
<div v-for="(tag, index) in tags" class="col-4 p-0 p-sm-2 p-md-3 hashtag-post-square">
|
||||||
<a class="card info-overlay card-md-border-0" :href="tag.status.url">
|
<a class="card info-overlay card-md-border-0" :href="tag.status.url">
|
||||||
<div :class="[tag.status.filter ? 'square ' + tag.status.filter : 'square']">
|
<div :class="[tag.status.filter ? 'square ' + tag.status.filter : 'square']">
|
||||||
<div class="square-content" :style="'background-image: url('+tag.status.thumb+')'"></div>
|
<div v-if="tag.status.sensitive && forceNsfw == false" class="square-content" :style="'background-image: url(/storage/no-preview.png)'"></div>
|
||||||
|
<div v-else class="square-content" :style="'background-image: url('+tag.status.thumb+')'"></div>
|
||||||
<div class="info-overlay-text">
|
<div class="info-overlay-text">
|
||||||
<h5 class="text-white m-auto font-weight-bold">
|
<h5 class="text-white m-auto font-weight-bold">
|
||||||
<span class="pr-4">
|
<span class="pr-4">
|
||||||
|
@ -105,6 +113,7 @@
|
||||||
following: false,
|
following: false,
|
||||||
tags: [],
|
tags: [],
|
||||||
top: [],
|
top: [],
|
||||||
|
forceNsfw: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
|
|
Loading…
Reference in New Issue