mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-02 11:30:35 +02:00
Do not disable "Reserve topic" checkbox for admins
This commit is contained in:
parent
61f403bff4
commit
0177016fbc
3 changed files with 7 additions and 3 deletions
web/src/components
|
@ -11,7 +11,7 @@ import theme from "./theme";
|
|||
import subscriptionManager from "../app/SubscriptionManager";
|
||||
import DialogFooter from "./DialogFooter";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import accountApi from "../app/AccountApi";
|
||||
import accountApi, {Role} from "../app/AccountApi";
|
||||
import session from "../app/Session";
|
||||
import routes from "./routes";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
|
@ -255,7 +255,7 @@ const DisplayNameDialog = (props) => {
|
|||
|
||||
export const ReserveLimitChip = () => {
|
||||
const { account } = useContext(AccountContext);
|
||||
if (account?.stats.reservations_remaining > 0) {
|
||||
if (account?.role === Role.ADMIN || account?.stats.reservations_remaining > 0) {
|
||||
return <></>;
|
||||
} else if (config.enable_payments) {
|
||||
return (account?.limits.reservations > 0) ? <LimitReachedChip/> : <ProChip/>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue