Changes: auto-clean tempdir, loading animation in homepage
This commit is contained in:
parent
becf63d660
commit
2ca22b9e77
7 changed files with 78 additions and 2208 deletions
|
|
@ -9,7 +9,7 @@ export const baseDir = app.getAppPath();
|
|||
export const fastapiDir = isDev ? path.join(baseDir, "servers/fastapi") : path.join(baseDir, "resources/fastapi");
|
||||
export const nextjsDir = isDev ? path.join(baseDir, "servers/nextjs") : path.join(baseDir, "resources/nextjs");
|
||||
|
||||
export const tempDir = app.getPath("temp")
|
||||
export const tempDir = path.join(app.getPath("temp"), "presenton")
|
||||
export const userDataDir = app.getPath("userData")
|
||||
export const downloadsDir = app.getPath("downloads")
|
||||
export const userConfigPath = path.join(userDataDir, "userConfig.json")
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
"dev": "tsc && electron --gtk-version=3 .",
|
||||
"setup:env": "npm install && cd servers/fastapi && poetry install && cd ../../servers/nextjs && npm install",
|
||||
"build:ts": "tsc",
|
||||
"build:css": "tailwindcss -i ./resources/ui/assets/tailwind.import.css -o ./resources/ui/assets/tailwind.css",
|
||||
"build:css": "tailwindcss -i ./resources/ui/assets/css/tailwind.import.css -o ./resources/ui/assets/css/tailwind.css --watch",
|
||||
"build:nextjs": "rm -rf resources/nextjs && cp -r servers/nextjs resources/nextjs && cd resources/nextjs && npm install --omit=dev && npm run build",
|
||||
"build:fastapi": "rm -rf resources/fastapi && cd servers/fastapi && .venv/bin/pyinstaller --name fastapi --distpath ../../resources server.py",
|
||||
"build:electron": "tsc && node build.js",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
BIN
resources/ui/assets/images/presenton_logo.png
Normal file
BIN
resources/ui/assets/images/presenton_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 861 KiB |
|
|
@ -3,13 +3,30 @@
|
|||
|
||||
<head>
|
||||
<title>Presenton Open Source</title>
|
||||
<link rel="stylesheet" href="../assets/tailwind.css">
|
||||
<link rel="stylesheet" href="../assets/css/tailwind.css">
|
||||
<script src="./script.js"></script>
|
||||
<style>
|
||||
.loading-circle {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 4px solid rgba(255, 255, 255, 0.3);
|
||||
border-radius: 50%;
|
||||
border-top-color: white;
|
||||
animation: spin 1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="bg-gray-900 text-white flex flex-col items-center justify-center h-screen">
|
||||
<h1 class="text-4xl font-bold">Presenton Open Source</h1>
|
||||
<p class="mt-4">Waiting for server to start...</p>
|
||||
<img src="../assets/images/presenton_logo.png" alt="Presenton Logo" class="h-20">
|
||||
<p class="mt-20 text-lg">Waiting for server to start...</p>
|
||||
<div class="loading-circle mt-10"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -7,6 +7,7 @@ class TempFileService:
|
|||
base_dir = os.getenv("TEMP_DIRECTORY")
|
||||
|
||||
def __init__(self):
|
||||
self.cleanup_base_dir()
|
||||
os.makedirs(self.base_dir, exist_ok=True)
|
||||
|
||||
def create_dir_in_dir(self, base_dir: str, dir_name: Optional[str] = None) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue