2017-06-23 06:43:53 +02:00
<div class="panel">
<h2>Publish</h2>
2017-07-28 23:39:39 +02:00
<div class="col-left" id="file-selection-area">
2017-06-23 06:43:53 +02:00
<div id="drop-zone" ondrop="drop_handler(event);" ondragover="dragover_handler(event);" ondragend="dragend_handler(event)">
<p>Drag and drop your file here, or choose your file below.</p>
2017-07-14 17:57:12 +02:00
<div class="input-error" id="input-error-file-selection" hidden="true"></div>
2017-07-23 03:01:17 +02:00
<input type="file" id="siofu_input" name="file" accept="video/*,image/*" onchange="previewAndStageFile(event.target.files[0])" enctype="multipart/form-data"/>
2017-06-11 03:33:03 +02:00
</div>
2017-07-28 23:39:39 +02:00
<div id="asset-preview-holder"></div>
2017-06-23 06:43:53 +02:00
</div>
<div class="col-right">
<div id="publish-active-area">
2017-07-14 17:57:12 +02:00
<div class="input-error" id="input-error-claim-name" hidden="true"></div>
2017-07-23 03:01:17 +02:00
<div class="claim-name-input-area">
2017-07-28 23:39:39 +02:00
Spee.ch/<input type="text" id="claim-name-input" placeholder="your-title-here" oninput="checkClaimName(event.target.value)">
<span id="claim-name-available" hidden="true" style="color: green">✔</span>
2017-07-23 03:01:17 +02:00
</div>
<p class="stop-float">
2017-06-23 06:43:53 +02:00
<label for="publish-license">License:</label>
<select type="text" id="publish-license" name="license" value="license">
<option value="Public Domain">Public Domain</option>
<option value="Creative Commons">Creative Commons</option>
2017-07-29 06:06:33 +02:00
<option value="CC Attribution-NonCommercial 4.0 International">CC Attribution-NonCommercial 4.0 International</option>
2017-06-27 03:14:42 +02:00
</select>
<br />
2017-06-23 06:43:53 +02:00
<input type="checkbox" id="publish-nsfw">
<label for="publish-nsfw">NSFW</label>
</p>
<p>
2017-07-14 17:57:12 +02:00
<div class="input-error" id="input-error-publish-submit" hidden="true"></div>
2017-07-28 23:59:53 +02:00
<button id="publish-submit" onclick="publishSelectedImage(event)">Publish</button>
2017-07-28 23:39:39 +02:00
<button onclick="resetPublishArea()">Reset</button>
2017-06-23 06:43:53 +02:00
</p>
<p><i>By clicking 'Publish' I attest that I have read and agree to the <a href="https://lbry.io/termsofservice" target="_blank">LBRY terms of service</a>.</i></p>
2017-06-11 03:33:03 +02:00
</div>
2017-06-10 05:39:07 +02:00
</div>
2017-06-22 19:08:41 +02:00
</div>
2017-07-28 23:39:39 +02:00
<script type="text/javascript" >
function resetPublishArea () {
// reset file selection area
document.getElementById('file-selection-area').innerHTML = `<div id="drop-zone" ondrop="drop_handler(event);" ondragover="dragover_handler(event);" ondragend="dragend_handler(event)">
<p>Drag and drop your file here, or choose your file below.</p>
<div class="input-error" id="input-error-file-selection" hidden="true"></div>
<input type="file" id="siofu_input" name="file" accept="video/*,image/*" onchange="previewAndStageFile(event.target.files[0])" enctype="multipart/form-data"/>
</div>
<div id="asset-preview-holder"></div>`;
// reset
document.getElementById('claim-name-input').value = '';
// remove staged files
stagedFiles = null;
// clear any errors
document.getElementById('input-error-file-selection').innerHTML = '';
document.getElementById('input-error-claim-name').innerHTML = '';
document.getElementById('input-error-publish-submit').innerHTML = '';
// remove nsfw check
document.getElementById('claim-name-available').hidden = true;
// remove nsfw check
document.getElementById('publish-nsfw').checked = false;
}
</script>