@@ -12,7 +12,7 @@ import { timer } from 'rxjs';
12
12
13
13
import { NgClass } from '@angular/common' ;
14
14
import { 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' ;
16
16
import { FormsModule } from '@angular/forms' ;
17
17
import { ActivatedRoute , Router , RouterLink } from '@angular/router' ;
18
18
@@ -29,7 +29,7 @@ import {
29
29
MyResourcesSelectors ,
30
30
RemoveResourceFromBookmarks ,
31
31
} from '@osf/shared/stores' ;
32
- import { hasViewOnlyParam } from '@shared/helpers' ;
32
+ import { hasViewOnlyParam , IS_SMALL } from '@shared/helpers' ;
33
33
34
34
import { SocialsShareActionItem } from '../../models' ;
35
35
import { DuplicateDialogComponent } from '../duplicate-dialog/duplicate-dialog.component' ;
@@ -66,6 +66,7 @@ export class OverviewToolbarComponent {
66
66
destroyRef = inject ( DestroyRef ) ;
67
67
isPublic = signal ( false ) ;
68
68
isBookmarked = signal ( false ) ;
69
+ isMobile = toSignal ( inject ( IS_SMALL ) ) ;
69
70
70
71
isCollectionsRoute = input < boolean > ( false ) ;
71
72
canEdit = input . required < boolean > ( ) ;
@@ -144,6 +145,7 @@ export class OverviewToolbarComponent {
144
145
handleToggleProjectPublicity ( ) : void {
145
146
const resource = this . currentResource ( ) ;
146
147
if ( ! resource ) return ;
148
+ const dialogWidth = this . isMobile ( ) ? '95vw' : '600px' ;
147
149
148
150
const isCurrentlyPublic = resource . isPublic ;
149
151
const newPublicStatus = ! isCurrentlyPublic ;
@@ -154,7 +156,7 @@ export class OverviewToolbarComponent {
154
156
155
157
this . dialogService . open ( TogglePublicityDialogComponent , {
156
158
focusOnShow : false ,
157
- width : '40vw' ,
159
+ width : dialogWidth ,
158
160
header : this . translateService . instant (
159
161
isCurrentlyPublic ? 'project.overview.dialog.makePrivate.header' : 'project.overview.dialog.makePublic.header'
160
162
) ,
0 commit comments