This commit is contained in:
netop://ウエハ 2019-08-21 12:54:17 -05:00
parent f66349d613
commit 5949bcb16e
4 changed files with 36 additions and 26 deletions

View file

@ -254,7 +254,11 @@ export default async(data, socket) => {
}); });
} }
return response.body.result[Object.keys(response.body.result)[0]].claim; // console.log("——");
// console.log(response.body.result[Object.keys(response.body.result)[0]]);
// console.log("——");
return response.body.result[Object.keys(response.body.result)[0]];
} catch(error) { } catch(error) {
messageSlack({ messageSlack({
message: "```" + error + "```", message: "```" + error + "```",

View file

@ -265,6 +265,7 @@
} }
.playground-content__urlbar { .playground-content__urlbar {
height: 2.5rem;
border: 1px solid $lbry-gray-1; border: 1px solid $lbry-gray-1;
display: flex; display: flex;
margin-bottom: 1rem; margin-bottom: 1rem;
@ -289,6 +290,7 @@
input { input {
width: calc(100% - 9.5rem); width: calc(100% - 9.5rem);
border: none;
font-size: 1rem; font-size: 1rem;
&::placeholder { &::placeholder {
@ -299,12 +301,12 @@
span { span {
@include no-user-select; @include no-user-select;
width: 3.5rem; width: 3.5rem; height: 2.5rem;
color: $lbry-gray-4; color: $lbry-gray-4;
cursor: default; cursor: default;
font-size: 1rem; font-size: 1rem;
line-height: 2rem; line-height: 2.4;
text-align: right; text-align: right;
} }
} }

View file

@ -136,8 +136,9 @@ function generateContent(exampleNumber, displayTrendingContent) {
Promise.all(rawContentCollection) Promise.all(rawContentCollection)
.then(collection => { .then(collection => {
for (const part of collection) { for (const part of collection) {
if (part.value.tags.includes("mature")) if (part.value.tags && part.value.tags.includes("mature"))
continue; continue;
try { try {
renderedContentCollection.push(` renderedContentCollection.push(`
<section class="playground-content__trend"> <section class="playground-content__trend">
@ -153,7 +154,7 @@ function generateContent(exampleNumber, displayTrendingContent) {
</div> </div>
<div class="media__subtitle"> <div class="media__subtitle">
${part.channel_name} ${part.signing_channel.name || "Anon"}
</div> </div>
</section> </section>
`); `);
@ -170,6 +171,10 @@ function generateContent(exampleNumber, displayTrendingContent) {
`); `);
displayTrendingContent(renderedContentCollection.join("")); displayTrendingContent(renderedContentCollection.join(""));
})
.catch(error => {
console.error(error);
return null;
}); });
}); });
} }
@ -199,8 +204,7 @@ function generateContent(exampleNumber, displayTrendingContent) {
if ( if (
part && part &&
part.value && part.value &&
part.value.thumbnail.url && part.value.thumbnail.url
part.channel_name
) { ) {
renderedContentCollection.push(` renderedContentCollection.push(`
<section class="playground-content__trend"> <section class="playground-content__trend">
@ -217,7 +221,7 @@ function generateContent(exampleNumber, displayTrendingContent) {
</div> </div>
<div class="media__subtitle"> <div class="media__subtitle">
${part.channel_name} ${part.signing_channel.name || "Anon"}
</div> </div>
</section> </section>
`); `);

View file

@ -93,15 +93,15 @@
"private": true, "private": true,
"scripts": { "scripts": {
"css": "sass --load-path=node_modules --update app/sass:app/dist --style compressed", "css": "sass --load-path=node_modules --update app/sass:app/dist --style compressed",
"format": "eslint '**/*.js' --fix --ignore-pattern '/app/dist/'", "format": "eslint . --fix --ignore-pattern '/app/dist/'",
"postinstall": "link-module-alias", "postinstall": "link-module-alias",
"preinstall": "command -v link-module-alias; link-module-alias clean || true", "preinstall": "command -v link-module-alias;link-module-alias clean || true",
"start": "npm i; npm run css; NODE_ENV=production node index.js", "start": "npm i;npm run css;NODE_ENV=production node index.js",
"test": "run-s test:*", "test": "run-s test:*",
"test:dependencies": "updates --update ./ --exclude prismjs", "test:dependencies": "updates --update ./ --exclude prismjs",
"test:lint": "standardx --verbose | snazzy", "test:lint": "standardx --verbose | snazzy",
"test:sass": "sass-lint --config ./node_modules/@inc/sasslint-config/config.json --verbose --no-exit", "test:sass": "sass-lint --config ./node_modules/@inc/sasslint-config/config.json --verbose --no-exit",
"watch": "npm run css; run-p watch:*", "watch": "npm run css;run-p watch:*",
"watch:sass": "sass --load-path=node_modules --watch app/sass:app/dist --style compressed", "watch:sass": "sass --load-path=node_modules --watch app/sass:app/dist --style compressed",
"watch:server": "NODE_ENV=development nodemon --ignore 'app/dist'" "watch:server": "NODE_ENV=development nodemon --ignore 'app/dist'"
}, },