Passwort Falsch Abfrage und Version auf Dashboard
This commit is contained in:
@@ -212,7 +212,10 @@ router.get('/:id/download', authenticate, async (req, res) => {
|
|||||||
const bcrypt = require('bcryptjs');
|
const bcrypt = require('bcryptjs');
|
||||||
const pw = req.query.password || req.headers['x-share-password'] || '';
|
const pw = req.query.password || req.headers['x-share-password'] || '';
|
||||||
const ok = pw && await bcrypt.compare(pw, share.password_hash);
|
const ok = pw && await bcrypt.compare(pw, share.password_hash);
|
||||||
if (!ok) return res.status(403).json({ error: 'Falsches Passwort', passwordRequired: true });
|
if (!ok) return res.status(403).json({
|
||||||
|
error: 'Falsches Passwort',
|
||||||
|
passwordRequired: !pw // true = noch kein PW eingegeben, false = falsches PW
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const fp = path.join(UPLOAD_DIR, file.filename);
|
const fp = path.join(UPLOAD_DIR, file.filename);
|
||||||
|
|||||||
60
deploy-helper.bat
Normal file
60
deploy-helper.bat
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal EnableDelayedExpansion
|
||||||
|
chcp 65001 >nul
|
||||||
|
|
||||||
|
set PROJEKT=D:\projekt
|
||||||
|
set DOWNLOADS=%USERPROFILE%\Downloads
|
||||||
|
set COUNT=0
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ╔══════════════════════════════════════╗
|
||||||
|
echo ║ DickenDock Deploy-Helper ║
|
||||||
|
echo ╚══════════════════════════════════════╝
|
||||||
|
echo.
|
||||||
|
|
||||||
|
:: Alle Dateien im Download-Ordner prüfen und im Projekt suchen
|
||||||
|
for %%F in ("%DOWNLOADS%\*.*") do (
|
||||||
|
set "DATEI=%%~nxF"
|
||||||
|
:: Im Projektordner rekursiv nach dieser Datei suchen
|
||||||
|
for /r "%PROJEKT%" %%P in ("%%~nxF") do (
|
||||||
|
copy /Y "%%F" "%%P" >nul 2>&1
|
||||||
|
if !ERRORLEVEL!==0 (
|
||||||
|
echo ✓ !DATEI! → %%P
|
||||||
|
set /A COUNT+=1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if %COUNT%==0 (
|
||||||
|
echo Keine passenden Dateien im Download-Ordner gefunden.
|
||||||
|
echo.
|
||||||
|
goto :ende
|
||||||
|
)
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo %COUNT% Datei(en) kopiert.
|
||||||
|
echo.
|
||||||
|
set /p MSG=" Commit-Nachricht (Enter = 'Update'): "
|
||||||
|
if "!MSG!"=="" set MSG=Update
|
||||||
|
|
||||||
|
cd /d %PROJEKT%
|
||||||
|
git add -A
|
||||||
|
git commit -m "!MSG!"
|
||||||
|
git push
|
||||||
|
|
||||||
|
if %ERRORLEVEL%==0 (
|
||||||
|
echo.
|
||||||
|
echo ✓ Gepusht! Proxmox-Konsole:
|
||||||
|
echo.
|
||||||
|
echo cd /opt/dickendock
|
||||||
|
echo docker compose down
|
||||||
|
echo docker builder prune -f
|
||||||
|
echo docker compose up -d --build
|
||||||
|
echo.
|
||||||
|
) else (
|
||||||
|
echo ✕ Push fehlgeschlagen.
|
||||||
|
echo.
|
||||||
|
)
|
||||||
|
|
||||||
|
:ende
|
||||||
|
pause
|
||||||
@@ -838,11 +838,8 @@ function Dashboard({ toast, mobile, setActive, unreadMsgs=0 }) {
|
|||||||
<Notepad toast={toast} />
|
<Notepad toast={toast} />
|
||||||
<div style={{ marginTop:24, textAlign:'center',
|
<div style={{ marginTop:24, textAlign:'center',
|
||||||
color:'rgba(255,255,255,0.12)', fontSize:9, fontFamily:'monospace', letterSpacing:1 }}>
|
color:'rgba(255,255,255,0.12)', fontSize:9, fontFamily:'monospace', letterSpacing:1 }}>
|
||||||
{(() => { try {
|
{typeof __BUILD_TIME__ !== 'undefined' && __BUILD_TIME__
|
||||||
const d = new Date(typeof __BUILD_TIME__ !== 'undefined' ? __BUILD_TIME__ : '');
|
? `GEBAUT ${__BUILD_TIME__}` : null}
|
||||||
if (isNaN(d)) return null;
|
|
||||||
return `GEBAUT ${d.toLocaleDateString('de-DE',{day:'2-digit',month:'2-digit',year:'numeric'})} ${d.toLocaleTimeString('de-DE',{hour:'2-digit',minute:'2-digit'})}`;
|
|
||||||
} catch { return null; }})()}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,17 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import react from '@vitejs/plugin-react'
|
import react from '@vitejs/plugin-react'
|
||||||
|
|
||||||
|
const now = new Date();
|
||||||
|
const buildTime = now.toLocaleString('de-DE', {
|
||||||
|
timeZone: 'Europe/Berlin',
|
||||||
|
day: '2-digit', month: '2-digit', year: 'numeric',
|
||||||
|
hour: '2-digit', minute: '2-digit'
|
||||||
|
});
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
server: { proxy: { '/api': 'http://localhost:4000' } },
|
server: { proxy: { '/api': 'http://localhost:4000' } },
|
||||||
|
define: {
|
||||||
|
__BUILD_TIME__: JSON.stringify(buildTime),
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user