From 60a53ef3d3f90d92f7eb5c60deb1acb7fce61393 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Wed, 4 Feb 2026 18:00:21 +0000 Subject: [PATCH] Implement server name config to override the default of using share folder name. --- cista/api.py | 17 ++++++ .../src/components/UserManagementModal.vue | 54 +++++++++++++++++-- frontend/src/repositories/User.ts | 5 ++ 3 files changed, 73 insertions(+), 3 deletions(-) diff --git a/cista/api.py b/cista/api.py index 105db8f..b6266d1 100644 --- a/cista/api.py +++ b/cista/api.py @@ -176,3 +176,20 @@ async def update_public(request): raise BadRequest(str(e)) from None config.update_config({"public": public}) return json({"message": "Public access setting updated", "public": public}) + + +@bp.put("config/name") +async def update_name(request): + await auth.verify(request, privileged=True) + try: + name = request.json["name"] + if not isinstance(name, str): + raise ValueError("name must be a string") + except KeyError: + raise BadRequest("Missing name field") from None + except ValueError as e: + raise BadRequest(str(e)) from None + config.update_config({"name": name}) + # Return the effective name (fallback to path.name if empty) + effective_name = name or config.config.path.name + return json({"message": "Server name updated", "name": effective_name}) diff --git a/frontend/src/components/UserManagementModal.vue b/frontend/src/components/UserManagementModal.vue index 824a2e4..5d00275 100644 --- a/frontend/src/components/UserManagementModal.vue +++ b/frontend/src/components/UserManagementModal.vue @@ -3,6 +3,19 @@
Loading...

Server Settings

+
+ +
+ + Leave empty to use the share folder name +
+