mirror of
https://github.com/docmost/docmost.git
synced 2025-11-17 07:21:08 +10:00
feat: complete space translation
This commit is contained in:
@ -103,39 +103,6 @@
|
|||||||
"Search for groups": "Search for groups",
|
"Search for groups": "Search for groups",
|
||||||
"No group found": "No group found"
|
"No group found": "No group found"
|
||||||
},
|
},
|
||||||
"space": {
|
"space": {}
|
||||||
"Spaces": "Spaces",
|
|
||||||
"Create space": "Create space",
|
|
||||||
"Space": "Space",
|
|
||||||
"Members": "Members",
|
|
||||||
"Settings": "Settings",
|
|
||||||
"Details": "Details",
|
|
||||||
"Name": "Name",
|
|
||||||
"e.g Sales": "e.g Sales",
|
|
||||||
"Slug": "Slug",
|
|
||||||
"Description": "Description",
|
|
||||||
"e.g Space for sales team to collaborate": "e.g Space for sales team to collaborate",
|
|
||||||
"Save": "Save",
|
|
||||||
"Space name": "Space name",
|
|
||||||
"e.g Product Team": "e.g Product Team",
|
|
||||||
"Space slug": "Space slug",
|
|
||||||
"e.g product": "e.g product",
|
|
||||||
"Space description": "Space description",
|
|
||||||
"e.g Space for product team": "e.g Space for product team",
|
|
||||||
"Create": "Create",
|
|
||||||
"addSpaceMembers": "addSpaceMembers",
|
|
||||||
"add": "add",
|
|
||||||
"selectRole": "selectRole",
|
|
||||||
"Remove space member": "Remove space member",
|
|
||||||
"Are you sure you want to remove this user from the space? The user will lose all access to this space.": "Are you sure you want to remove this user from the space? The user will lose all access to this space.",
|
|
||||||
"Remove": "Remove",
|
|
||||||
"Cancel": "Cancel",
|
|
||||||
"Member": "Member",
|
|
||||||
"Role": "Role",
|
|
||||||
"Failed to load page. An error occurred.": "Failed to load page. An error occurred.",
|
|
||||||
"Add members": "Add members",
|
|
||||||
"Search for users and groups": "Search for users and groups",
|
|
||||||
"No user found": "No user found"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
45
apps/client/public/locales/en/space.json
Normal file
45
apps/client/public/locales/en/space.json
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"Overview": "Overview",
|
||||||
|
"Search": "Search",
|
||||||
|
"Space settings": "Space settings",
|
||||||
|
"New page": "New page",
|
||||||
|
"Pages": "Pages",
|
||||||
|
"Create page": "Create page",
|
||||||
|
"Import pages & space settings": "Import pages & space settings",
|
||||||
|
"Space menu": "Space menu",
|
||||||
|
"Import pages": "Import pages",
|
||||||
|
"Spaces": "Spaces",
|
||||||
|
"Create space": "Create space",
|
||||||
|
"Space": "Space",
|
||||||
|
"Members": "Members",
|
||||||
|
"Settings": "Settings",
|
||||||
|
"Details": "Details",
|
||||||
|
"Name": "Name",
|
||||||
|
"e.g Sales": "e.g Sales",
|
||||||
|
"Slug": "Slug",
|
||||||
|
"Description": "Description",
|
||||||
|
"e.g Space for sales team to collaborate": "e.g Space for sales team to collaborate",
|
||||||
|
"Save": "Save",
|
||||||
|
"Space name": "Space name",
|
||||||
|
"e.g Product Team": "e.g Product Team",
|
||||||
|
"Space slug": "Space slug",
|
||||||
|
"e.g product": "e.g product",
|
||||||
|
"Space description": "Space description",
|
||||||
|
"e.g Space for product team": "e.g Space for product team",
|
||||||
|
"Create": "Create",
|
||||||
|
"addSpaceMembers": "addSpaceMembers",
|
||||||
|
"add": "add",
|
||||||
|
"selectRole": "selectRole",
|
||||||
|
"Remove space member": "Remove space member",
|
||||||
|
"Are you sure you want to remove this user from the space? The user will lose all access to this space.": "Are you sure you want to remove this user from the space? The user will lose all access to this space.",
|
||||||
|
"Remove": "Remove",
|
||||||
|
"Cancel": "Cancel",
|
||||||
|
"Member": "Member",
|
||||||
|
"Role": "Role",
|
||||||
|
"Failed to load page. An error occurred.": "Failed to load page. An error occurred.",
|
||||||
|
"Add members": "Add members",
|
||||||
|
"Search for users and groups": "Search for users and groups",
|
||||||
|
"No user found": "No user found",
|
||||||
|
"Spaces you belong to": "Spaces you belong to",
|
||||||
|
"Recently updated": "Recently updated"
|
||||||
|
}
|
||||||
@ -39,10 +39,7 @@
|
|||||||
"home": {
|
"home": {
|
||||||
"Recently updated": "Recently updated"
|
"Recently updated": "Recently updated"
|
||||||
},
|
},
|
||||||
"space": {
|
"space": {},
|
||||||
"Spaces you belong to": "Spaces you belong to",
|
|
||||||
"Recently updated": "Recently updated"
|
|
||||||
},
|
|
||||||
"page": {
|
"page": {
|
||||||
"Error fetching page data.": "Error fetching page data.",
|
"Error fetching page data.": "Error fetching page data.",
|
||||||
"untitled": "untitled",
|
"untitled": "untitled",
|
||||||
|
|||||||
1
apps/client/public/locales/en/workspace.json
Normal file
1
apps/client/public/locales/en/workspace.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@ -103,39 +103,6 @@
|
|||||||
"Search for groups": "搜索群组",
|
"Search for groups": "搜索群组",
|
||||||
"No group found": "未找到群组"
|
"No group found": "未找到群组"
|
||||||
},
|
},
|
||||||
"space": {
|
"space": {}
|
||||||
"Spaces": "空间",
|
|
||||||
"Create space": "创建空间",
|
|
||||||
"Space": "空间",
|
|
||||||
"Members": "成员",
|
|
||||||
"Settings": "设置",
|
|
||||||
"Details": "详情",
|
|
||||||
"Name": "名称",
|
|
||||||
"e.g Sales": "例如:销售",
|
|
||||||
"Slug": "短链接",
|
|
||||||
"Description": "描述",
|
|
||||||
"e.g Space for sales team to collaborate": "例如:销售团队协作的空间",
|
|
||||||
"Save": "保存",
|
|
||||||
"Space name": "空间名称",
|
|
||||||
"e.g Product Team": "例如:产品团队",
|
|
||||||
"Space slug": "空间短链接",
|
|
||||||
"e.g product": "例如:product",
|
|
||||||
"Space description": "空间描述",
|
|
||||||
"e.g Space for product team": "例如:产品团队的空间",
|
|
||||||
"Create": "创建",
|
|
||||||
"addSpaceMembers": "添加空间成员",
|
|
||||||
"add": "添加",
|
|
||||||
"selectRole": "选择角色",
|
|
||||||
"Remove space member": "移除空间成员",
|
|
||||||
"Are you sure you want to remove this user from the space? The user will lose all access to this space.": "您确定要从空间中移除这个用户吗?该用户将失去对这个空间的所有访问权限。",
|
|
||||||
"Remove": "移除",
|
|
||||||
"Cancel": "取消",
|
|
||||||
"Member": "成员",
|
|
||||||
"Role": "角色",
|
|
||||||
"Failed to load page. An error occurred.": "页面加载失败。发生了一个错误。",
|
|
||||||
"Add members": "添加成员",
|
|
||||||
"Search for users and groups": "搜索用户和群组",
|
|
||||||
"No user found": "未找到用户"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
45
apps/client/public/locales/zh/space.json
Normal file
45
apps/client/public/locales/zh/space.json
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"Overview": "概览",
|
||||||
|
"Search": "搜索",
|
||||||
|
"Space settings": "空间设置",
|
||||||
|
"New page": "新建页面",
|
||||||
|
"Pages": "页面",
|
||||||
|
"Create page": "创建页面",
|
||||||
|
"Import pages & space settings": "导入页面和空间设置",
|
||||||
|
"Space menu": "空间菜单",
|
||||||
|
"Import pages": "导入页面",
|
||||||
|
"Spaces": "空间",
|
||||||
|
"Create space": "创建空间",
|
||||||
|
"Space": "空间",
|
||||||
|
"Members": "成员",
|
||||||
|
"Settings": "设置",
|
||||||
|
"Details": "详情",
|
||||||
|
"Name": "名称",
|
||||||
|
"e.g Sales": "例如:销售",
|
||||||
|
"Slug": "短链接",
|
||||||
|
"Description": "描述",
|
||||||
|
"e.g Space for sales team to collaborate": "例如:销售团队协作的空间",
|
||||||
|
"Save": "保存",
|
||||||
|
"Space name": "空间名称",
|
||||||
|
"e.g Product Team": "例如:产品团队",
|
||||||
|
"Space slug": "空间短链接",
|
||||||
|
"e.g product": "例如:product",
|
||||||
|
"Space description": "空间描述",
|
||||||
|
"e.g Space for product team": "例如:产品团队的空间",
|
||||||
|
"Create": "创建",
|
||||||
|
"addSpaceMembers": "添加空间成员",
|
||||||
|
"add": "添加",
|
||||||
|
"selectRole": "选择角色",
|
||||||
|
"Remove space member": "移除空间成员",
|
||||||
|
"Are you sure you want to remove this user from the space? The user will lose all access to this space.": "您确定要从空间中移除这个用户吗?该用户将失去对这个空间的所有访问权限。",
|
||||||
|
"Remove": "移除",
|
||||||
|
"Cancel": "取消",
|
||||||
|
"Member": "成员",
|
||||||
|
"Role": "角色",
|
||||||
|
"Failed to load page. An error occurred.": "页面加载失败。发生了一个错误。",
|
||||||
|
"Add members": "添加成员",
|
||||||
|
"Search for users and groups": "搜索用户和群组",
|
||||||
|
"No user found": "未找到用户",
|
||||||
|
"Spaces you belong to": "您所属的空间",
|
||||||
|
"Recently updated": "最近更新"
|
||||||
|
}
|
||||||
@ -39,10 +39,7 @@
|
|||||||
"home": {
|
"home": {
|
||||||
"Recently updated": "最近更新"
|
"Recently updated": "最近更新"
|
||||||
},
|
},
|
||||||
"space": {
|
"space": {},
|
||||||
"Spaces you belong to": "您所属的空间",
|
|
||||||
"Recently updated": "最近更新"
|
|
||||||
},
|
|
||||||
"page": {
|
"page": {
|
||||||
"Error fetching page data.": "获取页面数据时出错。",
|
"Error fetching page data.": "获取页面数据时出错。",
|
||||||
"untitled": "无标题",
|
"untitled": "无标题",
|
||||||
|
|||||||
3
apps/client/public/locales/zh/workspace.json
Normal file
3
apps/client/public/locales/zh/workspace.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"space": {}
|
||||||
|
}
|
||||||
@ -13,9 +13,7 @@ interface AddSpaceMemberModalProps {
|
|||||||
export default function AddSpaceMembersModal({
|
export default function AddSpaceMembersModal({
|
||||||
spaceId,
|
spaceId,
|
||||||
}: AddSpaceMemberModalProps) {
|
}: AddSpaceMemberModalProps) {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("space");
|
||||||
keyPrefix: "workspace.space",
|
|
||||||
});
|
|
||||||
const [opened, { open, close }] = useDisclosure(false);
|
const [opened, { open, close }] = useDisclosure(false);
|
||||||
const [memberIds, setMemberIds] = useState<string[]>([]);
|
const [memberIds, setMemberIds] = useState<string[]>([]);
|
||||||
const [role, setRole] = useState<string>(SpaceRole.WRITER);
|
const [role, setRole] = useState<string>(SpaceRole.WRITER);
|
||||||
|
|||||||
@ -23,9 +23,7 @@ const formSchema = z.object({
|
|||||||
type FormValues = z.infer<typeof formSchema>;
|
type FormValues = z.infer<typeof formSchema>;
|
||||||
|
|
||||||
export function CreateSpaceForm() {
|
export function CreateSpaceForm() {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("space");
|
||||||
keyPrefix: "workspace.space",
|
|
||||||
});
|
|
||||||
const createSpaceMutation = useCreateSpaceMutation();
|
const createSpaceMutation = useCreateSpaceMutation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
|||||||
@ -4,9 +4,7 @@ import { CreateSpaceForm } from "@/features/space/components/create-space-form.t
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function CreateSpaceModal() {
|
export default function CreateSpaceModal() {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("space");
|
||||||
keyPrefix: "workspace.space",
|
|
||||||
});
|
|
||||||
const [opened, { open, close }] = useDisclosure(false);
|
const [opened, { open, close }] = useDisclosure(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -17,9 +17,7 @@ interface EditSpaceFormProps {
|
|||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
}
|
}
|
||||||
export function EditSpaceForm({ space, readOnly }: EditSpaceFormProps) {
|
export function EditSpaceForm({ space, readOnly }: EditSpaceFormProps) {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("space");
|
||||||
keyPrefix: "workspace.space",
|
|
||||||
});
|
|
||||||
const updateSpaceMutation = useUpdateSpaceMutation();
|
const updateSpaceMutation = useUpdateSpaceMutation();
|
||||||
|
|
||||||
const form = useForm<FormValues>({
|
const form = useForm<FormValues>({
|
||||||
|
|||||||
@ -31,9 +31,7 @@ const renderMultiSelectOption: MultiSelectProps["renderOption"] = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
export function MultiMemberSelect({ onChange }: MultiMemberSelectProps) {
|
export function MultiMemberSelect({ onChange }: MultiMemberSelectProps) {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("space");
|
||||||
keyPrefix: "workspace.space",
|
|
||||||
});
|
|
||||||
const [searchValue, setSearchValue] = useState("");
|
const [searchValue, setSearchValue] = useState("");
|
||||||
const [debouncedQuery] = useDebouncedValue(searchValue, 500);
|
const [debouncedQuery] = useDebouncedValue(searchValue, 500);
|
||||||
const { data: suggestion, isLoading } = useSearchSuggestionsQuery({
|
const { data: suggestion, isLoading } = useSearchSuggestionsQuery({
|
||||||
|
|||||||
@ -22,9 +22,7 @@ export default function SpaceSettingsModal({
|
|||||||
opened,
|
opened,
|
||||||
onClose,
|
onClose,
|
||||||
}: SpaceSettingsModalProps) {
|
}: SpaceSettingsModalProps) {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("space");
|
||||||
keyPrefix: "workspace.space",
|
|
||||||
});
|
|
||||||
const { data: space, isLoading } = useSpaceQuery(spaceId);
|
const { data: space, isLoading } = useSpaceQuery(spaceId);
|
||||||
|
|
||||||
const spaceRules = space?.membership?.permissions;
|
const spaceRules = space?.membership?.permissions;
|
||||||
|
|||||||
@ -35,8 +35,10 @@ import {
|
|||||||
SpaceCaslSubject,
|
SpaceCaslSubject,
|
||||||
} from "@/features/space/permissions/permissions.type.ts";
|
} from "@/features/space/permissions/permissions.type.ts";
|
||||||
import PageImportModal from "@/features/page/components/page-import-modal.tsx";
|
import PageImportModal from "@/features/page/components/page-import-modal.tsx";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export function SpaceSidebar() {
|
export function SpaceSidebar() {
|
||||||
|
const { t } = useTranslation("space");
|
||||||
const [tree] = useAtom(treeApiAtom);
|
const [tree] = useAtom(treeApiAtom);
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const [opened, { open: openSettings, close: closeSettings }] =
|
const [opened, { open: openSettings, close: closeSettings }] =
|
||||||
@ -86,7 +88,7 @@ export function SpaceSidebar() {
|
|||||||
className={classes.menuItemIcon}
|
className={classes.menuItemIcon}
|
||||||
stroke={2}
|
stroke={2}
|
||||||
/>
|
/>
|
||||||
<span>Overview</span>
|
<span>{t("Overview")}</span>
|
||||||
</div>
|
</div>
|
||||||
</UnstyledButton>
|
</UnstyledButton>
|
||||||
|
|
||||||
@ -97,7 +99,7 @@ export function SpaceSidebar() {
|
|||||||
className={classes.menuItemIcon}
|
className={classes.menuItemIcon}
|
||||||
stroke={2}
|
stroke={2}
|
||||||
/>
|
/>
|
||||||
<span>Search</span>
|
<span>{t("Search")}</span>
|
||||||
</div>
|
</div>
|
||||||
</UnstyledButton>
|
</UnstyledButton>
|
||||||
|
|
||||||
@ -108,7 +110,7 @@ export function SpaceSidebar() {
|
|||||||
className={classes.menuItemIcon}
|
className={classes.menuItemIcon}
|
||||||
stroke={2}
|
stroke={2}
|
||||||
/>
|
/>
|
||||||
<span>Space settings</span>
|
<span>{t("Space settings")}</span>
|
||||||
</div>
|
</div>
|
||||||
</UnstyledButton>
|
</UnstyledButton>
|
||||||
|
|
||||||
@ -126,7 +128,7 @@ export function SpaceSidebar() {
|
|||||||
className={classes.menuItemIcon}
|
className={classes.menuItemIcon}
|
||||||
stroke={2}
|
stroke={2}
|
||||||
/>
|
/>
|
||||||
<span>New page</span>
|
<span>{t("New page")}</span>
|
||||||
</div>
|
</div>
|
||||||
</UnstyledButton>
|
</UnstyledButton>
|
||||||
)}
|
)}
|
||||||
@ -136,7 +138,7 @@ export function SpaceSidebar() {
|
|||||||
<div className={classes.section}>
|
<div className={classes.section}>
|
||||||
<Group className={classes.pagesHeader} justify="space-between">
|
<Group className={classes.pagesHeader} justify="space-between">
|
||||||
<Text size="xs" fw={500} c="dimmed">
|
<Text size="xs" fw={500} c="dimmed">
|
||||||
Pages
|
{t("Pages")}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
{spaceAbility.can(
|
{spaceAbility.can(
|
||||||
@ -146,12 +148,12 @@ export function SpaceSidebar() {
|
|||||||
<Group gap="xs">
|
<Group gap="xs">
|
||||||
<SpaceMenu spaceId={space.id} onSpaceSettings={openSettings} />
|
<SpaceMenu spaceId={space.id} onSpaceSettings={openSettings} />
|
||||||
|
|
||||||
<Tooltip label="Create page" withArrow position="right">
|
<Tooltip label={t("Create page")} withArrow position="right">
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
variant="default"
|
variant="default"
|
||||||
size={18}
|
size={18}
|
||||||
onClick={handleCreatePage}
|
onClick={handleCreatePage}
|
||||||
aria-label="Create page"
|
aria-label={t("Create page")}
|
||||||
>
|
>
|
||||||
<IconPlus />
|
<IconPlus />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
@ -188,6 +190,7 @@ interface SpaceMenuProps {
|
|||||||
onSpaceSettings: () => void;
|
onSpaceSettings: () => void;
|
||||||
}
|
}
|
||||||
function SpaceMenu({ spaceId, onSpaceSettings }: SpaceMenuProps) {
|
function SpaceMenu({ spaceId, onSpaceSettings }: SpaceMenuProps) {
|
||||||
|
const { t } = useTranslation("space");
|
||||||
const [importOpened, { open: openImportModal, close: closeImportModal }] =
|
const [importOpened, { open: openImportModal, close: closeImportModal }] =
|
||||||
useDisclosure(false);
|
useDisclosure(false);
|
||||||
|
|
||||||
@ -196,11 +199,15 @@ function SpaceMenu({ spaceId, onSpaceSettings }: SpaceMenuProps) {
|
|||||||
<Menu width={200} shadow="md" withArrow>
|
<Menu width={200} shadow="md" withArrow>
|
||||||
<Menu.Target>
|
<Menu.Target>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
label="Import pages & space settings"
|
label={t("Import pages & space settings")}
|
||||||
withArrow
|
withArrow
|
||||||
position="top"
|
position="top"
|
||||||
>
|
>
|
||||||
<ActionIcon variant="default" size={18} aria-label="Space menu">
|
<ActionIcon
|
||||||
|
variant="default"
|
||||||
|
size={18}
|
||||||
|
aria-label={t("Space menu")}
|
||||||
|
>
|
||||||
<IconDots />
|
<IconDots />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
@ -211,7 +218,7 @@ function SpaceMenu({ spaceId, onSpaceSettings }: SpaceMenuProps) {
|
|||||||
onClick={openImportModal}
|
onClick={openImportModal}
|
||||||
leftSection={<IconArrowDown size={16} />}
|
leftSection={<IconArrowDown size={16} />}
|
||||||
>
|
>
|
||||||
Import pages
|
{t("Import pages")}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
|
||||||
<Menu.Divider />
|
<Menu.Divider />
|
||||||
@ -220,7 +227,7 @@ function SpaceMenu({ spaceId, onSpaceSettings }: SpaceMenuProps) {
|
|||||||
onClick={onSpaceSettings}
|
onClick={onSpaceSettings}
|
||||||
leftSection={<IconSettings size={16} />}
|
leftSection={<IconSettings size={16} />}
|
||||||
>
|
>
|
||||||
Space settings
|
{t("Space settings")}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
</Menu.Dropdown>
|
</Menu.Dropdown>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|||||||
@ -9,9 +9,7 @@ interface SpaceDetailsProps {
|
|||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
}
|
}
|
||||||
export default function SpaceDetails({ spaceId, readOnly }: SpaceDetailsProps) {
|
export default function SpaceDetails({ spaceId, readOnly }: SpaceDetailsProps) {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("space");
|
||||||
keyPrefix: "workspace.space",
|
|
||||||
});
|
|
||||||
const { data: space, isLoading } = useSpaceQuery(spaceId);
|
const { data: space, isLoading } = useSpaceQuery(spaceId);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -8,8 +8,7 @@ import { formatMemberCount } from "@/lib";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function SpaceGrid() {
|
export default function SpaceGrid() {
|
||||||
const { t } = useTranslation("translation", { keyPrefix: "space" });
|
const { t } = useTranslation("space");
|
||||||
|
|
||||||
const { data, isLoading } = useGetSpacesQuery();
|
const { data, isLoading } = useGetSpacesQuery();
|
||||||
|
|
||||||
const cards = data?.items.map((space, index) => (
|
const cards = data?.items.map((space, index) => (
|
||||||
|
|||||||
@ -6,9 +6,7 @@ import { useGetSpaceBySlugQuery } from "@/features/space/queries/space-query.ts"
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function SpaceHomeTabs() {
|
export default function SpaceHomeTabs() {
|
||||||
const { t } = useTranslation("translaction", {
|
const { t } = useTranslation("space");
|
||||||
keyPrefix: "workspace.space",
|
|
||||||
});
|
|
||||||
const { spaceSlug } = useParams();
|
const { spaceSlug } = useParams();
|
||||||
const { data: space } = useGetSpaceBySlugQuery(spaceSlug);
|
const { data: space } = useGetSpaceBySlugQuery(spaceSlug);
|
||||||
|
|
||||||
|
|||||||
@ -7,9 +7,7 @@ import { formatMemberCount } from "@/lib";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function SpaceList() {
|
export default function SpaceList() {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("space");
|
||||||
keyPrefix: "workspace.space",
|
|
||||||
});
|
|
||||||
const { data, isLoading } = useGetSpacesQuery();
|
const { data, isLoading } = useGetSpacesQuery();
|
||||||
const [opened, { open, close }] = useDisclosure(false);
|
const [opened, { open, close }] = useDisclosure(false);
|
||||||
const [selectedSpaceId, setSelectedSpaceId] = useState<string>(null);
|
const [selectedSpaceId, setSelectedSpaceId] = useState<string>(null);
|
||||||
|
|||||||
@ -27,9 +27,7 @@ export default function SpaceMembersList({
|
|||||||
spaceId,
|
spaceId,
|
||||||
readOnly,
|
readOnly,
|
||||||
}: SpaceMembersProps) {
|
}: SpaceMembersProps) {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("space");
|
||||||
keyPrefix: "workspace.space",
|
|
||||||
});
|
|
||||||
const { data, isLoading } = useSpaceMembersQuery(spaceId);
|
const { data, isLoading } = useSpaceMembersQuery(spaceId);
|
||||||
const removeSpaceMember = useRemoveSpaceMemberMutation();
|
const removeSpaceMember = useRemoveSpaceMemberMutation();
|
||||||
const changeSpaceMemberRoleMutation = useChangeSpaceMemberRoleMutation();
|
const changeSpaceMemberRoleMutation = useChangeSpaceMemberRoleMutation();
|
||||||
|
|||||||
Reference in New Issue
Block a user