[release] v0.10.0-unstable19
This commit is contained in:
parent
8d359ca008
commit
cf8a29c1aa
|
@ -19,7 +19,7 @@ const NavItem = ({ item, level }) => {
|
|||
const menu = useSelector((state) => state.menu);
|
||||
const { drawerOpen, openItem } = menu;
|
||||
const {role} = useClientInfos();
|
||||
const isAdmin = role === 2;
|
||||
const isAdmin = role === "2";
|
||||
|
||||
if (item.adminOnly && !isAdmin) {
|
||||
return null;
|
||||
|
|
|
@ -40,7 +40,7 @@ const ConfigManagement = () => {
|
|||
const [uploadingBackground, setUploadingBackground] = React.useState(false);
|
||||
const [saveLabel, setSaveLabel] = React.useState("Save");
|
||||
const {role} = useClientInfos();
|
||||
const isAdmin = role === 2;
|
||||
const isAdmin = role === "2";
|
||||
|
||||
function refresh() {
|
||||
API.config.get().then((res) => {
|
||||
|
|
|
@ -79,7 +79,7 @@ const AddDeviceModal = ({ users, config, refreshConfig, devices }) => {
|
|||
const [isDone, setIsDone] = useState(null);
|
||||
const canvasRef = React.useRef(null);
|
||||
const {role, nickname} = useClientInfos();
|
||||
const isAdmin = role === 2;
|
||||
const isAdmin = role === "2";
|
||||
|
||||
let firstIP = "192.168.201.2/24";
|
||||
if (devices && devices.length > 0) {
|
||||
|
|
|
@ -15,7 +15,7 @@ import { ConstellationDNS } from './dns';
|
|||
|
||||
const ConstellationIndex = () => {
|
||||
const {role} = useClientInfos();
|
||||
const isAdmin = role === 2;
|
||||
const isAdmin = role === "2";
|
||||
|
||||
return isAdmin ? <div>
|
||||
<IsLoggedIn />
|
||||
|
|
|
@ -31,7 +31,7 @@ export const ConstellationVPN = () => {
|
|||
const [users, setUsers] = useState(null);
|
||||
const [devices, setDevices] = useState(null);
|
||||
const {role} = useClientInfos();
|
||||
const isAdmin = role === 2;
|
||||
const isAdmin = role === "2";
|
||||
|
||||
const refreshConfig = async () => {
|
||||
let configAsync = await API.config.get();
|
||||
|
|
|
@ -89,7 +89,7 @@ const HomePage = () => {
|
|||
const isDark = theme.palette.mode === 'dark';
|
||||
const isMd = useMediaQuery(theme.breakpoints.up('md'));
|
||||
const {role} = useClientInfos();
|
||||
const isAdmin = role === 2;
|
||||
const isAdmin = role === "2";
|
||||
|
||||
const blockStyle = {
|
||||
margin: 0,
|
||||
|
|
|
@ -112,7 +112,7 @@ const MarketPage = () => {
|
|||
const { appName, appStore } = useParams();
|
||||
const [search, setSearch] = useState("");
|
||||
const {role} = useClientInfos();
|
||||
const isAdmin = role === 2;
|
||||
const isAdmin = role === "2";
|
||||
|
||||
const backgroundStyle = isDark ? {
|
||||
backgroundColor: 'rgb(0,0,0)',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.10.0-unstable18",
|
||||
"version": "0.10.0-unstable19",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
|
|
Loading…
Reference in a new issue