File tree Expand file tree Collapse file tree 2 files changed +19
-15
lines changed
src/frontend/apps/impress/src/features/docs/doc-versioning/components Expand file tree Collapse file tree 2 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ and this project adheres to
11
11
12
12
## Changed
13
13
14
+ - 🛂(frontend) Restore version visibility #629
14
15
- 📝(doc) minor README.md formatting and wording enhancements
15
16
- ♻️Stop setting a default title on doc creation #634
16
17
Original file line number Diff line number Diff line change @@ -36,8 +36,9 @@ export const ModalSelectVersion = ({
36
36
const { t } = useTranslation ( ) ;
37
37
const [ selectedVersionId , setSelectedVersionId ] =
38
38
useState < Versions [ 'version_id' ] > ( ) ;
39
-
39
+ const canRestore = doc . abilities . partial_update ;
40
40
const restoreModal = useModal ( ) ;
41
+
41
42
return (
42
43
< >
43
44
< Modal
@@ -127,21 +128,23 @@ export const ModalSelectVersion = ({
127
128
selectedVersionId = { selectedVersionId }
128
129
/>
129
130
</ Box >
130
- < Box
131
- $padding = "xs"
132
- $css = { css `
133
- border-top : 1px solid var (--c--theme--colors--greyscale-200 );
134
- ` }
135
- >
136
- < Button
137
- fullWidth
138
- disabled = { ! selectedVersionId }
139
- onClick = { restoreModal . open }
140
- color = "primary"
131
+ { canRestore && (
132
+ < Box
133
+ $padding = "xs"
134
+ $css = { css `
135
+ border-top : 1px solid var (--c--theme--colors--greyscale-200 );
136
+ ` }
141
137
>
142
- { t ( 'Restore' ) }
143
- </ Button >
144
- </ Box >
138
+ < Button
139
+ fullWidth
140
+ disabled = { ! selectedVersionId }
141
+ onClick = { restoreModal . open }
142
+ color = "primary"
143
+ >
144
+ { t ( 'Restore' ) }
145
+ </ Button >
146
+ </ Box >
147
+ ) }
145
148
</ Box >
146
149
</ Box >
147
150
</ Modal >
You can’t perform that action at this time.
0 commit comments