Complete bootstrap base frontend prototype.
- login page and playlist setting page frontend templates. - fast API route. - reading and saving config files - mock login logic for UI interaction demo
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
CONFIG_PATH = os.path.join(os.path.dirname(__file__), "..", "config.json")
|
||||
|
||||
def load_config():
|
||||
if not os.path.exists(CONFIG_PATH):
|
||||
return {}
|
||||
with open(CONFIG_PATH, "r", encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
|
||||
def save_config(new_config):
|
||||
with open(CONFIG_PATH, "w", encoding="utf-8") as f:
|
||||
json.dump(new_config, f, indent=4, ensure_ascii=False)
|
||||
Reference in New Issue
Block a user