mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
fix
This commit is contained in:
@@ -75,7 +75,9 @@ function PinnedResources() {
|
||||
}
|
||||
const prefetchData = app.getPreFetchData();
|
||||
if (prefetchData && prefetchData.background) {
|
||||
navigator.setBackground(network.getResampledImageUrl(prefetchData.background));
|
||||
navigator.setBackground(
|
||||
network.getResampledImageUrl(prefetchData.background),
|
||||
);
|
||||
}
|
||||
if (prefetchData && prefetchData.pinned) {
|
||||
cachedPinnedResources = prefetchData.pinned;
|
||||
|
@@ -727,7 +727,12 @@ function FileTile({ file }: { file: RFile }) {
|
||||
{file.is_redirect ? t("Redirect") : fileSizeToString(file.size)}
|
||||
</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"} />
|
||||
Md5: {file.hash}
|
||||
</Badge>
|
||||
@@ -767,9 +772,29 @@ function FileTile({ file }: { file: RFile }) {
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-row-reverse xs:hidden p-2">
|
||||
<button className={"btn btn-primary btn-soft btn-sm"}>
|
||||
{file.size > 10 * 1024 * 1024 ? (
|
||||
<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>
|
||||
);
|
||||
|
Reference in New Issue
Block a user