diff --git a/.gitignore b/.gitignore index b3bf067..7d9a8ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ node_modules server/data -server/db data background .vscode diff --git a/frontend/src/helpers/constants.js b/frontend/src/helpers/constants.js index ff3dff8..38a48a2 100644 --- a/frontend/src/helpers/constants.js +++ b/frontend/src/helpers/constants.js @@ -1,5 +1,5 @@ export const APP_NAME = "NeonLink"; -export const VERSION = "1.4.4"; +export const VERSION = "1.4.5"; export const DEF_MAX_ITEMS = 20; export const DEF_COLUMNS = 3; export const CARD_HEADER_STYLE = [ diff --git a/frontend/src/pages/settings/tabs/mainTab/UsersList.jsx b/frontend/src/pages/settings/tabs/mainTab/UsersList.jsx index 1ddd35e..09afa4b 100644 --- a/frontend/src/pages/settings/tabs/mainTab/UsersList.jsx +++ b/frontend/src/pages/settings/tabs/mainTab/UsersList.jsx @@ -2,11 +2,15 @@ import React, { useEffect, useRef, useState } from "react"; import { notify } from "../../../../components/Notification"; import { deleteJSON, getJSON, putJSON } from "../../../../helpers/fetch"; import UserItem from "./UserItem"; +import { appSettingsKeys, useAppSettingsStore } from "../../../../stores/appSettingsStore"; export default function UsersList() { const [users, setUsers] = useState([]); const [isLoading, setIsLoading] = useState(false); const [isError, setIsError] = useState(undefined); + const [authenticationEnabled] = useAppSettingsStore( + appSettingsKeys.AuthenticationEnabled + ); const abortController = useRef(null); @@ -74,11 +78,19 @@ export default function UsersList() { }, []); useEffect(() => { - if (isError) notify("Error", isError?.message || "", "error"); - }, [isError]); + if (isError && authenticationEnabled) { + notify( + "Error", + "Can't get list of users. " + isError?.message || "", + "error" + ); + } + }, [isError, authenticationEnabled]); if (isLoading) return
Loading...
; + if (users.length === 0) return
No users
; + return (