@@ -12,7 +12,7 @@ import { timer } from 'rxjs';
1212
1313import { NgClass } from '@angular/common' ;
1414import { ChangeDetectionStrategy , Component , computed , DestroyRef , effect , inject , input , signal } from '@angular/core' ;
15- import { takeUntilDestroyed } from '@angular/core/rxjs-interop' ;
15+ import { takeUntilDestroyed , toSignal } from '@angular/core/rxjs-interop' ;
1616import { FormsModule } from '@angular/forms' ;
1717import { ActivatedRoute , Router , RouterLink } from '@angular/router' ;
1818
@@ -29,7 +29,7 @@ import {
2929 MyResourcesSelectors ,
3030 RemoveResourceFromBookmarks ,
3131} from '@osf/shared/stores' ;
32- import { hasViewOnlyParam } from '@shared/helpers' ;
32+ import { hasViewOnlyParam , IS_SMALL } from '@shared/helpers' ;
3333
3434import { SocialsShareActionItem } from '../../models' ;
3535import { DuplicateDialogComponent } from '../duplicate-dialog/duplicate-dialog.component' ;
@@ -66,6 +66,7 @@ export class OverviewToolbarComponent {
6666 destroyRef = inject ( DestroyRef ) ;
6767 isPublic = signal ( false ) ;
6868 isBookmarked = signal ( false ) ;
69+ isMobile = toSignal ( inject ( IS_SMALL ) ) ;
6970
7071 isCollectionsRoute = input < boolean > ( false ) ;
7172 canEdit = input . required < boolean > ( ) ;
@@ -144,6 +145,7 @@ export class OverviewToolbarComponent {
144145 handleToggleProjectPublicity ( ) : void {
145146 const resource = this . currentResource ( ) ;
146147 if ( ! resource ) return ;
148+ const dialogWidth = this . isMobile ( ) ? '95vw' : '600px' ;
147149
148150 const isCurrentlyPublic = resource . isPublic ;
149151 const newPublicStatus = ! isCurrentlyPublic ;
@@ -154,7 +156,7 @@ export class OverviewToolbarComponent {
154156
155157 this . dialogService . open ( TogglePublicityDialogComponent , {
156158 focusOnShow : false ,
157- width : '40vw' ,
159+ width : dialogWidth ,
158160 header : this . translateService . instant (
159161 isCurrentlyPublic ? 'project.overview.dialog.makePrivate.header' : 'project.overview.dialog.makePublic.header'
160162 ) ,
0 commit comments