fix(mobile): anchor notifications popup to viewport right edge
This commit is contained in:
parent
de5130e31f
commit
2597835352
|
|
@ -1,8 +1,8 @@
|
||||||
const isLocalhost = self.location.hostname === "localhost" || self.location.hostname === "127.0.0.1";
|
const isLocalhost = self.location.hostname === "localhost" || self.location.hostname === "127.0.0.1";
|
||||||
|
|
||||||
if (!isLocalhost) {
|
if (!isLocalhost) {
|
||||||
const STATIC_CACHE = "construction-delivery-static-v103";
|
const STATIC_CACHE = "construction-delivery-static-v104";
|
||||||
const RUNTIME_CACHE = "construction-delivery-runtime-v103";
|
const RUNTIME_CACHE = "construction-delivery-runtime-v104";
|
||||||
const APP_SHELL_URLS = ["/", "/index.html", "/manifest.webmanifest", "/icons/icon-192.png", "/icons/icon-512.png"];
|
const APP_SHELL_URLS = ["/", "/index.html", "/manifest.webmanifest", "/icons/icon-192.png", "/icons/icon-512.png"];
|
||||||
|
|
||||||
self.addEventListener("install", (event) => {
|
self.addEventListener("install", (event) => {
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ export function NotificationBell({ notifications, unreadCount, onMarkAsRead, onM
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{isOpen && (
|
{isOpen && (
|
||||||
<div className="absolute right-0 top-full z-50 mt-2 w-80 sm:w-96">
|
<div className="fixed right-3 top-14 z-[100] mt-2 w-[calc(100vw-1.5rem)] max-w-96 sm:absolute sm:right-0 sm:top-full sm:mt-2 sm:w-96">
|
||||||
<Panel className="max-h-[480px] overflow-hidden p-0 shadow-xl">
|
<Panel className="max-h-[480px] overflow-hidden p-0 shadow-xl">
|
||||||
<div className="flex items-center justify-between border-b border-[var(--color-border)] px-4 py-3">
|
<div className="flex items-center justify-between border-b border-[var(--color-border)] px-4 py-3">
|
||||||
<h3 className="text-sm font-semibold">Уведомления</h3>
|
<h3 className="text-sm font-semibold">Уведомления</h3>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue