Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions src/common/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -707,13 +707,7 @@ export interface components {
};
/** Desktop */
Desktop: {
/** @enum {string} */
desktop_type:
| 'Desktop'
| 'Gaming PC'
| 'Notebook'
| 'Tablet PC / Hybrid'
| 'Ultrabook';
desktop_type: string;
os: string;
os_version: string;
/** @enum {string} */
Expand Down Expand Up @@ -959,10 +953,10 @@ export interface components {
id: number;
name: string;
surname: string;
device:
| components['schemas']['Smartphone']
| components['schemas']['Tablet']
| components['schemas']['Desktop'];
device: {
/** @enum {string} */
type: 'smartphone' | 'tablet' | 'desktop' | 'other';
};
};
transcript?: components['schemas']['Transcript'];
};
Expand Down
11 changes: 4 additions & 7 deletions src/features/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1705,12 +1705,7 @@ export type Tablet = {
type: 'tablet';
};
export type Desktop = {
desktop_type:
| 'Desktop'
| 'Gaming PC'
| 'Notebook'
| 'Tablet PC / Hybrid'
| 'Ultrabook';
desktop_type: string;
os: string;
os_version: string;
type: 'desktop';
Expand Down Expand Up @@ -1901,7 +1896,9 @@ export type Video = {
id: number;
name: string;
surname: string;
device: Smartphone | Tablet | Desktop;
device: {
type: 'smartphone' | 'tablet' | 'desktop' | 'other';
};
};
transcript?: Transcript;
};
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,7 @@
"__VIDEOS_LIST_META_VIDEO_COUNT_one": "video uploaded",
"__VIDEOS_LIST_META_VIDEO_COUNT_many": "videos uploaded",
"__VIDEOS_LIST_META_VIDEO_COUNT_other": "videos uploaded",
"__VIDEOS_LIST_OTHER_TITLE": "Other",
"__VIDEOS_LIST_SMARTPHONE_TITLE": "Mobile",
"__VIDEOS_LIST_TABLET_TITLE": "Tablet",
"__VIDEOS_LIST_USECASE_INFO": "videos",
Expand Down
1 change: 1 addition & 0 deletions src/locales/it/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@
"__VIDEOS_LIST_META_VIDEO_COUNT_one": "video caricato",
"__VIDEOS_LIST_META_VIDEO_COUNT_many": "video caricati",
"__VIDEOS_LIST_META_VIDEO_COUNT_other": "video caricati",
"__VIDEOS_LIST_OTHER_TITLE": "Altro",
"__VIDEOS_LIST_SMARTPHONE_TITLE": "Mobile",
"__VIDEOS_LIST_TABLET_TITLE": "Tablet",
"__VIDEOS_LIST_USECASE_INFO": "video totali",
Expand Down
4 changes: 1 addition & 3 deletions src/pages/Video/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ const Actions = () => {
{video.tester.device && (
<Tag hue="white" style={{ textTransform: 'capitalize' }}>
<Tag.Avatar>{getDeviceIcon(video.tester.device.type)}</Tag.Avatar>
{video.tester.device.type === 'desktop'
? video.tester.device.desktop_type
: `${video.tester.device.manufacturer} ${video.tester.device.model}`}
{video.tester.device.type}
</Tag>
)}
{video.duration && (
Expand Down
6 changes: 6 additions & 0 deletions src/pages/Videos/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ const VideosPageContent = () => {
video={uc.videos.smartphone}
/>
)}
{!!uc.videos.other.length && (
<VideoContainer
title={t('__VIDEOS_LIST_OTHER_TITLE')}
video={uc.videos.other}
/>
)}
<AccordionFooter>
<CompletionTooltip
percentage={uc.usecase.completion}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Videos/useVideos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ enum DeviceTypeEnum {
smartphone = 'smartphone',
tablet = 'tablet',
desktop = 'desktop',
other = 'other',
}

type OrderedVideo = Record<DeviceTypeEnum, Video[]>;
Expand Down Expand Up @@ -39,6 +40,7 @@ export const useVideo = (cid: string) => {
smartphone: [],
tablet: [],
desktop: [],
other: [],
total: item.videos.length,
} as VideosWithTotal,
};
Expand Down