Plugin 1.2.0: Taste 'Gefaellt mir nicht', Fortschrittsbalken auf 'Aktueller Titel'
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -74,6 +74,10 @@
|
||||
<input type="checkbox" id="showTitle" />
|
||||
<label id="l-showTitle" for="showTitle"></label>
|
||||
</div>
|
||||
<div class="row check" data-for="showProgress" hidden>
|
||||
<input type="checkbox" id="showProgress" />
|
||||
<label id="l-showProgress" for="showProgress"></label>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var PREFIX = 'com.fojadrachi.playtube.';
|
||||
@@ -81,7 +85,7 @@
|
||||
en: {
|
||||
target: 'Target tab', auto: 'Automatic (active tab)', step: 'Step (%)', volume: 'Volume (%)',
|
||||
seconds: 'Seconds', tab: 'Switch to', toggle: 'Toggle YouTube / Music', playlist: 'Playlist',
|
||||
playlistId: 'Playlist ID (manual)', showTitle: 'Show title on the key', reload: 'Reload',
|
||||
playlistId: 'Playlist ID (manual)', showTitle: 'Show title on the key', showProgress: 'Show progress bar', reload: 'Reload',
|
||||
choose: '- choose a playlist -', loading: 'Loading playlists ...',
|
||||
offline: 'Playtube is not running or too old (needs the newer version with Stream Dock support).',
|
||||
failed: 'Playlists could not be read. Is YouTube Music loaded in Playtube?', count: 'playlists found'
|
||||
@@ -89,7 +93,7 @@
|
||||
de: {
|
||||
target: 'Ziel-Tab', auto: 'Automatisch (aktiver Tab)', step: 'Schrittweite (%)', volume: 'Lautstärke (%)',
|
||||
seconds: 'Sekunden', tab: 'Wechseln zu', toggle: 'YouTube / Musik umschalten', playlist: 'Playlist',
|
||||
playlistId: 'Playlist-ID (manuell)', showTitle: 'Titel auf der Taste anzeigen', reload: 'Neu laden',
|
||||
playlistId: 'Playlist-ID (manuell)', showTitle: 'Titel auf der Taste anzeigen', showProgress: 'Fortschrittsbalken anzeigen', reload: 'Neu laden',
|
||||
choose: '- Playlist wählen -', loading: 'Playlists werden geladen ...',
|
||||
offline: 'Playtube läuft nicht oder ist zu alt (benötigt die neuere Version mit Stream-Dock-Unterstützung).',
|
||||
failed: 'Playlists konnten nicht gelesen werden. Ist YouTube Musik in Playtube geladen?', count: 'Playlists gefunden'
|
||||
@@ -99,7 +103,7 @@
|
||||
var FIELDS = {
|
||||
volumeup: ['target', 'step'], volumedown: ['target', 'step'], volumeset: ['target', 'volume'],
|
||||
seekback: ['target', 'seconds'], seekforward: ['target', 'seconds'],
|
||||
playpause: ['target', 'showTitle'], nowplaying: ['target', 'showTitle'],
|
||||
playpause: ['target', 'showTitle'], nowplaying: ['target', 'showTitle', 'showProgress'],
|
||||
playlist: ['playlist'], switchtab: ['tab'], show: []
|
||||
};
|
||||
var DEFAULT_FIELDS = ['target'];
|
||||
@@ -143,7 +147,7 @@
|
||||
window.connectElgatoStreamDeckSocket = connectElgatoStreamDeckSocket;
|
||||
|
||||
function applyTexts() {
|
||||
['target', 'step', 'volume', 'seconds', 'tab', 'playlist', 'playlistId', 'showTitle'].forEach(function (key) {
|
||||
['target', 'step', 'volume', 'seconds', 'tab', 'playlist', 'playlistId', 'showTitle', 'showProgress'].forEach(function (key) {
|
||||
$('l-' + key).textContent = t[key];
|
||||
});
|
||||
$('o-auto').textContent = t.auto;
|
||||
@@ -168,6 +172,8 @@
|
||||
var defaultShow = actionId() === 'nowplaying';
|
||||
$('showTitle').checked = settings.showTitle === undefined
|
||||
? defaultShow : settings.showTitle === true || settings.showTitle === 'true';
|
||||
$('showProgress').checked = settings.showProgress === undefined
|
||||
|| settings.showProgress === true || settings.showProgress === 'true';
|
||||
selectPlaylist(settings.playlistId || '');
|
||||
}
|
||||
|
||||
@@ -179,7 +185,8 @@
|
||||
seconds: Number($('seconds').value) || 10,
|
||||
tab: $('tab').value,
|
||||
playlistId: $('playlistId').value.trim(),
|
||||
showTitle: $('showTitle').checked
|
||||
showTitle: $('showTitle').checked,
|
||||
showProgress: $('showProgress').checked
|
||||
});
|
||||
clearTimeout(saveTimer);
|
||||
saveTimer = setTimeout(function () { send({ event: 'setSettings', context: uuid, payload: settings }); }, 150);
|
||||
@@ -237,7 +244,7 @@
|
||||
save({ playlistTitle: select.value ? select.options[select.selectedIndex].textContent : '' });
|
||||
});
|
||||
$('reload').addEventListener('click', requestPlaylists);
|
||||
['target', 'step', 'volume', 'seconds', 'tab', 'showTitle'].forEach(function (id) {
|
||||
['target', 'step', 'volume', 'seconds', 'tab', 'showTitle', 'showProgress'].forEach(function (id) {
|
||||
$(id).addEventListener('input', function () { save(); });
|
||||
$(id).addEventListener('change', function () { save(); });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user