mirror of
https://github.com/TheGreyDiamond/open360viewer.git
synced 2025-07-17 20:33:48 +02:00
Updated title based on opened file
This commit is contained in:
@ -6,6 +6,7 @@ document.addEventListener("drop", (event) => {
|
|||||||
document.getElementById("state").innerHTML =
|
document.getElementById("state").innerHTML =
|
||||||
"Loading file. If this stays empty try another file.";
|
"Loading file. If this stays empty try another file.";
|
||||||
const superFile = event.dataTransfer.files[0].path;
|
const superFile = event.dataTransfer.files[0].path;
|
||||||
|
document.getElementById("title").innerHTML = "open360viewer - " + superFile
|
||||||
FileType.fromFile(superFile).then((type) => {
|
FileType.fromFile(superFile).then((type) => {
|
||||||
type = type["mime"].split("/")[0];
|
type = type["mime"].split("/")[0];
|
||||||
if (type == "image") {
|
if (type == "image") {
|
||||||
|
@ -8,6 +8,7 @@ ipcRenderer.on("FileData", function (event, data) {
|
|||||||
document.getElementById("loadingBig").style.display = "block";
|
document.getElementById("loadingBig").style.display = "block";
|
||||||
document.getElementById("state").innerHTML =
|
document.getElementById("state").innerHTML =
|
||||||
"Loading file. If this stays empty try another file.";
|
"Loading file. If this stays empty try another file.";
|
||||||
|
document.getElementById("title").innerHTML = "open360viewer - " + data.filePaths[0];
|
||||||
if (data.type == "image") {
|
if (data.type == "image") {
|
||||||
loadImageFromSource(data.filePaths[0]);
|
loadImageFromSource(data.filePaths[0]);
|
||||||
} else if (data.type == "video") {
|
} else if (data.type == "video") {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html class="dark">
|
<html class="dark">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>360 Viewer</title>
|
<title id="title">360 Viewer</title>
|
||||||
<meta name="viewport"
|
<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" />
|
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">
|
<link href="../output.css" rel="stylesheet">
|
||||||
|
@ -24,12 +24,7 @@ var getDirectories = function (src, callback) {
|
|||||||
let data = minify(myFile, options).then(function(data) {
|
let data = minify(myFile, options).then(function(data) {
|
||||||
fs.writeFileSync(dst, data);
|
fs.writeFileSync(dst, data);
|
||||||
})
|
})
|
||||||
|
|
||||||
//
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user