Updated title based on opened file

This commit is contained in:
TheGreyDiamond
2022-01-05 20:21:01 +01:00
parent 8c4a54494d
commit c88661564e
4 changed files with 3 additions and 6 deletions

View File

@ -6,6 +6,7 @@ document.addEventListener("drop", (event) => {
document.getElementById("state").innerHTML =
"Loading file. If this stays empty try another file.";
const superFile = event.dataTransfer.files[0].path;
document.getElementById("title").innerHTML = "open360viewer - " + superFile
FileType.fromFile(superFile).then((type) => {
type = type["mime"].split("/")[0];
if (type == "image") {

View File

@ -8,6 +8,7 @@ ipcRenderer.on("FileData", function (event, data) {
document.getElementById("loadingBig").style.display = "block";
document.getElementById("state").innerHTML =
"Loading file. If this stays empty try another file.";
document.getElementById("title").innerHTML = "open360viewer - " + data.filePaths[0];
if (data.type == "image") {
loadImageFromSource(data.filePaths[0]);
} else if (data.type == "video") {

View File

@ -2,7 +2,7 @@
<html class="dark">
<head>
<title>360 Viewer</title>
<title id="title">360 Viewer</title>
<meta name="viewport"
content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui" />
<link href="../output.css" rel="stylesheet">

View File

@ -24,12 +24,7 @@ var getDirectories = function (src, callback) {
let data = minify(myFile, options).then(function(data) {
fs.writeFileSync(dst, data);
})
//
}
//
}
}