feat: /elmer.apk — прямая ссылка для скачивания APK
This commit is contained in:
+7
-1
@@ -12,7 +12,7 @@ from pathlib import Path
|
|||||||
# Добавляем корень проекта в PYTHONPATH
|
# Добавляем корень проекта в PYTHONPATH
|
||||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
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.config import load
|
||||||
from elmer.db import Database
|
from elmer.db import Database
|
||||||
@@ -36,6 +36,12 @@ def index():
|
|||||||
return render_template("index.html")
|
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"])
|
@app.route("/api/diagnose", methods=["POST"])
|
||||||
def diagnose():
|
def diagnose():
|
||||||
"""Подключается к ELM327, читает данные, отправляет в LLM, возвращает результат."""
|
"""Подключается к ELM327, читает данные, отправляет в LLM, возвращает результат."""
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<div class="card" style="text-align:center;margin-bottom:20px;">
|
<div class="card" style="text-align:center;margin-bottom:20px;">
|
||||||
<p style="margin:0 0 10px 0;">📱 Скачай APK прямо на телефон:</p>
|
<p style="margin:0 0 10px 0;">📱 Скачай APK прямо на телефон:</p>
|
||||||
<a href="/static/app-debug.apk" style="color:#ff6b35;font-size:18px;font-weight:bold;text-decoration:none;">
|
<a href="/elmer.apk" style="color:#ff6b35;font-size:18px;font-weight:bold;text-decoration:none;">
|
||||||
⬇️ Скачать Elmer APK
|
⬇️ Скачать Elmer APK
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user