diff --git a/py_app/app/__pycache__/routes.cpython-312.pyc b/py_app/app/__pycache__/routes.cpython-312.pyc index ad5b565..ec4b99e 100644 Binary files a/py_app/app/__pycache__/routes.cpython-312.pyc and b/py_app/app/__pycache__/routes.cpython-312.pyc differ diff --git a/py_app/app/routes.py b/py_app/app/routes.py index e04655e..18b42e4 100644 --- a/py_app/app/routes.py +++ b/py_app/app/routes.py @@ -2130,6 +2130,30 @@ def download_desktop_app(): print(f"DEBUG: Error downloading desktop app: {e}") 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/', methods=['GET']) def get_order_data(order_id): """Get specific order data for preview""" diff --git a/py_app/app/templates/print_module.html b/py_app/app/templates/print_module.html index 3d9e755..0d14617 100644 --- a/py_app/app/templates/print_module.html +++ b/py_app/app/templates/print_module.html @@ -213,10 +213,13 @@ 🖥️ Quality Print Desktop v1.0.0 (RECOMMENDED)
- Professional desktop app with built-in thermal printing • Direct hardware access • Rich formatting + Professional desktop app • Direct hardware access • Rich formatting
+ ✅ READY! @@ -236,7 +239,7 @@
🏆 Desktop App Benefits: Direct thermal printing • Rich barcodes/QR codes • Better reliability
- ✨ Now includes: electron-pos-printer • One-click install • Cross-platform support + ✨ Two versions: Full Linux AppImage or Lightweight Windows Portable • Cross-platform support
@@ -1107,7 +1110,20 @@ function downloadElectronApp() { document.body.removeChild(link); // Show success message - showNotification('� 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() {