diff --git a/public/res/svg/ratatoskr-favicon-highlight.svg b/public/res/svg/ratatoskr-favicon-highlight.svg
new file mode 100644
index 00000000..f9a95e82
--- /dev/null
+++ b/public/res/svg/ratatoskr-favicon-highlight.svg
@@ -0,0 +1 @@
+
diff --git a/public/res/svg/ratatoskr-favicon-unread.svg b/public/res/svg/ratatoskr-favicon-unread.svg
new file mode 100644
index 00000000..f5bcb7d8
--- /dev/null
+++ b/public/res/svg/ratatoskr-favicon-unread.svg
@@ -0,0 +1 @@
+
diff --git a/public/res/svg/ratatoskr-favicon.svg b/public/res/svg/ratatoskr-favicon.svg
new file mode 100644
index 00000000..0c7cc393
--- /dev/null
+++ b/public/res/svg/ratatoskr-favicon.svg
@@ -0,0 +1 @@
+
diff --git a/public/res/svg/ratatoskr-highlight.svg b/public/res/svg/ratatoskr-highlight.svg
deleted file mode 100644
index 661442d4..00000000
--- a/public/res/svg/ratatoskr-highlight.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-
diff --git a/public/res/svg/ratatoskr-unread.svg b/public/res/svg/ratatoskr-unread.svg
deleted file mode 100644
index 69a08c95..00000000
--- a/public/res/svg/ratatoskr-unread.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-
diff --git a/src/app/features/scene/skyPlate.css.ts b/src/app/features/scene/skyPlate.css.ts
index c231527c..ebd117fd 100644
--- a/src/app/features/scene/skyPlate.css.ts
+++ b/src/app/features/scene/skyPlate.css.ts
@@ -39,6 +39,7 @@ globalStyle(within(scene), {
// Blur with a light tint toward the sky, like the chat bubbles; never an opaque slab (PLATE_TINT).
backgroundColor: [fill, `color-mix(in srgb, ${fill} ${PLATE_TINT * 100}%, transparent)`],
backdropFilter: 'blur(12px)',
+ WebkitBackdropFilter: 'blur(12px)',
color: text,
// Themed ink was chosen for the clear shell; inside the plate every token reads the plate's.
vars: {
diff --git a/src/app/pages/auth/styles.css.ts b/src/app/pages/auth/styles.css.ts
index 56ee090f..5b6b6588 100644
--- a/src/app/pages/auth/styles.css.ts
+++ b/src/app/pages/auth/styles.css.ts
@@ -80,6 +80,7 @@ globalStyle(`${scene} ${AuthCard}`, {
`color-mix(in srgb, var(--sky-bubble, #0d1a26) ${PLATE_TINT * 100}%, transparent)`,
],
backdropFilter: 'blur(12px)',
+ WebkitBackdropFilter: 'blur(12px)',
color: 'var(--sky-bubble-text, #b7c7d9)',
borderRadius: config.radii.R500,
border: 'none',
@@ -96,6 +97,7 @@ globalStyle(`${scene} ${AuthHeader}`, {
globalStyle(`${scene} #root header.${AuthHeader}`, {
backgroundColor: 'transparent',
backdropFilter: 'none',
+ WebkitBackdropFilter: 'none',
});
globalStyle(`${scene} ${AuthCardContent}`, {
paddingTop: config.space.S500,
@@ -117,6 +119,7 @@ globalStyle(`${scene} ${AuthFooter}`, {
paddingBottom: config.space.S500,
backgroundColor: ['var(--sky-bubble, #0d1a26)', tint],
backdropFilter: 'blur(12px)',
+ WebkitBackdropFilter: 'blur(12px)',
maskImage: `${FADE_Y}, ${FADE_X}`,
maskComposite: 'intersect',
color: 'var(--sky-bubble-text, #b7c7d9)',
diff --git a/src/app/pages/client/ClientNonUIFeatures.tsx b/src/app/pages/client/ClientNonUIFeatures.tsx
index db3eefc2..62385769 100644
--- a/src/app/pages/client/ClientNonUIFeatures.tsx
+++ b/src/app/pages/client/ClientNonUIFeatures.tsx
@@ -3,9 +3,9 @@ import React, { ReactNode, useCallback, useEffect, useRef } from 'react';
import { useNavigate } from 'react-router-dom';
import { RoomEvent, RoomEventHandlerMap } from 'matrix-js-sdk';
import { roomToUnreadAtom, unreadEqual, unreadInfoToUnread } from '../../state/room/roomToUnread';
-import LogoSVG from '../../../../public/res/svg/ratatoskr.svg';
-import LogoUnreadSVG from '../../../../public/res/svg/ratatoskr-unread.svg';
-import LogoHighlightSVG from '../../../../public/res/svg/ratatoskr-highlight.svg';
+import FaviconSVG from '../../../../public/res/svg/ratatoskr-favicon.svg';
+import FaviconUnreadSVG from '../../../../public/res/svg/ratatoskr-favicon-unread.svg';
+import FaviconHighlightSVG from '../../../../public/res/svg/ratatoskr-favicon-highlight.svg';
import NotificationSound from '../../../../public/sound/notification.ogg';
import InviteSound from '../../../../public/sound/invite.ogg';
import { notificationPermission, setFavicon } from '../../utils/dom';
@@ -67,9 +67,9 @@ function FaviconUpdater() {
});
if (notification) {
- setFavicon(highlight ? LogoHighlightSVG : LogoUnreadSVG);
+ setFavicon(highlight ? FaviconHighlightSVG : FaviconUnreadSVG);
} else {
- setFavicon(LogoSVG);
+ setFavicon(FaviconSVG);
}
}, [roomToUnread]);
@@ -89,8 +89,8 @@ function InviteNotifications() {
const notify = useCallback(
(count: number) => {
const noti = new window.Notification('Invitation', {
- icon: LogoSVG,
- badge: LogoSVG,
+ icon: FaviconSVG,
+ badge: FaviconSVG,
body: `You have ${count} new invitation request.`,
silent: true,
});
diff --git a/src/app/state/settings.ts b/src/app/state/settings.ts
index 9ca2496f..b5165929 100644
--- a/src/app/state/settings.ts
+++ b/src/app/state/settings.ts
@@ -87,7 +87,7 @@ const defaultSettings: Settings = {
encUrlPreview: false,
showHiddenEvents: false,
legacyUsernameColor: false,
- poseBubbles: false,
+ poseBubbles: true,
showNotifications: true,
isNotificationSounds: true,
diff --git a/src/index.tsx b/src/index.tsx
index c2461fe8..6c7a3bc2 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,4 +1,5 @@
/* eslint-disable import/first */
+import './polyfills';
import './preview-demo/seed';
import React from 'react';
import { createRoot } from 'react-dom/client';
diff --git a/src/polyfills.ts b/src/polyfills.ts
new file mode 100644
index 00000000..2f018c4b
--- /dev/null
+++ b/src/polyfills.ts
@@ -0,0 +1,72 @@
+/* eslint-disable no-extend-native, func-names */
+// Safari 14 (iPadOS 14) lacks these; the bundle (ours and matrix-js-sdk) calls them at runtime. Safari 15.4 has all.
+// Loaded first by src/index.tsx. Each is installed only when missing.
+
+function at(this: ArrayLike, n: number): T | undefined {
+ const len = this.length;
+ const i = Math.trunc(n) || 0;
+ const k = i < 0 ? len + i : i;
+ return k < 0 || k >= len ? undefined : this[k];
+}
+if (!Array.prototype.at) Object.defineProperty(Array.prototype, 'at', { value: at, writable: true, configurable: true });
+if (!String.prototype.at)
+ Object.defineProperty(String.prototype, 'at', { value: at, writable: true, configurable: true });
+
+if (!(Array.prototype as unknown as Record).findLast)
+ Object.defineProperty(Array.prototype, 'findLast', {
+ value: function (this: T[], fn: (v: T, i: number, a: T[]) => unknown, thisArg?: unknown) {
+ for (let i = this.length - 1; i >= 0; i -= 1) if (fn.call(thisArg, this[i], i, this)) return this[i];
+ return undefined;
+ },
+ writable: true,
+ configurable: true,
+ });
+if (!(Array.prototype as unknown as Record).findLastIndex)
+ Object.defineProperty(Array.prototype, 'findLastIndex', {
+ value: function (this: T[], fn: (v: T, i: number, a: T[]) => unknown, thisArg?: unknown) {
+ for (let i = this.length - 1; i >= 0; i -= 1) if (fn.call(thisArg, this[i], i, this)) return i;
+ return -1;
+ },
+ writable: true,
+ configurable: true,
+ });
+
+if (!(Object as unknown as Record).hasOwn)
+ Object.defineProperty(Object, 'hasOwn', {
+ value: (o: object, k: PropertyKey) => Object.prototype.hasOwnProperty.call(o, k),
+ writable: true,
+ configurable: true,
+ });
+
+// Structured clone for the data the client clones: plain objects, arrays, Map, Set, Date, RegExp, typed arrays, with cycles.
+if (typeof (globalThis as { structuredClone?: unknown }).structuredClone !== 'function') {
+ const clone = (v: unknown, seen: Map): unknown => {
+ if (v === null || typeof v !== 'object') return v;
+ if (seen.has(v)) return seen.get(v);
+ if (v instanceof Date) return new Date(v.getTime());
+ if (v instanceof RegExp) return new RegExp(v.source, v.flags);
+ if (ArrayBuffer.isView(v)) return (v as unknown as { slice: () => unknown }).slice();
+ if (v instanceof ArrayBuffer) return v.slice(0);
+ if (v instanceof Map) {
+ const m = new Map();
+ seen.set(v, m);
+ v.forEach((val, key) => m.set(clone(key, seen), clone(val, seen)));
+ return m;
+ }
+ if (v instanceof Set) {
+ const s = new Set();
+ seen.set(v, s);
+ v.forEach((val) => s.add(clone(val, seen)));
+ return s;
+ }
+ const out: Record | unknown[] = Array.isArray(v) ? [] : {};
+ seen.set(v, out);
+ Object.keys(v).forEach((k) => {
+ (out as Record)[k] = clone((v as Record)[k], seen);
+ });
+ return out;
+ };
+ (globalThis as { structuredClone?: unknown }).structuredClone = (v: unknown) => clone(v, new Map());
+}
+
+export {};