Repository URL to install this package:
|
Version:
3.0.1.40031-bionic ▾
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/common.css">
<link rel="stylesheet" href="css/preview.css">
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/common-old.js"></script>
<script type="text/javascript" src="js/drag.js"></script>
<script type="text/javascript" src="js/polyfills.js"></script>
<script type="text/javascript" src="js/vue.js"></script>
</head>
<body>
<div id="preview">
<div class="app-bar window-drag-handle">
<span class="window-title window-drag-handle">
<img draggable="false" class="icon window-drag-handle" v-bind:src="iconLink"/>
<span class="title window-drag-handle">{{ title }}</span>
</span>
<div class="close" onclick=closeWindow()></div>
</div>
<div class="content">
<div
class="loader"
v-if="loading"
>
Loading preview...
</div>
<img
class="thumbnail"
v-if="thumbnailLink"
v-bind:src="thumbnailLink"
/>
<div class="no-preview" v-if="!hasPreview">
No preview available.
</div>
</div>
</div>
<script src="js/debug.js"></script>
<script type="text/javascript">
var data = {
id: null,
type: null,
title: '',
iconLink: '',
thumbnailLink: '',
loading: true,
hasPreview: true,
}
var app = new Vue({
el: '#preview',
data: data,
});
function init(values) {
Object.keys(values).forEach(function(k) {
data[k] = values[k];
});
document.addEventListener('keydown', function(e) {
if ((e.keyCode === 27) || (e.keyCode === 32)) {
e.preventDefault();
closeWindow();
}
});
}
function setThumbnailPath(path) {
if (path) {
// Add the current time to bypass the browser cache. Otherwise, changes
// to the thumbnail within a single run of Insync don't get reflected
// (tested on OS X 10.12).
//
// This is already coming from a local Insync cache, anyway.
data.thumbnailLink = path + '#' + new Date().getTime();
} else {
data.hasPreview = false;
}
data.loading = false;
}
callPy('initialize')
</script>
</body>
</html>