Add PWA (Portable Web App) support
* make the app look a little less derpy on phone sized devices * add "Add to home screen" support Note: if you would like to replace my rather derpy rendition of the SCSI icon (and I wouldn't blame you if you did) then run your icon through the online favicon processor at https://www.favicon-generator.org/ to get all of the PWA icons (apple-icon-114x114.png, etc.)
BIN
src/web/pwa/android-icon-144x144.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/web/pwa/android-icon-192x192.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/web/pwa/android-icon-36x36.png
Normal file
After Width: | Height: | Size: 966 B |
BIN
src/web/pwa/android-icon-48x48.png
Normal file
After Width: | Height: | Size: 999 B |
BIN
src/web/pwa/android-icon-72x72.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/web/pwa/android-icon-96x96.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/web/pwa/apple-icon-114x114.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/web/pwa/apple-icon-120x120.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/web/pwa/apple-icon-144x144.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/web/pwa/apple-icon-152x152.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
src/web/pwa/apple-icon-180x180.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
src/web/pwa/apple-icon-57x57.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/web/pwa/apple-icon-60x60.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/web/pwa/apple-icon-72x72.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/web/pwa/apple-icon-76x76.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/web/pwa/apple-icon-precomposed.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
src/web/pwa/apple-icon.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
2
src/web/pwa/browserconfig.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
|
BIN
src/web/pwa/favicon-16x16.png
Normal file
After Width: | Height: | Size: 729 B |
BIN
src/web/pwa/favicon-32x32.png
Normal file
After Width: | Height: | Size: 864 B |
BIN
src/web/pwa/favicon-96x96.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/web/pwa/favicon.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
41
src/web/pwa/manifest.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "RaSCSI",
|
||||
"icons": [
|
||||
{
|
||||
"src": "\/pwa\/android-icon-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "\/pwa\/android-icon-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "\/pwa\/android-icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "\/pwa\/android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "\/pwa\/android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "\/pwa\/android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
}
|
||||
]
|
||||
}
|
BIN
src/web/pwa/ms-icon-144x144.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/web/pwa/ms-icon-150x150.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
src/web/pwa/ms-icon-310x310.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
src/web/pwa/ms-icon-70x70.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
@ -1,5 +1,25 @@
|
||||
<!doctype html>
|
||||
<title>RaSCSI Control Page</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/pwa/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/pwa/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/pwa/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/pwa/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/pwa/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/pwa/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/pwa/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/pwa/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/pwa/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/pwa/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/pwa/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="/pwa/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/pwa/favicon-16x16.png">
|
||||
<link rel="manifest" href="/pwa/manifest.json">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="/pwa/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
|
||||
<div class="content">
|
||||
|
@ -1,7 +1,7 @@
|
||||
import io
|
||||
import re
|
||||
|
||||
from flask import Flask, render_template, request, flash, url_for, redirect, send_file
|
||||
from flask import Flask, render_template, request, flash, url_for, redirect, send_file, send_from_directory
|
||||
|
||||
from file_cmds import (
|
||||
create_new_image,
|
||||
@ -49,6 +49,9 @@ def index():
|
||||
version=running_version(),
|
||||
)
|
||||
|
||||
@app.route('/pwa/<path:path>')
|
||||
def send_pwa_files(path):
|
||||
return send_from_directory('pwa', path)
|
||||
|
||||
@app.route("/config/save", methods=["POST"])
|
||||
def config_save():
|
||||
|