diff --git a/assets/src/components/Files.vue b/assets/src/components/Files.vue index c5d72c07..91296bdd 100644 --- a/assets/src/components/Files.vue +++ b/assets/src/components/Files.vue @@ -117,6 +117,8 @@ export default { mounted () { window.addEventListener('keydown', this.keyEvent) window.addEventListener('scroll', event => { + if (this.req.kind !== 'listing') return + let top = 112 - window.scrollY if (top < 64) { diff --git a/caddy/hugo/old.js b/caddy/hugo/old.js deleted file mode 100644 index 551ed893..00000000 --- a/caddy/hugo/old.js +++ /dev/null @@ -1,26 +0,0 @@ - -hugo.schedule = function (event) { - event.preventDefault(); - - let date = document.getElementById('date').value; - if(document.getElementById('publishDate')) { - date = document.getElementById('publishDate').value; - } - - buttons.setLoading('publish'); - - let data = JSON.stringify(form2js(document.querySelector('form'))), - headers = { - 'Kind': document.getElementById('editor').dataset.kind, - 'Schedule': 'true' - }; - - webdav.put(window.location.pathname, data, headers) - .then(() => { - buttons.setDone('publish'); - }) - .catch(e => { - console.log(e); - buttons.setDone('publish', false) - }) -}