From 0805d0c2a7020b32820cc54a635377f411f45b1d Mon Sep 17 00:00:00 2001 From: Repinoid Date: Thu, 28 May 2026 08:26:20 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20/elmer.apk=20=E2=80=94=20=D0=BF=D1=80?= =?UTF-8?q?=D1=8F=D0=BC=D0=B0=D1=8F=20=D1=81=D1=81=D1=8B=D0=BB=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D1=81=D0=BA=D0=B0=D1=87=D0=B8=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F=20APK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/app.py | 8 +++++++- web/templates/index.html | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/web/app.py b/web/app.py index cb8ef3f..c247052 100644 --- a/web/app.py +++ b/web/app.py @@ -12,7 +12,7 @@ from pathlib import Path # Добавляем корень проекта в PYTHONPATH sys.path.insert(0, str(Path(__file__).parent.parent)) -from flask import Flask, jsonify, render_template, request +from flask import Flask, jsonify, redirect, render_template, request, send_from_directory from elmer.config import load from elmer.db import Database @@ -36,6 +36,12 @@ def index(): return render_template("index.html") +@app.route("/elmer.apk") +def download_apk(): + """Прямая ссылка на APK.""" + return send_from_directory("static", "app-debug.apk", as_attachment=True, download_name="elmer.apk") + + @app.route("/api/diagnose", methods=["POST"]) def diagnose(): """Подключается к ELM327, читает данные, отправляет в LLM, возвращает результат.""" diff --git a/web/templates/index.html b/web/templates/index.html index 48ea4ce..898f309 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -15,7 +15,7 @@

📱 Скачай APK прямо на телефон:

- + ⬇️ Скачать Elmer APK