commit 38ee08f6bbf574aa45792bc8c70e90c9dc479ea7
parent 96c09e3669e66eeac26be50b9dc92c7f8a0cfaa5
Author: Hunter
Date:   Thu, 26 Mar 2026 16:41:23 -0400

use repeat.svg icon; clean up generate_manifests.py

Diffstat:
Mgenerate_manifests.py | 66+++++++++++++++++++++++++-----------------------------------------
Aresources/repeat.svg | 24++++++++++++++++++++++++
Mresources/script.js | 16++++++++++++++--
3 files changed, 63 insertions(+), 43 deletions(-)

diff --git a/generate_manifests.py b/generate_manifests.py @@ -8,54 +8,37 @@ import json import re from pathlib import Path -def get_configuration(localhost=False): - """Prompt user for configuration values - - Args: - localhost: If True, assumes root path and only asks for app name. - This enables PWA installation on localhost (iOS 18+). - """ +def get_configuration(): + """Prompt user for configuration values""" print("=" * 60) print("PWA Configuration") print("=" * 60) print() # Get app name - if localhost: - app_name = input("Enter a name for your mixapp (or press Return/Enter for 'my mixapp'): ").strip() - if not app_name: - app_name = "my mixapp" - print(f"Using default: {app_name}") - else: - app_name = input("Enter a name for your mixapp: ").strip() - if not app_name: - print("Error: App name is required") - exit(1) - - # For localhost mode, use root path - if localhost: - base_path = "/" - print() - print("Localhost mode: Using root path for PWA installation") + app_name = input("Enter a name for your mixapp: ").strip() + if not app_name: + print("Error: App name is required") + exit(1) + + # Get base path with smart default + default_path = app_name.lower().replace(" ", "_") + print() + print(f"Enter the deployment path (or press Return/Enter for default)") + print(f"Default: /{default_path}/") + base_path_input = input("Path: ").strip() + + if base_path_input: + # User provided a path - ensure it has leading/trailing slashes + base_path = base_path_input + if not base_path.startswith("/"): + base_path = "/" + base_path + if not base_path.endswith("/"): + base_path = base_path + "/" else: - # Get base path with smart default - default_path = app_name.lower().replace(" ", "_") - print() - print(f"Enter the deployment path (or press Return/Enter for default)") - print(f"Default: /{default_path}/") - base_path_input = input("Path: ").strip() - - if base_path_input: - # User provided a path - ensure it has leading/trailing slashes - base_path = base_path_input - if not base_path.startswith("/"): - base_path = "/" + base_path - if not base_path.endswith("/"): - base_path = base_path + "/" - else: - # Use default - base_path = f"/{default_path}/" - print(f"Using default path: {base_path}") + # Use default + base_path = f"/{default_path}/" + print(f"Using default path: {base_path}") print() print(f"Configuration:") @@ -189,6 +172,7 @@ def generate_pwa_manifests(app_name=None, base_path=None): "resources/pause.png", "resources/prev.png", "resources/next.png", + "resources/repeat.svg", ] # Conditionally include optional files if they exist diff --git a/resources/repeat.svg b/resources/repeat.svg @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="65.407951mm" + height="56.782715mm" + viewBox="0 0 65.407951 56.782715" + version="1.1" + id="svg5" + xml:space="preserve" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"><defs + id="defs2" /><g + id="layer1" + transform="translate(-468.51962,-125.48088)"><g + id="g9251"><path + id="path2689-9" + style="fill:currentColor;fill-opacity:1;stroke-width:5.39981;stroke-linecap:round;stroke-linejoin:round" + d="m 558.39505,447.02975 a 2.7001749,2.7001749 0 0 0 -0.9715,0.25878 2.7001749,2.7001749 0 0 0 -1.53172,2.43391 v 19.6921 h -68.73634 c -48.82418,-10e-6 -78.6236,51.9014 -57.88312,93.24693 l 2.36317,4.71165 25.58799,-20.65363 c -9.52258,-21.20085 3.26483,-45.131 29.93196,-45.13099 h 68.73634 v 19.69211 a 2.7001749,2.7001749 0 0 0 4.39509,2.1015 l 44.4911,-35.91071 a 2.7001749,2.7001749 0 0 0 -0.009,-4.20747 l -44.48888,-35.64969 a 2.7001749,2.7001749 0 0 0 -1.8852,-0.58449 z" + transform="matrix(0.23245107,0,0,0.23163997,379.32931,30.229918)" /><path + id="path2689-7-7" + style="fill:currentColor;fill-opacity:1;stroke-width:5.39981;stroke-linecap:round;stroke-linejoin:round" + d="m 558.39505,447.02975 a 2.7001749,2.7001749 0 0 0 -0.9715,0.25878 2.7001749,2.7001749 0 0 0 -1.53172,2.43391 v 19.6921 h -68.73634 c -48.82418,-10e-6 -78.6236,51.9014 -57.88312,93.24693 l 2.36317,4.71165 25.58799,-20.65363 c -9.52258,-21.20085 3.26483,-45.131 29.93196,-45.13099 h 68.73634 v 19.69211 a 2.7001749,2.7001749 0 0 0 4.39509,2.1015 l 44.4911,-35.91071 a 2.7001749,2.7001749 0 0 0 -0.009,-4.20747 l -44.48888,-35.64969 a 2.7001749,2.7001749 0 0 0 -1.8852,-0.58449 z" + transform="matrix(-0.23245107,0,0,-0.23163997,623.1179,277.51456)" /></g></g></svg> diff --git a/resources/script.js b/resources/script.js @@ -226,8 +226,20 @@ function renderPlaylist() { contentDiv.appendChild(artistDiv); const loopIcon = document.createElement('span'); - loopIcon.textContent = '🔁'; - loopIcon.style.display = (song.looping || false) ? 'inline' : 'none'; + loopIcon.style.width = '1.18em'; + loopIcon.style.height = '1.18em'; + loopIcon.style.display = (song.looping || false) ? 'inline-block' : 'none'; + loopIcon.style.color = 'var(--text)'; + fetch('resources/repeat.svg') + .then(r => r.text()) + .then(svgText => { + loopIcon.innerHTML = svgText; + const svg = loopIcon.querySelector('svg'); + if (svg) { + svg.style.width = '1.18em'; + svg.style.height = '1.18em'; + } + }); item.appendChild(contentDiv); item.appendChild(loopIcon);