Skip to content

Commit fe926fc

Browse files
committed
🏷️(frontend) add commenter type
Our document got new types: - user can be commenters, commenters can view and add comments to documents but cannot edit the document content itself. - document can be in 'commenters' mode, allowing viewers to add comments.
1 parent 16c4a63 commit fe926fc

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

src/frontend/apps/impress/src/features/docs/doc-management/hooks/useTrans.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const useTrans = () => {
77

88
const translatedRoles = {
99
[Role.READER]: t('Reader'),
10+
[Role.COMMENTER]: t('Commenter'),
1011
[Role.EDITOR]: t('Editor'),
1112
[Role.ADMIN]: t('Administrator'),
1213
[Role.OWNER]: t('Owner'),

src/frontend/apps/impress/src/features/docs/doc-management/types.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface Access {
2323

2424
export enum Role {
2525
READER = 'reader',
26+
COMMENTER = 'commenter',
2627
EDITOR = 'editor',
2728
ADMIN = 'administrator',
2829
OWNER = 'owner',
@@ -43,6 +44,7 @@ export enum LinkReach {
4344

4445
export enum LinkRole {
4546
READER = 'reader',
47+
COMMENTER = 'commenter',
4648
EDITOR = 'editor',
4749
}
4850

@@ -79,6 +81,7 @@ export interface Doc {
7981
children_create: boolean;
8082
children_list: boolean;
8183
collaboration_auth: boolean;
84+
comment: true;
8285
destroy: boolean;
8386
duplicate: boolean;
8487
favorite: boolean;

src/frontend/apps/impress/src/features/docs/doc-share/hooks/useTranslatedShareSettings.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const useTranslatedShareSettings = () => {
1313

1414
const linkModeTranslations = {
1515
[LinkRole.READER]: t('Reading'),
16+
[LinkRole.COMMENTER]: t('Commenting'),
1617
[LinkRole.EDITOR]: t('Editing'),
1718
};
1819

src/frontend/apps/impress/src/features/service-worker/plugins/ApiPlugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ export class ApiPlugin implements WorkboxPlugin {
187187
children_create: true,
188188
children_list: true,
189189
collaboration_auth: true,
190+
comment: true,
190191
destroy: true,
191192
duplicate: true,
192193
favorite: true,

0 commit comments

Comments
 (0)