File tree 3 files changed +16
-7
lines changed
components/RecentView/Views
3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -117,13 +117,13 @@ export function RecentViewList(props: Props) {
117
117
let elements : Elements = [ ] ;
118
118
if ( props . type === "blob" ) {
119
119
elements = response . data . blobs as BlobData [ ] ;
120
- }
121
- if ( props . type === "config" ) {
120
+ } else if ( props . type === "config" ) {
122
121
elements = response . data . configs as ConfigData [ ] ;
123
- }
124
- if ( props . type === "file" ) {
122
+ } else if ( props . type === "file" ) {
125
123
elements = response . data . files as ObjectData [ ] ;
126
- }
124
+ } else if ( props . type === "object" ) {
125
+ elements = response . data . objects as ObjectData [ ] ;
126
+ } else throw new Error ( "Unexpected object type" ) ;
127
127
listDispatch ( {
128
128
type : "pageLoaded" ,
129
129
elements,
Original file line number Diff line number Diff line change 9
9
ConfigData ,
10
10
ConfigListItem ,
11
11
Family ,
12
+ FileListItem ,
12
13
Group ,
13
14
KartonAnalysis ,
14
15
ObjectData ,
@@ -73,9 +74,10 @@ export type ApiKeyRemoveResponse = Response<null>;
73
74
export type GetObjectResponse = Response < ObjectOrConfigOrBlobData > ;
74
75
75
76
export type GetObjectListResponse = Response < {
76
- blobs ?: BlobListItem [ ] ;
77
- files ?: ObjectListItem [ ] ;
77
+ files ?: FileListItem [ ] ;
78
78
configs ?: ConfigListItem [ ] ;
79
+ blobs ?: BlobListItem [ ] ;
80
+ objects ?: ObjectListItem [ ] ;
79
81
} > ;
80
82
81
83
export type GetObjectCountResponse = Response < {
Original file line number Diff line number Diff line change @@ -141,6 +141,13 @@ export type BlobData = ObjectCommonData & {
141
141
} ;
142
142
143
143
export type ObjectListItem = {
144
+ id : string ;
145
+ tags : Tag [ ] ;
146
+ type : ObjectLegacyType ;
147
+ upload_time : string ;
148
+ } ;
149
+
150
+ export type FileListItem = {
144
151
file_name : string ;
145
152
file_size : number ;
146
153
file_type : string ;
You can’t perform that action at this time.
0 commit comments