Musik-Seite neu gestaltet: SVG-Icons statt Emojis, Player mit grossem Abspielknopf und schlankem Lautstaerkeregler, Suchleiste in voller Breite, zwei feste Spalten (Warteschlange/Verlauf links, Sprachkanal/Playlist rechts), kompaktere Listen mit Quell-Punkt oder Vorschaubild; Kanal-IDs kommen vom Bot als Text (JavaScript rundete die 19-stelligen IDs - "Unbekannter Sprachkanal")
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
bb6b1689b5
commit
ea8768cdf5
4 changed files with 256 additions and 157 deletions
|
|
@ -10197,85 +10197,138 @@ a.hunt-review-spot-thumb { width: 64px; height: 40px; flex-shrink: 0; }
|
|||
|
||||
/* ===== Musik (musik.php, assets/js/music.js): den Bot im Sprachkanal steuern ===== */
|
||||
.music-page { display: flex; flex-direction: column; gap: 1rem; }
|
||||
.music-connection { padding: 0.2rem 0.7rem; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--text-muted); font-size: 0.82rem; }
|
||||
.music-connection.is-online { background: rgba(76, 175, 80, 0.15); color: #8fdc93; }
|
||||
.music-connection.is-offline { background: rgba(217, 83, 79, 0.15); color: #f2a19e; }
|
||||
.music-now { display: flex; align-items: center; gap: 1.25rem; margin: 0.8rem 0 1rem; }
|
||||
.music-art { position: relative; flex: none; width: 96px; height: 96px; }
|
||||
.music-cover { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 12px; object-fit: cover; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); background: #1b1b1b; }
|
||||
.music-art:has(.music-cover:not([hidden])) .music-disc { display: none; }
|
||||
.music-disc {
|
||||
position: relative; flex: none; width: 96px; height: 96px; border-radius: 50%;
|
||||
background: repeating-radial-gradient(circle, #1b1b1b 0 2px, #262626 2px 4px); box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.35), 0 6px 18px rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
.music-disc span { position: absolute; inset: 34px; border-radius: 50%; background: radial-gradient(circle, #1a1a1a 0 18%, var(--gold) 20% 100%); }
|
||||
.is-playing .music-disc { animation: music-spin 3.2s linear infinite; }
|
||||
.is-playing .music-disc { box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(201, 162, 39, 0.35); }
|
||||
.music-page h2 { margin: 0; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
|
||||
.music-page h2 span { margin-left: 0.3rem; color: var(--text-muted); font-weight: 400; letter-spacing: 0; }
|
||||
.music-page .icon { flex: none; }
|
||||
|
||||
/* Player */
|
||||
.music-hero { position: relative; margin: 0; padding: 1.5rem 1.75rem 1.4rem; overflow: hidden; }
|
||||
.music-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 0% 0%, rgba(201, 162, 39, 0.14), transparent 55%); pointer-events: none; }
|
||||
.music-hero > * { position: relative; }
|
||||
.music-hero-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1.25rem; }
|
||||
.music-hero-head h1 { margin: 0; font-size: 1.5rem; }
|
||||
.music-connection { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.25rem 0.75rem 0.25rem 0.6rem; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--text-muted); font-size: 0.8rem; }
|
||||
.music-connection::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); }
|
||||
.music-connection.is-online { background: rgba(76, 175, 80, 0.14); color: #9fe3a3; }
|
||||
.music-connection.is-online::before { background: #4caf50; box-shadow: 0 0 8px rgba(76, 175, 80, 0.8); }
|
||||
.music-connection.is-offline { background: rgba(217, 83, 79, 0.14); color: #f2a19e; }
|
||||
.music-connection.is-offline::before { background: #d9534f; }
|
||||
|
||||
.music-now { display: flex; align-items: center; gap: 1.5rem; }
|
||||
.music-art { position: relative; flex: none; width: 124px; height: 124px; }
|
||||
.music-disc { position: absolute; inset: 0; border-radius: 50%; background: repeating-radial-gradient(circle, #151515 0 2px, #222 2px 4px); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.5); }
|
||||
.music-disc span { position: absolute; inset: 44px; border-radius: 50%; background: radial-gradient(circle, #151515 0 18%, var(--gold) 20% 100%); }
|
||||
.is-playing .music-disc { animation: music-spin 3.2s linear infinite; box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.5), 0 0 28px rgba(201, 162, 39, 0.25); }
|
||||
@keyframes music-spin { to { transform: rotate(360deg); } }
|
||||
.music-now-text { display: flex; flex: 1; flex-direction: column; gap: 0.2rem; min-width: 0; }
|
||||
.music-now-label { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
|
||||
.music-now-title { font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
|
||||
.music-now-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; color: var(--text-muted); font-size: 0.8rem; }
|
||||
.music-now-link { width: max-content; font-size: 0.8rem; }
|
||||
.music-next { margin-top: 0.3rem; color: var(--text-muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.music-progress { position: relative; height: 6px; margin-top: 0.45rem; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
|
||||
.music-progress.is-seekable { height: 8px; cursor: pointer; }
|
||||
.music-progress.is-seekable:hover { background: rgba(255, 255, 255, 0.14); }
|
||||
.music-progress i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: linear-gradient(90deg, #a07d1c, #e3bd6e); transition: width 0.5s linear; }
|
||||
.music-times { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.75rem; }
|
||||
.music-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
|
||||
.music-cover { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 14px; object-fit: cover; background: #151515; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
|
||||
.music-art:has(.music-cover:not([hidden])) .music-disc { display: none; }
|
||||
.music-now-text { display: flex; flex: 1; flex-direction: column; gap: 0.25rem; min-width: 0; }
|
||||
.music-now-label { color: var(--text-muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
|
||||
.music-now-title { font-size: 1.35rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
|
||||
.music-now-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; min-height: 1.2em; color: var(--text-muted); font-size: 0.82rem; }
|
||||
.music-now-link { font-size: 0.82rem; }
|
||||
.music-progress { position: relative; height: 5px; margin-top: 0.7rem; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; transition: height 0.15s; }
|
||||
.music-progress i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: linear-gradient(90deg, #a07d1c, var(--gold)); transition: width 0.5s linear; }
|
||||
.music-progress.is-seekable { cursor: pointer; }
|
||||
.music-progress.is-seekable:hover { height: 8px; }
|
||||
.music-times { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 0.3rem; color: var(--text-muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
|
||||
.music-next { flex: 1; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
.music-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; margin-top: 1.25rem; }
|
||||
.music-transport { display: flex; align-items: center; gap: 0.5rem; }
|
||||
.music-btn {
|
||||
display: grid; place-items: center; width: 2.6rem; height: 2.6rem; padding: 0; border: 1px solid var(--border); border-radius: 50%;
|
||||
background: var(--bg-panel-alt); box-shadow: none; font-size: 1.05rem; transition: border-color 0.15s, transform 0.15s, background 0.15s;
|
||||
position: relative; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; padding: 0; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.04); box-shadow: none; color: var(--text); transition: border-color 0.15s, background 0.15s, transform 0.15s, color 0.15s;
|
||||
}
|
||||
.music-btn:hover { border-color: var(--gold); background: rgba(201, 162, 39, 0.1); transform: translateY(-1px); box-shadow: none; }
|
||||
.music-btn.is-big { width: 3.3rem; height: 3.3rem; font-size: 1.4rem; border-color: rgba(201, 162, 39, 0.6); }
|
||||
.music-btn.is-on { border-color: var(--gold); background: rgba(201, 162, 39, 0.2); }
|
||||
.music-volume { display: flex; flex: 1 1 14rem; align-items: center; gap: 0.5rem; margin: 0 0 0 0.75rem; font-weight: 400; }
|
||||
.music-volume input { flex: 1; width: auto; accent-color: var(--gold); }
|
||||
.music-volume span { min-width: 2.8rem; color: var(--text-muted); font-size: 0.82rem; text-align: right; }
|
||||
.music-error { margin: 0.8rem 0 0; padding: 0.5rem 0.75rem; border-radius: 8px; background: rgba(240, 180, 108, 0.1); color: #f0b46c; font-size: 0.85rem; }
|
||||
.music-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
|
||||
.music-card { margin: 0; }
|
||||
.music-card h2 { margin: 0 0 0.6rem; font-size: 1.05rem; }
|
||||
.music-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
|
||||
.music-card-head .armory-text-button { white-space: nowrap; }
|
||||
.music-btn .icon { width: 19px; height: 19px; }
|
||||
.music-btn:hover { border-color: rgba(201, 162, 39, 0.7); background: rgba(201, 162, 39, 0.12); box-shadow: none; transform: translateY(-1px); }
|
||||
.music-btn.is-main { width: 3.5rem; height: 3.5rem; margin: 0 0.35rem; border-color: transparent; background: var(--gold); color: #1a1408; box-shadow: 0 6px 18px rgba(201, 162, 39, 0.35); }
|
||||
.music-btn.is-main .icon { width: 24px; height: 24px; stroke-width: 2.2; }
|
||||
.music-btn.is-main:hover { background: #e3bd6e; transform: translateY(-1px) scale(1.03); box-shadow: 0 8px 22px rgba(201, 162, 39, 0.45); }
|
||||
.music-btn .music-ico-pause, .is-playing .music-btn .music-ico-play { display: none; }
|
||||
.is-playing .music-btn .music-ico-pause { display: contents; }
|
||||
.music-btn.is-on { border-color: rgba(201, 162, 39, 0.8); background: rgba(201, 162, 39, 0.16); color: var(--gold); }
|
||||
.music-btn.is-on::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); transform: translateX(-50%); }
|
||||
.music-volume { display: flex; flex: 1 1 12rem; align-items: center; gap: 0.6rem; max-width: 22rem; margin: 0; color: var(--text-muted); font-weight: 400; }
|
||||
.music-volume .icon { width: 18px; height: 18px; }
|
||||
.music-volume input { flex: 1; width: auto; height: 4px; margin: 0; padding: 0; border: 0; border-radius: 2px; background: linear-gradient(90deg, var(--gold) var(--v, 50%), rgba(255, 255, 255, 0.12) var(--v, 50%)); box-shadow: none; appearance: none; -webkit-appearance: none; cursor: pointer; }
|
||||
.music-volume input::-webkit-slider-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); -webkit-appearance: none; }
|
||||
.music-volume input::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
|
||||
.music-volume input:focus { outline: none; }
|
||||
.music-volume input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.5); }
|
||||
.music-volume span { min-width: 2.6rem; font-size: 0.8rem; text-align: right; font-variant-numeric: tabular-nums; }
|
||||
.music-error { margin: 1rem 0 0; padding: 0.5rem 0.75rem; border-radius: 8px; background: rgba(240, 180, 108, 0.1); color: #f0b46c; font-size: 0.85rem; }
|
||||
|
||||
/* Suchleiste */
|
||||
.music-search { display: flex; flex-direction: row; align-items: center; gap: 0.6rem; margin: 0; padding: 0.4rem 0.4rem 0.4rem 1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-panel); transition: border-color 0.15s, box-shadow 0.15s; }
|
||||
.music-search:focus-within { border-color: rgba(201, 162, 39, 0.7); box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12); }
|
||||
.music-search .icon { color: var(--text-muted); }
|
||||
.music-search input { flex: 1; min-width: 0; width: auto; margin: 0; padding: 0.55rem 0; border: 0; background: none; box-shadow: none; font-size: 0.95rem; }
|
||||
.music-search input:focus { outline: none; box-shadow: none; }
|
||||
.music-search .button { flex: none; border-radius: 999px; }
|
||||
.music-hint { margin: -0.4rem 0 0; padding: 0 1rem; color: var(--text-muted); font-size: 0.78rem; }
|
||||
|
||||
/* Spalten */
|
||||
.music-columns { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
|
||||
.music-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
|
||||
.music-card { margin: 0; padding: 1.1rem 1.25rem 1.2rem; }
|
||||
.music-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 1.6rem; margin-bottom: 0.75rem; }
|
||||
.music-text-btn { padding: 0.2rem 0.6rem; border: 1px solid transparent; border-radius: 999px; background: none; box-shadow: none; color: var(--gold); font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
|
||||
.music-text-btn:hover { border-color: rgba(201, 162, 39, 0.5); background: rgba(201, 162, 39, 0.1); box-shadow: none; }
|
||||
.music-row { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
|
||||
.music-row select, .music-row input { flex: 1 1 12rem; width: auto; min-width: 0; }
|
||||
.music-list { display: flex; flex-direction: column; gap: 0.25rem; max-height: 22rem; margin: 0; padding: 0; overflow-y: auto; list-style: none; counter-reset: music; }
|
||||
.music-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border-radius: 6px; background: rgba(255, 255, 255, 0.025); font-size: 0.88rem; }
|
||||
.music-item-cover { flex: none; width: 40px; height: 24px; border-radius: 4px; object-fit: cover; background: #1b1b1b; }
|
||||
.music-list li:hover { background: rgba(255, 255, 255, 0.05); }
|
||||
ol.music-list li:not(.music-empty)::before { counter-increment: music; content: counter(music); min-width: 1.3rem; color: var(--text-muted); font-size: 0.75rem; text-align: right; }
|
||||
.music-row select, .music-row input { flex: 1 1 10rem; width: auto; min-width: 0; margin: 0; }
|
||||
.music-channel-now { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem; color: var(--text-muted); font-size: 0.88rem; }
|
||||
.music-filter { width: 100%; margin: 0 0 0.6rem; }
|
||||
|
||||
/* Listen */
|
||||
.music-list { display: flex; flex-direction: column; gap: 2px; max-height: 24rem; margin: 0; padding: 0; overflow-y: auto; list-style: none; counter-reset: music; scrollbar-width: thin; }
|
||||
.music-list li { display: flex; align-items: center; gap: 0.6rem; min-height: 2.5rem; padding: 0.3rem 0.5rem; border-radius: 8px; font-size: 0.88rem; transition: background 0.12s; }
|
||||
.music-list li:not(.music-empty):hover { background: rgba(255, 255, 255, 0.05); }
|
||||
ol.music-list li:not(.music-empty)::before { counter-increment: music; content: counter(music); min-width: 1.2rem; color: var(--text-muted); font-size: 0.75rem; text-align: right; font-variant-numeric: tabular-nums; }
|
||||
.music-item-art { display: grid; flex: none; place-items: center; width: 44px; height: 28px; border-radius: 5px; overflow: hidden; background: rgba(255, 255, 255, 0.05); }
|
||||
.music-item-art img { width: 100%; height: 100%; object-fit: cover; }
|
||||
.music-src { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
|
||||
.music-src.is-youtube, .music-src.is-search { background: #ff4e45; }
|
||||
.music-src.is-spotify { background: #1db954; }
|
||||
.music-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.music-item-meta { color: var(--text-muted); font-size: 0.75rem; }
|
||||
.music-item-by { max-width: 7rem; overflow: hidden; color: var(--text-muted); font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.music-item-btn { padding: 0.1rem 0.45rem; border: 1px solid transparent; background: none; box-shadow: none; color: var(--text-muted); font-size: 0.85rem; }
|
||||
.music-list li .music-item-btn { opacity: 0.55; }
|
||||
.music-item-meta { color: var(--text-muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
|
||||
.music-item-btn { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; color: var(--text-muted); opacity: 0.45; transition: opacity 0.12s, background 0.12s, color 0.12s; }
|
||||
.music-list li:hover .music-item-btn, .music-list li:focus-within .music-item-btn { opacity: 1; }
|
||||
.music-item-btn:hover { border-color: var(--gold); background: rgba(201, 162, 39, 0.1); color: var(--text); box-shadow: none; }
|
||||
.music-item-btn.is-danger:hover { border-color: var(--danger); background: rgba(217, 83, 79, 0.12); }
|
||||
.music-empty { color: var(--text-muted); font-style: italic; }
|
||||
.music-filter { width: 100%; margin-bottom: 0.5rem; }
|
||||
.music-upload { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px dashed var(--border); }
|
||||
.music-upload input[type="text"] { flex: 1 1 10rem; width: auto; }
|
||||
.music-file { position: relative; display: flex; flex: 1 1 100%; align-items: center; margin: 0; padding: 0.5rem 0.75rem; border: 1px dashed rgba(201, 162, 39, 0.5); border-radius: 8px; color: var(--text-muted); font-size: 0.85rem; font-weight: 400; cursor: pointer; }
|
||||
.music-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
|
||||
.is-busy .music-btn, .is-busy .music-item-btn { opacity: 0.6; }
|
||||
.music-item-btn:hover { background: rgba(201, 162, 39, 0.15); box-shadow: none; color: var(--gold); }
|
||||
.music-item-btn.is-danger:hover { background: rgba(217, 83, 79, 0.15); color: #f2a19e; }
|
||||
.music-empty { justify-content: center; padding: 1.2rem 0.5rem !important; color: var(--text-muted); font-size: 0.85rem; text-align: center; }
|
||||
|
||||
/* Upload (Leitung) */
|
||||
.music-upload { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--border); }
|
||||
.music-file { position: relative; display: flex; align-items: center; gap: 0.6rem; margin: 0; padding: 0.7rem 0.9rem; border: 1px dashed rgba(201, 162, 39, 0.45); border-radius: 10px; color: var(--text-muted); font-size: 0.82rem; font-weight: 400; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
|
||||
.music-file:hover { border-color: var(--gold); background: rgba(201, 162, 39, 0.06); }
|
||||
.music-file input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
|
||||
.music-file .icon { color: var(--gold); }
|
||||
|
||||
.is-busy .music-btn, .is-busy .music-item-btn, .is-busy .music-text-btn { opacity: 0.6; pointer-events: none; }
|
||||
.music-toast {
|
||||
position: fixed; left: 50%; bottom: 1.5rem; z-index: 1200; max-width: min(92vw, 520px); padding: 0.6rem 1rem; border: 1px solid rgba(201, 162, 39, 0.5);
|
||||
border-radius: 10px; background: #1d1d1d; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); transform: translateX(-50%); font-size: 0.9rem;
|
||||
}
|
||||
.music-toast.is-error { border-color: rgba(217, 83, 79, 0.7); color: #f2a19e; }
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.music-columns { grid-template-columns: 1fr; }
|
||||
}
|
||||
@media (max-width: 560px) {
|
||||
.music-now { gap: 0.9rem; }
|
||||
.music-disc { width: 64px; height: 64px; }
|
||||
.music-disc span { inset: 22px; }
|
||||
.music-art { width: 64px; height: 64px; }
|
||||
.music-item-by, .music-item-cover { display: none; }
|
||||
.music-hero { padding: 1.2rem 1.1rem; }
|
||||
.music-now { gap: 1rem; }
|
||||
.music-art { width: 80px; height: 80px; }
|
||||
.music-disc span { inset: 28px; }
|
||||
.music-now-title { font-size: 1.1rem; }
|
||||
.music-next { display: none; }
|
||||
.music-controls { justify-content: center; }
|
||||
.music-volume { flex-basis: 100%; max-width: none; }
|
||||
.music-search { padding-left: 0.8rem; }
|
||||
.music-search .button { padding-left: 0.9rem; padding-right: 0.9rem; }
|
||||
.music-item-by, .music-item-art { display: none; }
|
||||
.music-list li { gap: 0.35rem; }
|
||||
.music-item-btn { padding: 0.1rem 0.3rem; }
|
||||
.music-volume { flex-basis: 100%; margin-left: 0; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.is-playing .music-disc { animation: none; }
|
||||
|
|
|
|||
|
|
@ -14,7 +14,18 @@
|
|||
var csrf = (document.querySelector('meta[name="csrf-token"]') || {}).content || '';
|
||||
var canManage = root.dataset.canManage === '1';
|
||||
var POLL_MS = 3000;
|
||||
var SOURCE_ICONS = { file: '📁', youtube: '▶️', spotify: '🟢', search: '🔎' };
|
||||
var SOURCE_NAMES = { file: 'Playlist der Legion', youtube: 'YouTube', spotify: 'Spotify', search: 'YouTube-Suche' };
|
||||
// Kleine Icons fuer die Listen (gleiche Pfade wie icon() in includes/functions.php)
|
||||
var ICON_PATHS = {
|
||||
play: '<path d="M8 5v14l11-7z"/>',
|
||||
trash: '<polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>',
|
||||
x: '<line x1="6" y1="6" x2="18" y2="18"/><line x1="18" y1="6" x2="6" y2="18"/>',
|
||||
up: '<line x1="12" y1="19" x2="12" y2="5"/><polyline points="5 12 12 5 19 12"/>',
|
||||
replay: '<polyline points="1 4 1 10 7 10"/><path d="M3.5 15a9 9 0 1 0 2.1-9.4L1 10"/>'
|
||||
};
|
||||
var svg = function (name) {
|
||||
return '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">' + ICON_PATHS[name] + '</svg>';
|
||||
};
|
||||
var state = null;
|
||||
var stateAt = 0;
|
||||
var busy = false;
|
||||
|
|
@ -30,7 +41,12 @@
|
|||
var s = seconds % 60;
|
||||
return (h ? h + ':' + String(m).padStart(2, '0') : m) + ':' + String(s).padStart(2, '0');
|
||||
};
|
||||
var icon = function (item) { return (SOURCE_ICONS[item.source] || '') + ' ' + item.title; };
|
||||
var sourceDot = function (source) {
|
||||
var dot = document.createElement('i');
|
||||
dot.className = 'music-src is-' + (source || 'file');
|
||||
dot.title = SOURCE_NAMES[source] || '';
|
||||
return dot;
|
||||
};
|
||||
|
||||
var toastTimer = null;
|
||||
var toast = function (text, isError) {
|
||||
|
|
@ -104,16 +120,21 @@
|
|||
$('[data-music-bar]').style.width = duration ? Math.min(100, elapsed / duration * 100) + '%' : '0%';
|
||||
};
|
||||
|
||||
var listItem = function (text, meta, buttons, cover, by) {
|
||||
var listItem = function (item, meta, buttons, by) {
|
||||
var li = document.createElement('li');
|
||||
if (cover) {
|
||||
var art = document.createElement('span');
|
||||
art.className = 'music-item-art';
|
||||
if (item.thumbnail) {
|
||||
var img = document.createElement('img');
|
||||
img.className = 'music-item-cover';
|
||||
img.src = cover;
|
||||
img.src = item.thumbnail;
|
||||
img.alt = '';
|
||||
img.loading = 'lazy';
|
||||
li.appendChild(img);
|
||||
art.appendChild(img);
|
||||
} else {
|
||||
art.appendChild(sourceDot(item.source));
|
||||
}
|
||||
li.appendChild(art);
|
||||
var text = item.title;
|
||||
var label = document.createElement('span');
|
||||
label.className = 'music-item-title';
|
||||
label.textContent = text;
|
||||
|
|
@ -134,7 +155,7 @@
|
|||
var btn = document.createElement('button');
|
||||
btn.type = 'button';
|
||||
btn.className = 'music-item-btn' + (b.danger ? ' is-danger' : '');
|
||||
btn.textContent = b.label;
|
||||
btn.innerHTML = svg(b.icon);
|
||||
btn.title = b.title;
|
||||
btn.addEventListener('click', b.onClick);
|
||||
li.appendChild(btn);
|
||||
|
|
@ -164,17 +185,17 @@
|
|||
list.textContent = '';
|
||||
var shown = tracks.filter(function (t) { return t.title.toLowerCase().indexOf(filter) !== -1; });
|
||||
if (!shown.length) {
|
||||
list.appendChild(emptyItem(tracks.length ? 'Kein Treffer.' : 'Noch keine Titel' + (canManage ? ' – lade unten welche hoch.' : '.')));
|
||||
list.appendChild(emptyItem(tracks.length ? 'Kein Treffer.' : 'Noch keine eigenen Titel' + (canManage ? ' – lade unten welche hoch.' : '.')));
|
||||
return;
|
||||
}
|
||||
shown.forEach(function (t) {
|
||||
var buttons = [{ label: '▶', title: 'In die Warteschlange', onClick: function () { play(String(t.id)).catch(function () {}); } }];
|
||||
var buttons = [{ icon: 'play', title: 'In die Warteschlange', onClick: function () { play(String(t.id)).catch(function () {}); } }];
|
||||
if (canManage) {
|
||||
buttons.push({ label: '🗑', title: 'Aus der Playlist löschen', danger: true, onClick: function () {
|
||||
buttons.push({ icon: 'trash', title: 'Aus der Playlist löschen', danger: true, onClick: function () {
|
||||
if (window.confirm('„' + t.title + '“ aus der Playlist löschen?')) act({ action: 'delete', track_id: String(t.id) }).catch(function () {});
|
||||
} });
|
||||
}
|
||||
list.appendChild(listItem('📁 ' + t.title, fmt(t.duration), buttons));
|
||||
list.appendChild(listItem({ title: t.title, source: 'file' }, fmt(t.duration), buttons));
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -183,13 +204,13 @@
|
|||
if (!changed('queue', [music.queue, music.queue_total])) return;
|
||||
var queue = $('[data-music-queue]');
|
||||
queue.textContent = '';
|
||||
if (!music.queue.length) queue.appendChild(emptyItem('Leer.'));
|
||||
if (!music.queue.length) queue.appendChild(emptyItem('Nichts in der Warteschlange – füg oben etwas hinzu.'));
|
||||
music.queue.forEach(function (item, index) {
|
||||
var buttons = [];
|
||||
if (index > 0) buttons.push({ label: '⤴', title: 'Als Nächstes', onClick: function () { control('move', index); } });
|
||||
buttons.push({ label: '▶', title: 'Jetzt abspielen', onClick: function () { control('jump', index); } });
|
||||
buttons.push({ label: '✕', title: 'Aus der Warteschlange', onClick: function () { control('remove', index); } });
|
||||
queue.appendChild(listItem(icon(item), fmt(item.duration), buttons, item.thumbnail, item.added_by));
|
||||
if (index > 0) buttons.push({ icon: 'up', title: 'Als Nächstes', onClick: function () { control('move', index); } });
|
||||
buttons.push({ icon: 'play', title: 'Jetzt abspielen', onClick: function () { control('jump', index); } });
|
||||
buttons.push({ icon: 'x', title: 'Aus der Warteschlange', danger: true, onClick: function () { control('remove', index); } });
|
||||
queue.appendChild(listItem(item, fmt(item.duration), buttons, item.added_by));
|
||||
});
|
||||
if (music.queue_total > music.queue.length) {
|
||||
queue.appendChild(emptyItem('… und ' + (music.queue_total - music.queue.length) + ' weitere'));
|
||||
|
|
@ -203,9 +224,9 @@
|
|||
var list = $('[data-music-history]');
|
||||
list.textContent = '';
|
||||
history.forEach(function (item) {
|
||||
list.appendChild(listItem(icon(item), fmt(item.duration), [
|
||||
{ label: '↻', title: 'Noch einmal in die Warteschlange', onClick: function () { play(item.replay).catch(function () {}); } }
|
||||
], item.thumbnail, item.added_by));
|
||||
list.appendChild(listItem(item, fmt(item.duration), [
|
||||
{ icon: 'replay', title: 'Noch einmal in die Warteschlange', onClick: function () { play(item.replay).catch(function () {}); } }
|
||||
], item.added_by));
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -213,14 +234,16 @@
|
|||
state = music;
|
||||
stateAt = Date.now();
|
||||
var connection = $('[data-music-connection]');
|
||||
connection.textContent = music.connected ? '🟢 Im Sprachkanal ' + music.channel.name : '⚪ Nicht im Sprachkanal';
|
||||
connection.textContent = music.connected ? 'Im Sprachkanal ' + music.channel.name : 'Nicht im Sprachkanal';
|
||||
connection.className = 'music-connection' + (music.connected ? ' is-online' : '');
|
||||
root.classList.toggle('is-playing', !!(music.current && !music.paused));
|
||||
root.classList.toggle('is-paused', !!music.paused);
|
||||
|
||||
var current = music.current;
|
||||
$('[data-music-status]').textContent = current ? (music.paused ? '⏸️ Pausiert' : '🎶 Läuft gerade') : 'Gerade läuft nichts';
|
||||
$('[data-music-title]').textContent = current ? icon(current) : '–';
|
||||
$('[data-music-status]').textContent = current
|
||||
? (music.paused ? 'Pausiert' : 'Läuft gerade') + ' · ' + (SOURCE_NAMES[current.source] || '')
|
||||
: 'Gerade läuft nichts';
|
||||
$('[data-music-title]').textContent = current ? current.title : (music.connected ? 'Such dir unten etwas aus' : 'Hol den Bot in einen Sprachkanal');
|
||||
var by = $('[data-music-by]');
|
||||
by.hidden = !(current && current.added_by);
|
||||
by.textContent = current && current.added_by ? 'von ' + current.added_by : '';
|
||||
|
|
@ -243,6 +266,7 @@
|
|||
var next = $('[data-music-next]');
|
||||
next.hidden = !music.queue.length;
|
||||
next.textContent = music.queue.length ? 'Als Nächstes: ' + music.queue[0].title : '';
|
||||
$('[data-music-volume]').style.setProperty('--v', music.volume + '%');
|
||||
|
||||
root.querySelectorAll('[data-music-control="shuffle"]').forEach(function (b) { b.classList.toggle('is-on', !!music.shuffle); });
|
||||
root.querySelectorAll('[data-music-control="loop"]').forEach(function (b) { b.classList.toggle('is-on', !!music.loop); });
|
||||
|
|
@ -250,6 +274,8 @@
|
|||
if (document.activeElement !== volume && !volumeTimer) {
|
||||
volume.value = music.volume;
|
||||
$('[data-music-volume-text]').textContent = music.volume + ' %';
|
||||
} else {
|
||||
volume.style.setProperty('--v', volume.value + '%');
|
||||
}
|
||||
var error = $('[data-music-error]');
|
||||
error.hidden = !music.last_error;
|
||||
|
|
@ -267,13 +293,13 @@
|
|||
(music.voice_channels || []).forEach(function (c) {
|
||||
var option = document.createElement('option');
|
||||
option.value = String(c.id);
|
||||
option.textContent = '🔊 ' + c.name + (c.listeners ? ' (' + c.listeners + ')' : '');
|
||||
option.textContent = c.name + (c.listeners ? ' · ' + c.listeners + ' drin' : '');
|
||||
select.appendChild(option);
|
||||
});
|
||||
select.value = chosen;
|
||||
}
|
||||
$('[data-music-channel]').textContent = music.connected
|
||||
? 'Der Bot ist in 🔊 ' + music.channel.name + ' – ' + music.channel.listeners + ' Zuhörer'
|
||||
$('[data-music-channel] span').textContent = music.connected
|
||||
? 'Der Bot ist in ' + music.channel.name + ' – ' + music.channel.listeners + ' Zuhörer'
|
||||
: 'Der Bot ist in keinem Sprachkanal.';
|
||||
$('[data-music-leave]').hidden = !music.connected;
|
||||
$('[data-music-join]').textContent = music.connected ? 'Umziehen' : 'Holen';
|
||||
|
|
@ -293,6 +319,7 @@
|
|||
var volume = $('[data-music-volume]');
|
||||
volume.addEventListener('input', function () {
|
||||
$('[data-music-volume-text]').textContent = volume.value + ' %';
|
||||
volume.style.setProperty('--v', volume.value + '%');
|
||||
clearTimeout(volumeTimer);
|
||||
volumeTimer = setTimeout(function () {
|
||||
volumeTimer = null;
|
||||
|
|
@ -339,7 +366,7 @@
|
|||
if (upload) {
|
||||
var fileInput = upload.querySelector('input[type="file"]');
|
||||
fileInput.addEventListener('change', function () {
|
||||
upload.querySelector('[data-music-file-label]').textContent = fileInput.files[0] ? fileInput.files[0].name : 'Datei wählen';
|
||||
upload.querySelector('[data-music-file-label]').textContent = fileInput.files[0] ? fileInput.files[0].name : 'Audiodatei wählen';
|
||||
});
|
||||
upload.addEventListener('submit', function (event) {
|
||||
event.preventDefault();
|
||||
|
|
@ -350,7 +377,7 @@
|
|||
button.disabled = true;
|
||||
button.textContent = 'Lädt hoch …';
|
||||
act({ action: 'upload', title: upload.querySelector('input[name="title"]').value }, file)
|
||||
.then(function () { upload.reset(); upload.querySelector('[data-music-file-label]').textContent = 'Datei wählen'; })
|
||||
.then(function () { upload.reset(); upload.querySelector('[data-music-file-label]').textContent = 'Audiodatei wählen'; })
|
||||
.catch(function () {})
|
||||
.finally(function () { button.disabled = false; button.textContent = 'Hochladen'; });
|
||||
});
|
||||
|
|
|
|||
|
|
@ -172,6 +172,15 @@ function icon(string $name): string
|
|||
'code' => '<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>',
|
||||
'sword' => '<path d="M14.5 17.5 3 6V3h3l11.5 11.5"/><path d="m13 19 6-6"/><path d="m16 16 4 4"/><path d="m19 21 2-2"/>',
|
||||
'music' => '<path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/>',
|
||||
// Musik-Seite: Steuerung des Bots
|
||||
'shuffle' => '<polyline points="16 3 21 3 21 8"/><path d="M4 20 21 3"/><polyline points="21 16 21 21 16 21"/><path d="m15 15 6 6"/><path d="M4 4l5 5"/>',
|
||||
'pause' => '<rect x="6" y="4" width="4" height="16" rx="1"/><rect x="14" y="4" width="4" height="16" rx="1"/>',
|
||||
'skip' => '<path d="M5 4l10 8-10 8z"/><line x1="19" y1="5" x2="19" y2="19"/>',
|
||||
'stop' => '<rect x="5" y="5" width="14" height="14" rx="2"/>',
|
||||
'repeat' => '<polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/>',
|
||||
'volume' => '<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"/><path d="M15.5 8.5a5 5 0 0 1 0 7"/><path d="M19 5.5a9 9 0 0 1 0 13"/>',
|
||||
'headphones' => '<path d="M3 18v-6a9 9 0 0 1 18 0v6"/><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"/>',
|
||||
'upload' => '<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/>',
|
||||
'bug' => '<rect x="8" y="6" width="8" height="14" rx="4"/><path d="M19 7l-3 2"/><path d="M5 7l3 2"/><path d="M19 19l-3-2"/><path d="M5 19l3-2"/><path d="M20 13h-4"/><path d="M4 13h4"/><path d="M10 4l1 2"/><path d="M14 4l-1 2"/>',
|
||||
'shield-check' => '<path d="M12 21c4.5-1.8 7-5.2 7-9.5V6l-7-3-7 3v5.5c0 4.3 2.5 7.7 7 9.5z"/><polyline points="9 12 11.2 14.2 15.5 9.8"/>',
|
||||
'hammer' => '<path d="m14.5 9.5-10 10"/><path d="M11 6l4-4 7 7-4 4z"/>',
|
||||
|
|
|
|||
138
musik.php
138
musik.php
|
|
@ -13,90 +13,100 @@ $pageTitle = 'Musik';
|
|||
include __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
<div class="music-page" data-music data-can-manage="<?= $canManage ? '1' : '0' ?>">
|
||||
<div class="panel music-hero">
|
||||
<div class="raid-header">
|
||||
<section class="panel music-hero">
|
||||
<div class="music-hero-head">
|
||||
<h1>Musik</h1>
|
||||
<span class="music-connection" data-music-connection>Verbinde mit dem Bot …</span>
|
||||
</div>
|
||||
<div class="music-now">
|
||||
<div class="music-art">
|
||||
<div class="music-disc" data-music-disc aria-hidden="true"><span></span></div>
|
||||
<div class="music-disc" aria-hidden="true"><span></span></div>
|
||||
<img class="music-cover" data-music-cover alt="" hidden>
|
||||
</div>
|
||||
<div class="music-now-text">
|
||||
<span class="music-now-label" data-music-status>Gerade läuft nichts</span>
|
||||
<strong class="music-now-title" data-music-title>–</strong>
|
||||
<span class="music-now-meta"><span data-music-by hidden></span><a class="music-now-link" data-music-link href="#" target="_blank" rel="noopener noreferrer" hidden>auf YouTube öffnen ↗</a></span>
|
||||
<strong class="music-now-title" data-music-title>Such dir unten etwas aus</strong>
|
||||
<span class="music-now-meta">
|
||||
<span data-music-by hidden></span>
|
||||
<a class="music-now-link" data-music-link href="#" target="_blank" rel="noopener noreferrer" hidden>auf YouTube öffnen ↗</a>
|
||||
</span>
|
||||
<div class="music-progress" data-music-progress title="Zum Spulen klicken" aria-hidden="true"><i data-music-bar></i></div>
|
||||
<div class="music-times"><span data-music-elapsed>0:00</span><span data-music-duration>0:00</span></div>
|
||||
<span class="music-next" data-music-next hidden></span>
|
||||
<div class="music-times"><span data-music-elapsed>0:00</span><span class="music-next" data-music-next hidden></span><span data-music-duration>0:00</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="music-controls" role="group" aria-label="Steuerung">
|
||||
<button type="button" class="music-btn" data-music-control="shuffle" title="Zufall an/aus">🔀</button>
|
||||
<button type="button" class="music-btn is-big" data-music-control="toggle" title="Pause / Weiter (Leertaste)" data-music-toggle>⏯️</button>
|
||||
<button type="button" class="music-btn" data-music-control="skip" title="Nächster Titel (N)">⏭️</button>
|
||||
<button type="button" class="music-btn" data-music-control="stop" title="Stoppen und Warteschlange leeren">⏹️</button>
|
||||
<button type="button" class="music-btn" data-music-control="loop" title="Schleife an/aus">🔁</button>
|
||||
<label class="music-volume" title="Lautstärke">🔊
|
||||
<input type="range" min="0" max="100" step="5" value="50" data-music-volume aria-label="Lautstärke">
|
||||
<div class="music-controls">
|
||||
<div class="music-transport" role="group" aria-label="Steuerung">
|
||||
<button type="button" class="music-btn" data-music-control="shuffle" title="Zufall an/aus" aria-label="Zufall"><?= icon('shuffle') ?></button>
|
||||
<button type="button" class="music-btn is-main" data-music-control="toggle" title="Pause / Weiter (Leertaste)" aria-label="Pause / Weiter">
|
||||
<span class="music-ico-play"><?= icon('play') ?></span><span class="music-ico-pause"><?= icon('pause') ?></span>
|
||||
</button>
|
||||
<button type="button" class="music-btn" data-music-control="skip" title="Nächster Titel (N)" aria-label="Nächster Titel"><?= icon('skip') ?></button>
|
||||
<button type="button" class="music-btn" data-music-control="stop" title="Stoppen und Warteschlange leeren" aria-label="Stopp"><?= icon('stop') ?></button>
|
||||
<button type="button" class="music-btn" data-music-control="loop" title="Schleife an/aus" aria-label="Schleife"><?= icon('repeat') ?></button>
|
||||
</div>
|
||||
<label class="music-volume" title="Lautstärke">
|
||||
<?= icon('volume') ?>
|
||||
<input type="range" min="0" max="100" step="5" value="50" data-music-volume aria-label="Lautstärke" style="--v: 50%">
|
||||
<span data-music-volume-text>50 %</span>
|
||||
</label>
|
||||
</div>
|
||||
<p class="music-error" data-music-error hidden></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="music-grid">
|
||||
<section class="panel music-card">
|
||||
<h2>Sprachkanal</h2>
|
||||
<p class="text-muted music-channel-now" data-music-channel>Der Bot ist in keinem Sprachkanal.</p>
|
||||
<div class="music-row">
|
||||
<select data-music-channels aria-label="Sprachkanal"><option value="">Sprachkanal wählen …</option></select>
|
||||
<button type="button" class="button" data-music-join>Holen</button>
|
||||
<button type="button" class="button button-secondary" data-music-leave hidden>Rausschicken</button>
|
||||
</div>
|
||||
</section>
|
||||
<form class="music-search" data-music-add>
|
||||
<?= icon('search') ?>
|
||||
<input type="text" maxlength="<?= MUSIC_QUERY_MAX ?>" placeholder="YouTube- oder Spotify-Link einfügen oder suchen, z. B. „Linkin Park Numb“" aria-label="Link oder Suche" data-music-query>
|
||||
<button type="submit" class="button">Abspielen</button>
|
||||
</form>
|
||||
<p class="music-hint">YouTube, YouTube Music (auch Playlists) und Spotify (Song, Playlist, Album – gespielt wird der passende Titel von YouTube). Ohne Link wird auf YouTube gesucht. Ist der Bot in keinem Kanal, kommt er in den rechts gewählten.</p>
|
||||
|
||||
<section class="panel music-card">
|
||||
<h2>Hinzufügen</h2>
|
||||
<form class="music-row" data-music-add>
|
||||
<input type="text" maxlength="<?= MUSIC_QUERY_MAX ?>" placeholder="YouTube-/Spotify-Link oder Suche, z. B. „Linkin Park Numb“" aria-label="Link oder Suche" data-music-query>
|
||||
<button type="submit" class="button">Abspielen</button>
|
||||
</form>
|
||||
<p class="field-hint">YouTube, YouTube Music (auch Playlists) und Spotify (Song, Playlist, Album – gespielt wird der passende Titel von YouTube). Ohne Link wird auf YouTube gesucht. Ist der Bot noch in keinem Kanal, kommt er in den oben gewählten.</p>
|
||||
</section>
|
||||
<div class="music-columns">
|
||||
<div class="music-col">
|
||||
<section class="panel music-card">
|
||||
<div class="music-card-head">
|
||||
<h2>Warteschlange <span data-music-queue-count></span></h2>
|
||||
<button type="button" class="music-text-btn" data-music-control="clear">Leeren</button>
|
||||
</div>
|
||||
<ol class="music-list" data-music-queue></ol>
|
||||
</section>
|
||||
<section class="panel music-card" data-music-history-card hidden>
|
||||
<div class="music-card-head"><h2>Zuletzt gespielt</h2></div>
|
||||
<ul class="music-list" data-music-history></ul>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section class="panel music-card music-queue-card">
|
||||
<div class="music-card-head">
|
||||
<h2>Warteschlange <span class="text-muted" data-music-queue-count></span></h2>
|
||||
<button type="button" class="armory-text-button" data-music-control="clear">Leeren</button>
|
||||
</div>
|
||||
<ol class="music-list" data-music-queue><li class="music-empty">Leer.</li></ol>
|
||||
</section>
|
||||
<div class="music-col">
|
||||
<section class="panel music-card">
|
||||
<div class="music-card-head"><h2>Sprachkanal</h2></div>
|
||||
<p class="music-channel-now" data-music-channel><?= icon('headphones') ?><span>Der Bot ist in keinem Sprachkanal.</span></p>
|
||||
<div class="music-row">
|
||||
<select data-music-channels aria-label="Sprachkanal"><option value="">Sprachkanal wählen …</option></select>
|
||||
<button type="button" class="button" data-music-join>Holen</button>
|
||||
<button type="button" class="button button-secondary" data-music-leave hidden>Rausschicken</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="panel music-card">
|
||||
<div class="music-card-head">
|
||||
<h2>Playlist der Legion <span class="text-muted" data-music-tracks-count></span></h2>
|
||||
<button type="button" class="armory-text-button" data-music-play-all>Alle abspielen</button>
|
||||
</div>
|
||||
<input type="search" class="music-filter" placeholder="Playlist durchsuchen …" aria-label="Playlist durchsuchen" data-music-filter>
|
||||
<ul class="music-list" data-music-tracks><li class="music-empty">Noch keine Titel.</li></ul>
|
||||
<?php if ($canManage): ?>
|
||||
<form class="music-upload" data-music-upload>
|
||||
<label class="music-file">
|
||||
<input type="file" name="file" accept=".mp3,.ogg,.m4a,.wav,.flac,.opus,audio/*" required data-enhanced="1">
|
||||
<span data-music-file-label>Datei wählen (mp3, ogg, m4a, wav, flac, opus – max. 25 MB)</span>
|
||||
</label>
|
||||
<input type="text" name="title" maxlength="100" placeholder="Titel (leer = Dateiname)" aria-label="Titel">
|
||||
<button type="submit" class="button">Hochladen</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<section class="panel music-card" data-music-history-card hidden>
|
||||
<h2>Zuletzt gespielt</h2>
|
||||
<ul class="music-list" data-music-history></ul>
|
||||
</section>
|
||||
<section class="panel music-card">
|
||||
<div class="music-card-head">
|
||||
<h2>Playlist der Legion <span data-music-tracks-count></span></h2>
|
||||
<button type="button" class="music-text-btn" data-music-play-all>Alle abspielen</button>
|
||||
</div>
|
||||
<input type="search" class="music-filter" placeholder="Playlist durchsuchen …" aria-label="Playlist durchsuchen" data-music-filter>
|
||||
<ul class="music-list" data-music-tracks></ul>
|
||||
<?php if ($canManage): ?>
|
||||
<form class="music-upload" data-music-upload>
|
||||
<label class="music-file">
|
||||
<input type="file" name="file" accept=".mp3,.ogg,.m4a,.wav,.flac,.opus,audio/*" required data-enhanced="1">
|
||||
<?= icon('upload') ?><span data-music-file-label>Audiodatei wählen – mp3, ogg, m4a, wav, flac, opus, max. 25 MB</span>
|
||||
</label>
|
||||
<div class="music-row">
|
||||
<input type="text" name="title" maxlength="100" placeholder="Titel (leer = Dateiname)" aria-label="Titel">
|
||||
<button type="submit" class="button">Hochladen</button>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="music-toast" data-music-toast hidden></div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue