169 lines
7.1 KiB
Plaintext
169 lines
7.1 KiB
Plaintext
@using System.IO
|
|
@model Nop.Plugin.Misc.FruitBankPlugin.Models.App.AppDownloadModel
|
|
|
|
@{
|
|
Layout = "_AdminLayout";
|
|
NopHtml.SetActiveMenuItemSystemName("FruitBank.AppDownload");
|
|
}
|
|
|
|
<div class="content-header clearfix">
|
|
<h1 class="float-left">
|
|
Android App letöltés
|
|
</h1>
|
|
</div>
|
|
|
|
<section class="content">
|
|
<div class="container-fluid">
|
|
@if (!string.IsNullOrEmpty(Model.CurrentVersion))
|
|
{
|
|
<!-- Latest Version Card -->
|
|
<div class="card card-default">
|
|
<div class="card-header">
|
|
<h3 class="card-title">
|
|
<i class="fas fa-mobile-alt"></i>
|
|
Legújabb verzió: @Model.CurrentVersion
|
|
</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<div class="alert alert-info">
|
|
<i class="fas fa-info-circle"></i>
|
|
<strong>Telepítési útmutató:</strong>
|
|
<ol class="mb-0 mt-2">
|
|
<li>Engedélyezd az "Ismeretlen forrásokból" való telepítést a táblagépen (Beállítások → Biztonság)</li>
|
|
<li>Kattints a "Letöltés" gombra</li>
|
|
<li>Nyisd meg a letöltött APK fájlt</li>
|
|
<li>Kövesd a telepítési utasításokat</li>
|
|
</ol>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<strong>Verzió:</strong> @Model.CurrentVersion<br />
|
|
<strong>Méret:</strong> @Model.FileSizeFormatted<br />
|
|
<strong>Kiadás dátuma:</strong> @Model.ReleaseDate.ToString("yyyy-MM-dd HH:mm")
|
|
</div>
|
|
|
|
@if (!string.IsNullOrEmpty(Model.Changelog))
|
|
{
|
|
<div class="mb-3">
|
|
<strong>Változások:</strong>
|
|
<pre class="bg-light p-3 rounded">@Model.Changelog</pre>
|
|
</div>
|
|
}
|
|
|
|
<a href="@Url.Action("Download", "AppDownload", new { version = Model.CurrentVersion, fileName = Model.FileName })" class="btn btn-primary btn-lg">
|
|
<i class="fas fa-download"></i>
|
|
Letöltés (@Model.FileSizeFormatted)
|
|
</a>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<div class="text-center">
|
|
<!-- QR Code for easy download on tablet -->
|
|
<div id="qrcode" class="mb-3"></div>
|
|
<p class="text-muted"><small>Szkenneld be a QR kódot a táblagéppel a közvetlen letöltéshez</small></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@if (Model.PreviousVersions != null && Model.PreviousVersions.Any())
|
|
{
|
|
<!-- Previous Versions Card -->
|
|
<div class="card card-default collapsed-card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">
|
|
<i class="fas fa-history"></i>
|
|
Korábbi verziók
|
|
</h3>
|
|
<div class="card-tools">
|
|
<button type="button" class="btn btn-tool" data-card-widget="collapse">
|
|
<i class="fas fa-plus"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="card-body" style="display: none;">
|
|
<table class="table table-bordered table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Verzió</th>
|
|
<th>Méret</th>
|
|
<th>Kiadás dátuma</th>
|
|
<th>Letöltés</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var version in Model.PreviousVersions)
|
|
{
|
|
<tr>
|
|
<td>@version.Version</td>
|
|
<td>@version.FileSizeFormatted</td>
|
|
<td>@version.ReleaseDate.ToString("yyyy-MM-dd HH:mm")</td>
|
|
<td>
|
|
<a href="@Url.Action("Download", "AppDownload", new { version = version.Version, fileName = version.FileName })" class="btn btn-sm btn-secondary" download>
|
|
<i class="fas fa-download"></i>
|
|
Letöltés
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<div class="card card-default">
|
|
<div class="card-body">
|
|
<div class="alert alert-warning">
|
|
<i class="fas fa-exclamation-triangle"></i>
|
|
Nincs elérhető app verzió. Kérlek, helyezd el az APK fájlt a <code>wwwroot/app/versions/</code> mappában.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</section>
|
|
|
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/qrcodejs@1.0.0/qrcode.min.js"></script>
|
|
<script>
|
|
$(function() {
|
|
@if (!string.IsNullOrEmpty(Model.CurrentVersion) && !string.IsNullOrEmpty(Model.FileName))
|
|
{
|
|
<text>
|
|
var downloadUrl = '@Url.Action("Download", "AppDownload", new { version = Model.CurrentVersion, fileName = Model.FileName }, Context.Request.Scheme)';
|
|
console.log('QR Code URL:', downloadUrl); // Debug log
|
|
|
|
new QRCode(document.getElementById("qrcode"), {
|
|
text: downloadUrl,
|
|
width: 200,
|
|
height: 200,
|
|
colorDark: "#000000",
|
|
colorLight: "#ffffff",
|
|
correctLevel: QRCode.CorrectLevel.H
|
|
});
|
|
</text>
|
|
}
|
|
});
|
|
</script>
|
|
|
|
|
|
<style>
|
|
#qrcode {
|
|
display: inline-block;
|
|
padding: 10px;
|
|
background: white;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
#qrcode img {
|
|
display: block;
|
|
}
|
|
</style> |