fix(ui): учитывать права на операции с серверами
This commit is contained in:
1 parent
e9e5030047
commit
61950638bc
6 files changed
+121
-18
No files matched your search
@@ -22,11 +22,12 @@ const ROS_FEATURES = [
|
||||
interface ServerExpandedDetailProps {
|
||||
server: Server
|
||||
isLive: boolean
|
||||
canWrite: boolean
|
||||
isPolling: boolean
|
||||
onPoll: () => void
|
||||
}
|
||||
|
||||
function ServerExpandedDetail({ server: s, isLive, isPolling, onPoll }: ServerExpandedDetailProps) {
|
||||
function ServerExpandedDetail({ server: s, isLive, isPolling, canWrite, onPoll }: ServerExpandedDetailProps) {
|
||||
const ver = rosVer(s.os)
|
||||
|
||||
return (
|
||||
@@ -65,7 +66,7 @@ function ServerExpandedDetail({ server: s, isLive, isPolling, onPoll }: ServerEx
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="h-7 gap-1.5 text-xs shrink-0"
|
||||
disabled={isPolling}
|
||||
disabled={!canWrite || isPolling}
|
||||
onClick={(e) => { e.stopPropagation(); onPoll() }}
|
||||
>
|
||||
<RefreshCwIcon className={cn("size-3.5", isPolling && "animate-spin")} />
|
||||
|
||||
Reference in new issue
Block a user