Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #925 from lbryio/staging
Browse files Browse the repository at this point in the history
cuts release from staging
  • Loading branch information
jessopb authored Feb 19, 2019
2 parents f24c5cd + 5547d02 commit 34e9d0c
Show file tree
Hide file tree
Showing 23 changed files with 629 additions and 255 deletions.
261 changes: 146 additions & 115 deletions README.md

Large diffs are not rendered by default.

50 changes: 27 additions & 23 deletions cli/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ let thumbnailChannelDefault = '@thumbnails';
let thumbnailChannel = '';
let thumbnailChannelId = '';

const createConfigFile = (fileName, configObject, topSecret) => { // siteConfig.json , siteConfig
const createConfigFile = (fileName, configObject, topSecret) => {
// siteConfig.json , siteConfig
const fileLocation = topSecret
? Path.resolve(__dirname, `../site/private/${fileName}`)
: Path.resolve(__dirname, `../site/config/${fileName}`);
Expand All @@ -39,15 +40,8 @@ try {
siteConfig = require('./defaults/siteConfig.json');
}
const {
details: {
port,
title,
host,
},
publishing: {
uploadDirectory,
channelClaimBidAmount: channelBid,
},
details: { port, title, host },
publishing: { uploadDirectory, channelClaimBidAmount: channelBid },
} = siteConfig;

let lbryConfig;
Expand Down Expand Up @@ -80,12 +74,12 @@ try {

// authConfig
let randSessionKey = pwGenerator.generate({
length : 20,
length: 20,
numbers: true,
});

let randMasterPass = pwGenerator.generate({
length : 20,
length: 20,
numbers: true,
});

Expand All @@ -94,7 +88,7 @@ try {
authConfig = require('../site/private/authConfig.json');
} catch (error) {
authConfig = {
sessionKey : randSessionKey,
sessionKey: randSessionKey,
masterPassword: randMasterPass,
};
}
Expand All @@ -111,7 +105,7 @@ inquirer
console.log('\nRetrieving your primary claim address from LBRY...');
return axios
.post('http://localhost:5279', {
method: 'wallet_list',
method: 'address_list',
})
.then(response => {
if (response.data) {
Expand All @@ -125,7 +119,8 @@ inquirer
return;
}
throw new Error('No data received from lbrynet');
}).catch(error => {
})
.catch(error => {
throw error;
});
})
Expand Down Expand Up @@ -159,7 +154,10 @@ inquirer
}
console.log('name:', foundChannel.name);
console.log('claim_id:', foundChannel.claim_id);
if (foundChannel.name === thumbnailChannel && foundChannel.claim_id === thumbnailChannelId) {
if (
foundChannel.name === thumbnailChannel &&
foundChannel.claim_id === thumbnailChannelId
) {
console.log('No update to existing thumbnail config required\n');
} else {
console.log(`Replacing thumbnail channel in config...`);
Expand All @@ -174,11 +172,12 @@ inquirer
return false;
}
throw new Error('No data received from lbrynet');
}).catch(error => {
})
.catch(error => {
throw error;
});
})
.then((thumbnailChannelAlreadyExists) => {
.then(thumbnailChannelAlreadyExists => {
// exit if a channel already exists, skip this step
if (thumbnailChannelAlreadyExists) {
return;
Expand All @@ -190,7 +189,7 @@ inquirer
method: 'channel_new',
params: {
channel_name: thumbnailChannelDefault,
amount : channelBid,
amount: channelBid,
},
})
.then(response => {
Expand All @@ -207,7 +206,8 @@ inquirer
return;
}
throw new Error('No data received from lbrynet');
}).catch(error => {
})
.catch(error => {
throw error;
});
})
Expand All @@ -232,11 +232,15 @@ inquirer
createConfigFile('authConfig.json', authConfig, true);
})
.then(() => {
console.log('\nYou\'re all done!');
console.log('\nIt\'s a good idea to BACK UP YOUR MASTER PASSWORD \nin "/site/private/authConfig.json" so that you don\'t lose \ncontrol of your channel.');
console.log("\nYou're all done!");
console.log(
'\nIt\'s a good idea to BACK UP YOUR MASTER PASSWORD \nin "/site/private/authConfig.json" so that you don\'t lose \ncontrol of your channel.'
);

console.log('\nNext step: run "npm run start" to build and start your server!');
console.log('If you want to change any settings, you can edit the files in the "/site" folder.');
console.log(
'If you want to change any settings, you can edit the files in the "/site" folder.'
);
process.exit(0);
})
.catch(error => {
Expand Down
69 changes: 62 additions & 7 deletions cli/defaults/siteConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"publishing": {
"primaryClaimAddress": null,
"uploadDirectory": "/home/lbry/Uploads",
"lbrynetHome": "/home/lbry",
"lbrynetHome": "/CURRENTLYUNUSED",
"thumbnailChannel": null,
"thumbnailChannelId": null,
"additionalClaimAddresses": [],
Expand All @@ -36,20 +36,75 @@
"publishingChannelWhitelist": [],
"channelClaimBidAmount": "0.1",
"fileClaimBidAmount": "0.01",
"fileSizeLimits": {
"image": 50000000,
"video": 50000000,
"audio": 50000000,
"text": 50000000,
"model": 50000000,
"application": 50000000,
"customByContentType": {
"application/octet-stream": 50000000
}
},
"maxSizeImage": 10000000,
"maxSizeGif": 50000000,
"maxSizeVideo": 50000000
},
"serving": {
"markdownSettings": {
"skipHtml": true,
"privilegedDisallowedTypesDescriptions": ["Image"],
"privilegedDisallowedTypesMain": [],
"publicDisallowedTypesDescriptions": ["Image"],
"publicDisallowedTypesMain": []
"skipHtmlMain": true,
"escapeHtmlMain": true,
"skipHtmlDescriptions": true,
"escapeHtmlDescriptions": true,
"allowedTypesMain": [],
"allowedTypesDescriptions": [],
"allowedTypesExample": [
"see react-markdown docs",
"root",
"text",
"break",
"paragraph",
"emphasis",
"strong",
"thematicBreak",
"blockquote",
"delete",
"link",
"image",
"linkReference",
"imageReference",
"table",
"tableHead",
"tableBody",
"tableRow",
"tableCell",
"list",
"listItem",
"heading",
"inlineCode",
"code",
"html",
"parsedHtml"
],
"disallowedTypesMain": [],
"disallowedTypesDescriptions": ["image", "html"],
"disallowedTypesExample": ["image", "html"]
},
"customFileExtensions": {
"application/example-type": "example"
"application/x-troff-man": ".man",
"application/x-troff-me": ".me",
"application/x-mif": ".mif",
"application/x-troff-ms": ".ms",
"application/x-troff": ".roff",
"application/x-python-code": ".pyc",
"text/x-python": ".py",
"application/x-pn-realaudio": ".ram",
"application/x-sgml": ".sgm",
"model/stl": ".stl",
"image/pict": ".pct",
"text/xul": ".xul",
"text/x-go": "go"
}
},
"startup": {
Expand Down
16 changes: 11 additions & 5 deletions client/scss/_asset-display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

.asset-document {
width: 100%;
max-width: 1000px;
padding: $thin-padding;
height: fit-content;
box-sizing: border-box;
Expand All @@ -16,15 +16,17 @@
}

.asset-title {
max-width: 1000px;
padding-bottom: $thin-padding;
text-align: center;
}

.asset-image, .asset-video {
max-height: 95vh;
max-width: 95vw;
max-height: 75vh;
max-width: 85vw;
object-fit: contain;
object-position: center;
background: black;
}

/*below must die if this is intended to be shareable component! it also probably doesn't need to be*/
Expand Down Expand Up @@ -111,12 +113,15 @@
margin: $primary-padding;
width: 100%;

@media (min-width: $break-point-tablet) {
padding: $primary-padding;
}
@media (max-width: $break-point-tablet) {
margin: $primary-padding $secondary-padding;
padding: $tertiary-padding;
}

@media (max-width: $break-point-mobile) {
margin: $primary-padding 0;
margin: $tertiary-padding;
}
}

Expand All @@ -125,4 +130,5 @@
padding-top: $primary-padding;
margin-top: $primary-padding;
color: $grey;
text-align: center;
}
51 changes: 38 additions & 13 deletions client/scss/_markdown.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
.markdown-preview {
// Headers

margin: $tertiary-padding 0px;

h1,
h2,
h3,
h4,
h5,
h6 {
h3 {
font-size: inherit;
font-weight: inherit;
margin: $tertiary-padding 0px;
}

h4, h5, h6 {
font-size: $text-large;
font-weight: 600;
margin-bottom: $tertiary-padding;
padding-top: $tertiary-padding;
margin: $tertiary-padding 0px;
}

// Paragraphs
p {
font-size: 1.15rem;
margin-bottom: $tertiary-padding;
white-space: pre-line;
margin: $tertiary-padding 0px;

svg {
width: 1rem;
Expand All @@ -29,10 +33,20 @@
}

blockquote {
border-radius: 8px;
background: $blockquote-background;
padding: $tertiary-padding;
min-width: 60%;
margin: $tertiary-padding;
p:first-child{
margin-top: 0px;
}
p:last-child {
margin-bottom: 0px;
}

div {
display: none;
}
}

// Strikethrough text
Expand All @@ -42,10 +56,10 @@
// Tables
table {
width: 100%;
margin-bottom: 1.2rem;
background-color: $base-color;
border-spacing: 0;
border: .5px solid $chrome-color;
margin: $tertiary-padding 0px;

tr {
td,
Expand Down Expand Up @@ -77,9 +91,20 @@
margin-top: $tertiary-padding;
padding: $secondary-padding;
object-fit: scale-down;
max-width: 100%;
border: $subtle-border;
box-sizing: border-box;
display: block;
margin-left: auto;
margin-right: auto;
max-width: 90vw;
}

iframe {
display: block;
margin-left: auto;
margin-right: auto;
max-width: 90vw;
margin-top: $tertiary-padding 0px;
margin-bottom: $tertiary-padding 0px;
}

// Horizontal Rule
Expand Down Expand Up @@ -114,7 +139,7 @@

a {
color: $primary-color;
display: inline-block;
display: inline;
}

// Lists
Expand Down
Loading

0 comments on commit 34e9d0c

Please sign in to comment.