NSFW content is not shown on Tour
This commit is contained in:
parent
fadbe03e83
commit
70e292f39a
4 changed files with 12 additions and 24 deletions
|
@ -29,40 +29,23 @@ module.exports = exports = (data, socket) => {
|
|||
if (data.step === 2 && !data.data) return;
|
||||
if (data.step === 2) dataDetails = data.data; // file upload
|
||||
|
||||
const claimAddress = data.claim;
|
||||
const resolveMethod = data.method;
|
||||
|
||||
/*
|
||||
const allowedClaims = [
|
||||
"fortnite-top-stream-moments-nickatnyte",
|
||||
"hellolbry",
|
||||
"itsadisaster",
|
||||
"six",
|
||||
"unbubbled1-1"
|
||||
];
|
||||
*/
|
||||
|
||||
const allowedMethods = [
|
||||
"publish",
|
||||
"resolve",
|
||||
"wallet_send"
|
||||
];
|
||||
|
||||
const body = {};
|
||||
const claimAddress = data.claim;
|
||||
const resolveMethod = data.method;
|
||||
|
||||
if (allowedMethods.indexOf(resolveMethod) < 0) return socket.send(JSON.stringify({
|
||||
"details": "Unallowed resolve method for tutorial",
|
||||
"message": "notification",
|
||||
"type": "error"
|
||||
}));
|
||||
|
||||
/*
|
||||
if (data.step === 1 && allowedClaims.indexOf(claimAddress) < 0) return socket.send(JSON.stringify({
|
||||
"details": "Invalid claim ID for tutorial",
|
||||
"message": "notification",
|
||||
"type": "error"
|
||||
}));
|
||||
*/
|
||||
|
||||
const body = {};
|
||||
|
||||
body.access_token = process.env.LBRY_DAEMON_ACCESS_TOKEN;
|
||||
body.method = resolveMethod;
|
||||
|
|
|
@ -295,7 +295,7 @@ function generateStep1OfTour(displayTrendingContent) {
|
|||
|
||||
Promise.all(rawContentCollection).then(collection => {
|
||||
for (const part of collection) {
|
||||
if (part.value.stream.metadata.thumbnail) {
|
||||
if (!part.value.stream.metadata.nsfw && part.value.stream.metadata.thumbnail) {
|
||||
renderedContentCollection.push(`
|
||||
<figure class="tour__content__trend">
|
||||
<img alt="${part.name}" data-action="choose claim" data-claim-id="${part.name}" src="${part.value.stream.metadata.thumbnail}"/>
|
||||
|
|
|
@ -25,7 +25,7 @@ module.exports = exports = () => async () => html`
|
|||
<ul class="home__features">
|
||||
<li class="home__feature">
|
||||
<p class="home__feature__title"><strong>New to LBRY?</strong></p>
|
||||
<p class="home__feature__description">Learn how LBRY works in 3 easy steps</p>
|
||||
<p class="home__feature__description">Learn how LBRY works with 3 easy examples</p>
|
||||
<a class="home__feature__cta" href="/tour">Take the Tour</a>
|
||||
</li>
|
||||
|
||||
|
|
|
@ -80,6 +80,11 @@ $("body").on("click", ".hook__page__content__meme__thumbnail", event => {
|
|||
updateCanvas(event.currentTarget);
|
||||
});
|
||||
|
||||
$("#fetch-claim-uri").on("keyup", function (e) {
|
||||
const key = e.keyCode ? e.keyCode : e.which;
|
||||
if (key === 13 && $("#fetch-claim-uri").val()) fetchMetadata(1, $("#fetch-claim-uri").val());
|
||||
});
|
||||
|
||||
$("#meme-top-line, #meme-bottom-line").on("keyup", () => updateCanvas());
|
||||
|
||||
|
||||
|
@ -106,7 +111,7 @@ function detectLanguageAndUpdate() {
|
|||
}
|
||||
|
||||
function initializeTour() {
|
||||
$("#fetch-claim-uri").val(""); // reset
|
||||
$("#fetch-claim-uri").val("").focus(); // reset
|
||||
$(".tour__sidebar__step:nth-child(1)").addClass("active");
|
||||
|
||||
send(JSON.stringify({
|
||||
|
|
Loading…
Reference in a new issue