mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
fix
This commit is contained in:
@@ -75,7 +75,9 @@ function PinnedResources() {
|
|||||||
}
|
}
|
||||||
const prefetchData = app.getPreFetchData();
|
const prefetchData = app.getPreFetchData();
|
||||||
if (prefetchData && prefetchData.background) {
|
if (prefetchData && prefetchData.background) {
|
||||||
navigator.setBackground(network.getResampledImageUrl(prefetchData.background));
|
navigator.setBackground(
|
||||||
|
network.getResampledImageUrl(prefetchData.background),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (prefetchData && prefetchData.pinned) {
|
if (prefetchData && prefetchData.pinned) {
|
||||||
cachedPinnedResources = prefetchData.pinned;
|
cachedPinnedResources = prefetchData.pinned;
|
||||||
|
@@ -239,7 +239,7 @@ export default function ResourcePage() {
|
|||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
<CollectionDialog rid={resource.id} />
|
<CollectionDialog rid={resource.id} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -727,7 +727,12 @@ function FileTile({ file }: { file: RFile }) {
|
|||||||
{file.is_redirect ? t("Redirect") : fileSizeToString(file.size)}
|
{file.is_redirect ? t("Redirect") : fileSizeToString(file.size)}
|
||||||
</Badge>
|
</Badge>
|
||||||
{
|
{
|
||||||
file.hash && <Badge className={"badge-soft badge-accent text-xs mr-2 break-all hidden sm:inline-flex"} selectable={true}>
|
<Badge
|
||||||
|
className={
|
||||||
|
"badge-soft badge-accent text-xs mr-2 break-all hidden sm:inline-flex"
|
||||||
|
}
|
||||||
|
selectable={true}
|
||||||
|
>
|
||||||
<MdOutlineVerifiedUser size={16} className={"inline-block"} />
|
<MdOutlineVerifiedUser size={16} className={"inline-block"} />
|
||||||
Md5: {file.hash}
|
Md5: {file.hash}
|
||||||
</Badge>
|
</Badge>
|
||||||
@@ -767,9 +772,29 @@ function FileTile({ file }: { file: RFile }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-row-reverse xs:hidden p-2">
|
<div className="flex flex-row-reverse xs:hidden p-2">
|
||||||
<button className={"btn btn-primary btn-soft btn-sm"}>
|
{file.size > 10 * 1024 * 1024 ? (
|
||||||
<MdOutlineDownload size={20} />
|
<button
|
||||||
</button>
|
className={"btn btn-primary btn-soft btn-sm"}
|
||||||
|
onClick={() => {
|
||||||
|
if (!app.cloudflareTurnstileSiteKey) {
|
||||||
|
const link = network.getFileDownloadLink(file.id, "");
|
||||||
|
window.open(link, "_blank");
|
||||||
|
} else {
|
||||||
|
showPopup(<CloudflarePopup file={file} />, buttonRef.current!);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MdOutlineDownload size={20} />
|
||||||
|
</button>
|
||||||
|
) : (
|
||||||
|
<a
|
||||||
|
href={network.getFileDownloadLink(file.id, "")}
|
||||||
|
target="_blank"
|
||||||
|
className={"btn btn-primary btn-soft btn-sm"}
|
||||||
|
>
|
||||||
|
<MdOutlineDownload size={24} />
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user