Favicon, title, automatic & manual server naming (#2)

Server name may be set in config file. If unset, backend uses the folder name being served. This is shown in page title for site root, and subfolder names are also now shown. New icon of Droppy icon, changing only the color.
This commit is contained in:
2023-11-08 23:00:07 +00:00
parent 9762d7c1ad
commit 7391033d1e
10 changed files with 13 additions and 245 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ async def watch(req, ws):
msgspec.json.encode(
{
"server": {
"name": "Cista", # Should be configurable
"name": config.config.name or config.config.path.name,
"version": __version__,
"public": config.config.public,
},
+1
View File
@@ -14,6 +14,7 @@ class Config(msgspec.Struct):
listen: str
secret: str = secrets.token_hex(12)
public: bool = False
name: str = ""
users: dict[str, User] = {}
links: dict[str, Link] = {}