feat: Serien-Suche, Admin-Favoriten, Pushover, Dashboard-Badge
This commit is contained in:
@@ -1903,7 +1903,7 @@ function GlobalSearch({ setActive, setDevToolsNav, mobile }) {
|
||||
}
|
||||
|
||||
|
||||
function Dashboard({ toast, mobile, setActive, setDevToolsNav, unreadMsgs=0, unreadBoard=0, unreadPromoted=0, onBoardRead, unreadChangelog=0, onChangelogRead, user }) {
|
||||
function Dashboard({ toast, mobile, setActive, setDevToolsNav, unreadMsgs=0, unreadBoard=0, unreadPromoted=0, onBoardRead, unreadChangelog=0, onChangelogRead, unackedFavs=0, onAckFavs, user }) {
|
||||
const [now, setNow] = useState(new Date());
|
||||
const [showBoard, setShowBoard] = useState(false);
|
||||
const [showChangelog, setShowChangelog] = useState(false);
|
||||
@@ -1981,6 +1981,16 @@ function Dashboard({ toast, mobile, setActive, setDevToolsNav, unreadMsgs=0, unr
|
||||
borderRadius:'50%', background:'#ffe66d', boxShadow:'0 0 5px #ffe66d' }}/>
|
||||
)}
|
||||
</button>
|
||||
{/* Admin: unquittierte Favoriten */}
|
||||
{user?.role==='admin' && unackedFavs > 0 && (
|
||||
<button onClick={()=>{ setActive('media'); onAckFavs(); }} style={{
|
||||
background:'rgba(245,158,11,0.12)', border:'1px solid rgba(245,158,11,0.35)',
|
||||
borderRadius:7, color:'#f59e0b', cursor:'pointer',
|
||||
padding:'4px 10px', fontSize:9, fontFamily:'monospace', letterSpacing:1,
|
||||
}}>
|
||||
⭐ {unackedFavs} neue Favorit{unackedFavs!==1?'en':''}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -3608,6 +3618,7 @@ export default function App() {
|
||||
const [unreadBoard, setUnreadBoard] = useState(0);
|
||||
const [unreadPromoted, setUnreadPromoted] = useState(0);
|
||||
const [unreadChangelog,setUnreadChangelog]= useState(0);
|
||||
const [unackedFavs, setUnackedFavs] = useState(0);
|
||||
|
||||
const [authChecked, setAuthChecked] = useState(false);
|
||||
useEffect(()=>{
|
||||
|
||||
Reference in New Issue
Block a user