Add server control buttons to dashboard with confirmation dialogs
All checks were successful
Deploy GSM / deploy (push) Successful in 24s
All checks were successful
Deploy GSM / deploy (push) Successful in 24s
- Add ConfirmModal component for stop/restart confirmations - Add start/stop/restart buttons to ServerCard (moderator/admin only) - Add confirmation dialogs to ServerDetail for stop/restart actions - Add btn-sm CSS class for smaller buttons Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import LoginModal from '../components/LoginModal'
|
||||
|
||||
export default function Dashboard({ onLogout }) {
|
||||
const navigate = useNavigate()
|
||||
const { user, token, loading: userLoading, isSuperadmin, role } = useUser()
|
||||
const { user, token, loading: userLoading, isSuperadmin, isModerator, role } = useUser()
|
||||
const [servers, setServers] = useState([])
|
||||
const [displaySettings, setDisplaySettings] = useState({})
|
||||
const [loading, setLoading] = useState(true)
|
||||
@@ -259,6 +259,9 @@ export default function Dashboard({ onLogout }) {
|
||||
isAuthenticated={isAuthenticated}
|
||||
isGuest={isGuest}
|
||||
displaySettings={displaySettings[server.id]}
|
||||
isModerator={isModerator}
|
||||
token={token}
|
||||
onServerAction={fetchServers}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user