Disable zoom, select text, auto fill token
This commit is contained in:
+19
-19
@@ -2,33 +2,33 @@
|
|||||||
VITE_PORT = 3000
|
VITE_PORT = 3000
|
||||||
VITE_API_BASE_URL = /api/v1/
|
VITE_API_BASE_URL = /api/v1/
|
||||||
VITE_API_WS_URL = /ws/
|
VITE_API_WS_URL = /ws/
|
||||||
VITE_SECURITY_CODE =
|
VITE_SECURITY_CODE = "00"
|
||||||
|
|
||||||
# Backend environments
|
# Backend environments
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
SECRET_KEY =
|
SECRET_KEY = <ENTER SECRET KEY HERE>
|
||||||
ALLOWED_HOSTS =
|
ALLOWED_HOSTS = localhost,proxy
|
||||||
PER_PAGE_SIZE =
|
PER_PAGE_SIZE = 10
|
||||||
# Database
|
# Database
|
||||||
MYSQL_PORT=
|
MYSQL_PORT=3306
|
||||||
DATABASE_NAME =
|
DATABASE_NAME = walmart_db
|
||||||
DATABASE_USER =
|
DATABASE_USER = root
|
||||||
DATABASE_PASSWORD =
|
DATABASE_PASSWORD = digitoolsolutions
|
||||||
DATABASE_HOST =
|
DATABASE_HOST = mysql
|
||||||
|
|
||||||
DJANGO_SUPERUSER_USERNAME =
|
DJANGO_SUPERUSER_USERNAME = superadmin
|
||||||
DJANGO_SUPERUSER_EMAIL =
|
DJANGO_SUPERUSER_EMAIL = admin@gmail.com
|
||||||
DJANGO_SUPERUSER_PASSWORD =
|
DJANGO_SUPERUSER_PASSWORD = admin
|
||||||
|
|
||||||
# Redis
|
# Redis
|
||||||
REDIS_PORT =
|
REDIS_PORT=6379
|
||||||
|
|
||||||
# Watchtower
|
# Watchtower
|
||||||
WATCHTOWER_HTTP_API_TOKEN =
|
WATCHTOWER_HTTP_API_TOKEN = <ENTER TOKEN HERE>
|
||||||
UPDATE_HOOK_TOKEN =
|
UPDATE_HOOK_TOKEN = <ENTER TOKEN HERE>
|
||||||
WATCHTOWER_URL =
|
WATCHTOWER_URL = http://watchtower:8080/v1/update
|
||||||
|
|
||||||
# Registry Images
|
# Registry Images
|
||||||
FRONTEND_IMAGE =
|
FRONTEND_IMAGE = gitea.digitoolsolutions.synology.me/dts/tv-walmart-fe:latest
|
||||||
BACKEND_IMAGE =
|
BACKEND_IMAGE = gitea.digitoolsolutions.synology.me/dts/tv-walmart-be:latest
|
||||||
RELEASE_API_URL =
|
RELEASE_API_URL = https://server.digitoolsolutions.synology.me/api/v1/system/release/latest/
|
||||||
|
|||||||
+36
-5
@@ -64,9 +64,27 @@ if exist "%ROOT_DIR%.env.example" set "ENV_SAMPLE=%ROOT_DIR%.env.example"
|
|||||||
if "%ENV_SAMPLE%"=="" if exist "%ROOT_DIR%.env.template" set "ENV_SAMPLE=%ROOT_DIR%.env.template"
|
if "%ENV_SAMPLE%"=="" if exist "%ROOT_DIR%.env.template" set "ENV_SAMPLE=%ROOT_DIR%.env.template"
|
||||||
|
|
||||||
if "%ENV_SAMPLE%"=="" goto :ENV_CLEANUP
|
if "%ENV_SAMPLE%"=="" goto :ENV_CLEANUP
|
||||||
copy /Y "%ENV_SAMPLE%" "%ROOT_DIR%.env" >nul
|
|
||||||
echo [ACTION REQUIRED] Created .env from sample. Configure it in Notepad, save, and close...
|
echo - Generating .env with secure random SECRET_KEY and Watchtower tokens...
|
||||||
|
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
||||||
|
"$tpl = Get-Content -Raw -Path '%ENV_SAMPLE%';" ^
|
||||||
|
"$rng = [System.Security.Cryptography.RandomNumberGenerator]::Create();" ^
|
||||||
|
"$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.ToCharArray();" ^
|
||||||
|
"$b1 = New-Object byte[] 50; $rng.GetBytes($b1);" ^
|
||||||
|
"$secret = -join ($b1 | ForEach-Object { $chars[$_ %% $chars.Length] });" ^
|
||||||
|
"$b2 = New-Object byte[] 32; $rng.GetBytes($b2); $wtToken = ([BitConverter]::ToString($b2) -replace '-','').ToLower();" ^
|
||||||
|
"$b3 = New-Object byte[] 32; $rng.GetBytes($b3); $hookToken = ([BitConverter]::ToString($b3) -replace '-','').ToLower();" ^
|
||||||
|
"$tpl = $tpl -replace '<ENTER SECRET KEY HERE>', $secret;" ^
|
||||||
|
"$tpl = [regex]::Replace($tpl, '<ENTER TOKEN HERE>', $wtToken, 1);" ^
|
||||||
|
"$tpl = [regex]::Replace($tpl, '<ENTER TOKEN HERE>', $hookToken, 1);" ^
|
||||||
|
"$utf8NoBom = New-Object System.Text.UTF8Encoding $false;" ^
|
||||||
|
"[System.IO.File]::WriteAllText('%ROOT_DIR%.env', $tpl, $utf8NoBom);" ^
|
||||||
|
"if ($tpl -match '<ENTER ') { exit 2 } else { exit 0 }"
|
||||||
|
|
||||||
|
if %errorLevel% equ 2 (
|
||||||
|
echo [ACTION REQUIRED] Some placeholders remain in .env. Configure in Notepad, save, and close...
|
||||||
start /wait notepad.exe "%ROOT_DIR%.env"
|
start /wait notepad.exe "%ROOT_DIR%.env"
|
||||||
|
)
|
||||||
|
|
||||||
:ENV_CLEANUP
|
:ENV_CLEANUP
|
||||||
if not exist "%ROOT_DIR%.env" (
|
if not exist "%ROOT_DIR%.env" (
|
||||||
@@ -404,9 +422,9 @@ powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
|||||||
"$set = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable -ExecutionTimeLimit ([TimeSpan]::Zero) -RestartCount 5 -RestartInterval (New-TimeSpan -Minutes 1) -MultipleInstances IgnoreNew;" ^
|
"$set = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable -ExecutionTimeLimit ([TimeSpan]::Zero) -RestartCount 5 -RestartInterval (New-TimeSpan -Minutes 1) -MultipleInstances IgnoreNew;" ^
|
||||||
"Register-ScheduledTask -TaskName 'WSL Docker Startup' -Action $act -Trigger $trig -Principal $prin -Settings $set -Force | Out-Null"
|
"Register-ScheduledTask -TaskName 'WSL Docker Startup' -Action $act -Trigger $trig -Principal $prin -Settings $set -Force | Out-Null"
|
||||||
if %errorLevel% neq 0 (
|
if %errorLevel% neq 0 (
|
||||||
echo [WARNING] Failed to create Task Scheduler entry WSL Docker Startup!
|
echo [WARNING] Failed to create Task Scheduler entry WSL Docker Startup.
|
||||||
) else (
|
) else (
|
||||||
echo - Registered 24/7 startup task: WSL Docker Startup (User: %USERDOMAIN%\%USERNAME%)
|
echo - Registered 24/7 startup task: WSL Docker Startup (User: %USERDOMAIN%\%USERNAME%^)
|
||||||
)
|
)
|
||||||
|
|
||||||
set "WINLOGON_KEY=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
set "WINLOGON_KEY=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||||
@@ -422,6 +440,19 @@ set "EDGE_POL=HKLM\SOFTWARE\Policies\Microsoft\Edge"
|
|||||||
reg add "%EDGE_POL%" /v "InPrivateModeAvailability" /t REG_DWORD /d 1 /f >nul
|
reg add "%EDGE_POL%" /v "InPrivateModeAvailability" /t REG_DWORD /d 1 /f >nul
|
||||||
reg add "%EDGE_POL%" /v "ClearBrowsingDataOnExit" /t REG_DWORD /d 0 /f >nul
|
reg add "%EDGE_POL%" /v "ClearBrowsingDataOnExit" /t REG_DWORD /d 0 /f >nul
|
||||||
reg add "%EDGE_POL%" /v "RestoreOnStartup" /t REG_DWORD /d 4 /f >nul
|
reg add "%EDGE_POL%" /v "RestoreOnStartup" /t REG_DWORD /d 4 /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "ShowHomeButton" /t REG_DWORD /d 0 /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "HomepageLocation" /t REG_SZ /d "file:///C:/KioskApp/startup.html" /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "NewTabPageLocation" /t REG_SZ /d "file:///C:/KioskApp/startup.html" /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "DeveloperToolsAvailability" /t REG_DWORD /d 2 /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "AllowDeletingBrowserHistory" /t REG_DWORD /d 0 /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "PrintingEnabled" /t REG_DWORD /d 0 /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "DownloadRestrictions" /t REG_DWORD /d 3 /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "BookmarkBarEnabled" /t REG_DWORD /d 0 /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "AutofillAddressEnabled" /t REG_DWORD /d 0 /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "AutofillCreditCardEnabled" /t REG_DWORD /d 0 /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "PasswordManagerEnabled" /t REG_DWORD /d 0 /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f >nul
|
||||||
|
reg add "%EDGE_POL%" /v "TranslateEnabled" /t REG_DWORD /d 0 /f >nul
|
||||||
|
|
||||||
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
||||||
"$user = '%KIOSK_USER%';" ^
|
"$user = '%KIOSK_USER%';" ^
|
||||||
@@ -436,7 +467,7 @@ powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
|||||||
"$profilePath = (Get-ItemProperty $profReg -ErrorAction SilentlyContinue).ProfileImagePath;" ^
|
"$profilePath = (Get-ItemProperty $profReg -ErrorAction SilentlyContinue).ProfileImagePath;" ^
|
||||||
"if ($profilePath) {" ^
|
"if ($profilePath) {" ^
|
||||||
" $hivePath = Join-Path $profilePath 'NTUSER.DAT';" ^
|
" $hivePath = Join-Path $profilePath 'NTUSER.DAT';" ^
|
||||||
" $edgeCmd = '\"' + $edge + '\" --kiosk \"file:///C:/KioskApp/startup.html\" --edge-kiosk-type=fullscreen --user-data-dir=\"C:\KioskBrowserData\" --no-first-run --disable-features=TranslateUI --allow-file-access-from-files';" ^
|
" $edgeCmd = '\"' + $edge + '\" --kiosk \"file:///C:/KioskApp/startup.html\" --edge-kiosk-type=fullscreen --user-data-dir=\"C:\KioskBrowserData\" --no-first-run --allow-file-access-from-files --disable-pinch';" ^
|
||||||
" $loaded = $false;" ^
|
" $loaded = $false;" ^
|
||||||
" if (-not (Test-Path \"Registry::HKEY_USERS\$sid\")) {" ^
|
" if (-not (Test-Path \"Registry::HKEY_USERS\$sid\")) {" ^
|
||||||
" reg load \"HKU\$sid\" \"$hivePath\" >$null 2>&1;" ^
|
" reg load \"HKU\$sid\" \"$hivePath\" >$null 2>&1;" ^
|
||||||
|
|||||||
+11
-2
@@ -10,6 +10,15 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
overscroll-behavior-x: none;
|
||||||
|
touch-action: pan-y;
|
||||||
|
-ms-content-zooming: none;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -45,7 +54,7 @@
|
|||||||
#000 calc(100% - 12px)
|
#000 calc(100% - 12px)
|
||||||
);
|
);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
animation: spin 3s infinite ease-in-out;
|
animation: spin 5s infinite ease-in-out;
|
||||||
}
|
}
|
||||||
.loader::before,
|
.loader::before,
|
||||||
.loader::after {
|
.loader::after {
|
||||||
@@ -79,7 +88,7 @@
|
|||||||
right/calc(200% + 1ch) 100%;
|
right/calc(200% + 1ch) 100%;
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
background-clip: text;
|
background-clip: text;
|
||||||
animation: l7 3s infinite steps(100);
|
animation: l7 5s infinite steps(100);
|
||||||
}
|
}
|
||||||
.loader-text:before {
|
.loader-text:before {
|
||||||
content: "Loading...";
|
content: "Loading...";
|
||||||
|
|||||||
Reference in New Issue
Block a user