File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -86,10 +86,19 @@ async function handleNotebookSharing(
8686) {
8787 const notebookContent = notebookPanel . context . model . toJSON ( ) as INotebookContent ;
8888
89+ const isViewOnly = notebookContent . metadata ?. isSharedNotebook === true ;
8990 const sharedId = notebookContent . metadata ?. sharedId as string | undefined ;
9091 const defaultName = generateDefaultNotebookName ( ) ;
9192
9293 try {
94+ if ( isViewOnly ) {
95+ // Skip CKHub sync for view-only notebooks
96+ console . log ( 'View-only notebook: skipping CKHub sync and showing share URL.' ) ;
97+ if ( manual ) {
98+ await showShareDialog ( sharingService , notebookContent ) ;
99+ }
100+ return ;
101+ }
93102 if ( sharedId ) {
94103 console . log ( 'Updating notebook:' , sharedId ) ;
95104 await sharingService . update ( sharedId , notebookContent ) ;
You can’t perform that action at this time.
0 commit comments