@@ -5,7 +5,7 @@ import CACHE, {RunsFolder, RunsListCache} from "../cache/cache"
5
5
import { RunListItem , RunListItemModel } from '../models/run_list'
6
6
import { RunsListItemView } from '../components/runs_list_item'
7
7
import { SearchView } from '../components/search'
8
- import { CancelButton , CustomButton , DeleteButton , EditButton } from '../components/buttons'
8
+ import { CancelButton , DeleteButton , EditButton , IconButton } from '../components/buttons'
9
9
import { HamburgerMenuView } from '../components/hamburger_menu'
10
10
import EmptyRunsList from './empty_runs_list'
11
11
import { UserMessages } from '../components/user_messages'
@@ -24,7 +24,7 @@ class RunsListView extends ScreenView {
24
24
searchQuery : string
25
25
buttonContainer : HTMLDivElement
26
26
deleteButton : DeleteButton
27
- archiveButton : CustomButton
27
+ archiveButton : IconButton
28
28
editButton : EditButton
29
29
cancelButton : CancelButton
30
30
isEditMode : boolean
@@ -46,11 +46,10 @@ class RunsListView extends ScreenView {
46
46
this . deleteButton = new DeleteButton ( { onButtonClick : this . onDelete , parent : this . constructor . name } )
47
47
this . editButton = new EditButton ( { onButtonClick : this . onEdit , parent : this . constructor . name } )
48
48
this . cancelButton = new CancelButton ( { onButtonClick : this . onCancel , parent : this . constructor . name } )
49
- this . archiveButton = new CustomButton ( {
50
- text : this . folder == RunsFolder . DEFAULT ? 'Archive' : 'Unarchive' ,
49
+ this . archiveButton = new IconButton ( {
51
50
onButtonClick : this . onArchiveClick ,
52
51
parent : this . constructor . name
53
- } )
52
+ } , folder == RunsFolder . DEFAULT ? '.fas.fa-archive' : '.fas.fa-upload' )
54
53
55
54
this . userMessages = new UserMessages ( )
56
55
@@ -140,7 +139,8 @@ class RunsListView extends ScreenView {
140
139
this . deleteButton . hide ( noRuns || ! this . isEditMode )
141
140
this . cancelButton . hide ( noRuns || ! this . isEditMode )
142
141
this . editButton . hide ( noRuns || this . isEditMode )
143
- this . archiveButton . hide ( noRuns || ! this . isEditMode )
142
+ this . archiveButton . hide ( ( noRuns || ! this . isEditMode ) ||
143
+ ( this . folder != RunsFolder . DEFAULT && this . folder != RunsFolder . ARCHIVE ) )
144
144
145
145
if ( ! noRuns && ! this . isEditMode ) {
146
146
this . refresh . start ( )
0 commit comments