Skip to content

Commit 29a403f

Browse files
committed
Use web_archive type
We don't want to try to render zip files as web archives, so we're introducing a brand new type.
1 parent 6fb04d8 commit 29a403f

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

constants/master_en.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,9 @@
739739
"mkv": "A Matroska Multimedia Container file",
740740
"mpg": "A MPEG-2 File",
741741
"mpeg": "A MPEG-2 File"
742+
},
743+
"web_archive": {
744+
"wacz": "Web Archive"
742745
}
743746
},
744747
"folder": {
@@ -832,7 +835,8 @@
832835
"reference": "Reference",
833836
"spreadsheet": "spreadsheet",
834837
"unknown": "unknown",
835-
"video": "video"
838+
"video": "video",
839+
"web_archive": "web archive"
836840
},
837841
"report": {
838842
"cloud_file_missing": "Went to get a cloud file that should have been there",

src/app/file-browser/components/file-viewer/file-viewer.component.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@
3838
!isDocument &&
3939
!isVideo &&
4040
!isAudio &&
41-
!isArchive
41+
!isArchive &&
42+
!isWebArchive
4243
"
4344
></pr-zooming-image-viewer>
4445
<replay-web-page source="{{currentRecord?.files?.[0]?.downloadUrl}}"
4546
replayBase="/assets/replay/"
46-
*ngIf="isArchive">
47+
*ngIf="isWebArchive">
4748
</replay-web-page>
4849
<pr-thumbnail
4950
[item]="currentRecord"
@@ -53,7 +54,8 @@
5354
!isDocument &&
5455
!isVideo &&
5556
!isAudio &&
56-
!isArchive
57+
!isArchive &&
58+
!isWebArchive
5759
"
5860
></pr-thumbnail>
5961
<pr-video [item]="currentRecord" *ngIf="isVideo"></pr-video>

src/app/file-browser/components/file-viewer/file-viewer.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class FileViewerComponent implements OnInit, OnDestroy {
4949
public isVideo = false;
5050
public isAudio = false;
5151
public isDocument = false;
52-
public isArchive = false;
52+
public isWebArchive = false;
5353
public showThumbnail = true;
5454
public isPublicArchive: boolean = false;
5555
public allowDownloads: boolean = false;
@@ -225,7 +225,7 @@ export class FileViewerComponent implements OnInit, OnDestroy {
225225
this.isDocument = this.currentRecord.FileVOs?.some(
226226
(obj) => obj.type.includes('pdf') || obj.type.includes('txt'),
227227
);
228-
this.isArchive = this.currentRecord.type.includes('archive');
228+
this.isWebArchive = this.currentRecord.type.includes('web_archive');
229229
this.documentUrl = this.getDocumentUrl();
230230
this.setCurrentTags();
231231
}

src/app/models/vo-types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ export type RecordType =
4747
| 'type.record.reference'
4848
| 'type.record.spreadsheet'
4949
| 'type.record.unknown'
50-
| 'type.record.video';
50+
| 'type.record.video'
51+
| 'type.record.web_archive';
5152

5253
export type GenericStatus =
5354
| 'status.generic.declined'

0 commit comments

Comments
 (0)