Feature: Z-Badge für Züchter-Kacheln in Welten-Admin-Ansicht (SW by-v916)
This commit is contained in:
parent
b911c41583
commit
4a52a52cff
5 changed files with 15 additions and 12 deletions
|
|
@ -980,12 +980,15 @@ window.Worlds = (() => {
|
|||
return u.rolle === 'admin' || u.rolle === 'moderator' || u.is_moderator || u.is_social_media;
|
||||
}
|
||||
|
||||
function _chip(icon, label, page, locked = false, proBadge = false) {
|
||||
function _chip(icon, label, page, locked = false, proBadge = false, breederBadge = false) {
|
||||
const style = locked ? 'opacity:0.25;cursor:default;' : '';
|
||||
const badge = proBadge
|
||||
? `<span style="position:absolute;top:2px;left:3px;font-size:8px;font-weight:800;
|
||||
color:#fff;background:#92400e;border-radius:3px;padding:0 3px;line-height:14px">P</span>`
|
||||
: '';
|
||||
: breederBadge
|
||||
? `<span style="position:absolute;top:2px;left:3px;font-size:8px;font-weight:800;
|
||||
color:#fff;background:#1d4ed8;border-radius:3px;padding:0 3px;line-height:14px">Z</span>`
|
||||
: '';
|
||||
return `
|
||||
<div class="world-chip" ${locked ? '' : `data-wnav="${page}"`}
|
||||
style="${style}position:relative">
|
||||
|
|
@ -1140,7 +1143,7 @@ window.Worlds = (() => {
|
|||
<div class="world-bottom">
|
||||
<div class="world-section-label">Deine Bereiche</div>
|
||||
<div class="world-chips-grid">
|
||||
${features.map(f => _chip(f.icon, f.label, f.page, false, f.pro && _isRoleBasedPro())).join('')}
|
||||
${features.map(f => _chip(f.icon, f.label, f.page, false, f.pro && _isRoleBasedPro(), f.role === 'breeder')).join('')}
|
||||
</div>
|
||||
<div class="world-footer-links">
|
||||
<span data-wnav="impressum">Impressum</span>
|
||||
|
|
@ -1431,7 +1434,7 @@ window.Worlds = (() => {
|
|||
` : ''}
|
||||
<div class="world-section-label">Alles über ${_esc(dog.name)}</div>
|
||||
<div class="world-chips-grid">
|
||||
${chips.map(c => _chip(c.icon, c.label, c.page, false, c.pro && _isRoleBasedPro())).join('')}
|
||||
${chips.map(c => _chip(c.icon, c.label, c.page, false, c.pro && _isRoleBasedPro(), c.role === 'breeder')).join('')}
|
||||
</div>
|
||||
<div class="world-footer-links">
|
||||
<span data-wnav="gruender">Die 100 Gründer</span>
|
||||
|
|
@ -1605,7 +1608,7 @@ window.Worlds = (() => {
|
|||
<div class="world-bottom">
|
||||
<div class="world-section-label">Die Welt da draußen</div>
|
||||
<div class="world-chips-grid">
|
||||
${chips.map(c => _chip(c.icon, c.label, c.page, false, c.pro && _isRoleBasedPro())).join('')}
|
||||
${chips.map(c => _chip(c.icon, c.label, c.page, false, c.pro && _isRoleBasedPro(), c.role === 'breeder')).join('')}
|
||||
</div>
|
||||
<div class="world-footer-links">
|
||||
<span data-wnav="datenschutz">Datenschutz</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue