Skip to content

Commit

Permalink
Upd: home widget dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Sep 16, 2024
1 parent b4ee6e7 commit c65000b
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 26 deletions.
28 changes: 14 additions & 14 deletions docs/references/translating_status.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
- bg-BG: 1080 missing phrases
- es-AR: 28 missing phrases
- es-ES: 947 missing phrases
- es-VE: 935 missing phrases
- fi-FI: 932 missing phrases
- fr-FR: 28 missing phrases
- it-IT: 28 missing phrases
- ja-JP: 28 missing phrases
- ko-KR: 28 missing phrases
- nl-NL: 28 missing phrases
- pl-PL: 80 missing phrases
- ru-RU: 28 missing phrases
- zh-Hans: 28 missing phrases
- zh-Hant: 114 missing phrases
- bg-BG: 1081 missing phrases
- es-AR: 29 missing phrases
- es-ES: 948 missing phrases
- es-VE: 936 missing phrases
- fi-FI: 933 missing phrases
- fr-FR: 29 missing phrases
- it-IT: 29 missing phrases
- ja-JP: 29 missing phrases
- ko-KR: 29 missing phrases
- nl-NL: 29 missing phrases
- pl-PL: 81 missing phrases
- ru-RU: 29 missing phrases
- zh-Hans: 29 missing phrases
- zh-Hant: 115 missing phrases
1 change: 1 addition & 0 deletions htdocs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2709,6 +2709,7 @@ <h5 class="modal-title"><span class="mi title-icon">home</span> <span id="modalH
<input id="modalHomeWidgetRefreshInput" placeholder="0" class="form-control rounded-end"/>
<span class="input-group-text-nobg" data-phrase="Seconds"></span>
</div>
<small class="help" data-phrase="helpHomeWidgetRefresh"></small>
<div class="invalid-feedback" data-phrase="Invalid refresh interval"></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion htdocs/js/modalHomeWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function showWidgetScriptArgs(option, values) {
*/
//eslint-disable-next-line no-unused-vars
function saveHomeWidget(target) {
cleanupModalId('modalHomeIcon');
cleanupModalId('modalHomeWidget');
btnWaiting(target, true);
const args = formToScriptArgs(elGetById('modalHomeWidgetArgumentsInput'));
const modal = elGetById('modalHomeWidget');
Expand Down
1 change: 1 addition & 0 deletions src/compile_time.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ extern struct t_mympd_queue *mympd_api_queue;
#define JUKEBOX_LAST_PLAYED_MAX 5000
#define JUKEBOX_UNIQ_RANGE 50
#define SCRIPT_ARGUMENTS_MAX 20
#define HOME_WIDGET_REFRESH_MAX 360

// timer + mpd connections + stickerdb + eventfd (mympd api queue)
#define POLL_FDS_MAX LIST_TIMER_MAX + MPD_CONNECTION_MAX * 4 + 1 + 1
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/json/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@
"Num discs": "%{smart_count} CD |||| %{smart_count} CD's",
"Num entries": "%{smart_count} Eintrag |||| %{smart_count} Einträge",
"Num songs": "%{smart_count} Lied |||| %{smart_count} Lieder",
"Number is out of valid range": "Zahl ist außerhalb der erlaubten Range",
"Number is out of valid range": "Zahl ist außerhalb des erlaubten Bereichs",
"Off": "Deaktiviert",
"Offset": "Start",
"Ogg Vorbis": "Ogg Vorbis",
Expand Down Expand Up @@ -1097,6 +1097,7 @@
"helpSettingsVorbisUslt": "Vorbis Kommentarname für einfache Liedtexte (Einfacher Text).",
"helpTimerPlaylist": "Wiedergabeliste wird ignoriert, wenn die Voreinstellung die Jukebox aktiviert",
"helpTimerPreset": "Voreinstellungen werden in den Wiedergabeeinstellungen verwaltet.",
"helpHomeWidgetRefresh": "Auf 0 setzen, um die Aktualisierung zu deaktivieren.",
"homepage": "Homepage",
"http://uri.to/stream.mp3": "http://url.zum/stream.mp3",
"httpd": "HTTPD",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/json/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"helpSettingsFeedback": "Rate songs by love/hate or with 5 stars.",
"helpSettingsGridSize": "Size of the images in grid view.",
"helpSettingsAlbumListSort": "Default sort tag for the album list.",
"helpHomeWidgetRefresh": "Set to 0 to disable widegt refresh.",
"icon-all": "All",
"icon-action": "Action",
"icon-alert": "Alert",
Expand Down
18 changes: 9 additions & 9 deletions src/i18n/json/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"default": {"desc":"Browser default", "missingPhrases": 0},
"de-DE": {"desc":"Deutsch (de-DE)", "missingPhrases": 0},
"en-US": {"desc":"English (en-US)", "missingPhrases": 0},
"es-AR": {"desc":"Español (es-AR)", "missingPhrases": 28},
"fr-FR": {"desc":"Français (fr-FR)", "missingPhrases": 28},
"it-IT": {"desc":"Italiano (it-IT)", "missingPhrases": 28},
"ja-JP": {"desc":"日本語 (ja-JP)", "missingPhrases": 28},
"ko-KR": {"desc":"한국어 (ko-KR)", "missingPhrases": 28},
"nl-NL": {"desc":"Nederlands (nl-NL)", "missingPhrases": 28},
"pl-PL": {"desc":"Polish (pl-PL)", "missingPhrases": 80},
"ru-RU": {"desc":"Russian (ru-RU)", "missingPhrases": 28},
"zh-Hans": {"desc":"简体中文 (zh-Hans)", "missingPhrases": 28}
"es-AR": {"desc":"Español (es-AR)", "missingPhrases": 29},
"fr-FR": {"desc":"Français (fr-FR)", "missingPhrases": 29},
"it-IT": {"desc":"Italiano (it-IT)", "missingPhrases": 29},
"ja-JP": {"desc":"日本語 (ja-JP)", "missingPhrases": 29},
"ko-KR": {"desc":"한국어 (ko-KR)", "missingPhrases": 29},
"nl-NL": {"desc":"Nederlands (nl-NL)", "missingPhrases": 29},
"pl-PL": {"desc":"Polish (pl-PL)", "missingPhrases": 81},
"ru-RU": {"desc":"Russian (ru-RU)", "missingPhrases": 29},
"zh-Hans": {"desc":"简体中文 (zh-Hans)", "missingPhrases": 29}
}
1 change: 1 addition & 0 deletions src/i18n/json/phrases.json
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@
{"term":"helpConnectionMusicDirectory"},
{"term":"helpConnectionPlaylistDirectory"},
{"term":"helpConnectionTimeout"},
{"term":"helpHomeWidgetRefresh"},
{"term":"helpJukeboxFilterExclude"},
{"term":"helpJukeboxFilterInclude"},
{"term":"helpJukeboxIgnoreHated"},
Expand Down
2 changes: 1 addition & 1 deletion src/mympd_api/mympd_api_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ void mympd_api_handler(struct t_mympd_state *mympd_state, struct t_partition_sta
json_get_string(request->data, "$.params.script", 1, NAME_LEN_MAX, &sds_buf2, vcb_isname, &parse_error) == true &&
json_get_string(request->data, "$.params.size", 1, NAME_LEN_MAX, &sds_buf3, vcb_isalnum, &parse_error) == true &&
json_get_object_string(request->data, "$.params.arguments", &options, vcb_isname, vcb_isname, 10, &parse_error) == true &&
json_get_uint_max(request->data, "$.params.refresh", &uint_buf2, &parse_error) == true)
json_get_uint(request->data, "$.params.refresh", 0, HOME_WIDGET_REFRESH_MAX, &uint_buf2, &parse_error) == true)
{
rc = mympd_api_home_widget_save(&mympd_state->home_list, bool_buf1, uint_buf1, sds_buf1, uint_buf2, sds_buf3, sds_buf2, &options);
response->data = jsonrpc_respond_with_ok_or_error(response->data, request->cmd_id, request->id, rc,
Expand Down

0 comments on commit c65000b

Please sign in to comment.