check git hash to reset page
This commit is contained in:
@@ -75,7 +75,4 @@ jobs:
|
|||||||
docker-compose pull
|
docker-compose pull
|
||||||
docker-compose down
|
docker-compose down
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
export HYPRLAND_INSTANCE_SIGNATURE=$(hyprctl instances -j | jq '.[0].instance' | tr -d "'\"")
|
|
||||||
hyprctl dispatch exec 'pkill firefox'
|
|
||||||
hyprctl dispatch exec 'firefox -kiosk localhost:9123'
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
monitor-im-flur:
|
monitor-im-flur:
|
||||||
image: git.rivercry.com/wg/monitor-im-flur:latest
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "9123:80"
|
- "9123:80"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
@@ -1,11 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo "<!DOCTYPE html>
|
echo "$GITHUB_SHA" > dist/git-hash.html
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Git Hash</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<pre>GITHUB_SHA = '$GITHUB_SHA';</pre>
|
|
||||||
</body>
|
|
||||||
</html>" > dist/git-hash.html
|
|
||||||
@@ -16,6 +16,28 @@ import Weather from "@/components/Weather/Weather";
|
|||||||
import style from "./style.module.css";
|
import style from "./style.module.css";
|
||||||
|
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
|
// '/git-hash.html' contains the current git commit hash, check it every 10 seconds and reload if it isn't the same
|
||||||
|
const [gitHash, setGitHash] = useState("");
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const interval = setInterval(async () => {
|
||||||
|
const response = await fetch("/git-hash.html");
|
||||||
|
const text = await response.text();
|
||||||
|
const newHash = text.trim();
|
||||||
|
console.log("Fetched git hash:", newHash);
|
||||||
|
|
||||||
|
if (gitHash === "") {
|
||||||
|
setGitHash(newHash);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gitHash !== "" && newHash !== gitHash) {
|
||||||
|
setGitHash(newHash);
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
}, 10000);
|
||||||
|
return () => clearInterval(interval);
|
||||||
|
}, [gitHash]);
|
||||||
|
|
||||||
const schemes = [style.day, style.evening, style.night];
|
const schemes = [style.day, style.evening, style.night];
|
||||||
const [schemeIndex, setSchemeIndex] = useState(0);
|
const [schemeIndex, setSchemeIndex] = useState(0);
|
||||||
const scheme = schemes[schemeIndex];
|
const scheme = schemes[schemeIndex];
|
||||||
|
|||||||
@@ -6,281 +6,281 @@ const iconNumberToPng = {
|
|||||||
"0": {
|
"0": {
|
||||||
day: {
|
day: {
|
||||||
description: "Sunny",
|
description: "Sunny",
|
||||||
image: "http://openweathermap.org/img/wn/01d@2x.png",
|
image: "https://openweathermap.org/img/wn/01d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Clear",
|
description: "Clear",
|
||||||
image: "http://openweathermap.org/img/wn/01n@2x.png",
|
image: "https://openweathermap.org/img/wn/01n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
day: {
|
day: {
|
||||||
description: "Mainly Sunny",
|
description: "Mainly Sunny",
|
||||||
image: "http://openweathermap.org/img/wn/01d@2x.png",
|
image: "https://openweathermap.org/img/wn/01d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Mainly Clear",
|
description: "Mainly Clear",
|
||||||
image: "http://openweathermap.org/img/wn/01n@2x.png",
|
image: "https://openweathermap.org/img/wn/01n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"2": {
|
"2": {
|
||||||
day: {
|
day: {
|
||||||
description: "Partly Cloudy",
|
description: "Partly Cloudy",
|
||||||
image: "http://openweathermap.org/img/wn/02d@2x.png",
|
image: "https://openweathermap.org/img/wn/02d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Partly Cloudy",
|
description: "Partly Cloudy",
|
||||||
image: "http://openweathermap.org/img/wn/02n@2x.png",
|
image: "https://openweathermap.org/img/wn/02n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"3": {
|
"3": {
|
||||||
day: {
|
day: {
|
||||||
description: "Cloudy",
|
description: "Cloudy",
|
||||||
image: "http://openweathermap.org/img/wn/03d@2x.png",
|
image: "https://openweathermap.org/img/wn/03d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Cloudy",
|
description: "Cloudy",
|
||||||
image: "http://openweathermap.org/img/wn/03n@2x.png",
|
image: "https://openweathermap.org/img/wn/03n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"45": {
|
"45": {
|
||||||
day: {
|
day: {
|
||||||
description: "Foggy",
|
description: "Foggy",
|
||||||
image: "http://openweathermap.org/img/wn/50d@2x.png",
|
image: "https://openweathermap.org/img/wn/50d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Foggy",
|
description: "Foggy",
|
||||||
image: "http://openweathermap.org/img/wn/50n@2x.png",
|
image: "https://openweathermap.org/img/wn/50n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"48": {
|
"48": {
|
||||||
day: {
|
day: {
|
||||||
description: "Rime Fog",
|
description: "Rime Fog",
|
||||||
image: "http://openweathermap.org/img/wn/50d@2x.png",
|
image: "https://openweathermap.org/img/wn/50d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Rime Fog",
|
description: "Rime Fog",
|
||||||
image: "http://openweathermap.org/img/wn/50n@2x.png",
|
image: "https://openweathermap.org/img/wn/50n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"51": {
|
"51": {
|
||||||
day: {
|
day: {
|
||||||
description: "Light Drizzle",
|
description: "Light Drizzle",
|
||||||
image: "http://openweathermap.org/img/wn/09d@2x.png",
|
image: "https://openweathermap.org/img/wn/09d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Light Drizzle",
|
description: "Light Drizzle",
|
||||||
image: "http://openweathermap.org/img/wn/09n@2x.png",
|
image: "https://openweathermap.org/img/wn/09n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"53": {
|
"53": {
|
||||||
day: {
|
day: {
|
||||||
description: "Drizzle",
|
description: "Drizzle",
|
||||||
image: "http://openweathermap.org/img/wn/09d@2x.png",
|
image: "https://openweathermap.org/img/wn/09d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Drizzle",
|
description: "Drizzle",
|
||||||
image: "http://openweathermap.org/img/wn/09n@2x.png",
|
image: "https://openweathermap.org/img/wn/09n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"55": {
|
"55": {
|
||||||
day: {
|
day: {
|
||||||
description: "Heavy Drizzle",
|
description: "Heavy Drizzle",
|
||||||
image: "http://openweathermap.org/img/wn/09d@2x.png",
|
image: "https://openweathermap.org/img/wn/09d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Heavy Drizzle",
|
description: "Heavy Drizzle",
|
||||||
image: "http://openweathermap.org/img/wn/09n@2x.png",
|
image: "https://openweathermap.org/img/wn/09n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"56": {
|
"56": {
|
||||||
day: {
|
day: {
|
||||||
description: "Light Freezing Drizzle",
|
description: "Light Freezing Drizzle",
|
||||||
image: "http://openweathermap.org/img/wn/09d@2x.png",
|
image: "https://openweathermap.org/img/wn/09d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Light Freezing Drizzle",
|
description: "Light Freezing Drizzle",
|
||||||
image: "http://openweathermap.org/img/wn/09n@2x.png",
|
image: "https://openweathermap.org/img/wn/09n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"57": {
|
"57": {
|
||||||
day: {
|
day: {
|
||||||
description: "Freezing Drizzle",
|
description: "Freezing Drizzle",
|
||||||
image: "http://openweathermap.org/img/wn/09d@2x.png",
|
image: "https://openweathermap.org/img/wn/09d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Freezing Drizzle",
|
description: "Freezing Drizzle",
|
||||||
image: "http://openweathermap.org/img/wn/09n@2x.png",
|
image: "https://openweathermap.org/img/wn/09n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"61": {
|
"61": {
|
||||||
day: {
|
day: {
|
||||||
description: "Light Rain",
|
description: "Light Rain",
|
||||||
image: "http://openweathermap.org/img/wn/10d@2x.png",
|
image: "https://openweathermap.org/img/wn/10d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Light Rain",
|
description: "Light Rain",
|
||||||
image: "http://openweathermap.org/img/wn/10n@2x.png",
|
image: "https://openweathermap.org/img/wn/10n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"63": {
|
"63": {
|
||||||
day: {
|
day: {
|
||||||
description: "Rain",
|
description: "Rain",
|
||||||
image: "http://openweathermap.org/img/wn/10d@2x.png",
|
image: "https://openweathermap.org/img/wn/10d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Rain",
|
description: "Rain",
|
||||||
image: "http://openweathermap.org/img/wn/10n@2x.png",
|
image: "https://openweathermap.org/img/wn/10n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"65": {
|
"65": {
|
||||||
day: {
|
day: {
|
||||||
description: "Heavy Rain",
|
description: "Heavy Rain",
|
||||||
image: "http://openweathermap.org/img/wn/10d@2x.png",
|
image: "https://openweathermap.org/img/wn/10d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Heavy Rain",
|
description: "Heavy Rain",
|
||||||
image: "http://openweathermap.org/img/wn/10n@2x.png",
|
image: "https://openweathermap.org/img/wn/10n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"66": {
|
"66": {
|
||||||
day: {
|
day: {
|
||||||
description: "Light Freezing Rain",
|
description: "Light Freezing Rain",
|
||||||
image: "http://openweathermap.org/img/wn/10d@2x.png",
|
image: "https://openweathermap.org/img/wn/10d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Light Freezing Rain",
|
description: "Light Freezing Rain",
|
||||||
image: "http://openweathermap.org/img/wn/10n@2x.png",
|
image: "https://openweathermap.org/img/wn/10n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"67": {
|
"67": {
|
||||||
day: {
|
day: {
|
||||||
description: "Freezing Rain",
|
description: "Freezing Rain",
|
||||||
image: "http://openweathermap.org/img/wn/10d@2x.png",
|
image: "https://openweathermap.org/img/wn/10d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Freezing Rain",
|
description: "Freezing Rain",
|
||||||
image: "http://openweathermap.org/img/wn/10n@2x.png",
|
image: "https://openweathermap.org/img/wn/10n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"71": {
|
"71": {
|
||||||
day: {
|
day: {
|
||||||
description: "Light Snow",
|
description: "Light Snow",
|
||||||
image: "http://openweathermap.org/img/wn/13d@2x.png",
|
image: "https://openweathermap.org/img/wn/13d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Light Snow",
|
description: "Light Snow",
|
||||||
image: "http://openweathermap.org/img/wn/13n@2x.png",
|
image: "https://openweathermap.org/img/wn/13n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"73": {
|
"73": {
|
||||||
day: {
|
day: {
|
||||||
description: "Snow",
|
description: "Snow",
|
||||||
image: "http://openweathermap.org/img/wn/13d@2x.png",
|
image: "https://openweathermap.org/img/wn/13d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Snow",
|
description: "Snow",
|
||||||
image: "http://openweathermap.org/img/wn/13n@2x.png",
|
image: "https://openweathermap.org/img/wn/13n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"75": {
|
"75": {
|
||||||
day: {
|
day: {
|
||||||
description: "Heavy Snow",
|
description: "Heavy Snow",
|
||||||
image: "http://openweathermap.org/img/wn/13d@2x.png",
|
image: "https://openweathermap.org/img/wn/13d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Heavy Snow",
|
description: "Heavy Snow",
|
||||||
image: "http://openweathermap.org/img/wn/13n@2x.png",
|
image: "https://openweathermap.org/img/wn/13n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"77": {
|
"77": {
|
||||||
day: {
|
day: {
|
||||||
description: "Snow Grains",
|
description: "Snow Grains",
|
||||||
image: "http://openweathermap.org/img/wn/13d@2x.png",
|
image: "https://openweathermap.org/img/wn/13d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Snow Grains",
|
description: "Snow Grains",
|
||||||
image: "http://openweathermap.org/img/wn/13n@2x.png",
|
image: "https://openweathermap.org/img/wn/13n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"80": {
|
"80": {
|
||||||
day: {
|
day: {
|
||||||
description: "Light Showers",
|
description: "Light Showers",
|
||||||
image: "http://openweathermap.org/img/wn/09d@2x.png",
|
image: "https://openweathermap.org/img/wn/09d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Light Showers",
|
description: "Light Showers",
|
||||||
image: "http://openweathermap.org/img/wn/09n@2x.png",
|
image: "https://openweathermap.org/img/wn/09n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"81": {
|
"81": {
|
||||||
day: {
|
day: {
|
||||||
description: "Showers",
|
description: "Showers",
|
||||||
image: "http://openweathermap.org/img/wn/09d@2x.png",
|
image: "https://openweathermap.org/img/wn/09d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Showers",
|
description: "Showers",
|
||||||
image: "http://openweathermap.org/img/wn/09n@2x.png",
|
image: "https://openweathermap.org/img/wn/09n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"82": {
|
"82": {
|
||||||
day: {
|
day: {
|
||||||
description: "Heavy Showers",
|
description: "Heavy Showers",
|
||||||
image: "http://openweathermap.org/img/wn/09d@2x.png",
|
image: "https://openweathermap.org/img/wn/09d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Heavy Showers",
|
description: "Heavy Showers",
|
||||||
image: "http://openweathermap.org/img/wn/09n@2x.png",
|
image: "https://openweathermap.org/img/wn/09n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"85": {
|
"85": {
|
||||||
day: {
|
day: {
|
||||||
description: "Light Snow Showers",
|
description: "Light Snow Showers",
|
||||||
image: "http://openweathermap.org/img/wn/13d@2x.png",
|
image: "https://openweathermap.org/img/wn/13d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Light Snow Showers",
|
description: "Light Snow Showers",
|
||||||
image: "http://openweathermap.org/img/wn/13n@2x.png",
|
image: "https://openweathermap.org/img/wn/13n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"86": {
|
"86": {
|
||||||
day: {
|
day: {
|
||||||
description: "Snow Showers",
|
description: "Snow Showers",
|
||||||
image: "http://openweathermap.org/img/wn/13d@2x.png",
|
image: "https://openweathermap.org/img/wn/13d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Snow Showers",
|
description: "Snow Showers",
|
||||||
image: "http://openweathermap.org/img/wn/13n@2x.png",
|
image: "https://openweathermap.org/img/wn/13n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"95": {
|
"95": {
|
||||||
day: {
|
day: {
|
||||||
description: "Thunderstorm",
|
description: "Thunderstorm",
|
||||||
image: "http://openweathermap.org/img/wn/11d@2x.png",
|
image: "https://openweathermap.org/img/wn/11d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Thunderstorm",
|
description: "Thunderstorm",
|
||||||
image: "http://openweathermap.org/img/wn/11n@2x.png",
|
image: "https://openweathermap.org/img/wn/11n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"96": {
|
"96": {
|
||||||
day: {
|
day: {
|
||||||
description: "Light Thunderstorms With Hail",
|
description: "Light Thunderstorms With Hail",
|
||||||
image: "http://openweathermap.org/img/wn/11d@2x.png",
|
image: "https://openweathermap.org/img/wn/11d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Light Thunderstorms With Hail",
|
description: "Light Thunderstorms With Hail",
|
||||||
image: "http://openweathermap.org/img/wn/11n@2x.png",
|
image: "https://openweathermap.org/img/wn/11n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"99": {
|
"99": {
|
||||||
day: {
|
day: {
|
||||||
description: "Thunderstorm With Hail",
|
description: "Thunderstorm With Hail",
|
||||||
image: "http://openweathermap.org/img/wn/11d@2x.png",
|
image: "https://openweathermap.org/img/wn/11d@2x.png",
|
||||||
},
|
},
|
||||||
night: {
|
night: {
|
||||||
description: "Thunderstorm With Hail",
|
description: "Thunderstorm With Hail",
|
||||||
image: "http://openweathermap.org/img/wn/11n@2x.png",
|
image: "https://openweathermap.org/img/wn/11n@2x.png",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -291,8 +291,6 @@ const useWeatherStore = create(
|
|||||||
weatherData: {},
|
weatherData: {},
|
||||||
fetchWeatherData: async () => {
|
fetchWeatherData: async () => {
|
||||||
const data = await fetchWeatherData();
|
const data = await fetchWeatherData();
|
||||||
|
|
||||||
// Process first location. Add a for-loop for multiple locations or weather models
|
|
||||||
const response = data[0];
|
const response = data[0];
|
||||||
|
|
||||||
if (response === null) {
|
if (response === null) {
|
||||||
@@ -300,7 +298,6 @@ const useWeatherStore = create(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attributes for timezone and location
|
|
||||||
const utcOffsetSeconds = response.utcOffsetSeconds();
|
const utcOffsetSeconds = response.utcOffsetSeconds();
|
||||||
const current = response.current();
|
const current = response.current();
|
||||||
const hourly = response.hourly();
|
const hourly = response.hourly();
|
||||||
@@ -311,7 +308,6 @@ const useWeatherStore = create(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: The order of weather variables in the URL query and the indices below need to match!
|
|
||||||
const weatherData = {
|
const weatherData = {
|
||||||
current: {
|
current: {
|
||||||
time: current.time(),
|
time: current.time(),
|
||||||
|
|||||||
Reference in New Issue
Block a user