Skip to content

Commit

Permalink
chore: release v1.5.1
Browse files Browse the repository at this point in the history
- improve documentation
- remove margin from plcontainer
- improve textoverflow with ellipsis
- adjust initial widgetsize of playlist widget
- repair attributes for playlist widget
- add light mode css for playlist widget
  • Loading branch information
oweitman committed Nov 29, 2024
1 parent 91aa29e commit 50bef50
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 55 deletions.
41 changes: 35 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,27 +460,55 @@ For self formating there are some predefined css-classes:
| plcontainer| Class name assigned to the ul-tag |
| plentry | Class name assigned to the li-tag |
| plrefresh | Class name assigned to the refresh-li tag |
| pltext | Class name assigned to the playlist name |

The following CSS for the vis-css tab can serve as an example:

Dark-mode

```css
.plentry {
border: 1px #505050 groove;
margin:1px 0px;
padding:5px;
text-overflow: ellipsis;
background-color:#202020;
overflow-x:clip;
}
.plrefresh {
padding:5px;
}
.plentry:hover {
background-color:#404040;
background-color:#404040;
}
.plrefresh svg {
color:#cccccc;
}
.plrefresh svg:hover {
color:#ffffff;
filter: drop-shadow(0px 0px 1px #87ceeb);
color:#ffffff;
filter: drop-shadow(0px 0px 1px #87ceeb);
}
```

Light-mode

```css
.plentry {
border: 1px #b0b0b0 groove;
margin:1px 0px;
padding:5px;
background-color:#c0c0c0;
}
.plrefresh {
padding:5px;
}
.plentry:hover {
background-color:#e0e0e0;
}
.plrefresh svg {
color:#444444;
}
.plrefresh svg:hover {
color:#000000;
filter: drop-shadow(0px 0px 1px #87ceeb);
}
```

Expand Down Expand Up @@ -553,13 +581,14 @@ are contained in the following CLI documentation:
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**
### 1.5.1 (2024-11-29)

- improve documentation
- remove margin from plcontainer
- improve textoverflow with ellipsis
- adjust initial widgetsize of playlist widget
- repair attributes for playlist widget
- add light mode css for playlist widget

### 1.5.0 (2024-11-28)

