[release] v0.10.0-unstable19

This commit is contained in:
Yann Stepienik 2023-10-04 18:46:57 +01:00
parent 8d359ca008
commit cf8a29c1aa
8 changed files with 8 additions and 8 deletions

View file

@ -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;

View file

@ -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) => {

View file

@ -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) {

View file

@ -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 />

View file

@ -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();

View file

@ -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,

View file

@ -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)',

View file

@ -1,6 +1,6 @@
{
"name": "cosmos-server",
"version": "0.10.0-unstable18",
"version": "0.10.0-unstable19",
"description": "",
"main": "test-server.js",
"bugs": {