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