Expand Down
15 changes: 14 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
{
"common": {
"name": "squeezeboxrpc",
"version": "1.5.0",
"version": "1.5.1",
"news": {
"1.5.1": {
"en": "improve documentation\nremove margin from plcontainer\nimprove textoverflow with ellipsis\nadjust initial widgetsize of playlist widget\nrepair attributes for playlist widget\nadd light mode css for playlist widget",
"de": "verbesserung der dokumentation\nentfernen sie den rand von plcontainer\ntextoverflow mit ellipsis verbessern\neinstellen der ersten widgetsize der wiedergabeliste widget\nreparatur-attribute für playlist widget\nlichtmodus css für playlist widget hinzufügen",
"ru": "улучшение документации\nудалить маржу от plcontainer\nулучшить текстовый поток с эллипсисом\nнастроить первоначальный виджет\nатрибуты для воспроизведения виджета\nдобавить режим cs для виджета списка воспроизведения",
"pt": "melhorar a documentação\nremover a margem do plcontainer\nmelhorar o fluxo de texto com ellipsis\najustar o widget inicial do widget da lista de reprodução\natributos de reparo para widget de lista de reprodução\nadd light mode css para widget da lista de reprodução",
"nl": "de documentatie verbeteren\nde marge uit plcontainer verwijderen\nverbeteren textoverflow met ellipsis\nde initiële widgetgrootte van afspeellijstwidget aanpassen\nreparatie attributen voor afspeellijst widget\nlichtmodus css toevoegen voor afspeellijstwidget",
"fr": "améliorer la documentation\nenlever la marge du plcontainer\naméliorer le textoverflow avec ellipse\najustez le widget initial du widget playlist\nattributs de réparation pour widget playlist\najouter le mode lumière css pour le widget playlist",
"it": "migliorare la documentazione\nrimuovere il margine da plcontainer\nmigliorare il flusso di testo con ellipsis\nregolare la dimensione iniziale del widget di playlist\nattributi di riparazione per widget di playlist\naggiungere css modalità di luce per widget di playlist",
"es": "mejorar la documentación\neliminar el margen de plcontainer\nmejorar el flujo de textover con elipsis\najustar el widgetsize inicial del widget de lista de reproducción\natributos de reparación para el widget de lista\nañadir light mode css para el widget de lista de reproducción",
"pl": "poprawić dokumentację\nusunąć margines z plakietki\npoprawić przepływ tekstuwerwiru za pomocą elipsy\ndostosować początkowy rozmiar widgetsize widget listy odtwarzania\nnaprawa atrybutów widgetu listy odtwarzania\ndodaj tryb światła css dla widżetu listy odtwarzania",
"uk": "вдосконалення документації\nприбрати запас від plcontainer\nполіпшення текстового потоку з еліпсом\nналаштування початкового віджетурозміри віджету\nвідремонтувати атрибути для відтворення віджету\nadd light режим css для playlist віджет",
"zh-cn": "改进文件编制\n从容器中删除边距\n改进带有椭圆的文本流\n调整播放列表部件的初始部件大小\n播放列表部件的修复属性\n为播放列表部件添加轻模式 ccs"
},
"1.5.0": {
"en": "Umstellung auf iobroker/eslint\nNeues Widget playlist",
"de": "Anpassung an iobroker/eslint\nNeues Widget Playlist",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iobroker.squeezeboxrpc",
"version": "1.5.0",
"version": "1.5.1",
"description": "ioBroker Logitech Squeezebox Adapter over JSON/RPC-Protocol",
"author": {
"name": "oweitman",
Expand Down
46 changes: 25 additions & 21 deletions widgets/squeezeboxrpc/js/squeezeboxrpc-dist.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions widgets/squeezeboxrpc/js/squeezeboxrpc-dist.js.map

Large diffs are not rendered by default.

47 changes: 25 additions & 22 deletions widgets/squeezeboxrpc/js/squeezeboxrpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1781,30 +1781,33 @@ vis.binds['squeezeboxrpc'] = {
let result = await vis.binds['squeezeboxrpc'].getPlaylistData(ainstance.join('.'));
let playlist = result.result.playlists_loop;
let text = '';
text += '<style>';
text += `#${widgetID} ul.plcontainer { `;
text += ' list-style-type: none;';
text += ' padding-left: 0px;';
text += ' color:white;';
text += ' margin:0px;';
text += '}';
text += `#${widgetID} li.plentry { `;
text += ' cursor: pointer;';
text += '}';
text += `#${widgetID} li.plentry div{ `;
text += ' text-overflow: ellipsis;';
text += ' overflow: hidden;';
text += '}';
text += `#${widgetID} li.plrefresh { `;
text += ' width: 1em;';
text += ' height: 1em;';
text += ' margin: 5px 0px;';
text += '}';

text += '</style>';
text += `
<style>
#${widgetID} ul.plcontainer {
list-style-type: none;
padding-left: 0px;
margin: 0px;
}
#${widgetID} li.plentry {
cursor: pointer;
height: 1em;
margin: 5px 0px;
}
#${widgetID} li.plentry div {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
#${widgetID} li.plrefresh {
width: 1em;
height: 1em;
margin: 5px 0px;
}
</style>
`;
text += '<ul class="plcontainer">';
text +=
'<li class="plrefresh"><svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="RefreshIcon"><path fill="currentColor" d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"></path></svg></li>';
'<li class="plrefresh"><div><svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="RefreshIcon"><path fill="currentColor" d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"></path></svg></div></li>';
for (let i = 0; i < playlist.length; i++) {
let pl = playlist[i];
text += `<li class="plentry"><div class="pltext" data-plid="${pl.id}" data-pln="${playername}" data-ins="${ainstance.join('.')}" onclick="vis.binds.squeezeboxrpc.playlist.onclickplaylist(this,event)">${pl.playlist}</div></li>`;
Expand Down

0 comments on commit 50bef50

Please sign in to comment.