+
{props.children}
)
@@ -156,26 +185,31 @@ const PrefGroup = (props) => {
const Pref = (props) => {
return (
- <>
+
-
{props.title}
+
{props.title}
+ {props.description &&
{props.description}
}
{props.children}
- >
+
);
};
@@ -202,8 +236,8 @@ const Users = () => {
};
return (
-
-
+
+
{t("prefs_users_title")}
@@ -260,7 +294,7 @@ const UserTable = (props) => {
- {t("prefs_users_table_user_header")}
+ {t("prefs_users_table_user_header")}
{t("prefs_users_table_base_url_header")}
@@ -271,7 +305,7 @@ const UserTable = (props) => {
key={user.baseUrl}
sx={{ '&:last-child td, &:last-child th': { border: 0 } }}
>
- {user.username}
+ {user.username}
{user.baseUrl}
handleEditClick(user)}>
@@ -307,8 +341,12 @@ const UserDialog = (props) => {
if (editMode) {
return username.length > 0 && password.length > 0;
}
+ const baseUrlValid = validUrl(baseUrl);
const baseUrlExists = props.users?.map(user => user.baseUrl).includes(baseUrl);
- return !baseUrlExists && username.length > 0 && password.length > 0;
+ return baseUrlValid
+ && !baseUrlExists
+ && username.length > 0
+ && password.length > 0;
})();
const handleSubmit = async () => {
props.onSubmit({
@@ -373,7 +411,7 @@ const Appearance = () => {
const { t } = useTranslation();
return (
-
+
{t("prefs_appearance_title")}