Fix shell details: distro name, storage path only in footer
- OS name comes from /etc/os-release (e.g. 'CachyOS Linux'), mirroring the original app's os_utils; macOS/Windows get proper names too - Status pill shows the name as-is instead of uppercasing it - Removed the watched-folder path next to the logo; it now appears only in the footer strip (spec updated to match)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import platform
|
||||
import time
|
||||
|
||||
from django.conf import settings
|
||||
@@ -6,13 +5,7 @@ from rest_framework.permissions import AllowAny
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
|
||||
|
||||
def _os_info():
|
||||
system = platform.system()
|
||||
icon = {"Linux": "linux", "Darwin": "apple", "Windows": "windows"}.get(
|
||||
system, "unknown"
|
||||
)
|
||||
return {"name": system, "release": platform.release(), "icon": icon}
|
||||
from .system_info import get_os_info
|
||||
|
||||
|
||||
def _worker_counts():
|
||||
@@ -35,7 +28,7 @@ class StatusView(APIView):
|
||||
"env": settings.APP_ENV,
|
||||
"git_hash": settings.GIT_COMMIT_HASH,
|
||||
"version": settings.APP_VERSION,
|
||||
"os": _os_info(),
|
||||
"os": get_os_info(),
|
||||
"watched_folder": settings.WATCHED_FOLDER,
|
||||
"e621_time_ms": None, # no e621 calls in the backend yet
|
||||
"workers": _worker_counts(),
|
||||
|
||||
Reference in New Issue
Block a user