Set default instance name to empty string
parent
c1f2866a94
commit
9b3fc0c65e
|
@ -49,7 +49,7 @@ old_default_settings = {
|
||||||
default_settings = old_default_settings.copy()
|
default_settings = old_default_settings.copy()
|
||||||
default_settings.update({
|
default_settings.update({
|
||||||
"appearance": {
|
"appearance": {
|
||||||
"name": "OctoPrint",
|
"name": "",
|
||||||
"color": "white"
|
"color": "white"
|
||||||
},
|
},
|
||||||
"controls": [],
|
"controls": [],
|
||||||
|
|
|
@ -309,10 +309,8 @@ function TemperatureViewModel(settingsViewModel) {
|
||||||
if (val == undefined || val == 0)
|
if (val == undefined || val == 0)
|
||||||
return ""; // we don't want to display the minutes since the epoch if not connected yet ;)
|
return ""; // we don't want to display the minutes since the epoch if not connected yet ;)
|
||||||
|
|
||||||
// calculate current time in milliseconds in UTC
|
// current time in milliseconds in UTC
|
||||||
var now = new Date();
|
var timestampUtc = Date.now();
|
||||||
var timezoneOffset = now.getTimezoneOffset() * 60 * 1000;
|
|
||||||
var timestampUtc = now.getTime() + timezoneOffset;
|
|
||||||
|
|
||||||
// calculate difference in milliseconds
|
// calculate difference in milliseconds
|
||||||
var diff = timestampUtc - val;
|
var diff = timestampUtc - val;
|
||||||
|
@ -804,10 +802,11 @@ function GcodeFilesViewModel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.changeSorting = function(sorting) {
|
self.changeSorting = function(sorting) {
|
||||||
if (sorting != "name" && sorting != "upload")
|
if (sorting != "name" && sorting != "upload" && sorting != "size")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
self.currentSorting(sorting);
|
self.currentSorting(sorting);
|
||||||
|
self.changePage(0);
|
||||||
self._updateFiles();
|
self._updateFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -854,6 +853,13 @@ function GcodeFilesViewModel() {
|
||||||
if (a["date"] < b["date"]) return 1;
|
if (a["date"] < b["date"]) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
} else if (self.currentSorting() == "size") {
|
||||||
|
comparator = function(a, b) {
|
||||||
|
// sorts descending
|
||||||
|
if (a["bytes"] > b["bytes"]) return -1;
|
||||||
|
if (a["bytes"] < b["bytes"]) return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// work on all files
|
// work on all files
|
||||||
|
|
Loading…
Reference in New Issue