Merge pull request #1835 from pixelfed/staging

Staging
This commit is contained in:
daniel 2019-11-25 21:35:40 -07:00 committed by GitHub
commit 9f812d5619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 10 deletions

File diff suppressed because one or more lines are too long

2
public/js/status.js vendored

File diff suppressed because one or more lines are too long

View File

@ -14,7 +14,7 @@
"/js/compose.js": "/js/compose.js?id=3e8264e6f459adeb5b49",
"/js/compose-classic.js": "/js/compose-classic.js?id=e7483681a575c190a43b",
"/js/developers.js": "/js/developers.js?id=9636d4060ca6b359d8a2",
"/js/discover.js": "/js/discover.js?id=ec4f53b810977ff041ae",
"/js/discover.js": "/js/discover.js?id=6c70004f4bdfd17f87cc",
"/js/hashtag.js": "/js/hashtag.js?id=3fe97ed3f975f0e0baa5",
"/js/loops.js": "/js/loops.js?id=9c31302552d789d5f35b",
"/js/mode-dot.js": "/js/mode-dot.js?id=993d7fee684361edddbc",
@ -22,7 +22,7 @@
"/js/profile-directory.js": "/js/profile-directory.js?id=918f460f3ba6ba5a8b19",
"/js/quill.js": "/js/quill.js?id=d909fb9ece981d98eff1",
"/js/search.js": "/js/search.js?id=45c2ede55c2ac48cf1d6",
"/js/status.js": "/js/status.js?id=5cdd90acab635eb3fe58",
"/js/status.js": "/js/status.js?id=d17fee7e81f5bf74b7e2",
"/js/theme-monokai.js": "/js/theme-monokai.js?id=efa54f8ee94778885eb7",
"/js/timeline.js": "/js/timeline.js?id=cdab37b19c377c04acdc"
}

View File

@ -4,10 +4,10 @@
<img src="/img/pixelfed-icon-grey.svg">
</div>
<div v-else>
<!-- <div class="d-block d-md-none px-0 border-top-0 mx-n3">
<div class="d-block d-md-none px-0 border-top-0 mx-n3">
<input class="form-control rounded-0" placeholder="Search" v-model="searchTerm" v-on:keyup.enter="searchSubmit">
</div> -->
<!-- <section class="d-none d-md-flex mb-md-2 pt-5 discover-bar" style="width:auto; overflow: auto hidden;" v-if="categories.length > 0">
</div>
<section class="d-none d-md-flex mb-md-2 pt-5 discover-bar" style="width:auto; overflow: auto hidden;" v-if="categories.length > 0">
<a v-if="config.ab.loops == true" class="text-decoration-none bg-transparent border border-success rounded d-inline-flex align-items-center justify-content-center mr-3 card-disc" href="/discover/loops">
<p class="text-success lead font-weight-bold mb-0">Loops</p>
</a>
@ -15,12 +15,12 @@
<p class="text-white font-weight-bold" style="text-shadow: 3px 3px 16px #272634;">{{category.name}}</p>
</a>
</section> -->
</section>
<section class="mb-5 section-explore">
<div class="profile-timeline">
<div class="row p-0 mt-5">
<div class="col-12 col-md-6">
<div class="">
<div class="mb-4">
<a class="card info-overlay card-md-border-0" :href="posts[0].url">
<div class="square">
<span v-if="posts[0].type == 'photo:album'" class="float-right mr-3 post-icon"><i class="fas fa-images fa-2x"></i></span>

View File

@ -34,6 +34,7 @@
<span class="fas fa-ellipsis-v text-muted"></span>
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item font-weight-bold" @click="showEmbedPostModal()">Embed</a>
<div v-if="!owner()">
<a class="dropdown-item font-weight-bold" :href="reportUrl()">Report</a>
<a class="dropdown-item font-weight-bold" v-on:click="muteProfile()">Mute Profile</a>
@ -99,6 +100,7 @@
<span class="fas fa-ellipsis-v text-muted"></span>
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item font-weight-bold" @click="showEmbedPostModal()">Embed</a>
<span v-if="!owner()">
<a class="dropdown-item font-weight-bold" :href="reportUrl()">Report</a>
<a class="dropdown-item font-weight-bold" v-on:click="muteProfile">Mute Profile</a>
@ -476,6 +478,21 @@
<img :src="lightboxMedia.url" :class="lightboxMedia.filter_class + ' img-fluid'" style="min-height: 100%; min-width: 100%">
</div>
</b-modal>
<b-modal ref="embedModal"
id="ctx-embed-modal"
hide-header
hide-footer
centered
rounded
size="md"
body-class="p-2 rounded">
<div>
<textarea class="form-control disabled" rows="1" style="border: 1px solid #efefef; font-size: 14px; line-height: 12px; height: 37px; margin: 0 0 7px; resize: none; white-space: nowrap;" v-model="ctxEmbedPayload"></textarea>
<hr>
<button :class="copiedEmbed ? 'btn btn-primary btn-block btn-sm py-1 font-weight-bold disabed': 'btn btn-primary btn-block btn-sm py-1 font-weight-bold'" @click="ctxCopyEmbed" :disabled="copiedEmbed">{{copiedEmbed ? 'Embed Code Copied!' : 'Copy Embed Code'}}</button>
<p class="mb-0 px-2 small text-muted">By using this embed, you agree to our <a href="/site/terms">Terms of Use</a></p>
</div>
</b-modal>
</div>
</template>
@ -600,6 +617,8 @@ export default {
emoji: window.App.util.emoji,
showReadMore: true,
showCaption: true,
ctxEmbedPayload: false,
copiedEmbed: false,
}
},
@ -1167,7 +1186,17 @@ export default {
redirect(url) {
window.location.href = url;
}
},
showEmbedPostModal() {
this.ctxEmbedPayload = window.App.util.embed.post(this.status.url)
this.$refs.embedModal.show();
},
ctxCopyEmbed() {
navigator.clipboard.writeText(this.ctxEmbedPayload);
this.$refs.embedModal.hide();
},
},
}