Show routes #72
6 changed files with 26 additions and 25 deletions
|
@ -13,10 +13,6 @@
|
|||
}
|
||||
|
||||
/* show routes */
|
||||
.asset-name {
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
.show-asset {
|
||||
width: 100%;
|
||||
margin-bottom: 1em;
|
||||
|
|
|
@ -97,7 +97,7 @@ socket.on('publish-failure', function(msg){
|
|||
|
||||
socket.on('publish-complete', function(msg){
|
||||
var publishResults;
|
||||
var showUrl = '/s/' + msg.name + '/' + msg.result.claim_id;
|
||||
var showUrl = '/show/' + msg.name + '/' + msg.result.claim_id;
|
||||
// build new publish area
|
||||
publishResults = '<p>Your publish is complete! You are being redirected to it now.</p>';
|
||||
publishResults += '<p><a target="_blank" href="' + showUrl + '">If you do not get redirected, click here.</a></p>';
|
||||
|
|
|
@ -49,7 +49,7 @@ module.exports = (app) => {
|
|||
});
|
||||
});
|
||||
// route to show a specific asset
|
||||
app.get('/s/:name/:claim_id', ({ ip, originalUrl, params }, res) => {
|
||||
app.get('/show/:name/:claim_id', ({ ip, originalUrl, params }, res) => {
|
||||
// begin image-serve processes
|
||||
getClaimByClaimId(params.name, params.claim_id)
|
||||
.then(fileInfo => {
|
||||
|
@ -67,7 +67,7 @@ module.exports = (app) => {
|
|||
});
|
||||
});
|
||||
// route to show the winning free, public claim
|
||||
app.get('/s/:name', ({ ip, originalUrl, params }, res) => {
|
||||
app.get('/show/:name', ({ ip, originalUrl, params }, res) => {
|
||||
// get and render the content
|
||||
getClaimByName(params.name)
|
||||
.then(fileInfo => {
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
<div class="panel">
|
||||
<h2>Title</h2>
|
||||
<p class="asset-name">{{fileInfo.name}}</>
|
||||
<h2>Name</h2>
|
||||
<p>{{fileInfo.name}}</>
|
||||
</div>
|
||||
<div class="panel links">
|
||||
<h2 class="subheader">Links</h2>
|
||||
<a href="/{{fileInfo.name}}/{{fileInfo.claimId}}">Direct Link</a>
|
||||
</br>
|
||||
<input type="text" id="direct-link" class="link" readonly="true" spellcheck="false" value="spee.ch/{{fileInfo.name}}/{{fileInfo.claimId}}"/>
|
||||
<input type="text" id="direct-link" class="link" readonly="true" spellcheck="false" value="https://spee.ch/{{fileInfo.name}}/{{fileInfo.claimId}}"/>
|
||||
<button class="copy-button" data-elementtocopy="direct-link" onclick="copyToClipboard(event)">copy</button>
|
||||
</br>
|
||||
<br/>
|
||||
<a href="/s/{{fileInfo.name}}/{{fileInfo.claimId}}">Details Link</a>
|
||||
</br>
|
||||
<input type="text" id="show-link" class="link" readonly="true" spellcheck="false" value="spee.ch/s/{{fileInfo.name}}/{{fileInfo.claimId}}"/>
|
||||
<button class="copy-button" data-elementtocopy="show-link" onclick="copyToClipboard(event)">copy</button>
|
||||
</br>
|
||||
<br/>
|
||||
Embed HTML
|
||||
</br>
|
||||
<br/>
|
||||
{{#ifConditional fileInfo.fileType '===' 'video/mp4'}}
|
||||
<input type="text" id="embed-text" class="link" readonly="true" spellcheck="false" value='<video controls><source src="https://spee.ch/{{fileInfo.name}}/{{fileInfo.claimId}}" /></video>'/>
|
||||
{{else}}
|
||||
|
@ -26,6 +19,12 @@
|
|||
<button class="copy-button" data-elementtocopy="embed-text" onclick="copyToClipboard(event)">copy</button>
|
||||
<br/>
|
||||
<br/>
|
||||
<a href="/show/{{fileInfo.name}}/{{fileInfo.claimId}}">Details</a>
|
||||
</br>
|
||||
<input type="text" id="show-link" class="link" readonly="true" spellcheck="false" value="https://spee.ch/show/{{fileInfo.name}}/{{fileInfo.claimId}}"/>
|
||||
<button class="copy-button" data-elementtocopy="show-link" onclick="copyToClipboard(event)">copy</button>
|
||||
<br/>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="panel">
|
||||
<h2 class="subheader">Metadata</h2>
|
||||
|
|
|
@ -9,13 +9,23 @@
|
|||
</ul>
|
||||
<code>https://spee.ch/:name</code>
|
||||
<ul>
|
||||
<li >Serves the newest file with the largest bid at a claim</li>
|
||||
<li >Serves the winning free, public claim at this name</li>
|
||||
<li >E.g. <a href="/doitlive">spee.ch/doitlive</a></li>
|
||||
</ul>
|
||||
<code>https://spee.ch/show/:name</code>
|
||||
<ul>
|
||||
<li >Serves the winning claim at this name with additional details</li>
|
||||
<li >E.g. <a href="/show/doitlive">spee.ch/show/doitlive</a></li>
|
||||
</ul>
|
||||
<code>https://spee.ch/:name/:claim_id</code>
|
||||
<ul>
|
||||
<li >Serves a specific file at a claim</li>
|
||||
<li >E.g. <a href="/doitlive/c496c8c55ed79816fec39e36a78645aa4458edb5">spee.ch/doitlive/c496c8c55ed79816fec39e36a78645aa4458edb5</a></li>
|
||||
<li >Serves a specific claim</li>
|
||||
<li >E.g. <a href="/doitlive/ca3023187e901df9e9aabd95d6ae09b6cc69b3f0">spee.ch/doitlive/ca3023187e901df9e9aabd95d6ae09b6cc69b3f0</a></li>
|
||||
</ul>
|
||||
<code>https://spee.ch/show/:name/:claim_id</code>
|
||||
<ul>
|
||||
<li >Serves a specific claim with additional details</li>
|
||||
<li >E.g. <a href="/show/doitlive/ca3023187e901df9e9aabd95d6ae09b6cc69b3f0">spee.ch/show/doitlive/ca3023187e901df9e9aabd95d6ae09b6cc69b3f0</a></li>
|
||||
</ul>
|
||||
<code>https://spee.ch/:name/all</code>
|
||||
<ul>
|
||||
|
|
|
@ -13,9 +13,5 @@
|
|||
<a href="/doitlive"><img class="example-image" src="/doitlive"/></a>
|
||||
<div class="example-code"><img src="https://spee.ch/doitlive"/></div>
|
||||
</div>
|
||||
<div class="example">
|
||||
<h4>Use spee.ch to view all the assets at a LBRY claim:</h4>
|
||||
<a href="/doitlive/all">spee.ch/doitlive/all</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in a new issue