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.

Reviewed-on: #2
This commit is contained in:
Leo Vasanko
2023-11-08 23:00:07 +00:00
parent e26cb8f70a
commit fb03fa5430
10 changed files with 13 additions and 245 deletions

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,
},

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] = {}