diff --git a/app/src/components/Archive.js b/app/src/components/Archive.js
index 6895daef..5967da41 100644
--- a/app/src/components/Archive.js
+++ b/app/src/components/Archive.js
@@ -1,6 +1,9 @@
import React, {useContext, useState} from "react";
import {
- Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardMeta,
Confirm,
Container,
Image,
@@ -38,7 +41,7 @@ import Grid from "semantic-ui-react/dist/commonjs/collections/Grid";
import Dropdown from "semantic-ui-react/dist/commonjs/modules/Dropdown";
import _ from "lodash";
import {ThemeContext} from "../contexts/contexts";
-import {Button, CardIcon, Header, Loader, Placeholder, Segment, Table} from "./Theme";
+import {Button, Card, CardIcon, Header, Loader, Placeholder, Segment, Table} from "./Theme";
function ArchivePage() {
const [deleteOpen, setDeleteOpen] = useState(false);
@@ -185,37 +188,37 @@ export function ArchiveCard({file}) {
const domainUrl = `/archive?domain=${domain}`;
return (
-
+
{screenshot}
-
-
+
+
{textEllipsis(archive.title || archive.url, 100)}
-
+
{domain &&
{domain}
}
-
+
{uploadDate(archive.archive_datetime)}
-
-
+
+
-
-
+
+
)
}
diff --git a/app/src/components/Common.js b/app/src/components/Common.js
index ca2c23a2..9c16fe7e 100644
--- a/app/src/components/Common.js
+++ b/app/src/components/Common.js
@@ -345,12 +345,12 @@ export function SearchInput({
return
}
@@ -745,3 +745,21 @@ export const BackButton = () => {
const navigate = useNavigate();
return
}
diff --git a/app/src/components/Theme.js b/app/src/components/Theme.js
index 671aaf5e..85e22480 100644
--- a/app/src/components/Theme.js
+++ b/app/src/components/Theme.js
@@ -3,6 +3,7 @@ import {ThemeContext} from "../contexts/contexts";
import {
Accordion as ACCORDION,
Button as BUTTON,
+ Card as CARD,
Form as FORM,
FormField as FORM_FIELD,
FormGroup as FORM_GROUP,
@@ -22,7 +23,7 @@ import {
TabPane as TAB_PANE,
TextArea as TEXTAREA
} from "semantic-ui-react";
-import {isEmpty} from "./Common";
+import {isEmpty, ColorToSemanticHexColor} from "./Common";
export const darkTheme = 'dark';
export const lightTheme = 'light';
@@ -290,3 +291,13 @@ export function CardIcon(props) {
const {inverted} = useContext(ThemeContext);
return
}
+
+export function Card({color, ...props}) {
+ props['style'] = props['style'] || {};
+ let hexColor = ColorToSemanticHexColor(color);
+ if (hexColor) {
+ // Increase drop shadow to emphasize color.
+ props['style']['boxShadow'] = `0 0 0 2px #d4d4d5, 0 5px 0 0 ${hexColor}, 0 0px 3px 0 #d4d4d5`;
+ }
+ return
+}
diff --git a/app/src/components/Videos.js b/app/src/components/Videos.js
index 728395f3..77253d85 100644
--- a/app/src/components/Videos.js
+++ b/app/src/components/Videos.js
@@ -19,7 +19,9 @@ import {
} from "./Common"
import VideoPage from "./VideoPlayer";
import {
- Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
Confirm,
Container,
Dropdown,
@@ -35,7 +37,7 @@ import {useChannel, useQuery, useSearchVideos, useVideo, useVideoStatistics} fro
import {FilesView} from "./Files";
import Grid from "semantic-ui-react/dist/commonjs/collections/Grid";
import Icon from "semantic-ui-react/dist/commonjs/elements/Icon";
-import {Button, CardIcon, Header, Loader, Placeholder, Segment, Statistic, StatisticGroup} from "./Theme";
+import {Button, Card, CardIcon, Header, Loader, Placeholder, Segment, Statistic, StatisticGroup} from "./Theme";
import {deleteVideos} from "../api";
import {ThemeContext} from "../contexts/contexts";
@@ -323,27 +325,28 @@ export function VideoCard({file}) {
poster = ;
}
- return (
+ const color = mimetypeColor(file.mimetype);
+ return
{poster}
-
-
+
+
{textEllipsis(video.title || video.stem || video.video_path, 100)}
-
-
+
+
{channel &&
{channel.name}
}
{upload_date}
-
-
- )
+
+
+
}
export function VideoRowCells({file}) {