mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-16 04:13:12 +00:00
chore: tweak i18n
This commit is contained in:
parent
a3943f5b2d
commit
c571720d42
@ -62,10 +62,7 @@
|
|||||||
"nickname": "Nickname",
|
"nickname": "Nickname",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
"role": "Role",
|
"role": "Role",
|
||||||
"profile": "Profile",
|
"profile": "Profile"
|
||||||
"action": {
|
|
||||||
"add-user": "Add user"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"self": "Setting",
|
"self": "Setting",
|
||||||
@ -76,11 +73,14 @@
|
|||||||
"workspace": {
|
"workspace": {
|
||||||
"self": "Workspace settings",
|
"self": "Workspace settings",
|
||||||
"custom-style": "Custom style",
|
"custom-style": "Custom style",
|
||||||
"enable-user-signup": {
|
"disallow-user-registration": {
|
||||||
"self": "Enable user signup",
|
"self": "Disallow user registration"
|
||||||
"description": "Once enabled, other users can signup."
|
|
||||||
},
|
},
|
||||||
"default-visibility": "Default visibility"
|
"default-visibility": "Default visibility",
|
||||||
|
"member": {
|
||||||
|
"self": "Member",
|
||||||
|
"add": "Add member"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ const WorkspaceMembersSection = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="w-full flex flex-col sm:flex-row justify-start items-start gap-4 sm:gap-x-16">
|
<div className="w-full flex flex-col sm:flex-row justify-start items-start gap-4 sm:gap-x-16">
|
||||||
<p className="sm:w-1/4 text-2xl shrink-0 font-semibold text-gray-900 dark:text-gray-500">Members</p>
|
<p className="sm:w-1/4 text-2xl shrink-0 font-semibold text-gray-900 dark:text-gray-500">{t("settings.workspace.member.self")}</p>
|
||||||
<div className="w-full sm:w-auto grow flex flex-col justify-start items-start gap-4">
|
<div className="w-full sm:w-auto grow flex flex-col justify-start items-start gap-4">
|
||||||
<div className="w-full flex justify-end">
|
<div className="w-full flex justify-end">
|
||||||
<Button
|
<Button
|
||||||
@ -55,7 +55,7 @@ const WorkspaceMembersSection = () => {
|
|||||||
setCurrentEditingUser(undefined);
|
setCurrentEditingUser(undefined);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("user.action.add-user")}
|
{t("settings.workspace.member.add")}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full flow-root">
|
<div className="w-full flow-root">
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
import { Switch } from "@mui/joy";
|
import { Switch } from "@mui/joy";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
import { workspaceServiceClient } from "@/grpcweb";
|
import { workspaceServiceClient } from "@/grpcweb";
|
||||||
import { useWorkspaceStore } from "@/stores";
|
import { useWorkspaceStore } from "@/stores";
|
||||||
import { WorkspaceSetting } from "@/types/proto/api/v1/workspace_service";
|
import { WorkspaceSetting } from "@/types/proto/api/v1/workspace_service";
|
||||||
import SSOSection from "./SSOSection";
|
import SSOSection from "./SSOSection";
|
||||||
|
|
||||||
const WorkspaceSecuritySection = () => {
|
const WorkspaceSecuritySection = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
const workspaceStore = useWorkspaceStore();
|
const workspaceStore = useWorkspaceStore();
|
||||||
|
|
||||||
const toggleDisallowUserRegistration = async (on: boolean) => {
|
const toggleDisallowUserRegistration = async (on: boolean) => {
|
||||||
@ -30,10 +32,6 @@ const WorkspaceSecuritySection = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("1", {
|
|
||||||
setting: workspaceSetting,
|
|
||||||
updateMask: updateMask,
|
|
||||||
});
|
|
||||||
try {
|
try {
|
||||||
await workspaceServiceClient.updateWorkspaceSetting({
|
await workspaceServiceClient.updateWorkspaceSetting({
|
||||||
setting: workspaceSetting,
|
setting: workspaceSetting,
|
||||||
@ -56,7 +54,7 @@ const WorkspaceSecuritySection = () => {
|
|||||||
size="lg"
|
size="lg"
|
||||||
checked={workspaceStore.setting.disallowUserRegistration}
|
checked={workspaceStore.setting.disallowUserRegistration}
|
||||||
onChange={(event) => toggleDisallowUserRegistration(event.target.checked)}
|
onChange={(event) => toggleDisallowUserRegistration(event.target.checked)}
|
||||||
endDecorator={<span>Disallow user registration</span>}
|
endDecorator={<span>{t("settings.workspace.disallow-user-registration.self")}</span>}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user