File tree Expand file tree Collapse file tree
project/overview/components/files-widget Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export class FilesTreeExplorerComponent {
7373 readonly storage = input . required < FileLabelModel | null > ( ) ;
7474
7575 readonly totalCount = input < number > ( 0 ) ;
76- readonly isLoading = input < boolean > ( ) ;
76+ readonly isLoading = input < boolean > ( false ) ;
7777 readonly resourceId = input . required < string > ( ) ;
7878 readonly resourceType = input < CurrentResourceType > ( CurrentResourceType . Projects ) ;
7979 readonly viewOnly = input < boolean > ( true ) ;
Original file line number Diff line number Diff line change @@ -184,14 +184,14 @@ export class MoveFileDialogComponent {
184184 tap ( ( ) => this . completeMove ( ) ) ,
185185 finalize ( ( ) => {
186186 this . config . header = this . translateService . instant ( 'files.dialogs.moveFile.title' ) ;
187+ this . isFilesUpdating . set ( false ) ;
187188 } ) ,
188189 takeUntilDestroyed ( this . destroyRef )
189190 )
190191 . subscribe ( ) ;
191192 }
192193
193194 private completeMove ( ) : void {
194- this . isFilesUpdating . set ( false ) ;
195195 this . actions . setCurrentFolder ( this . initialFolder ) ;
196196 this . actions . setMoveDialogCurrentFolder ( null ) ;
197197 this . dialogRef . close ( true ) ;
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ export class FileDetailComponent implements OnDestroy {
150150 selectedTab = FileDetailTab . Details ;
151151
152152 fileGuid = '' ;
153- fileVersion = '' ;
153+ fileVersion = signal ( '' ) ;
154154
155155 embedItems = [
156156 {
@@ -190,8 +190,8 @@ export class FileDetailComponent implements OnDestroy {
190190
191191 readonly headerTitle = computed ( ( ) => {
192192 const fileName = this . file ( ) ?. name ?? '' ;
193- if ( ! this . fileVersion ) return fileName ;
194- return `${ fileName } (${ this . translateService . instant ( 'project.wiki.version.title' ) } ${ this . fileVersion } )` ;
193+ if ( ! this . fileVersion ( ) ) return fileName ;
194+ return `${ fileName } (${ this . translateService . instant ( 'project.wiki.version.title' ) } ${ this . fileVersion ( ) } )` ;
195195 } ) ;
196196
197197 private readonly metaTagsData = computed ( ( ) => {
@@ -233,8 +233,8 @@ export class FileDetailComponent implements OnDestroy {
233233 }
234234
235235 onOpenRevision ( version : string ) : void {
236- if ( this . fileVersion !== version ) {
237- this . fileVersion = version ;
236+ if ( this . fileVersion ( ) !== version ) {
237+ this . fileVersion . set ( version ) ;
238238 this . getIframeLink ( version ) ;
239239 this . isIframeLoading = true ;
240240 }
Original file line number Diff line number Diff line change 1313 < p-select
1414 class ="w-full "
1515 inputId ="in_label "
16+ variant ="filled "
1617 [options] ="rootFoldersOptions() "
18+ [disabled] ="isButtonDisabled() "
1719 [(ngModel)] ="currentRootFolder "
1820 (onChange) ="handleRootFolderChange($event.value) "
19- variant ="filled "
2021 />
2122 }
2223 </ div >
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {
1818 PLATFORM_ID ,
1919 signal ,
2020} from '@angular/core' ;
21+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop' ;
2122import { Router } from '@angular/router' ;
2223
2324import { FileProvider } from '@osf/features/files/constants' ;
@@ -170,11 +171,14 @@ export class FilesWidgetComponent {
170171 return ;
171172 }
172173
173- this . filesService . getFileGuid ( file . id ) . subscribe ( ( file ) => {
174- if ( file . guid ) {
175- this . openFile ( file . guid ) ;
176- }
177- } ) ;
174+ this . filesService
175+ . getFileGuid ( file . id )
176+ . pipe ( takeUntilDestroyed ( this . destroyRef ) )
177+ . subscribe ( ( file ) => {
178+ if ( file . guid ) {
179+ this . openFile ( file . guid ) ;
180+ }
181+ } ) ;
178182 }
179183
180184 onLoadFiles ( event : FilePageLinkModel ) {
Original file line number Diff line number Diff line change 7272 }
7373 }
7474 }
75+
76+ .p-tree-loading-icon {
77+ color : var (--pr-blue-1 );
78+ }
7579 }
7680}
You can’t perform that action at this time.
0 commit comments