File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
components/nextcloud-attacher Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 22
33npm install
44zimlet build
5- zimlet package -v 1.0.6 --zimbraXVersion " >=2.0.0" -n " zimbra-zimlet-nextcloud" --desc " Nextcloud integration for Zimbra" -l " Nextcloud Zimlet"
5+ zimlet package -v 1.0.7 --zimbraXVersion " >=2.0.0" -n " zimbra-zimlet-nextcloud" --desc " Nextcloud integration for Zimbra" -l " Nextcloud Zimlet"
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import RenderPropfind from '../render-propfind';
2323 attachAsLink : 'nextcloud-zimlet-modern.attachAsLink' ,
2424 shareLinkPassword : 'nextcloud-zimlet-modern.shareLinkPassword' ,
2525 expirationDate : 'nextcloud-zimlet-modern.expirationDate' ,
26+ plainTextShareLink : 'nextcloud-zimlet-modern.plainTextShareLink' ,
2627} )
2728export default class NextcloudAttacher extends Component {
2829 constructor ( props ) {
@@ -85,7 +86,16 @@ export default class NextcloudAttacher extends Component {
8586 if ( attachType == "attachAsLink" ) {
8687 let OCSResponse = JSON . parse ( request . responseText ) ;
8788 OCSResponse . text = getName ( path ) ;
88- editor . insertLinksAtCaret ( [ OCSResponse ] ) ;
89+ if ( ! editor . isPlainText ( ) )
90+ {
91+ editor . insertLinksAtCaret ( [ OCSResponse ] ) ;
92+ }
93+ else
94+ {
95+ //https://github.com/ZimbraOS/zm-x-web/blob/1a6ae45704a6e189dd859a22ed802aac150c694d/src/components/composer/composer.js#L990
96+ //InsertAt... not supported in plain text compose mode
97+ window . prompt ( this . props . plainTextShareLink , OCSResponse . url ) ;
98+ }
8999 }
90100 else {
91101 // Blob and File are defined per window; We need compatibility with the parent Blob for attachments
Original file line number Diff line number Diff line change 1818 "attachInline" : " Attach inline" ,
1919 "attachAsLink" : " Attach as link" ,
2020 "shareLinkPassword" : " Password for shared link" ,
21- "expirationDate" : " Expiration date for shared link"
22- }
21+ "expirationDate" : " Expiration date for shared link" ,
22+ "plainTextShareLink" :" Copy and paste the share link to your email"
23+ }
2324}
2425
You can’t perform that action at this time.
0 commit comments