Open-source and local-first Slack and Notion alternative that puts you in control of your data
TypeScript chatchat-applicationcrdteditorelectronknowledge-baselocal-firstnotionnotion-alternativerealtime-collaborationself-hostedslacksqliteteam-collaborationwikiyjs
Fix default role for entry collaborators
Hakan Shehua20935a3afc5
diff --git a/apps/desktop/src/renderer/components/collaborators/entry-collaborator-create.tsx b/apps/desktop/src/renderer/components/collaborators/entry-collaborator-create.tsxindex cd1306a4..fd5b4e6d 100644--- a/apps/desktop/src/renderer/components/collaborators/entry-collaborator-create.tsx+++ b/apps/desktop/src/renderer/components/collaborators/entry-collaborator-create.tsx@@ -1,4 +1,5 @@import React from 'react';+import { EntryRole } from '@colanode/core';import { User } from '@/shared/types/users';import { EntryCollaboratorRoleDropdown } from '@/renderer/components/collaborators/entry-collaborator-role-dropdown';@@ -22,7 +23,7 @@ export const EntryCollaboratorCreate = ({const { mutate, isPending } = useMutation();const [users, setUsers] = React.useState<User[]>([]);- const [role, setRole] = React.useState('collaborator');+ const [role, setRole] = React.useState<EntryRole>('editor');return (<div className="flex flex-col gap-2">diff --git a/apps/desktop/src/renderer/components/collaborators/entry-collaborator-role-dropdown.tsx b/apps/desktop/src/renderer/components/collaborators/entry-collaborator-role-dropdown.tsxindex ef9d5b60..939cefe7 100644--- a/apps/desktop/src/renderer/components/collaborators/entry-collaborator-role-dropdown.tsx+++ b/apps/desktop/src/renderer/components/collaborators/entry-collaborator-role-dropdown.tsx@@ -43,8 +43,8 @@ const roles: EntryCollaboratorRole[] = [];interface EntryCollaboratorRoleDropdownProps {- value: string;- onChange: (value: string) => void;+ value: EntryRole;+ onChange: (value: EntryRole) => void;canEdit: boolean;}