mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Location/Weather: using a different API to geocode location name + fixed weather display which was offseted by a day
This commit is contained in:
@@ -216,10 +216,10 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
function removeWidgetFromSection(section, index) {
|
||||
// Logger.log("BarTab", "Removing widget from section", section, "at index", index)
|
||||
// Logger.log("BarTab", "Removing widget from section", section, "at index", index)
|
||||
var sectionArray = Settings.data.bar.widgets[section]
|
||||
//Logger.log("BarTab", "Current section array:", JSON.stringify(sectionArray))
|
||||
|
||||
//Logger.log("BarTab", "Current section array:", JSON.stringify(sectionArray))
|
||||
if (sectionArray && index >= 0 && index < sectionArray.length) {
|
||||
// Create a new array to avoid modifying the original
|
||||
var newArray = sectionArray.slice()
|
||||
@@ -238,6 +238,7 @@ ColumnLayout {
|
||||
//Logger.log("BarTab", "Verification - updated section array:", JSON.stringify(updatedArray))
|
||||
}, 100)
|
||||
} else {
|
||||
|
||||
//Logger.log("BarTab", "Invalid section or index:", section, index, "array length:",
|
||||
// sectionArray ? sectionArray.length : "null")
|
||||
}
|
||||
|
||||
@@ -90,7 +90,10 @@ NBox {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
spacing: Style.marginS * scaling
|
||||
NText {
|
||||
text: Qt.formatDateTime(new Date(LocationService.data.weather.daily.time[index]), "ddd")
|
||||
text: {
|
||||
var weatherDate = new Date(LocationService.data.weather.daily.time[index].replace(/-/g, "/"))
|
||||
return Qt.formatDateTime(weatherDate, "ddd")
|
||||
}
|
||||
color: Color.mOnSurface
|
||||
}
|
||||
NIcon {
|
||||
|
||||
Reference in New Issue
Block a user