40 Commits

Author SHA1 Message Date
Sebastian Molenda 36757d1fb9 Autoupdate
Deploy to FTP / deploy (push) Successful in 9s
Build APK / build (push) Failing after 1m12s
2026-06-13 17:26:13 +02:00
Sebastian Molenda a99f5167a9 jurprfgdbsophi
Deploy to FTP / deploy (push) Successful in 9s
2026-06-13 15:10:52 +02:00
Sebastian Molenda 2ea8e9c58e pack and upload
Deploy to FTP / deploy (push) Failing after 8s
2026-06-13 15:09:58 +02:00
Sebastian Molenda 40b013b2d6 pack and upload
Deploy to FTP / deploy (push) Failing after 9s
2026-06-13 15:09:12 +02:00
Sebastian Molenda 67a9d5b024 pack and upload
Deploy to FTP / deploy (push) Failing after 9s
2026-06-13 15:08:19 +02:00
Sebastian Molenda eb6890a603 pack and upload
Deploy to FTP / deploy (push) Failing after 10s
2026-06-13 15:06:31 +02:00
Sebastian Molenda 5f0074ed37 pack and upload
Deploy to FTP / deploy (push) Failing after 9s
2026-06-13 15:04:13 +02:00
Sebastian Molenda 5399b64cd5 pack and upload
Deploy to FTP / deploy (push) Failing after 5s
2026-06-13 15:02:47 +02:00
Sebastian Molenda e4db4bb31e pack and upload
Deploy to FTP / deploy (push) Successful in 5s
2026-06-13 11:16:53 +02:00
Sebastian Molenda 332fef0fd3 lock vertical
Deploy to FTP / deploy (push) Successful in 5s
2026-06-01 21:45:34 +02:00
Sebastian Molenda 244aa8457a Moze wersja 1.0.0?
Deploy to FTP / deploy (push) Successful in 5s
Build APK / build (push) Successful in 2m11s
2026-05-29 22:53:11 +02:00
Sebastian Molenda 03bcb465cf 0.2.3-t9
Deploy to FTP / deploy (push) Successful in 5s
Build APK / build (push) Successful in 1m56s
2026-05-29 22:37:21 +02:00
Sebastian Molenda b2721c2ec3 0.2.3-t8
Deploy to FTP / deploy (push) Successful in 5s
Build APK / build (push) Failing after 1m56s
2026-05-29 22:26:03 +02:00
Sebastian Molenda 1385b3ace0 0.2.3-t7
Deploy to FTP / deploy (push) Successful in 4s
Build APK / build (push) Failing after 1m57s
2026-05-29 22:20:33 +02:00
Sebastian Molenda 66a028880c 0.2.3-t5
Deploy to FTP / deploy (push) Successful in 5s
Build APK / build (push) Failing after 1m59s
2026-05-27 21:45:21 +02:00
Sebastian Molenda 365b12b0eb 0.2.3-t4
Deploy to FTP / deploy (push) Successful in 4s
Build APK / build (push) Failing after 1m56s
Release APK on Tag (Gitea Actions) / build-and-release (push) Failing after 1s
2026-05-27 21:38:16 +02:00
Sebastian Molenda 5ef6747e4d 0.2.3-t3
Deploy to FTP / deploy (push) Successful in 4s
Release APK on Tag (Gitea Actions) / build-and-release (push) Failing after 2s
Build APK / build (push) Failing after 1m57s
2026-05-27 21:21:49 +02:00
Sebastian Molenda 7ce23309f6 0.2.3-t2
Deploy to FTP / deploy (push) Successful in 5s
Build APK / build (push) Successful in 2m1s
Release APK on Tag (Gitea Actions) / build-and-release (push) Failing after 2s
2026-05-27 15:04:28 +02:00
Sebastian Molenda 6c4b5f4adf 0.2.3
Deploy to FTP / deploy (push) Successful in 5s
Build APK / build (push) Successful in 1m58s
2026-05-27 14:57:44 +02:00
Sebastian Molenda b8b7b3860b 0.2.2
Deploy to FTP / deploy (push) Successful in 16s
Build APK / build (push) Successful in 2m8s
2026-05-27 14:21:02 +02:00
Sebastian Molenda 35b19cf140 0.2.1
Deploy to FTP / deploy (push) Successful in 1m4s
Build APK / build (push) Successful in 2m47s
2026-05-27 14:06:15 +02:00
Sebastian Molenda 0b3c8e8a02 prawie dziala
Deploy to FTP / deploy (push) Successful in 1m47s
Build APK / build (push) Successful in 3m50s
2026-05-27 13:51:51 +02:00
Sebastian Molenda d890c6e15d fix
Deploy to FTP / deploy (push) Successful in 5s
2026-05-27 11:18:37 +02:00
Sebastian Molenda ccbb3549d1 fix indexa
Deploy to FTP / deploy (push) Successful in 5s
2026-05-27 11:05:48 +02:00
Sebastian Molenda 145c148bbc lokalnie gradle dziala
Deploy to FTP / deploy (push) Successful in 5s
Build APK / build (push) Successful in 1m51s
2026-05-27 00:13:35 +02:00
Sebastian Molenda 3402bb1c13 noszgradleurwaaa2a
Deploy to FTP / deploy (push) Successful in 4s
Build APK / build (push) Failing after 1m11s
2026-05-26 23:56:06 +02:00
Sebastian Molenda 92b66f5b8b noszgradleurwaaaa
Deploy to FTP / deploy (push) Successful in 3s
Build APK / build (push) Failing after 39s
2026-05-26 23:25:13 +02:00
Sebastian Molenda cd5d92feff noszkurwaaaa
Deploy to FTP / deploy (push) Successful in 4s
Build APK / build (push) Failing after 36s
2026-05-26 23:22:24 +02:00
Sebastian Molenda d3ef35f9ce znowhbrddsrgu zjebal
Deploy to FTP / deploy (push) Successful in 4s
Build APK / build (push) Failing after 46s
2026-05-26 23:18:53 +02:00
Sebastian Molenda 367402e777 znowu zjebal
Deploy to FTP / deploy (push) Successful in 4s
Build APK / build (push) Failing after 4s
2026-05-26 23:10:03 +02:00
Sebastian Molenda f59f0f19c8 se
Deploy to FTP / deploy (push) Successful in 4s
2026-05-26 23:07:32 +02:00
Sebastian Molenda 44338d1502 poprawka builda
Deploy to FTP / deploy (push) Successful in 4s
Build APK / build (push) Failing after 2s
2026-05-26 23:02:09 +02:00
Sebastian Molenda d9885a2d17 poprawka builda
Deploy to FTP / deploy (push) Successful in 4s
Build APK / build (push) Failing after 1s
2026-05-26 23:00:11 +02:00
Sebastian Molenda 8dd8ccd5f7 bild
Deploy to FTP / deploy (push) Successful in 3s
Build APK / build (push) Failing after 3s
2026-05-26 22:52:40 +02:00
Sebastian Molenda d3407057f2 prawie
Deploy to FTP / deploy (push) Successful in 4s
2026-05-26 22:28:49 +02:00
Sebastian Molenda 0386b615b1 poprawil?
Deploy to FTP / deploy (push) Successful in 7s
2026-05-26 22:24:49 +02:00
Sebastian Molenda ea84777b97 zjebal
Deploy to FTP / deploy (push) Successful in 4s
2026-05-26 22:22:53 +02:00
Sebastian Molenda 3bcf995c10 Merge branch 'androidapka'
Deploy to FTP / deploy (push) Successful in 4s
2026-05-26 22:17:26 +02:00
Sebastian Molenda 202562878a hello apk 2026-05-26 22:16:51 +02:00
Sebastian Molenda 7bab05fb24 wu tang clan
Deploy to FTP / deploy (push) Successful in 4s
2026-05-26 22:02:05 +02:00
632 changed files with 28266 additions and 895 deletions
+171
View File
@@ -0,0 +1,171 @@
name: Build APK
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
container:
image: cimg/android:2024.01
steps:
- name: Install Node.js
run: |
sudo apt-get update
sudo apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
- name: Checkout
uses: actions/checkout@v4
- name: Generate Gradle Wrapper
run: gradle wrapper
- name: Grant execute permission
run: chmod +x ./gradlew
- name: Package and upload webapp
env:
UPLOAD_WEBAPP_URL: ${{ secrets.UPLOAD_WEBAPP_URL }}
UPLOAD_WEBAPP_TOKEN: ${{ secrets.UPLOAD_WEBAPP_TOKEN }}
run: |
set -e
# create webapp zip and upload to configured URL (if provided)
./gradlew zipWebApp uploadWebApp
- name: Update version in assets
run: |
set -e
TAG="${{ github.ref_name }}"
# Jeśli tag jest pusty (np. push nie na tag), użyjemy skróconego SHA
if [ -z "$TAG" ] || [ "$TAG" = "main" ]; then
TAG=$(git rev-parse --short HEAD)
fi
echo "Setting version to: $TAG"
# Aktualizacja pliku js/version.js
echo "const APP_VERSION = '$TAG';" > app/src/main/assets/js/version.js
echo "document.addEventListener('DOMContentLoaded', () => {
const el = document.getElementById('app-version') || document.getElementById('commit-sha');
if (el) el.textContent = '$TAG';
});" >> app/src/main/assets/js/version.js
- name: Build APK
run: ./gradlew assembleRelease
- name: Locate APK
id: locate_apk
run: |
set -e
APK_PATH=$(ls app/build/outputs/apk/release/*.apk | head -n1 || true)
if [ -z "$APK_PATH" ]; then
echo "No APK found in app/build/outputs/apk/release" >&2
exit 1
fi
echo "APK_PATH=$APK_PATH" >> $GITHUB_ENV
echo "Found $APK_PATH"
# Note: uploading artifacts with actions/upload-artifact@v4 is not supported
# on some self-hosted/enterprise runners (GHES). We skip storing artifacts
# via that action and instead upload the APK directly to the Gitea release
# in the steps below.
- name: Create Gitea release
id: create_release
env:
GITEA_TOKEN: ${{ secrets.GIT_TOKEN }}
GITEA_SERVER: ${{ secrets.GIT_SERVER }}
run: |
set -e
SERVER_CLEAN=$(echo "$GITEA_SERVER" | sed 's#/$##')
API_BASE="${SERVER_CLEAN}/api/v1"
OWNER="${{ github.repository_owner }}"
REPO_NAME=$(echo "${{ github.repository }}" | cut -d/ -f2)
TAG="${{ github.ref_name }}"
echo "Debug Info:"
echo "- API URL: $API_BASE/repos/$OWNER/$REPO_NAME/releases"
echo "- OWNER: $OWNER"
echo "- REPO: $REPO_NAME"
echo "- TAG: $TAG"
# Próba utworzenia release z przechwyceniem statusu HTTP
RESPONSE_FILE=$(mktemp)
HTTP_STATUS=$(curl -s -o "$RESPONSE_FILE" -w "%{http_code}" \
-H "Content-Type: application/json" \
-H "Authorization: token $GITEA_TOKEN" \
-X POST \
-d "{
\"tag_name\": \"$TAG\",
\"name\": \"$TAG\",
\"body\": \"Automated release for $TAG\",
\"draft\": false,
\"prerelease\": false
}" \
"$API_BASE/repos/$OWNER/$REPO_NAME/releases")
RESPONSE_BODY=$(cat "$RESPONSE_FILE")
echo "HTTP Status: $HTTP_STATUS"
echo "Response: $RESPONSE_BODY"
if [ "$HTTP_STATUS" -eq 409 ]; then
echo "Release already exists, fetching existing ID..."
RESPONSE_BODY=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$API_BASE/repos/$OWNER/$REPO_NAME/releases/tags/$TAG")
RELEASE_ID=$(echo "$RESPONSE_BODY" | sed -n 's/.*"id":\([0-9]*\),.*/\1/p' | head -n1)
elif [ "$HTTP_STATUS" -eq 201 ]; then
RELEASE_ID=$(echo "$RESPONSE_BODY" | sed -n 's/.*"id":\([0-9]*\),.*/\1/p' | head -n1)
else
echo "Failed to create release. Expected 201 or 409, got $HTTP_STATUS"
exit 1
fi
if [ -z "$RELEASE_ID" ]; then
echo "Failed to extract RELEASE_ID from response"
exit 1
fi
echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV
echo "Successfully processed release ID: $RELEASE_ID"
- name: Upload APK to Gitea release
env:
GITEA_TOKEN: ${{ secrets.GIT_TOKEN }}
GITEA_SERVER: ${{ secrets.GIT_SERVER }}
run: |
set -e
SERVER_CLEAN=$(echo "$GITEA_SERVER" | sed 's#/$##')
API_BASE="${SERVER_CLEAN}/api/v1"
OWNER="${{ github.repository_owner }}"
REPO_NAME=$(echo "${{ github.repository }}" | cut -d/ -f2)
TAG="${{ github.ref_name }}"
if [ -z "$APK_PATH" ]; then
echo "APK_PATH not set" >&2
exit 1
fi
if [ -z "$RELEASE_ID" ]; then
echo "RELEASE_ID not set" >&2
exit 1
fi
# Tworzymy ładną nazwę dla pliku
FRIENDLY_NAME="Matma-${TAG}.apk"
cp "$APK_PATH" "./$FRIENDLY_NAME"
UPLOAD_URL="$API_BASE/repos/$OWNER/$REPO_NAME/releases/$RELEASE_ID/assets?name=$FRIENDLY_NAME"
echo "Uploading $FRIENDLY_NAME to $UPLOAD_URL"
curl --fail -s -H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/octet-stream" \
--data-binary @"./$FRIENDLY_NAME" \
"$UPLOAD_URL"
# Dodanie bezpośredniego linku do podsumowania buildu w Gitea
DOWNLOAD_URL="${SERVER_CLEAN}/${OWNER}/${REPO_NAME}/releases/download/${TAG}/${FRIENDLY_NAME}"
echo "### ✅ APK gotowy do pobrania!" >> $GITHUB_STEP_SUMMARY
echo "[Pobierz plik $FRIENDLY_NAME]($DOWNLOAD_URL)" >> $GITHUB_STEP_SUMMARY
echo "Adres: $DOWNLOAD_URL" >> $GITHUB_STEP_SUMMARY
+23 -1
View File
@@ -19,12 +19,34 @@ jobs:
run: |
echo "${{ env.GITHUB_SHA }}" > version.sha
- name: Create latest.zip
run: |
set -e
# ensure a small staging dir for upload (absolute path so later cd won't affect it)
mkdir -p "$GITHUB_WORKSPACE/dist/"
# install zip utility (container may not have it)
apt-get update && apt-get install -y zip
# create latest.zip containing the assets directory (so zip root contains 'assets/')
cd app/src/main
zip -r "$GITHUB_WORKSPACE/latest.zip" assets
# move zip into the workspace dist so the FTP action can upload just that file
mv "$GITHUB_WORKSPACE/latest.zip" "$GITHUB_WORKSPACE/dist/"
- name: Upload latest.zip via FTP to releases
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
server: ${{ secrets.FTP_HOST }}
username: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASS }}
local-dir: dist/
server-dir: /releases/
- name: Upload via FTP
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
server: ${{ secrets.FTP_HOST }}
username: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASS }}
local-dir: ./
local-dir: app/src/main/assets/
server-dir: /
+36 -1
View File
@@ -1,3 +1,38 @@
.DS_Store
./QuizzyTemplate
./QuizzyTemplate/*
/.QuizzyTemplate
# Android/Gradle
/.gradle/
/build/
/app/build/
/**/build/
# Gradle wrapper
/gradle/wrapper/gradle-wrapper.jar
# Local configuration
/local.properties
# Keystore
*.jks
# Generated APKs/outputs
**/outputs/
**/apk/**
*.apk
*.ap_
# IntelliJ / Android Studio
.idea/
*.iml
# macOS
.DS_Store
# NPM / Node
node_modules/
# Misc
*.log
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View File
Binary file not shown.
@@ -0,0 +1,2 @@
#Sat Jun 13 15:33:08 CEST 2026
gradle.version=9.4.1
Binary file not shown.
Binary file not shown.
View File
+201
View File
@@ -0,0 +1,201 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="NONE" />
</component>
<component name="ChangeListManager">
<list default="true" id="51538617-7e5b-4e71-9f47-7bda274cf4cc" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.gradle/8.5/checksums/checksums.lock" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/8.5/checksums/md5-checksums.bin" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/8.5/checksums/sha1-checksums.bin" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/8.5/dependencies-accessors/gc.properties" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/8.5/executionHistory/executionHistory.bin" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/8.5/executionHistory/executionHistory.lock" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/8.5/fileChanges/last-build.bin" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/8.5/fileHashes/fileHashes.bin" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/8.5/fileHashes/fileHashes.lock" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/8.5/fileHashes/resourceHashesCache.bin" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/8.5/gc.properties" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/buildOutputCleanup/cache.properties" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/buildOutputCleanup/cache.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/buildOutputCleanup/outputFiles.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/buildOutputCleanup/outputFiles.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/file-system.probe" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/file-system.probe" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/dex/debug/mergeProjectDexDebug/6/classes.dex" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/dex/debug/mergeProjectDexDebug/6/classes.dex" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/last-build.bin" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/cacheable/last-build.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/local-state/build-history.bin" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/kotlin/compileDebugKotlin/local-state/build-history.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/outputs/apk/debug/app-debug.apk" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/outputs/apk/debug/app-debug.apk" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/outputs/logs/manifest-merger-debug-report.txt" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/outputs/logs/manifest-merger-debug-report.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/AndroidManifest.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/AndroidManifest.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/example/app/MainActivity.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/example/app/MainActivity.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/example/app/WebAppUpdater.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/example/app/WebAppUpdater.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/build.gradle" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gradle.properties" beforeDir="false" afterPath="$PROJECT_DIR$/gradle.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gradle/wrapper/gradle-wrapper.properties" beforeDir="false" afterPath="$PROJECT_DIR$/gradle/wrapper/gradle-wrapper.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/settings.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/settings.gradle" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ClangdSettings">
<option name="formatViaClangd" value="false" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[LocalEmulator::path=/Users/aln/.android/avd/Pixel_10.avd]" />
<component name="ExternalProjectsData">
<projectState path="$PROJECT_DIR$">
<ProjectState />
</projectState>
</component>
<component name="ExternalProjectsManager">
<system id="GRADLE">
<state>
<projects_view>
<tree_state>
<expand />
<select />
</tree_state>
</projects_view>
</state>
</system>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 2,
&quot;fromUser&quot;: false
}</component>
<component name="ProjectId" id="3EHNE822z12n2x6rUf57MsHEkbE" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"Android App.app.executor": "Debug",
"Gradle.Configure Daemon JVM Criteria.executor": "Run",
"GradleDaemonJvmCriteriaMigrationNotification.isNotificationDisabled": "true",
"ModuleVcsDetector.initialDetectionPerformed": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.cidr.known.project.marker": "true",
"RunOnceActivity.git.unshallow": "true",
"RunOnceActivity.readMode.enableVisualFormatting": "true",
"cf.first.check.clang-format": "false",
"cidr.known.project.marker": "true",
"git-widget-placeholder": "master",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "/Users/aln/Work/Matma"
}
}]]></component>
<component name="RunManager">
<configuration name="app" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
<module name="Matma.app" />
<option name="ANDROID_RUN_CONFIGURATION_SCHEMA_VERSION" value="1" />
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="DEPLOY_AS_INSTANT" value="false" />
<option name="ARTIFACT_NAME" value="" />
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
<option name="ALLOW_ASSUME_VERIFIED" value="false" />
<option name="CLEAR_APP_STORAGE" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="RESTORE_ENABLED" value="false" />
<option name="RESTORE_FILE" value="" />
<option name="RESTORE_FRESH_INSTALL_ONLY" value="false" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
<option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
<option name="DEBUGGER_TYPE" value="Auto" />
<Auto>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
</Hybrid>
<Java>
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
</Java>
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
</Native>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
<option name="STARTUP_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Java/Kotlin Method Sample (legacy)" />
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
</Profilers>
<option name="DEEP_LINK" value="" />
<option name="ACTIVITY" value="" />
<option name="ACTIVITY_CLASS" value="" />
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
<method v="2">
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
</method>
</configuration>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="51538617-7e5b-4e71-9f47-7bda274cf4cc" name="Changes" comment="" />
<created>1779831422173</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1779831422173</updated>
</task>
<servers />
</component>
</project>
+38
View File
@@ -0,0 +1,38 @@
package com.example.app
import android.os.Bundle
import android.webkit.WebResourceRequest
import android.webkit.WebResourceResponse
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.appcompat.app.AppCompatActivity
import androidx.webkit.WebViewAssetLoader
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val webView = WebView(this)
webView.settings.javaScriptEnabled = true
webView.settings.domStorageEnabled = true
// Use WebViewAssetLoader to serve files from /assets/ over a secure origin.
val assetLoader = WebViewAssetLoader.Builder()
.addPathHandler("/assets/", WebViewAssetLoader.AssetsPathHandler(this))
.build()
webView.webViewClient = object : WebViewClient() {
override fun shouldInterceptRequest(view: WebView?, request: WebResourceRequest?): WebResourceResponse? {
if (request == null) return null
return assetLoader.shouldInterceptRequest(request.url)
}
}
// Load the app via the mapped secure origin so fetch() requests are allowed
webView.loadUrl("https://appassets.androidplatform.net/assets/index.html")
setContentView(webView)
}
}
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" packagePrefix="com.example.app" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Submodule QuizzyTemplate/App deleted from 149f214357
-410
View File
@@ -1,410 +0,0 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
:root {
--primary: #6366F1;
--primary-dark: #4F46E5;
--secondary: #8B5CF6;
--accent: #FFD166;
--text: #334155;
--text-light: #64748B;
--bg: #F8FAFC;
--bg-card: #FFFFFF;
--border: #E2E8F0;
--code-bg: #F1F5F9;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background-color: var(--bg);
color: var(--text);
line-height: 1.6;
padding: 0;
margin: 0;
}
.container {
max-width: 1100px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
padding: 60px 0 80px;
position: relative;
}
header::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
right: 0;
height: 4px;
background: var(--accent);
}
.logo {
font-size: 24px;
font-weight: 700;
display: flex;
align-items: center;
margin-bottom: 20px;
}
.logo-icon {
margin-right: 10px;
font-size: 28px;
}
h1, h2, h3, h4, h5, h6 {
font-weight: 600;
line-height: 1.3;
margin-bottom: 20px;
color: var(--text);
}
h1 {
font-size: 2.5em;
margin-bottom: 15px;
color: white;
}
h2 {
font-size: 1.8em;
padding-bottom: 10px;
border-bottom: 1px solid var(--border);
margin-top: 50px;
}
h3 {
font-size: 1.4em;
margin-top: 30px;
}
h4 {
font-size: 1.2em;
margin-top: 20px;
}
p {
margin-bottom: 16px;
}
a {
color: var(--primary);
text-decoration: none;
transition: color 0.2s ease;
}
a:hover {
color: var(--primary-dark);
text-decoration: underline;
}
.header-subtitle {
font-size: 1.2em;
color: rgba(255, 255, 255, 0.9);
max-width: 700px;
}
.content {
padding: 60px 0;
position: relative;
}
.toc {
background-color: var(--bg-card);
border-radius: 10px;
padding: 25px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
margin-bottom: 40px;
}
.toc-title {
font-size: 1.2em;
font-weight: 600;
margin-bottom: 15px;
color: var(--text);
display: flex;
align-items: center;
}
.toc-title svg {
margin-right: 10px;
}
.toc-list {
list-style-type: none;
columns: 2;
column-gap: 30px;
}
.toc-list li {
margin-bottom: 10px;
break-inside: avoid;
}
.toc-list a {
color: var(--text-light);
transition: color 0.2s;
display: flex;
align-items: center;
}
.toc-list a:hover {
color: var(--primary);
}
.toc-list a::before {
content: "•";
margin-right: 8px;
color: var(--primary);
font-weight: bold;
}
.section {
margin-bottom: 60px;
}
ul, ol {
margin-left: 20px;
margin-bottom: 20px;
}
li {
margin-bottom: 8px;
}
code {
font-family: 'Monaco', 'Consolas', monospace;
background-color: var(--code-bg);
padding: 2px 6px;
border-radius: 4px;
font-size: 0.9em;
}
pre {
background-color: var(--code-bg);
padding: 15px;
border-radius: 8px;
overflow-x: auto;
margin-bottom: 20px;
border-left: 4px solid var(--primary);
}
pre code {
background: none;
padding: 0;
font-size: 0.9em;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.feature-card {
background: var(--bg-card);
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.feature-icon {
font-size: 24px;
margin-bottom: 12px;
color: var(--primary);
}
.note {
background-color: rgba(99, 102, 241, 0.1);
border-left: 4px solid var(--primary);
padding: 15px;
border-radius: 0 8px 8px 0;
margin-bottom: 20px;
}
.warning {
background-color: rgba(255, 209, 102, 0.2);
border-left: 4px solid var(--accent);
padding: 15px;
border-radius: 0 8px 8px 0;
margin-bottom: 20px;
}
.project-structure {
font-family: 'Monaco', 'Consolas', monospace;
background-color: var(--code-bg);
padding: 20px;
border-radius: 8px;
margin-bottom: 20px;
white-space: pre;
overflow-x: auto;
line-height: 1.4;
font-size: 0.85em;
}
.code-filename {
color: var(--primary);
font-weight: 600;
margin-bottom: 5px;
font-size: 0.9em;
}
.steps {
list-style-type: none;
counter-reset: step-counter;
margin-left: 0;
}
.steps li {
counter-increment: step-counter;
margin-bottom: 15px;
position: relative;
padding-left: 45px;
}
.steps li::before {
content: counter(step-counter);
background-color: var(--primary);
color: white;
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
left: 0;
top: -1px;
font-weight: 600;
font-size: 0.9em;
}
.table-container {
overflow-x: auto;
margin-bottom: 20px;
}
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
th, td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid var(--border);
}
th {
background-color: var(--code-bg);
font-weight: 600;
}
tr:hover {
background-color: rgba(0, 0, 0, 0.01);
}
.badge {
display: inline-block;
background-color: var(--primary);
color: white;
border-radius: 20px;
padding: 3px 10px;
font-size: 0.75em;
font-weight: 600;
margin-right: 5px;
}
.badge.secondary {
background-color: var(--secondary);
}
.badge.accent {
background-color: var(--accent);
color: var(--text);
}
.screenshot {
max-width: 100%;
border-radius: 8px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}
footer {
background-color: var(--text);
color: white;
padding: 30px 0;
text-align: center;
margin-top: 100px;
}
.back-to-top {
position: fixed;
bottom: 30px;
right: 30px;
background-color: var(--primary);
color: white;
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.back-to-top.visible {
opacity: 1;
visibility: visible;
}
.back-to-top:hover {
background-color: var(--primary-dark);
transform: translateY(-3px);
}
@media (max-width: 768px) {
h1 {
font-size: 2em;
}
h2 {
font-size: 1.5em;
}
.toc-list {
columns: 1;
}
.container {
padding: 0 15px;
}
.feature-grid {
grid-template-columns: 1fr;
}
}
-397
View File
@@ -1,397 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QuizzyMind App Documentation</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
<header>
<div class="container">
<div class="logo">
<span class="logo-icon">🎮</span>
Quizzy<span style="color: var(--accent);">Mind</span>
</div>
<h1>QuizzyMind App Documentation</h1>
<p class="header-subtitle">A comprehensive guide to installing, configuring, and customizing your React Native Expo quiz application.</p>
</div>
</header>
<div class="container">
<div class="content">
<div class="toc" id="table-of-contents">
<h3 class="toc-title">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
Table of Contents
</h3>
<ul class="toc-list">
<li><a href="#introduction">Introduction</a></li>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#project-structure">Project Structure</a></li>
<li><a href="#configuration">Configuration</a></li>
<li><a href="#key-features">Key Features</a></li>
<li><a href="#customization-guide">Customization Guide</a></li>
<li><a href="#api-integration">API Integration</a></li>
<li><a href="#deployment">Deployment</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
<li><a href="#support">Support</a></li>
</ul>
</div>
<section class="section" id="introduction">
<h2>Introduction</h2>
<p>QuizzyMind is a fully functional quiz application built with React Native and Expo Router. This documentation will guide you through setting up and customizing the application to meet your specific needs.</p>
<h3>Key Features</h3>
<div class="feature-grid">
<div class="feature-card">
<div class="feature-icon">🧠</div>
<h4>Multiple Quiz Categories</h4>
<p>Extensive question bank with various categories</p>
</div>
<div class="feature-card">
<div class="feature-icon">🏆</div>
<h4>Real-time Leaderboards</h4>
<p>Compete with friends and track progress</p>
</div>
<div class="feature-card">
<div class="feature-icon">🎨</div>
<h4>Modern UI</h4>
<p>Clean design with smooth animations</p>
</div>
<div class="feature-card">
<div class="feature-icon">🧭</div>
<h4>Expo Router</h4>
<p>Optimized navigation experience</p>
</div>
<div class="feature-card">
<div class="feature-icon">📱</div>
<h4>Cross-platform</h4>
<p>Works on both iOS and Android</p>
</div>
</div>
</section>
<section class="section" id="requirements">
<h2>Requirements</h2>
<p>Before you begin, ensure you have the following installed:</p>
<ul>
<li><strong>Node.js</strong> (v14.0.0 or newer)</li>
<li><strong>npm</strong> (v6.0.0 or newer) or <strong>Yarn</strong> (v1.22.0 or newer)</li>
<li><strong>Expo CLI</strong> (<code>npm install -g expo-cli</code>)</li>
<li><strong>Android Studio</strong> (for Android development)</li>
<li><strong>Xcode</strong> (for iOS development, macOS only)</li>
<li><strong>Git</strong></li>
</ul>
<div class="note">
<p><strong>Note:</strong> You can verify your Node.js and npm versions by running <code>node -v</code> and <code>npm -v</code> in your terminal.</p>
</div>
</section>
<section class="section" id="installation">
<h2>Installation</h2>
<p>Follow these steps to get the app up and running:</p>
<ol class="steps">
<li>
<strong>Clone or extract the project files</strong>
<pre><code># If you downloaded as a zip, extract it
cd QuizzyMind-app</code></pre>
</li>
<li>
<strong>Install dependencies</strong>
<pre><code>npm install
# or with yarn
yarn install</code></pre>
</li>
<li>
<strong>Start the development server</strong>
<pre><code>npx expo start or npm start</code></pre>
</li>
<li>
<strong>Run on device/simulator</strong>
<ul>
<li>Press <code>i</code> to open in iOS simulator</li>
<li>Press <code>a</code> to open in Android emulator</li>
<li>Scan QR code with Expo Go app on physical device</li>
</ul>
</li>
</ol>
<div class="note">
<p><strong>Tip:</strong> If you encounter any issues during installation, refer to the <a href="#troubleshooting">Troubleshooting</a> section.</p>
</div>
</section>
<section class="section" id="project-structure">
<h2>Project Structure</h2>
<div class="project-structure">QuizzyMind-app/
├── app/ # Main application code using Expo Router
│ ├── (pages)/ # All screens inside this folder
│ ├────────── _layout.js # Root layout component
│ ├────────── CategoryScreen.jsx # Category Screen
│ ├────────── QuizScreen.jsx # QuizScreen Screen
│ ├────────── ResultScreen.jsx # ResultScreen Screen
│ ├── _layout.js # Root layout component
│ └── index.js # Home screen
├── assets/ # Static assets like images, fonts
├── components/ # Reusable UI components
│ ├── common/ # Shared components
│ ├── quiz/ # Quiz-related components
│ └── ui/ # UI elements (buttons, cards, etc.)
├── constants/ # App constants and theme settings
├── contexts/ # React contexts for state management
├── hooks/ # Custom React hooks
├── services/ # API services and external integrations
├── utils/ # Utility functions
├── app.json # Expo configuration
├── babel.config.js # Babel configuration
├── package.json # Dependencies and scripts
└── README.md # Basic readme</div>
</section>
<section class="section" id="key-features">
<h2>Key Features</h2>
<h3>Quiz Engine</h3>
<p>The quiz system supports:</p>
<ul>
<li>Multiple quiz categories</li>
<li>Various question types (multiple choice, true/false)</li>
<li>Timed quizzes</li>
<li>Score tracking and history</li>
<li>Difficulty levels</li>
</ul>
<h3>User Interface</h3>
<p>The UI is built with:</p>
<ul>
<li>Custom components for consistent design</li>
<li>Smooth animations and transitions</li>
<li>Dark/light mode support</li>
<li>Responsive layouts for different device sizes</li>
</ul>
</section>
<section class="section" id="customization-guide">
<h2>Customization Guide</h2>
<h3>Theme Customization</h3>
<p>Edit the theme variables in <code>constants/Theme.js</code>:</p>
<div class="code-filename">constants/Theme.js</div>
<pre><code>// Example theme customization
export const COLORS = {
primary: '#6366F1',
secondary: '#8B5CF6',
accent: '#FFD166',
// Add your custom colors
};
export const FONTS = {
// Customize font families
};
export const SIZES = {
// Customize spacing and sizes
};</code></pre>
<h3>Content Customization</h3>
<p>Quiz questions are stored in <code>data/quizData.js</code>. Modify this file to add your own questions:</p>
<div class="code-filename">data/quizData.js</div>
<pre><code>export const QUIZ_CATEGORIES = [
{
id: 'general',
title: 'General Knowledge',
icon: 'brain',
questions: [
{
id: 'q1',
question: 'What is the capital of France?',
options: ['London', 'Berlin', 'Paris', 'Madrid'],
correctAnswer: 'Paris',
difficulty: 'easy'
},
// Add more questions here
]
},
// Add more categories
];</code></pre>
<h3>Adding New Screens</h3>
<p>To add a new screen with Expo Router:</p>
<ol>
<li>Create a new file in the <code>app</code> directory, e.g., <code>app/newScreen.js</code></li>
<li>Define your screen component:</li>
</ol>
<div class="code-filename">app/newScreen.js</div>
<pre><code>import { View, Text, StyleSheet } from 'react-native';
import { useRouter } from 'expo-router';
export default function NewScreen() {
const router = useRouter();
return (
&lt;View style={styles.container}&gt;
&lt;Text&gt;New Screen Content&lt;/Text&gt;
&lt;/View&gt;
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
});</code></pre>
</section>
<section class="section" id="deployment">
<h2>Deployment</h2>
<h3>Publishing to Expo</h3>
<ol>
<li>Create an Expo account at <a href="https://expo.dev" target="_blank">expo.dev</a></li>
<li>Configure your app in <code>app.json</code>:
<ul>
<li>Update <code>name</code>, <code>slug</code>, and <code>owner</code></li>
<li>Set appropriate version numbers</li>
<li>Configure splash screen and icons</li>
</ul>
</li>
<li>Build and publish:
<pre><code>expo build:android # For Android APK/AAB
expo build:ios # For iOS IPA
expo publish # For Expo Go distribution</code></pre>
</li>
</ol>
<h3>Submitting to App Stores</h3>
<h4>Android (Google Play)</h4>
<ol>
<li>Generate a signed AAB:
<pre><code>eas build -p android --profile production</code></pre>
</li>
<li>Follow Google Play Console submission guidelines</li>
</ol>
<h4>iOS (App Store)</h4>
<ol>
<li>Generate a signed IPA:
<pre><code>eas build -p ios --profile production</code></pre>
</li>
<li>Submit through App Store Connect</li>
</ol>
</section>
<section class="section" id="troubleshooting">
<h2>Troubleshooting</h2>
<h3>Common Issues</h3>
<h4>Metro Bundler Issues</h4>
<pre><code># Clear cache and restart
expo start -c</code></pre>
<h4>Dependency Problems</h4>
<pre><code># Reset node_modules
rm -rf node_modules
npm install</code></pre>
<h4>Expo SDK Version Conflicts</h4>
<p>Ensure all packages are compatible with your Expo SDK version in <code>package.json</code>.</p>
<div class="note">
<p><strong>Tip:</strong> Most common issues can be resolved by clearing your cache and reinstalling dependencies.</p>
</div>
</section>
<section class="section" id="support">
<h2>Support</h2>
<p>For additional support, please contact us at <a href="mailto:support@email.com">support@email.com</a> or visit our support page on TemplateMonster.</p>
</section>
</div>
</div>
<footer>
<div class="container">
<p>© 2025 QuizzyMind App | All Rights Reserved</p>
</div>
</footer>
<a href="#" class="back-to-top" id="backToTop">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 15l-6-6-6 6"/>
</svg>
</a>
<script>
// Back to top button functionality
const backToTopButton = document.getElementById('backToTop');
window.addEventListener('scroll', () => {
if (window.pageYOffset > 300) {
backToTopButton.classList.add('visible');
} else {
backToTopButton.classList.remove('visible');
}
});
backToTopButton.addEventListener('click', (e) => {
e.preventDefault();
window.scrollTo({ top: 0, behavior: 'smooth' });
});
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function(e) {
e.preventDefault();
if (this.getAttribute('href') === '#') return;
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth'
});
}
});
});
</script>
</body>
</html>
+30
View File
@@ -13,3 +13,33 @@ Pliki
Jak uruchomić
Otwórz plik `index.html` w przeglądarce (najlepiej na urządzeniu mobilnym lub w trybie responsywnym).
Signing a release APK/AAB
------------------------
Aby uniknąć ostrzeżeń "nieznany deweloper" lub instalatora na Androidzie, zbuduj podpisany pakiet APK lub AAB i zainstaluj go zamiast debugowego APK.
1. Utwórz magazyn kluczy (jeśli go nie masz):
```bash
keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my_key_alias
```
2. Skopiuj `gradle.properties.example` do swojego osobistego pliku `~/.gradle/gradle.properties` i uzupełnij wartości (nie commituj prawdziwych haseł do kontroli wersji).
3. Zbuduj podpisany pakiet APK lub AAB:
```bash
./gradlew assembleRelease # podpisany APK (jeśli podpisywanie jest skonfigurowane)
./gradlew bundleRelease # AAB do Sklepu Play
```
4. Zainstaluj APK za pomocą adb:
```bash
adb install -r app/build/outputs/apk/release/app-release.apk
```
Lub przesłać AAB do Google Play (testowanie wewnętrzne) — zalecane w celu najłatwiejszej dystrybucji.
Jeśli chcesz tylko przetestować lokalnie i zobaczyć ostrzeżenie "Nieznane źródła", możesz tymczasowo włączyć instalowanie z nieznanych źródeł na urządzeniu, ale dystrybucja podpisanego wydania jest bezpieczniejszym podejściem.
+117
View File
@@ -0,0 +1,117 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
namespace 'com.example.app'
compileSdk 34
defaultConfig {
applicationId "com.example.app"
minSdk 21
targetSdk 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
// Signing configuration for release builds.
// Configure the following properties in either your
// - ~/.gradle/gradle.properties (recommended for secrets), or
// - <project root>/gradle.properties (do NOT commit passwords)
//
// Example properties:
// MYAPP_STORE_FILE=keystores/my-release-key.jks
// MYAPP_STORE_PASSWORD=your_store_password
// MYAPP_KEY_ALIAS=my_key_alias
// MYAPP_KEY_PASSWORD=your_key_password
signingConfigs {
release {
// Only configure signing when the properties are provided.
if (project.hasProperty('MYAPP_STORE_FILE')) {
storeFile file(MYAPP_STORE_FILE)
storePassword MYAPP_STORE_PASSWORD
keyAlias MYAPP_KEY_ALIAS
keyPassword MYAPP_KEY_PASSWORD
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// Apply signing config if available. This keeps debug and CI builds
// working even when signing properties are absent locally.
if (project.hasProperty('MYAPP_STORE_FILE')) {
signingConfig signingConfigs.release
}
// Ensure release builds are not debuggable.
debuggable false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.22"
implementation 'androidx.webkit:webkit:1.8.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
// JSONObject is provided by Android SDK (org.json)
}
// Task: package webapp assets into a zip for release and optionally upload
def webappSrc = file("src/main/assets")
def webappZip = file("${buildDir}/outputs/webapp/webapp.zip")
tasks.register("zipWebApp") {
group = "release"
description = "Create zip of web assets (app/src/main/assets -> webapp.zip)"
inputs.dir(webappSrc)
outputs.file(webappZip)
doLast {
webappZip.parentFile.mkdirs()
ant.zip(destfile: webappZip) {
fileset(dir: webappSrc)
}
println "Created webapp zip: ${webappZip.absolutePath}"
}
}
tasks.register("uploadWebApp") {
group = "release"
description = "Upload webapp zip to remote server if UPLOAD_WEBAPP_URL is set"
dependsOn "zipWebApp"
doLast {
def uploadUrl = System.getenv('UPLOAD_WEBAPP_URL')
def token = System.getenv('UPLOAD_WEBAPP_TOKEN')
if (!uploadUrl) {
println "UPLOAD_WEBAPP_URL not set, skipping upload"
return
}
if (!webappZip.exists()) {
throw new GradleException("webapp zip not found: ${webappZip}")
}
println "Uploading webapp to ${uploadUrl}"
def cmd = ["curl", "--fail", "-X", "PUT", "-H", "Content-Type: application/zip"]
if (token) {
cmd += ["-H", "Authorization: Bearer ${token}"]
}
cmd += ["--data-binary", "@${webappZip.absolutePath}", uploadUrl]
def process = cmd.execute()
process.in.eachLine { println it }
process.err.eachLine { System.err.println it }
def rc = process.waitFor()
if (rc != 0) throw new GradleException("Upload failed with exit code ${rc}")
println "Upload successful"
}
}
@@ -0,0 +1,2 @@
#- File Locator -
listingFile=../../../outputs/apk/debug/output-metadata.json
@@ -0,0 +1,2 @@
appMetadataVersion=1.1
androidGradlePluginVersion=8.2.2
File diff suppressed because it is too large Load Diff
@@ -39,9 +39,7 @@
<span id="blank-progress" class="play-progress"></span>
</header>
<div class="play-progress-bar">
<div id="dyk-progress-bar-inner" class="play-progress-bar-inner"></div>
</div>
<div id="progressbar-placeholder"></div>
<div class="play-body">
<div class="play-scroll-area" id="dyk-scroll">
@@ -71,6 +69,9 @@
}).then(html => {
document.getElementById('header-placeholder').outerHTML = html;
});
loadComponent('components/progress-bar.html', {'{PROGRESS_ID}': 'dyk-progress-bar-inner'}).then(html => {
document.getElementById('progressbar-placeholder').outerHTML = html;
});
loadComponent('components/footer.html').then(html => {
document.getElementById('footer-placeholder').outerHTML = html;
});
@@ -51,9 +51,7 @@
<span id="progress-label" class="progress-text">0/20</span>
</div>
</header>
<div class="read-progress-bar">
<div id="progress-inner" class="read-progress-bar-inner"></div>
</div>
<div id="progressbar-placeholder"></div>
<div class="play-body">
<div class="problem-display">
@@ -107,6 +105,9 @@
}).then(html => {
document.getElementById('header-placeholder').outerHTML = html;
});
loadComponent('components/progress-bar.html', {'{PROGRESS_ID}': 'progress-inner'}).then(html => {
document.getElementById('progressbar-placeholder').outerHTML = html;
});
loadComponent('components/footer.html').then(html => {
document.getElementById('footer-placeholder').outerHTML = html;
});
@@ -55,19 +55,19 @@ const statusEl = document.getElementById('status');
// load settings from localStorage
function loadSettings(){
try{
const raw = localStorage.getItem('matma:settings')
const raw = (typeof localStorage !== 'undefined') ? localStorage.getItem('matma:settings') : null
if (raw) {
const s = JSON.parse(raw)
state.settings = Object.assign(state.settings, s)
}
}catch(e){ console.warn('settings load failed', e) }
// reflect to inputs
settingTimed.value = state.settings.timedSeconds
settingMaxResult.value = state.settings.maxResult
settingMaxOperand.value = state.settings.maxOperand
settingSessionProblems.value = state.settings.sessionProblems
settingAllowNegative.checked = !!state.settings.allowNegative
settingAllowFraction.checked = !!state.settings.allowFraction
// reflect to inputs (guard in case some inputs are missing)
if (settingTimed) settingTimed.value = state.settings.timedSeconds
if (settingMaxResult) settingMaxResult.value = state.settings.maxResult
if (settingMaxOperand) settingMaxOperand.value = state.settings.maxOperand
if (settingSessionProblems) settingSessionProblems.value = state.settings.sessionProblems
if (settingAllowNegative) settingAllowNegative.checked = !!state.settings.allowNegative
if (settingAllowFraction) settingAllowFraction.checked = !!state.settings.allowFraction
}
function saveSettings(){
@@ -145,16 +145,16 @@ function startPlay(){
renderProblem()
if (state.mode === 'timed'){
progressInner.style.width = '0%'
startTimer(state.settings.timedSeconds)
statusEl.textContent = 'Na czas';
timerEl.classList.remove('hidden');
if (progressInner) progressInner.style.width = '0%'
startTimer(state.settings.timedSeconds)
if (statusEl) statusEl.textContent = 'Na czas';
if (timerEl) timerEl.classList.remove('hidden');
} else {
progressInner.style.width = '0%'
state.sessionSolved = 0
state.sessionTarget = Math.max(1, state.settings.sessionProblems)
updateProgress()
timerEl.classList.add('hidden');
if (progressInner) progressInner.style.width = '0%'
state.sessionSolved = 0
state.sessionTarget = Math.max(1, state.settings.sessionProblems)
updateProgress()
if (timerEl) timerEl.classList.add('hidden');
}
}
@@ -311,14 +311,14 @@ backspaceBtn.addEventListener('click', ()=>{
function startTimer(seconds){
state.timeLeft = seconds
timerEl.textContent = state.timeLeft
if (timerEl) timerEl.textContent = state.timeLeft
stopTimer();
state.timerId = setInterval(()=>{
state.timeLeft -= 1
timerEl.textContent = state.timeLeft
if (timerEl) timerEl.textContent = state.timeLeft
const pct = Math.max(0, (state.timeLeft / seconds) * 100)
progressInner.style.width = pct + '%'
if (progressInner) progressInner.style.width = pct + '%'
if (state.timeLeft <= 0) {
stopTimer()
endSession()
@@ -357,9 +357,9 @@ summaryBack.addEventListener('click', ()=>{
function updateProgress(){
if (state.mode === 'training'){
const pct = Math.min(100, Math.round((state.sessionSolved/state.sessionTarget)*100))
progressInner.style.width = pct + '%'
statusEl.textContent = `${state.sessionSolved}/${state.sessionTarget}`
const pct = Math.min(100, Math.round((state.sessionSolved/state.sessionTarget)*100))
if (progressInner) progressInner.style.width = pct + '%'
if (statusEl) statusEl.textContent = `${state.sessionSolved}/${state.sessionTarget}`
}
}
@@ -0,0 +1,27 @@
// Komponenty HTML loader
function loadComponent(path, replaceMap = {}) {
// If path is a full mapped origin used by WebViewAssetLoader, strip it to a relative path.
const mappedOrigin = 'https://appassets.androidplatform.net/assets/';
if (path.startsWith(mappedOrigin)) {
path = path.slice(mappedOrigin.length);
}
// If an absolute path starting with '/' is provided, remove leading slash to make it
// relative to the current document (works under local http server and WebViewAssetLoader).
if (path.startsWith('/')) path = path.slice(1);
return fetch(path)
.then(r => {
if (!r.ok) throw new Error('Failed to load component: ' + path);
return r.text();
})
.then(html => {
Object.entries(replaceMap).forEach(([key, val]) => {
html = html.replaceAll(key, val);
});
return html;
});
}
// Przykład użycia:
// loadComponent('components/header.html', {'{TITLE}': 'Tytuł', '{SUBTITLE}': 'Podtytuł'}).then(html => ...)
@@ -21,7 +21,7 @@
const readViewport = document.getElementById('read-viewport')
const readTextEl = document.getElementById('read-text')
const nextLineBtn = document.getElementById('next-line-btn')
const progressBar = document.getElementById('read-progress-bar-inner')
let progressBar = null
// ── Load text list from dyktanda.json ────────────────────────────────────
fetch('json/dyktanda.json')
@@ -52,11 +52,16 @@
clearInterval(autoTimer)
autoTimer = null
readTitleEl.textContent = title
readTextEl.textContent = text
readTextEl.style.transform = 'translateY(0)'
speedBtn.textContent = SPEED_LABELS[0]
progressBar.style.width = '0%'
if (!readTitleEl || !readTextEl || !speedBtn || !readWrap || !listWrap) {
console.warn('czytanie: missing DOM elements', { readTitleEl, readTextEl, speedBtn, readWrap, listWrap })
}
if (readTitleEl) readTitleEl.textContent = title
if (readTextEl) readTextEl.textContent = text
if (readTextEl) readTextEl.style.transform = 'translateY(0)'
if (speedBtn) speedBtn.textContent = SPEED_LABELS[0]
if (!progressBar) progressBar = document.getElementById('read-progress-bar-inner')
if (progressBar) progressBar.style.width = '0%'
listWrap.classList.add('hidden')
readWrap.classList.remove('hidden')
@@ -78,9 +83,8 @@
}
// ── Back to list ──────────────────────────────────────────────────────────
// Zakończ button: natychmiast wróć do listy bez potwierdzenia
readBackBtn.addEventListener('click', () => {
const active = yOffset > 0 || autoTimer !== null
if (active && !confirm('Wrócić do listy tekstów?')) return
clearInterval(autoTimer)
autoTimer = null
readWrap.classList.add('hidden')
@@ -132,6 +136,7 @@
function updateProgressBar() {
const progress = maxOffset > 0 ? (yOffset / maxOffset) * 100 : 100
progressBar.style.width = `${progress}%`
if (!progressBar) progressBar = document.getElementById('read-progress-bar-inner')
if (progressBar) progressBar.style.width = `${progress}%`
}
})()
@@ -35,7 +35,7 @@
const summaryScore = document.getElementById('summary-score')
const summaryBackBtn = document.getElementById('summary-back-btn')
const dykScroll = document.getElementById('dyk-scroll')
const progressBar = document.getElementById('dyk-progress-bar-inner')
let progressBar = null
// ── Load texts ────────────────────────────────────────────────────────────
fetch('json/dyktanda.json')
@@ -53,6 +53,20 @@
textList.innerHTML = '<p style="color:var(--muted)">Nie udało się wczytać tekstów.</p>'
})
// Poczekaj na dynamiczne załadowanie progress bara
document.addEventListener('DOMContentLoaded', () => {
// progress bar jest ładowany przez loadComponent w dyktando.html
const checkProgressBar = () => {
const el = document.getElementById('dyk-progress-bar-inner')
if (el) {
progressBar = el
} else {
setTimeout(checkProgressBar, 50)
}
}
checkProgressBar()
})
customStartBtn.addEventListener('click', () => {
const txt = customInput.value.trim()
if (!txt) return
@@ -98,7 +112,7 @@
textDisplay.classList.remove('hidden')
choicesEl.classList.remove('hidden')
progressEl.textContent = ''
progressBar.style.width = '0%'
if (progressBar) progressBar.style.width = '0%'
listWrap.classList.add('hidden')
playWrap.classList.remove('hidden')
@@ -282,9 +296,8 @@
}
// ── Navigation ────────────────────────────────────────────────────────────
// Zakończ button: natychmiast wracamy do listy bez potwierdzenia
playBackBtn.addEventListener('click', () => {
const inProgress = blanks.length > 0 && current < blanks.length
if (inProgress && !confirm('Przerwać dyktando i wrócić do listy?')) return
goToList()
})
@@ -8,7 +8,7 @@
const problemEl = document.getElementById('problem')
const answerEl = document.getElementById('answer')
const feedbackEl = document.getElementById('feedback')
const progressInner = document.getElementById('progress-inner')
let progressInner = null
const progressLabel = document.getElementById('progress-label')
const summaryText = document.getElementById('summary-text')
const totalInput = document.getElementById('total-input')
@@ -99,7 +99,10 @@
function updateBar() {
const pct = st.total > 0 ? Math.round((st.solved / st.total) * 100) : 0
progressInner.style.width = pct + '%'
if (!progressInner) {
progressInner = document.getElementById('progress-inner')
}
if (progressInner) progressInner.style.width = pct + '%'
progressLabel.textContent = `${st.solved}/${st.total}`
}
@@ -133,7 +136,8 @@
let sha = (window.COMMIT_SHA || '').toString().trim()
if (!sha) {
try {
const res = await fetch('/version.sha', { cache: 'no-cache' })
// use relative path so the request works under WebViewAssetLoader or a local server
const res = await fetch('version.sha', { cache: 'no-cache' })
if (res.ok) {
const txt = await res.text()
const first = txt.split(/\r?\n/).find(l => l.trim().length > 0)
@@ -8,7 +8,7 @@
const problemEl = document.getElementById('problem')
const answerEl = document.getElementById('answer')
const feedbackEl = document.getElementById('feedback')
const progressInner = document.getElementById('progress-inner')
let progressInner = null
const progressLabel = document.getElementById('progress-label')
const scoreLabel = document.getElementById('score-label') // This element is removed, but we might re-purpose the logic
const summaryText = document.getElementById('summary-text')
@@ -99,7 +99,8 @@
function updateBar() {
const pct = st.total > 0 ? Math.round((st.solved / st.total) * 100) : 0
progressInner.style.width = pct + '%'
if (!progressInner) progressInner = document.getElementById('progress-inner')
if (progressInner) progressInner.style.width = pct + '%'
progressLabel.textContent = `${st.solved}/${st.total}`
// scoreLabel is removed, so we comment this out
// scoreLabel.textContent = `✔ ${st.score}`
@@ -135,7 +136,8 @@
let sha = (window.COMMIT_SHA || '').toString().trim()
if (!sha) {
try {
const res = await fetch('/version.sha', { cache: 'no-cache' })
// use relative path so the request works under WebViewAssetLoader or a local server
const res = await fetch('version.sha', { cache: 'no-cache' })
if (res.ok) {
const txt = await res.text()
const first = txt.split(/\r?\n/).find(l => l.trim().length > 0)
@@ -0,0 +1,13 @@
// Back-to-hub button with active-task confirmation
(function () {
document.addEventListener('DOMContentLoaded', () => {
const backBtn = document.getElementById('back-to-hub')
if (!backBtn) return
// Immediately navigate back to hub/menu without confirmation
backBtn.addEventListener('click', (e) => {
const href = backBtn.getAttribute('href')
if (href) window.location.href = href
})
})
})()
@@ -51,9 +51,7 @@
<span id="progress-label" class="progress-text">0/20</span>
</div>
</header>
<div class="read-progress-bar">
<div id="progress-inner" class="read-progress-bar-inner"></div>
</div>
<div id="progressbar-placeholder"></div>
<div class="play-body">
<div class="problem-display">
@@ -107,6 +105,9 @@
}).then(html => {
document.getElementById('header-placeholder').outerHTML = html;
});
loadComponent('components/progress-bar.html', {'{PROGRESS_ID}': 'progress-inner'}).then(html => {
document.getElementById('progressbar-placeholder').outerHTML = html;
});
loadComponent('components/footer.html').then(html => {
document.getElementById('footer-placeholder').outerHTML = html;
});
@@ -100,9 +100,7 @@
<div id="status" class="play-status">Trening</div>
<div id="score" class="play-score">0</div>
</header>
<div class="play-progress-bar">
<div id="progress_inner" class="play-progress-bar-inner"></div>
</div>
<div id="progressbar-placeholder"></div>
<div class="play-body">
<div class="problem-display">
@@ -161,6 +159,9 @@
}).then(html => {
document.getElementById('header-placeholder').outerHTML = html;
});
loadComponent('components/progress-bar.html', {'{PROGRESS_ID}': 'progress_inner'}).then(html => {
document.getElementById('progressbar-placeholder').outerHTML = html;
});
loadComponent('components/footer.html').then(html => {
document.getElementById('footer-placeholder').outerHTML = html;
});
@@ -0,0 +1,10 @@
{
"version": 3,
"artifactType": {
"type": "COMPATIBLE_SCREEN_MANIFEST",
"kind": "Directory"
},
"applicationId": "com.example.app",
"variantName": "debug",
"elements": []
}
@@ -0,0 +1 @@
7

Some files were not shown because too many files have changed in this diff Show More