mirror of
https://github.com/docmost/docmost.git
synced 2026-05-10 16:24:05 +08:00
feat(editor): fixed toolbar preference
This commit is contained in:
@@ -22,6 +22,10 @@ export class UpdateUserDto extends PartialType(
|
||||
@IsIn(['read', 'edit'])
|
||||
pageEditMode: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
editorToolbar: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
locale: string;
|
||||
|
||||
@@ -61,6 +61,14 @@ export class UserService {
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof updateUserDto.editorToolbar !== 'undefined') {
|
||||
return this.userRepo.updatePreference(
|
||||
userId,
|
||||
'editorToolbar',
|
||||
updateUserDto.editorToolbar,
|
||||
);
|
||||
}
|
||||
|
||||
const notificationSettings: Record<string, NotificationSettingKey> = {
|
||||
notificationPageUpdates: 'page.updated',
|
||||
notificationPageUserMention: 'page.userMention',
|
||||
|
||||
Reference in New Issue
Block a user