diff --git a/rotary_phone_web.py b/rotary_phone_web.py index 66f341f..a6c0faf 100644 --- a/rotary_phone_web.py +++ b/rotary_phone_web.py @@ -81,7 +81,7 @@ BACKUP_ON_WRITE = BACKUP_CONFIG.get('backup_on_write', True) WEB_PORT = SYS_CONFIG['web']['port'] # Template version - increment this when HTML template changes -TEMPLATE_VERSION = "1.4.0" # Updated: Added recording beep sound feature +TEMPLATE_VERSION = "1.5.0" # Updated: Redesigned sound selection with dropdowns # Flask app app = Flask(__name__) @@ -1176,7 +1176,28 @@ def main(): .upload-label:hover { background: #5568d3; } - + + .sound-selector { + width: 100%; + padding: 12px; + font-size: 1em; + border: 2px solid #e5e7eb; + border-radius: 8px; + background: white; + cursor: pointer; + transition: border-color 0.3s; + } + + .sound-selector:hover { + border-color: #667eea; + } + + .sound-selector:focus { + outline: none; + border-color: #667eea; + box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); + } + .btn { padding: 10px 20px; border: none; @@ -1555,20 +1576,62 @@ def main(): - +
-

đŸŽĩ Greeting Messages

+

đŸŽĩ Sound Assignment

-
- â„šī¸ Active greeting: {{ active_greeting }} - {% if extra_button_enabled %} -
🔘 Extra button sound: {{ extra_button_sound }} - {% endif %} +
+

⭐ Greeting Sound

+

+ Plays when handset is picked up +

+
+ {% if extra_button_enabled %} +
+

🔘 Button Sound

+

+ Plays when extra button is pressed during recording +

+ +
+ {% endif %} + +
+

đŸ“Ŗ Recording Beep

+

+ Plays after greeting to signal recording start +

+ +
+
+ + +
+

🔊 Available Sounds

+

- Upload WAV files to play when the handset is picked up + Upload WAV audio files for greetings, button sounds, and beeps

- + {% if greetings %} -

Available Greetings

+

Uploaded Sounds

{% for greeting in greetings %} -
+
-

- {% if greeting.is_active %}⭐{% endif %} - {% if greeting.is_button_sound and extra_button_enabled %}🔘{% endif %} - {{ greeting.filename }} -

+

{{ greeting.filename }}

📅 {{ greeting.date }} | âąī¸ {{ "%.1f"|format(greeting.duration) }}s | 💾 {{ "%.2f"|format(greeting.size_mb) }} MB
+
+ {% if greeting.is_active %}⭐ Active Greeting{% endif %} + {% if greeting.is_button_sound and extra_button_enabled %}{% if greeting.is_active %} | {% endif %}🔘 Button Sound{% endif %} + {% if greeting.is_beep_sound %}{% if greeting.is_active or greeting.is_button_sound %} | {% endif %}đŸ“Ŗ Beep Sound{% endif %} +
- {% if not greeting.is_active %} - - {% if extra_button_enabled and not greeting.is_button_sound %} - - {% endif %} - {% if not greeting.is_beep_sound %} - - {% endif %} - {% else %} - - {% if extra_button_enabled and not greeting.is_button_sound %} - - {% endif %} - {% if not greeting.is_beep_sound %} - - {% endif %} - {% endif %}
{% endfor %} @@ -1649,7 +1684,7 @@ def main(): {% else %}

đŸŽĩ

-

No greeting messages uploaded yet. Upload your first greeting!

+

No sounds uploaded yet. Upload your first sound file!

{% endif %}