From d8bc3492af554ddc88eae54bea4dd66d91fc005f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Vassb=C3=B8?= Date: Fri, 6 Dec 2024 11:27:37 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=94=20Fixed=20spaces=20added=20to=20the?= =?UTF-8?q?=20start=20of=20show=20name=20sometimes=20-=20Fixed=20freeze=20?= =?UTF-8?q?if=20trigger=20value=20was=20set=20to=20nothing=20-=20Updated?= =?UTF-8?q?=20languages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 32 ++++++++++++++---- public/lang/en_GB.json | 33 ++++++++++++++++--- public/lang/en_ZM.json | 33 ++++++++++++++++--- .../components/drawer/pages/Triggers.svelte | 3 ++ src/frontend/components/helpers/show.ts | 3 +- .../components/main/popups/Trigger.svelte | 2 +- 6 files changed, 90 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3bf04072..e00da132 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "freeshow", - "version": "1.3.2", + "version": "1.3.3-beta.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "freeshow", - "version": "1.3.2", + "version": "1.3.3-beta.1", "hasInstallScript": true, "license": "GPL-3.0", "dependencies": { @@ -18,12 +18,12 @@ "axios": "^1.7.8", "chord-transposer": "^3.0.9", "cross-env": "^7.0.3", + "css-fonts": "^1.0.8", "electron-store": "^8.0.1", "electron-updater": "^6.3.1", "exif": "^0.6.0", "express": "^4.17.2", "follow-redirects": "^1.15.2", - "font-list": "^1.4.5", "genius-lyrics": "^4.4.7", "grandiose": "vassbo/grandiose#9857c8e", "jzz": "^1.8.7", @@ -2654,6 +2654,15 @@ "node": ">=12.10" } }, + "node_modules/css-fonts": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/css-fonts/-/css-fonts-1.0.8.tgz", + "integrity": "sha512-V42LQXa5Q+PU/4DNQzGWkkQEP6cm3f7c04MDWHuEfdf7PioDAKN3WS5r2jGcXIlYtb/3EhLGVztt87pkF6Qlng==", + "license": "ISC", + "dependencies": { + "font-scanner": "github:vassbo/font-scanner" + } + }, "node_modules/css-select": { "version": "5.1.0", "license": "BSD-2-Clause", @@ -3772,9 +3781,14 @@ } } }, - "node_modules/font-list": { - "version": "1.5.1", - "license": "MIT" + "node_modules/font-scanner": { + "version": "0.2.2", + "resolved": "git+ssh://git@github.com/vassbo/font-scanner.git#76b1e872605eb3581f66825651c486045d4a7b93", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^5.0.0" + } }, "node_modules/for-each": { "version": "0.3.3", @@ -5727,6 +5741,12 @@ "version": "1.0.5", "license": "MIT" }, + "node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", + "license": "MIT" + }, "node_modules/node-fetch": { "version": "2.7.0", "license": "MIT", diff --git a/public/lang/en_GB.json b/public/lang/en_GB.json index c7d6c827..67a77a1a 100644 --- a/public/lang/en_GB.json +++ b/public/lang/en_GB.json @@ -163,6 +163,7 @@ "toggle_shuffle": "Toggle shuffle", "next": "Next", "previous": "Previous", + "play_no_audio": "Play without audio", "play_no_filters": "Play without filters", "favourite": "Favourite", "pause": "Pause", @@ -194,7 +195,10 @@ "playlist_settings": "Playlist settings", "custom_output": "Custom audio output", "mute_when_video_plays": "Mute when video plays", + "allow_gaining": "Allow gaining", + "allow_gaining_tip": "Allow setting volume above 100% (May cause distortion)", "pre_fader_volume_meter": "Pre fader volume meter", + "mixer": "Mixer", "metronome": "Metronome", "toggle_metronome": "Toggle metronome", "tempo": "Tempo", @@ -269,15 +273,17 @@ "ip": "Could not get the IP-address of your device, go to the computer Wi-Fi settings to find your local IPv4 address." }, "meta": { + "number": "Number", "title": "Title", "artist": "Artist", "author": "Author", "composer": "Composer", "publisher": "Publisher", "copyright": "Copyright", - "CCLI": "License (CCLI)", + "CCLI": "Song ID (CCLI)", "year": "Year", "key": "Key", + "autofill": "Autofill", "message": "Message", "message_tip": "Display something on all slides", "auto_media": "Get meta from media content", @@ -362,7 +368,8 @@ "music": "Music", "offers": "Offers", "notice": "Notice", - "visuals": "Visuals" + "visuals": "Visuals", + "action_tip": "An action that triggers each time a show with this category is presented." }, "groups": { "current": "Current", @@ -400,6 +407,7 @@ "change_output_values": "Change output values", "choose_chord": "Choose chord", "set_time": "Set time", + "slide_shortcut": "Slide shortcut", "animate": "Animate", "translate": "Localisation ", "next_timer": "Next slide timer", @@ -413,6 +421,7 @@ "about": "About", "history": "History", "action": "Action", + "category_action": "Category action", "connect": "Connect", "cloud_update": "Syncing with cloud", "cloud_method": "Data location", @@ -547,6 +556,8 @@ "zoomIn": "Zoom In", "zoomOut": "Zoom Out", "reset": "Reset", + "create_template": "Create template", + "project_template_tip": "Create a new project from this template", "convert_to_images": "Convert to images", "converting": "Converting...", "remove_template_from_show": "Remove template from show", @@ -608,6 +619,8 @@ "set_key": "Set key", "custom_key": "Set custom value", "select_chord": "Select this chord", + "play_with_shortcut": "Activate with shortcut", + "press_to_assign": "Press any letter key to assign", "play_on_midi": "Activate on MIDI signal", "play_on_midi_tip": "Activate this specific slide when receiving chosen MIDI signal", "send_midi": "Send MIDI signal", @@ -624,6 +637,7 @@ "next_after_media": "Next on media finished", "remove_media": "Remove media", "remove_layers": "Remove layers", + "toggle_checkbox_tip": "Action will toggle if checkbox is unchanged", "start_recording": "Start recording", "stop_recording": "Stop recording", "export_recording": "Stop recording and export", @@ -632,6 +646,7 @@ "previous_project_item": "Previous project item", "index_select_project_item": "Select project item by index", "name_select_show": "Select show by name", + "set_template_active": "Set template on active show", "random_slide": "Play random slide", "index_select_slide": "Select slide by index", "name_select_slide": "Select slide by name", @@ -672,6 +687,7 @@ "activate_slide_cleared": "Activate when slide is cleared", "activate_background_cleared": "Activate when background is cleared", "activate_show_created": "Activate when show is created", + "activate_show_opened": "Activate when show is opened", "activate_audio_playlist_ended": "Activate when audio playlist has ended" }, "recording": { @@ -679,7 +695,9 @@ "tip": "Record and replay the timings of slides. Sync with an audio track on the first slide.", "layout_changed": "Layout has changed since last recording!", "audio_synced": "Synced with audio!", - "start": "Start slide recording" + "start": "Start slide recording", + "use_duration": "Use duration time", + "use_duration_tip": "Use duration time instead of timestamp time" }, "animate": { "change": "Change", @@ -738,6 +756,7 @@ }, "context": { "enabledTabs": "Toggle tabs", + "setTag": "Set tag", "filterByTags": "Filter by tags", "addToProject": "Add to project", "add_to_show": "Add to show", @@ -796,6 +815,8 @@ "overlay_content": "Add overlay content", "different_first_template": "Custom template on first slide", "media_fit": "Media fit", + "one_letter": "One letter mode", + "sub_indexes": "Sub indexes", "size": "Size", "max_lines": "Max lines", "invert_items": "Invert items", @@ -916,6 +937,7 @@ "to_event": "Time until event", "counter": "Countdown", "time": "Time", + "minutes": "Minutes", "seconds": "Seconds", "from": "From", "to": "To", @@ -1063,6 +1085,7 @@ "group_numbers": "Group numbers", "full_colors": "High contrast group colours", "slide_number_keys": "Play slides with number keys", + "auto_shortcut_first_letter": "Auto shortcut to first letter in text", "auto_output": "Activate output screen on startup", "hide_cursor_in_output": "Hide cursor in output", "clear_media_when_finished": "Clear media when finished", @@ -1124,7 +1147,8 @@ "auto": "Auto", "optimized": "Optimised", "reduced": "Reduced", - "full": "Full" + "full": "Full", + "section_trigger_action": "Trigger action when navigating presentation to a section" }, "sort": { "sort_by": "Sort by", @@ -1172,6 +1196,7 @@ "reference": "Show reference", "split_reference": "Split reference", "combine_with_text": "Combine with text", + "first_slide_reference": "Reference on first slide", "reference_at_bottom": "Move to bottom", "red_jesus": "Jesus words in red", "search": "Search in the Bible" diff --git a/public/lang/en_ZM.json b/public/lang/en_ZM.json index b2fedcde..a1d2d2cc 100644 --- a/public/lang/en_ZM.json +++ b/public/lang/en_ZM.json @@ -163,6 +163,7 @@ "toggle_shuffle": "Toggle shuffle", "next": "Next", "previous": "Previous", + "play_no_audio": "Play without audio", "play_no_filters": "Play without filters", "favourite": "Favourite", "pause": "Pause", @@ -194,7 +195,10 @@ "playlist_settings": "Playlist settings", "custom_output": "Custom audio output", "mute_when_video_plays": "Mute when video plays", + "allow_gaining": "Allow gaining", + "allow_gaining_tip": "Allow setting volume above 100% (May cause distortion)", "pre_fader_volume_meter": "Pre fader volume meter", + "mixer": "Mixer", "metronome": "Metronome", "toggle_metronome": "Toggle metronome", "tempo": "Tempo", @@ -269,15 +273,17 @@ "ip": "Could not get the IP-address of your device, go to the computer Wi-Fi settings to find your local IPv4 address." }, "meta": { + "number": "Number", "title": "Title", "artist": "Artist", "author": "Author", "composer": "Composer", "publisher": "Publisher", "copyright": "Copyright", - "CCLI": "License (CCLI)", + "CCLI": "Song ID (CCLI)", "year": "Year", "key": "Key", + "autofill": "Autofill", "message": "Message", "message_tip": "Display something on all slides", "auto_media": "Get meta from media content", @@ -362,7 +368,8 @@ "music": "Music", "offers": "Offers", "notice": "Notice", - "visuals": "Visuals" + "visuals": "Visuals", + "action_tip": "An action that triggers each time a show with this category is presented." }, "groups": { "current": "Current", @@ -400,6 +407,7 @@ "change_output_values": "Change output values", "choose_chord": "Choose chord", "set_time": "Set time", + "slide_shortcut": "Slide shortcut", "animate": "Animate", "translate": "Localisation", "next_timer": "Next slide timer", @@ -413,6 +421,7 @@ "about": "About", "history": "History", "action": "Action", + "category_action": "Category action", "connect": "Connect", "cloud_update": "Syncing with cloud", "cloud_method": "Data location", @@ -547,6 +556,8 @@ "zoomIn": "Zoom In", "zoomOut": "Zoom Out", "reset": "Reset", + "create_template": "Create template", + "project_template_tip": "Create a new project from this template", "convert_to_images": "Convert to images", "converting": "Converting...", "remove_template_from_show": "Remove template from show", @@ -608,6 +619,8 @@ "set_key": "Set key", "custom_key": "Set custom value", "select_chord": "Select this chord", + "play_with_shortcut": "Activate with shortcut", + "press_to_assign": "Press any letter key to assign", "play_on_midi": "Activate on MIDI signal", "play_on_midi_tip": "Activate this specific slide when receiving chosen MIDI signal", "send_midi": "Send MIDI signal", @@ -624,6 +637,7 @@ "next_after_media": "Next on media finished", "remove_media": "Remove media", "remove_layers": "Remove layers", + "toggle_checkbox_tip": "Action will toggle if checkbox is unchanged", "start_recording": "Start recording", "stop_recording": "Stop recording", "export_recording": "Stop recording and export", @@ -632,6 +646,7 @@ "previous_project_item": "Previous project item", "index_select_project_item": "Select project item by index", "name_select_show": "Select show by name", + "set_template_active": "Set template on active show", "random_slide": "Play random slide", "index_select_slide": "Select slide by index", "name_select_slide": "Select slide by name", @@ -672,6 +687,7 @@ "activate_slide_cleared": "Activate when slide is cleared", "activate_background_cleared": "Activate when background is cleared", "activate_show_created": "Activate when show is created", + "activate_show_opened": "Activate when show is opened", "activate_audio_playlist_ended": "Activate when audio playlist has ended" }, "recording": { @@ -679,7 +695,9 @@ "tip": "Record and replay the timings of slides. Sync with an audio track on the first slide.", "layout_changed": "Layout has changed since last recording!", "audio_synced": "Synced with audio!", - "start": "Start slide recording" + "start": "Start slide recording", + "use_duration": "Use duration time", + "use_duration_tip": "Use duration time instead of timestamp time" }, "animate": { "change": "Change", @@ -738,6 +756,7 @@ }, "context": { "enabledTabs": "Toggle tabs", + "setTag": "Set tag", "filterByTags": "Filter by tags", "addToProject": "Add to project", "add_to_show": "Add to show", @@ -796,6 +815,8 @@ "overlay_content": "Add overlay content", "different_first_template": "Custom template on first slide", "media_fit": "Media fit", + "one_letter": "One letter mode", + "sub_indexes": "Sub indexes", "size": "Size", "max_lines": "Max lines", "invert_items": "Invert items", @@ -916,6 +937,7 @@ "to_event": "Time until event", "counter": "Countdown", "time": "Time", + "minutes": "Minutes", "seconds": "Seconds", "from": "From", "to": "To", @@ -1063,6 +1085,7 @@ "group_numbers": "Group numbers", "full_colors": "High contrast group colours", "slide_number_keys": "Play slides with number keys", + "auto_shortcut_first_letter": "Auto shortcut to first letter in text", "auto_output": "Activate output screen on startup", "hide_cursor_in_output": "Hide cursor in output", "clear_media_when_finished": "Clear media when finished", @@ -1124,7 +1147,8 @@ "auto": "Auto", "optimized": "Optimised", "reduced": "Reduced", - "full": "Full" + "full": "Full", + "section_trigger_action": "Trigger action when navigating presentation to a section" }, "sort": { "sort_by": "Sort by", @@ -1172,6 +1196,7 @@ "reference": "Show reference", "split_reference": "Split reference", "combine_with_text": "Combine with text", + "first_slide_reference": "Reference on first slide", "reference_at_bottom": "Move to bottom", "red_jesus": "Jesus words in red", "search": "Search in the Bible" diff --git a/src/frontend/components/drawer/pages/Triggers.svelte b/src/frontend/components/drawer/pages/Triggers.svelte index 608377c2..fbb66b3e 100644 --- a/src/frontend/components/drawer/pages/Triggers.svelte +++ b/src/frontend/components/drawer/pages/Triggers.svelte @@ -25,6 +25,9 @@ } function formatTriggerValue(value: string) { + // bug in pre 1.3.3 where trigger value is an event if changed to empty + if (typeof value !== "string") return + // value = e.g. http://192.168.10.50/?preset=1&cam=3 -> Preset: 1 if (!value) return "" diff --git a/src/frontend/components/helpers/show.ts b/src/frontend/components/helpers/show.ts index 6005db2a..c6de0590 100644 --- a/src/frontend/components/helpers/show.ts +++ b/src/frontend/components/helpers/show.ts @@ -14,7 +14,8 @@ export function checkName(name: string = "", showId: string = "") { let number = 1 while (Object.entries(get(shows)).find(([id, a]: any) => (!showId || showId !== id) && a.name?.toLowerCase() === (number > 1 ? name.toLowerCase() + " " + number : name.toLowerCase()))) number++ - return number > 1 ? name + " " + number : name + // add number if existing name, and trim away spaces from the start/end + return (number > 1 ? name + " " + number : name).trim() } export function formatToFileName(name: string = "") { diff --git a/src/frontend/components/main/popups/Trigger.svelte b/src/frontend/components/main/popups/Trigger.svelte index e7c7669e..e076c69d 100644 --- a/src/frontend/components/main/popups/Trigger.svelte +++ b/src/frontend/components/main/popups/Trigger.svelte @@ -31,7 +31,7 @@ let sortedTriggers = sortByName(globalList) function updateValue(e: any, key: string) { - let value = e?.target?.value || e + let value = e?.target?.value ?? e if (!value) return currentTrigger[key] = value