Skip to content

Commit f683ab2

Browse files
committed
Change stamp annotation to rubberStamp icon
1 parent f36ac1f commit f683ab2

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

viewers/snippet/src/components/comment-sidebar/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ export const annotationConfigs: Record<SidebarSubtype, AnnotationConfig> = {
121121
[PdfAnnotationSubtype.STAMP]: {
122122
label: 'Stamp',
123123
labelKey: 'annotation.stamp',
124-
icon: 'deviceFloppy',
124+
icon: 'rubberStamp',
125125
iconProps: () => ({
126-
primaryColor: '#dc2626',
126+
primaryColor: '#000000',
127127
}),
128128
},
129129
[PdfAnnotationSubtype.CARET]: {

viewers/snippet/src/config/commands.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,6 +1981,12 @@ export const commands: Record<string, Command<State>> = {
19811981
];
19821982
return !excluded.includes(type);
19831983
},
1984+
disabled: ({ state, documentId }) => {
1985+
return (
1986+
lacksPermission(state, documentId, PdfPermissionFlag.ModifyAnnotations) ||
1987+
lacksPermission(state, documentId, PdfPermissionFlag.CopyContents)
1988+
);
1989+
},
19841990
},
19851991

19861992
'stamp:create-from-group': {
@@ -2038,6 +2044,12 @@ export const commands: Record<string, Command<State>> = {
20382044
];
20392045
return selected.every((ta) => !excluded.includes(ta.object.type));
20402046
},
2047+
disabled: ({ state, documentId }) => {
2048+
return (
2049+
lacksPermission(state, documentId, PdfPermissionFlag.ModifyAnnotations) ||
2050+
lacksPermission(state, documentId, PdfPermissionFlag.CopyContents)
2051+
);
2052+
},
20412053
},
20422054

20432055
'annotation:overflow-tools': {

0 commit comments

Comments
 (0)