Skip to content

Commit

Permalink
Feat: add option for compact grids #1074
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Jul 29, 2023
1 parent 66dacd0 commit 96c4ebc
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 21 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Describe the release here.

- Feat: move song fingerprint calculation in worker thread
- Feat: display album tags in jukebox album list #1069
- Feat: add option for compact grids #1074
- Feat: add advanced search to more views #1048
- Upd: some code enhancements #1045
- Upd: merge MYMPD_API_QUEUE_SEARCH_ADV and MYMPD_API_QUEUE_LIST into MYMPD_API_QUEUE_SEARCH
- Fix: calculate correct position for jukebox list
Expand Down
24 changes: 12 additions & 12 deletions docs/references/translating_status.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
- es-AR: fully translated
- es-ES: 663 missing phrases
- es-VE: 670 missing phrases
- fi-FI: 666 missing phrases
- fr-FR: fully translated
- it-IT: fully translated
- ja-JP: 2 missing phrases
- ko-KR: fully translated
- nl-NL: fully translated
- pl-PL: 851 missing phrases
- ru-RU: 99 missing phrases
- zh-Hans: fully translated
- es-AR: 1 missing phrases
- es-ES: 664 missing phrases
- es-VE: 671 missing phrases
- fi-FI: 667 missing phrases
- fr-FR: 1 missing phrases
- it-IT: 1 missing phrases
- ja-JP: 3 missing phrases
- ko-KR: 1 missing phrases
- nl-NL: 1 missing phrases
- pl-PL: 852 missing phrases
- ru-RU: 100 missing phrases
- zh-Hans: 1 missing phrases
7 changes: 6 additions & 1 deletion htdocs/css/mympd.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ body.mobile > footer > nav {
--mympd-highlightcolor: var(--bs-green);
--mympd-highlightcolor-contrast: var(--bs-light);
--mympd-backgroundcolor: var(--bs-black);
--mympd-card-footer-word-wrap: nowrap;
--bs-dropdown-divider-margin-y: 0.5rem;
--bs-nav-link-padding-y: 0.5rem;
--bs-nav-link-padding-x: 1rem;
Expand Down Expand Up @@ -500,9 +501,13 @@ div#homeActions {
}

.card-footer-grid {
white-space: var(--mympd-card-footer-word-wrap);
font-size: 0.9rem;
}

.card-footer-grid > * {
overflow: hidden;
text-overflow: ellipsis;
font-size: 0.9rem;
}

.album-cover-grid {
Expand Down
6 changes: 6 additions & 0 deletions htdocs/js/globales.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,12 @@ const webuiSettingsDefault = {
"title": "Quick remove button",
"form": "appearanceSettingsFrm"
},
"uiCompactGrids": {
"defaultValue": true,
"inputType": "checkbox",
"title": "Compact grids",
"form": "appearanceSettingsFrm"
},
"enableHome": {
"defaultValue": true,
"inputType": "checkbox",
Expand Down
8 changes: 8 additions & 0 deletions htdocs/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ function parseSettings(obj) {
}
document.querySelector('html').setAttribute('data-bs-theme', setTheme);

//compact grids
if (settings.webuiSettings.uiCompactGrids === true) {
document.documentElement.style.setProperty('--mympd-card-footer-word-wrap', 'nowrap');
}
else {
document.documentElement.style.setProperty('--mympd-card-footer-word-wrap', 'unset');
}

//background
if (settings.webuiSettings.uiTheme === 'auto') {
//in auto mode we set default background
Expand Down
1 change: 1 addition & 0 deletions src/i18n/extra_phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Click song in queue
Click webradio
Click webradio favorite
Comment
Compact grids
Composer
ComposerSort
Conductor
Expand Down
1 change: 1 addition & 0 deletions src/i18n/json/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"Columns": "Spalten",
"Comment": "Kommentar",
"Comments": "Kommentare",
"Compact grids": "Kompaktes Grid",
"Composer": "Komponist",
"ComposerSort": "Komponist",
"Conductor": "Dirigent",
Expand Down
16 changes: 8 additions & 8 deletions src/i18n/json/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"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": 0},
"fr-FR": {"desc":"Français (fr-FR)", "missingPhrases": 0},
"it-IT": {"desc":"Italiano (it-IT)", "missingPhrases": 0},
"ja-JP": {"desc":"日本語 (ja-JP)", "missingPhrases": 2},
"ko-KR": {"desc":"한국어 (ko-KR)", "missingPhrases": 0},
"nl-NL": {"desc":"Nederlands (nl-NL)", "missingPhrases": 0},
"ru-RU": {"desc":"Russian (ru-RU)", "missingPhrases": 99},
"zh-Hans": {"desc":"简体中文 (zh-Hans)", "missingPhrases": 0}
"es-AR": {"desc":"Español (es-AR)", "missingPhrases": 1},
"fr-FR": {"desc":"Français (fr-FR)", "missingPhrases": 1},
"it-IT": {"desc":"Italiano (it-IT)", "missingPhrases": 1},
"ja-JP": {"desc":"日本語 (ja-JP)", "missingPhrases": 3},
"ko-KR": {"desc":"한국어 (ko-KR)", "missingPhrases": 1},
"nl-NL": {"desc":"Nederlands (nl-NL)", "missingPhrases": 1},
"ru-RU": {"desc":"Russian (ru-RU)", "missingPhrases": 100},
"zh-Hans": {"desc":"简体中文 (zh-Hans)", "missingPhrases": 1}
}

0 comments on commit 96c4ebc

Please sign in to comment.