mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-06 21:57:48 +01:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5a489198a | ||
|
|
17f54da524 | ||
|
|
b5065673ab | ||
|
|
610b0f63e0 | ||
|
|
73317bda67 | ||
|
|
f690f3acba | ||
|
|
eea9f1f6cb | ||
|
|
d9089e8d1c | ||
|
|
bed5acc9d5 | ||
|
|
f46feff445 | ||
|
|
d46a98c7d5 | ||
|
|
05af60df4f |
@@ -9,7 +9,7 @@
|
||||
- Images built for AMD64 (x86_64), ARM64, ARMv7 and ARMv6
|
||||
- Supports all Raspberry Pi's, most SBCs & Apple Silicon
|
||||
- Full i18n support with automatic language detection
|
||||
- Translations for Chinese, Dutch, French, German, Norwegian Bokmål, Polish, Portuguese, Russian, Spanish and Swedish
|
||||
- Translations for Chinese, Dutch, French, German, Hebrew, Hungarian, Norwegian Bokmål, Polish, Portuguese, Russian, Spanish and Swedish
|
||||
- Want to help translate? [Join the Weblate project](https://hosted.weblate.org/engage/homepage/)
|
||||
- Service & Web Bookmarks
|
||||
- Docker Integration
|
||||
@@ -139,3 +139,5 @@ Huge thanks to the all the contributors who have helped make this project what i
|
||||
- [SuperDOS](https://github.com/benphelps/homepage/commits?author=SuperDOS) - Swedish Translation
|
||||
- [xicopitz](https://github.com/benphelps/homepage/commits?author=xicopitz) - Gotify & Prowlarr Integration
|
||||
- [andrii-kryvoviaz](https://github.com/benphelps/homepage/commits?author=andrii-kryvoviaz) - Background opacity option
|
||||
- Daniel Varga - German & Hungarian Translation
|
||||
- [ShlomiPorush](https://github.com/benphelps/homepage/commits?author=ShlomiPorush) - Hebrew Translation
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
"pihole": {
|
||||
"queries": "Consultes",
|
||||
"blocked": "Bloquejat",
|
||||
"gravity": "Gravetat"
|
||||
"gravity": "Gravity"
|
||||
},
|
||||
"portainer": {
|
||||
"running": "Executant",
|
||||
@@ -147,14 +147,14 @@
|
||||
"albums": "Àlbums"
|
||||
},
|
||||
"adguard": {
|
||||
"queries": "Queries",
|
||||
"blocked": "Blocked",
|
||||
"filtered": "Filtered",
|
||||
"latency": "Latency"
|
||||
"queries": "Consultes",
|
||||
"blocked": "Bloquejat",
|
||||
"filtered": "Filtrat",
|
||||
"latency": "Latència"
|
||||
},
|
||||
"qbittorrent": {
|
||||
"download": "Download",
|
||||
"upload": "Upload",
|
||||
"download": "Descàrrega",
|
||||
"upload": "Càrrega",
|
||||
"leech": "Leech",
|
||||
"seed": "Seed"
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"total": "Gesamt",
|
||||
"free": "Frei",
|
||||
"used": "Gebraucht",
|
||||
"load": "Load"
|
||||
"load": "Belastung"
|
||||
},
|
||||
"docker": {
|
||||
"rx": "Rx",
|
||||
@@ -24,13 +24,13 @@
|
||||
"playing": "Spielen",
|
||||
"transcoding": "Transcodierung",
|
||||
"bitrate": "Bitrate",
|
||||
"no_active": "No Active Streams"
|
||||
"no_active": "Keine aktiven streamen"
|
||||
},
|
||||
"tautulli": {
|
||||
"playing": "Spielen",
|
||||
"transcoding": "Transcodierung",
|
||||
"bitrate": "Bitrate",
|
||||
"no_active": "No Active Streams"
|
||||
"no_active": "Keine aktiven streamen"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Aktiv",
|
||||
|
||||
@@ -153,9 +153,9 @@
|
||||
"latency": "Latencia"
|
||||
},
|
||||
"qbittorrent": {
|
||||
"download": "Download",
|
||||
"upload": "Upload",
|
||||
"leech": "Leech",
|
||||
"seed": "Seed"
|
||||
"download": "Descarga",
|
||||
"upload": "Subida",
|
||||
"leech": "Compañeros",
|
||||
"seed": "Semillas"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Actif",
|
||||
"upload": "Téléverser",
|
||||
"download": "Télécharger"
|
||||
"upload": "Envoi",
|
||||
"download": "Réception"
|
||||
},
|
||||
"sonarr": {
|
||||
"wanted": "Demandé",
|
||||
@@ -68,8 +68,8 @@
|
||||
"gravity": "Listes dom. bloqués"
|
||||
},
|
||||
"speedtest": {
|
||||
"upload": "Téléversement",
|
||||
"download": "Téléchargement",
|
||||
"upload": "Envoi",
|
||||
"download": "Récept.",
|
||||
"ping": "Ping"
|
||||
},
|
||||
"portainer": {
|
||||
@@ -164,8 +164,8 @@
|
||||
"latency": "Latence"
|
||||
},
|
||||
"qbittorrent": {
|
||||
"download": "Download",
|
||||
"upload": "Upload",
|
||||
"download": "Réception",
|
||||
"upload": "Envoi",
|
||||
"leech": "Leech",
|
||||
"seed": "Seed"
|
||||
}
|
||||
|
||||
161
public/locales/he/common.json
Normal file
161
public/locales/he/common.json
Normal file
@@ -0,0 +1,161 @@
|
||||
{
|
||||
"widget": {
|
||||
"missing_type": "סוג ווידג'ט חסר: {{type}}",
|
||||
"api_error": "שגיאת API",
|
||||
"status": "סטטוס"
|
||||
},
|
||||
"weather": {
|
||||
"current": "מיקום נוכחי",
|
||||
"allow": "יש ללחוץ כדי לאשר",
|
||||
"updating": "מעדכן",
|
||||
"wait": "המתן בבקשה"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "חיפוש…"
|
||||
},
|
||||
"resources": {
|
||||
"total": "סה\"כ",
|
||||
"free": "פנוי",
|
||||
"used": "בשימוש",
|
||||
"load": "עומס"
|
||||
},
|
||||
"docker": {
|
||||
"rx": "RX",
|
||||
"tx": "TX",
|
||||
"mem": "זיכרון",
|
||||
"cpu": "מעבד",
|
||||
"offline": "כבוי"
|
||||
},
|
||||
"emby": {
|
||||
"playing": "מנגן",
|
||||
"transcoding": "מקודד",
|
||||
"bitrate": "סיביות",
|
||||
"no_active": "אין הזרמות פעילות"
|
||||
},
|
||||
"tautulli": {
|
||||
"playing": "מנגן",
|
||||
"transcoding": "מקודד",
|
||||
"bitrate": "סיביות",
|
||||
"no_active": "אין הזרמות פעילות"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "יחס",
|
||||
"remaining": "נותר",
|
||||
"downloaded": "הורד"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "יחס",
|
||||
"queue": "תור",
|
||||
"timeleft": "זמן שנותר"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "פעיל",
|
||||
"upload": "העלאה",
|
||||
"download": "הורדה"
|
||||
},
|
||||
"transmission": {
|
||||
"download": "הורדה",
|
||||
"upload": "העלאה",
|
||||
"leech": "בהורדה",
|
||||
"seed": "בשיתוף"
|
||||
},
|
||||
"qbittorrent": {
|
||||
"download": "הורדה",
|
||||
"upload": "העלאה",
|
||||
"leech": "בהורדה",
|
||||
"seed": "בשיתוף"
|
||||
},
|
||||
"sonarr": {
|
||||
"wanted": "מבוקש",
|
||||
"queued": "בתור",
|
||||
"series": "סדרות"
|
||||
},
|
||||
"radarr": {
|
||||
"wanted": "מבוקש",
|
||||
"queued": "בתור",
|
||||
"movies": "סרטים"
|
||||
},
|
||||
"lidarr": {
|
||||
"wanted": "מבוקש",
|
||||
"queued": "בתור",
|
||||
"albums": "אלבומים"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "מבוקש",
|
||||
"queued": "בתור",
|
||||
"books": "ספרים"
|
||||
},
|
||||
"bazarr": {
|
||||
"missingEpisodes": "פרקים חסרים",
|
||||
"missingMovies": "סרטים חסרים"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "ממתין",
|
||||
"approved": "מאושר",
|
||||
"available": "זמין"
|
||||
},
|
||||
"jellyseerr": {
|
||||
"pending": "ממתין",
|
||||
"approved": "מאושר",
|
||||
"available": "זמין"
|
||||
},
|
||||
"overseerr": {
|
||||
"pending": "ממתין",
|
||||
"approved": "מאושר",
|
||||
"available": "זמין"
|
||||
},
|
||||
"pihole": {
|
||||
"queries": "שאילתות",
|
||||
"blocked": "נחסם",
|
||||
"gravity": "Gravity"
|
||||
},
|
||||
"adguard": {
|
||||
"queries": "שאילתות",
|
||||
"blocked": "נחסם",
|
||||
"filtered": "מסונן",
|
||||
"latency": "השהיה"
|
||||
},
|
||||
"speedtest": {
|
||||
"upload": "העלאה",
|
||||
"download": "הורדה",
|
||||
"ping": "פינג"
|
||||
},
|
||||
"portainer": {
|
||||
"running": "פעיל",
|
||||
"stopped": "נעצר",
|
||||
"total": "סה\"כ"
|
||||
},
|
||||
"traefik": {
|
||||
"routers": "ניתובים",
|
||||
"services": "שירותים",
|
||||
"middleware": "מתווך"
|
||||
},
|
||||
"npm": {
|
||||
"enabled": "מופעל",
|
||||
"disabled": "מבוטל",
|
||||
"total": "סה\"כ"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "קבע את התצורה של מטבע קריפטו אחד או יותר למעקב",
|
||||
"1hour": "שעה אחת",
|
||||
"1day": "יום 1",
|
||||
"7days": "7 יום",
|
||||
"30days": "30 יום"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "אפליקציות",
|
||||
"clients": "לקוחות",
|
||||
"messages": "הודעות"
|
||||
},
|
||||
"prowlarr": {
|
||||
"enableIndexers": "אינדקסים",
|
||||
"numberOfGrabs": "Grabs",
|
||||
"numberOfQueries": "שאילתות",
|
||||
"numberOfFailGrabs": "Fail Grabs",
|
||||
"numberOfFailQueries": "Fail Queries"
|
||||
},
|
||||
"jackett": {
|
||||
"configured": "מוגדר",
|
||||
"errored": "שגיאה"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"resources": {
|
||||
"total": "Total",
|
||||
"free": "Free",
|
||||
"used": "Used",
|
||||
"load": "Load"
|
||||
"total": "Összes",
|
||||
"free": "Szabad",
|
||||
"used": "Használt",
|
||||
"load": "Terhelés"
|
||||
},
|
||||
"docker": {
|
||||
"rx": "RX",
|
||||
@@ -13,149 +13,149 @@
|
||||
"offline": "Offline"
|
||||
},
|
||||
"lidarr": {
|
||||
"albums": "Albums",
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued"
|
||||
"albums": "Albumok",
|
||||
"wanted": "Keresett",
|
||||
"queued": "Sorban áll"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
"wanted": "Keresett",
|
||||
"queued": "Sorban áll",
|
||||
"books": "Könyvek"
|
||||
},
|
||||
"bazarr": {
|
||||
"missingEpisodes": "Missing Episodes",
|
||||
"missingMovies": "Missing Movies"
|
||||
"missingEpisodes": "Hiányzó epizódok",
|
||||
"missingMovies": "Hiányzó filmek"
|
||||
},
|
||||
"widget": {
|
||||
"missing_type": "Missing Widget Type: {{type}}",
|
||||
"api_error": "API Error",
|
||||
"status": "Status"
|
||||
"missing_type": "Hiányzó Widget Típus: {{type}}",
|
||||
"api_error": "API Hiba",
|
||||
"status": "Státusz"
|
||||
},
|
||||
"weather": {
|
||||
"current": "Current Location",
|
||||
"allow": "Click to allow",
|
||||
"updating": "Updating",
|
||||
"wait": "Please wait"
|
||||
"current": "Aktuális hely",
|
||||
"allow": "Kattints az engedélyezéshez",
|
||||
"updating": "Frissítés",
|
||||
"wait": "Kérlek várj"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Search…"
|
||||
"placeholder": "Keresés…"
|
||||
},
|
||||
"emby": {
|
||||
"playing": "Playing",
|
||||
"transcoding": "Transcoding",
|
||||
"bitrate": "Bitrate",
|
||||
"no_active": "No Active Streams"
|
||||
"playing": "Lejátszás",
|
||||
"transcoding": "Átkódolás",
|
||||
"bitrate": "Bitráta",
|
||||
"no_active": "Nincs aktív lejátszás"
|
||||
},
|
||||
"tautulli": {
|
||||
"playing": "Playing",
|
||||
"transcoding": "Transcoding",
|
||||
"bitrate": "Bitrate",
|
||||
"no_active": "No Active Streams"
|
||||
"playing": "Lejátszás folyamatban",
|
||||
"transcoding": "Átkódolás",
|
||||
"bitrate": "Bitráta",
|
||||
"no_active": "Nincs aktív lejátszás"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Remaining",
|
||||
"downloaded": "Downloaded"
|
||||
"rate": "Ráta",
|
||||
"remaining": "Hátralévő",
|
||||
"downloaded": "Letöltött"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
"rate": "Ráta",
|
||||
"queue": "Sor",
|
||||
"timeleft": "Hátralévő idő"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Active",
|
||||
"upload": "Upload",
|
||||
"download": "Download"
|
||||
"active": "Aktív",
|
||||
"upload": "Feltöltés",
|
||||
"download": "Letöltés"
|
||||
},
|
||||
"transmission": {
|
||||
"leech": "Leech",
|
||||
"seed": "Seed",
|
||||
"download": "Download",
|
||||
"upload": "Upload"
|
||||
"leech": "Leechelés",
|
||||
"seed": "Seedelés",
|
||||
"download": "Letöltés",
|
||||
"upload": "Feltöltés"
|
||||
},
|
||||
"qbittorrent": {
|
||||
"download": "Download",
|
||||
"upload": "Upload",
|
||||
"leech": "Leech",
|
||||
"seed": "Seed"
|
||||
"download": "Letöltés",
|
||||
"upload": "Feltöltés",
|
||||
"leech": "Leechelés",
|
||||
"seed": "Seedelés"
|
||||
},
|
||||
"sonarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"series": "Series"
|
||||
"wanted": "Keresett",
|
||||
"queued": "Sorban áll",
|
||||
"series": "Sorozat"
|
||||
},
|
||||
"radarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"movies": "Movies"
|
||||
"wanted": "Keresett",
|
||||
"queued": "Sorban áll",
|
||||
"movies": "Filmek"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
"pending": "Függőben",
|
||||
"approved": "Engedélyezett",
|
||||
"available": "Elérhető"
|
||||
},
|
||||
"jellyseerr": {
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
"pending": "Függőben",
|
||||
"approved": "Engedélyezett",
|
||||
"available": "Elérhető"
|
||||
},
|
||||
"overseerr": {
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
"pending": "Függőben",
|
||||
"approved": "Engedélyezett",
|
||||
"available": "Elérhető"
|
||||
},
|
||||
"pihole": {
|
||||
"queries": "Queries",
|
||||
"blocked": "Blocked",
|
||||
"gravity": "Gravity"
|
||||
"queries": "Lekérdezések",
|
||||
"blocked": "Blokkolt",
|
||||
"gravity": "Gravitáció"
|
||||
},
|
||||
"adguard": {
|
||||
"queries": "Queries",
|
||||
"blocked": "Blocked",
|
||||
"filtered": "Filtered",
|
||||
"latency": "Latency"
|
||||
"queries": "Lekérdezések",
|
||||
"blocked": "Blokkolt",
|
||||
"filtered": "Szűrt",
|
||||
"latency": "Késleltetés"
|
||||
},
|
||||
"speedtest": {
|
||||
"upload": "Upload",
|
||||
"download": "Download",
|
||||
"upload": "Feltöltés",
|
||||
"download": "Letöltés",
|
||||
"ping": "Ping"
|
||||
},
|
||||
"portainer": {
|
||||
"running": "Running",
|
||||
"stopped": "Stopped",
|
||||
"total": "Total"
|
||||
"running": "Futó",
|
||||
"stopped": "Megállított",
|
||||
"total": "Összes"
|
||||
},
|
||||
"traefik": {
|
||||
"routers": "Routers",
|
||||
"services": "Services",
|
||||
"middleware": "Middleware"
|
||||
"routers": "Routerek",
|
||||
"services": "Folyamatok",
|
||||
"middleware": "Közvetítő"
|
||||
},
|
||||
"npm": {
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled",
|
||||
"total": "Total"
|
||||
"enabled": "Bekapcsolva",
|
||||
"disabled": "Kikapcsolva",
|
||||
"total": "Összes"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track",
|
||||
"1hour": "1 Hour",
|
||||
"1day": "1 Day",
|
||||
"7days": "7 Days",
|
||||
"30days": "30 Days"
|
||||
"configure": "Állíts be egy vagy több Cryptovalutát a követéshez",
|
||||
"1hour": "1 Óra",
|
||||
"1day": "1 Nap",
|
||||
"7days": "7 Nap",
|
||||
"30days": "30 Nap"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
"messages": "Messages"
|
||||
"apps": "Applikációk",
|
||||
"clients": "Kliensek",
|
||||
"messages": "Üzenetek"
|
||||
},
|
||||
"prowlarr": {
|
||||
"enableIndexers": "Indexers",
|
||||
"numberOfGrabs": "Grabs",
|
||||
"numberOfFailGrabs": "Fail Grabs",
|
||||
"numberOfQueries": "Queries",
|
||||
"numberOfFailQueries": "Fail Queries"
|
||||
"enableIndexers": "Indexerek",
|
||||
"numberOfGrabs": "Fogott",
|
||||
"numberOfFailGrabs": "Hibás fogások",
|
||||
"numberOfQueries": "Lekérdezések",
|
||||
"numberOfFailQueries": "Hibás lekérdezések"
|
||||
},
|
||||
"jackett": {
|
||||
"configured": "Configured",
|
||||
"errored": "Errored"
|
||||
"configured": "Beállított",
|
||||
"errored": "Hibás"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,10 +110,10 @@
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "配置一个或多个需要追踪的加密",
|
||||
"1hour": "1 Hour",
|
||||
"1day": "1 Day",
|
||||
"7days": "7 Days",
|
||||
"30days": "30 Days"
|
||||
"1hour": "1小时",
|
||||
"1day": "1天",
|
||||
"7days": "7天",
|
||||
"30days": "30天"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "应用",
|
||||
@@ -121,41 +121,41 @@
|
||||
"messages": "信息"
|
||||
},
|
||||
"prowlarr": {
|
||||
"enableIndexers": "Indexers",
|
||||
"numberOfGrabs": "Grabs",
|
||||
"numberOfQueries": "Queries",
|
||||
"numberOfFailGrabs": "Fail Grabs",
|
||||
"numberOfFailQueries": "Fail Queries"
|
||||
"enableIndexers": "索引器",
|
||||
"numberOfGrabs": "抓取",
|
||||
"numberOfQueries": "查询",
|
||||
"numberOfFailGrabs": "抓取失败",
|
||||
"numberOfFailQueries": "查询失败"
|
||||
},
|
||||
"transmission": {
|
||||
"download": "下载",
|
||||
"upload": "上传",
|
||||
"leech": "Leech",
|
||||
"leech": "吸血",
|
||||
"seed": "做种"
|
||||
},
|
||||
"jackett": {
|
||||
"configured": "Configured",
|
||||
"errored": "Errored"
|
||||
"configured": "已配置",
|
||||
"errored": "出错了"
|
||||
},
|
||||
"bazarr": {
|
||||
"missingEpisodes": "Missing Episodes",
|
||||
"missingMovies": "Missing Movies"
|
||||
"missingEpisodes": "缺少的剧集",
|
||||
"missingMovies": "缺少的电影"
|
||||
},
|
||||
"lidarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"albums": "Albums"
|
||||
"wanted": "订阅",
|
||||
"queued": "队列",
|
||||
"albums": "相册"
|
||||
},
|
||||
"adguard": {
|
||||
"queries": "Queries",
|
||||
"blocked": "Blocked",
|
||||
"filtered": "Filtered",
|
||||
"latency": "Latency"
|
||||
"queries": "查询",
|
||||
"blocked": "阻止",
|
||||
"filtered": "过滤",
|
||||
"latency": "延迟"
|
||||
},
|
||||
"qbittorrent": {
|
||||
"download": "Download",
|
||||
"upload": "Upload",
|
||||
"leech": "Leech",
|
||||
"seed": "Seed"
|
||||
"download": "下载",
|
||||
"upload": "上传",
|
||||
"leech": "吸血",
|
||||
"seed": "做种"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,12 +22,6 @@ function resolveIcon(icon) {
|
||||
}
|
||||
|
||||
export default function Item({ service }) {
|
||||
const handleOnClick = () => {
|
||||
if (service.href && service.href !== "#") {
|
||||
window.open(service.href, "_blank").focus();
|
||||
}
|
||||
};
|
||||
|
||||
const hasLink = service.href && service.href !== "#";
|
||||
|
||||
return (
|
||||
@@ -41,13 +35,9 @@ export default function Item({ service }) {
|
||||
<div className="flex select-none">
|
||||
{service.icon &&
|
||||
(hasLink ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleOnClick}
|
||||
className="flex-shrink-0 flex items-center justify-center w-12 "
|
||||
>
|
||||
<a type="button" href={service.href} className="flex-shrink-0 flex items-center justify-center w-12 ">
|
||||
<Image src={resolveIcon(service.icon)} width={32} height={32} alt="logo" />
|
||||
</button>
|
||||
</a>
|
||||
) : (
|
||||
<div className="flex-shrink-0 flex items-center justify-center w-12 ">
|
||||
<Image src={resolveIcon(service.icon)} width={32} height={32} alt="logo" />
|
||||
@@ -57,7 +47,7 @@ export default function Item({ service }) {
|
||||
{hasLink ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleOnClick}
|
||||
href={service.href}
|
||||
className="flex-1 flex items-center justify-between rounded-r-md "
|
||||
>
|
||||
<div className="flex-1 px-2 py-2 text-sm text-left">
|
||||
|
||||
9
src/pages/api/validate.js
Normal file
9
src/pages/api/validate.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import checkAndCopyConfig from "utils/config";
|
||||
|
||||
const configs = ["docker.yaml", "settings.yaml", "services.yaml", "bookmarks.yaml"];
|
||||
|
||||
export default async function handler(req, res) {
|
||||
const errors = configs.map((config) => checkAndCopyConfig(config)).filter((status) => status !== true);
|
||||
|
||||
res.send(errors);
|
||||
}
|
||||
@@ -14,7 +14,7 @@ export default async function handler(req, res) {
|
||||
}
|
||||
|
||||
if (!apiKey && provider) {
|
||||
const settings = await getSettings();
|
||||
const settings = getSettings();
|
||||
apiKey = settings?.providers?.openweathermap;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export default async function handler(req, res) {
|
||||
}
|
||||
|
||||
if (!apiKey && provider) {
|
||||
const settings = await getSettings();
|
||||
const settings = getSettings();
|
||||
apiKey = settings?.providers?.weatherapi;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import Head from "next/head";
|
||||
import dynamic from "next/dynamic";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useEffect, useContext } from "react";
|
||||
import { BiError } from "react-icons/bi";
|
||||
|
||||
import ServicesGroup from "components/services/group";
|
||||
import BookmarksGroup from "components/bookmarks/group";
|
||||
@@ -23,17 +24,54 @@ const ColorToggle = dynamic(() => import("components/color-toggle"), {
|
||||
|
||||
const rightAlignedWidgets = ["weatherapi", "openweathermap", "weather", "search", "datetime"];
|
||||
|
||||
export async function getStaticProps() {
|
||||
const settings = await getSettings();
|
||||
|
||||
return {
|
||||
props: {
|
||||
settings,
|
||||
},
|
||||
};
|
||||
export function getStaticProps() {
|
||||
try {
|
||||
const settings = getSettings();
|
||||
return {
|
||||
props: {
|
||||
settings,
|
||||
},
|
||||
};
|
||||
} catch (e) {
|
||||
return {
|
||||
props: {
|
||||
settings: {},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default function Home({ settings }) {
|
||||
export default function Index({ settings }) {
|
||||
const { data: errorsData } = useSWR("/api/validate");
|
||||
|
||||
if (errorsData && errorsData.length > 0) {
|
||||
return (
|
||||
<div className="w-full container m-auto justify-center p-10">
|
||||
<div className="flex flex-col">
|
||||
{errorsData.map((error, i) => (
|
||||
<div
|
||||
className="basis-1/2 bg-theme-500 dark:bg-theme-600 text-theme-600 dark:text-theme-300 m-2 rounded-md font-mono shadow-md border-4 border-transparent"
|
||||
key={i}
|
||||
>
|
||||
<div className="bg-amber-200 text-amber-800 dark:text-amber-200 dark:bg-amber-800 p-2 rounded-md font-bold">
|
||||
<BiError className="float-right w-6 h-6" />
|
||||
{error.config}
|
||||
</div>
|
||||
<div className="p-2 text-theme-100 dark:text-theme-200">
|
||||
<pre className="opacity-50 font-bold pb-2">{error.reason}</pre>
|
||||
<pre className="text-sm">{error.mark.snippet}</pre>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return <Home settings={settings} />;
|
||||
}
|
||||
|
||||
function Home({ settings }) {
|
||||
const { i18n } = useTranslation();
|
||||
const { theme, setTheme } = useContext(ThemeContext);
|
||||
const { color, setColor } = useContext(ColorContext);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
# For configuration options and examples, please see:
|
||||
# https://github.com/benphelps/homepage/wiki/Bookmarks
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
---
|
||||
# For configuration options and examples, please see:
|
||||
# https://github.com/benphelps/homepage/wiki/Docker-Integration
|
||||
|
||||
my-docker:
|
||||
host: 127.0.0.1
|
||||
port: 2375
|
||||
# my-docker:
|
||||
# host: 127.0.0.1
|
||||
# port: 2375
|
||||
|
||||
other-docker:
|
||||
socket: /var/run/docker.sock
|
||||
# my-docker:
|
||||
# socket: /var/run/docker.sock
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
# For configuration options and examples, please see:
|
||||
# https://github.com/benphelps/homepage/wiki/Services
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
# For configuration options and examples, please see:
|
||||
# https://github.com/benphelps/homepage/wiki/Settings
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
# For configuration options and examples, please see:
|
||||
# https://github.com/benphelps/homepage/wiki/Information-Widgets
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable no-console */
|
||||
import { join } from "path";
|
||||
import { existsSync, copyFile, promises as fs } from "fs";
|
||||
import { existsSync, copyFile, readFileSync } from "fs";
|
||||
|
||||
import yaml from "js-yaml";
|
||||
|
||||
@@ -15,13 +15,22 @@ export default function checkAndCopyConfig(config) {
|
||||
}
|
||||
console.info("%s was copied to the config folder", config);
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
yaml.load(readFileSync(configYaml, "utf8"));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return { ...e, config };
|
||||
}
|
||||
}
|
||||
|
||||
export async function getSettings() {
|
||||
export function getSettings() {
|
||||
checkAndCopyConfig("settings.yaml");
|
||||
|
||||
const settingsYaml = join(process.cwd(), "config", "settings.yaml");
|
||||
const fileContents = await fs.readFile(settingsYaml, "utf8");
|
||||
const fileContents = readFileSync(settingsYaml, "utf8");
|
||||
return yaml.load(fileContents);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user