Save current progress of Quality Print Desktop project

This commit is contained in:
2025-09-27 00:23:35 +03:00
parent c5d1449ede
commit 1582e9363f
3 changed files with 44 additions and 4 deletions

View File

@@ -2130,6 +2130,30 @@ def download_desktop_app():
print(f"DEBUG: Error downloading desktop app: {e}") print(f"DEBUG: Error downloading desktop app: {e}")
return jsonify({'error': 'Failed to download desktop app'}), 500 return jsonify({'error': 'Failed to download desktop app'}), 500
@bp.route('/download/portable-app')
def download_portable_app():
"""Download the Quality Print Desktop Portable Windows version"""
try:
# Path to the portable app file
downloads_path = os.path.join(current_app.root_path, 'static', 'downloads')
filename = 'Quality_Print_Desktop_Portable_v1.0.0_Windows.zip'
# Check if the zip file exists
full_path = os.path.join(downloads_path, filename)
if not os.path.exists(full_path):
return jsonify({
'error': 'Portable app package not found',
'message': 'Quality Print Desktop Portable v1.0.0 Windows is not available',
'suggestion': 'Please contact the administrator'
}), 404
return send_from_directory(downloads_path, filename, as_attachment=True)
except Exception as e:
print(f"DEBUG: Error downloading portable app: {e}")
return jsonify({'error': 'Failed to download portable app'}), 500
@bp.route('/get_order_data/<int:order_id>', methods=['GET']) @bp.route('/get_order_data/<int:order_id>', methods=['GET'])
def get_order_data(order_id): def get_order_data(order_id):
"""Get specific order data for preview""" """Get specific order data for preview"""

View File

@@ -213,10 +213,13 @@
<strong>🖥️ Quality Print Desktop v1.0.0 (RECOMMENDED)</strong> <strong>🖥️ Quality Print Desktop v1.0.0 (RECOMMENDED)</strong>
</div> </div>
<div style="font-size: 10px; color: #495057; margin-bottom: 10px; line-height: 1.3;"> <div style="font-size: 10px; color: #495057; margin-bottom: 10px; line-height: 1.3;">
Professional desktop app with built-in thermal printing • Direct hardware access • Rich formatting Professional desktop app • Direct hardware access • Rich formatting
</div> </div>
<button onclick="downloadElectronApp()" class="btn btn-success btn-sm" style="font-size: 10px; padding: 4px 12px; margin-right: 5px;"> <button onclick="downloadElectronApp()" class="btn btn-success btn-sm" style="font-size: 10px; padding: 4px 12px; margin-right: 5px;">
📥 Download Desktop App (98MB) 📥 Download Linux Version (99MB)
</button>
<button onclick="downloadPortableApp()" class="btn btn-outline-success btn-sm" style="font-size: 10px; padding: 4px 12px; margin-right: 5px;">
💻 Windows Portable (8KB)
</button> </button>
<small style="color: #28a745; font-weight: bold;">✅ READY!</small> <small style="color: #28a745; font-weight: bold;">✅ READY!</small>
</div> </div>
@@ -236,7 +239,7 @@
<div style="font-size: 9px; color: #6c757d; margin-top: 5px; line-height: 1.2;"> <div style="font-size: 9px; color: #6c757d; margin-top: 5px; line-height: 1.2;">
<strong>🏆 Desktop App Benefits:</strong> Direct thermal printing • Rich barcodes/QR codes • Better reliability<br> <strong>🏆 Desktop App Benefits:</strong> Direct thermal printing • Rich barcodes/QR codes • Better reliability<br>
<small>Now includes: electron-pos-printer • One-click install • Cross-platform support</small> <small>Two versions: Full Linux AppImage or Lightweight Windows Portable • Cross-platform support</small>
</div> </div>
</div> </div>
</div> </div>
@@ -1107,7 +1110,20 @@ function downloadElectronApp() {
document.body.removeChild(link); document.body.removeChild(link);
// Show success message // Show success message
showNotification('<EFBFBD> Quality Print Desktop v1.0.0 download started!', 'success'); showNotification('📱 Quality Print Desktop v1.0.0 download started!', 'success');
}
function downloadPortableApp() {
// Download the portable Windows version
const link = document.createElement('a');
link.href = '/download/portable-app';
link.download = 'Quality_Print_Desktop_Portable_v1.0.0_Windows.zip';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
// Show success message
showNotification('💻 Portable Windows version download started!', 'success');
} }
document.getElementById('print-label-btn').addEventListener('click', function() { document.getElementById('print-label-btn').addEventListener('click', function() {