mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
fix UI
This commit is contained in:
@@ -11,11 +11,19 @@ export default function showPopup(
|
|||||||
|
|
||||||
const div = document.createElement("div");
|
const div = document.createElement("div");
|
||||||
div.style.position = "fixed";
|
div.style.position = "fixed";
|
||||||
|
if (window.innerWidth > 400) {
|
||||||
if (eRect.x > window.innerWidth / 2) {
|
if (eRect.x > window.innerWidth / 2) {
|
||||||
div.style.right = `${window.innerWidth - eRect.x}px`;
|
div.style.right = `${window.innerWidth - eRect.x}px`;
|
||||||
} else {
|
} else {
|
||||||
div.style.left = `${eRect.x}px`;
|
div.style.left = `${eRect.x}px`;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (eRect.x > window.innerWidth / 2) {
|
||||||
|
div.style.right = `8px`;
|
||||||
|
} else {
|
||||||
|
div.style.left = `8px`;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (eRect.y > window.innerHeight / 2) {
|
if (eRect.y > window.innerHeight / 2) {
|
||||||
div.style.bottom = `${window.innerHeight - eRect.y}px`;
|
div.style.bottom = `${window.innerHeight - eRect.y}px`;
|
||||||
} else {
|
} else {
|
||||||
|
@@ -728,7 +728,7 @@ function FileTile({ file }: { file: RFile }) {
|
|||||||
{file.is_redirect ? t("Redirect") : fileSizeToString(file.size)}
|
{file.is_redirect ? t("Redirect") : fileSizeToString(file.size)}
|
||||||
</Badge>
|
</Badge>
|
||||||
{
|
{
|
||||||
<Badge
|
file.hash && <Badge
|
||||||
className={
|
className={
|
||||||
"badge-soft badge-accent text-xs mr-2 break-all hidden sm:inline-flex"
|
"badge-soft badge-accent text-xs mr-2 break-all hidden sm:inline-flex"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user