From: PhiTux Date: Sun, 12 Oct 2025 08:50:47 +0000 (+0200) Subject: css fixes X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=dcb02c1c1e045fd2e863979b9a5aea2dae6164d0;p=DailyTxT.git css fixes --- diff --git a/build.sh b/build.sh index 8b7b44d..3a5b941 100755 --- a/build.sh +++ b/build.sh @@ -8,17 +8,18 @@ set -euo pipefail # - Docker installed # # Usage: -# TOLGEE_API_KEY=... ./build.sh [IMAGE_TAG] +# TOLGEE_API_KEY=... ./build.sh IMAGE_TAG [--push] # # Example: # export TOLGEE_API_KEY=xxxxx -# ./build.sh phitux/dailytxt:2.x.x-testing.1 +# ./build.sh phitux/dailytxt:2.x.x-testing.1 [--push] if [[ $# -lt 1 ]]; then - echo "Usage: ./build.sh " + echo "Usage: ./build.sh [--push]" exit 1 fi IMAGE_TAG="$1" +PUSH_FLAG="${2:-}" if [[ -z "${TOLGEE_API_KEY:-}" ]]; then echo "Error: TOLGEE_API_KEY is not set." @@ -30,10 +31,29 @@ fi echo "[1/3] Writing IMAGE_TAG (=version) into backend/version ..." echo "$IMAGE_TAG" > ./backend/version -echo "[2/3] Pulling translations from Tolgee into frontend/src/i18n ..." +echo -e "\n[2/3] Pulling translations from Tolgee into frontend/src/i18n ..." tolgee pull --path ./frontend/src/i18n --api-key $TOLGEE_API_KEY -echo "[3/3] Building Docker image: $IMAGE_TAG" -docker build -t phitux/dailytxt:$IMAGE_TAG . +echo -e "\n[3/3] Building Docker image: $IMAGE_TAG" +if [[ -z "$PUSH_FLAG" ]]; then + # Default: local docker build (no push) + docker build -t phitux/dailytxt:$IMAGE_TAG . +else + case "$PUSH_FLAG" in + --push) + echo "Pushing image to Docker registry..." + # Build for multiple platforms and push to registry + #docker buildx build \ + # --platform linux/amd64,linux/arm64 \ + # -t phitux/dailytxt:$IMAGE_TAG \ + # --push . + ;; + *) + echo "Unknown second argument: '$PUSH_FLAG'" + echo "Usage: ./build.sh [--push]" + exit 1 + ;; + esac +fi -echo "Done. Image built: $IMAGE_TAG" +echo -e "\nDone. Image built: $IMAGE_TAG" diff --git a/frontend/src/lib/ImageViewer.svelte b/frontend/src/lib/ImageViewer.svelte index 49fd583..0fffd91 100644 --- a/frontend/src/lib/ImageViewer.svelte +++ b/frontend/src/lib/ImageViewer.svelte @@ -258,7 +258,6 @@ .image-container:hover .image { transform: scale(1.1); - box-shadow: 0 0 12px 3px rgba(0, 0, 0, 0.2); } .image { diff --git a/frontend/src/lib/Sidenav.svelte b/frontend/src/lib/Sidenav.svelte index a965a5b..816c2c0 100644 --- a/frontend/src/lib/Sidenav.svelte +++ b/frontend/src/lib/Sidenav.svelte @@ -586,6 +586,7 @@ display: flex; flex-direction: column; border-radius: 10px; + min-height: 0; } .list-group { diff --git a/frontend/src/routes/(authed)/+layout.svelte b/frontend/src/routes/(authed)/+layout.svelte index 7095a84..cb509a0 100644 --- a/frontend/src/routes/(authed)/+layout.svelte +++ b/frontend/src/routes/(authed)/+layout.svelte @@ -1117,10 +1117,10 @@ $effect(() => { if (window.matchMedia('(display-mode: standalone)').matches) { showInstallationHelp = false; - console.log("We're installed"); + console.log('DailyTxT is installed'); } else { showInstallationHelp = true; - console.log("We're not installed"); + console.log('DailyTxT is not installed'); } }); diff --git a/frontend/src/routes/(authed)/write/+page.svelte b/frontend/src/routes/(authed)/write/+page.svelte index c665cf4..9d3f1ec 100644 --- a/frontend/src/routes/(authed)/write/+page.svelte +++ b/frontend/src/routes/(authed)/write/+page.svelte @@ -348,6 +348,11 @@ const imageExtensions = ['jpeg', 'jpg', 'gif', 'png', 'webp', 'bmp']; + let autoLoadImages = $derived( + ($settings.setAutoloadImagesPerDevice && $autoLoadImagesThisDevice) || + (!$settings.setAutoloadImagesPerDevice && $settings.autoloadImagesByDefault) + ); + $effect(() => { if (filesOfDay && autoLoadImages !== undefined) { // add all files to images if correct extension @@ -359,7 +364,6 @@ ) { images = [...images, file]; - console.log(autoLoadImages); if (autoLoadImages) { loadImage(file); } @@ -368,11 +372,6 @@ } }); - let autoLoadImages = $derived( - ($settings.setAutoloadImagesPerDevice && $autoLoadImagesThisDevice) || - (!$settings.setAutoloadImagesPerDevice && $settings.autoloadImagesByDefault) - ); - function loadImage(file) { images.map((image) => { if (image.uuid_filename === file.uuid_filename) {