mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-24 11:01:17 -08:00
styles
This commit is contained in:
1 parent
3d0425d74c
commit
71b984c5e5
4 files changed
+12
-6
No files matched your search
@@ -68,6 +68,7 @@ describe('evaluateOutgoingRingbackFallback', () => {
|
||||
declinedRoomId: null,
|
||||
hasCallBeenActive: false,
|
||||
getRoom: () => ({ roomId: '!room:example.org' }) as never,
|
||||
isDirectRoom: () => true,
|
||||
getSessionDescription: () => EMPTY_SESSION,
|
||||
};
|
||||
|
||||
|
||||
@@ -619,6 +619,7 @@ export function HandleNotificationClick() {
|
||||
const setActiveSessionId = useSetAtom(activeSessionIdAtom);
|
||||
const setIncomingCall = useSetAtom(incomingCallAtom);
|
||||
const mutedRoomId = useAtomValue(mutedCallRoomIdAtom);
|
||||
const [incomingVoiceRoomCallSoundEnabled] = useSetting(settingsAtom, 'incomingVoiceRoomCallSoundEnabled');
|
||||
const mDirects = useAtomValue(mDirectAtom);
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -650,14 +651,14 @@ export function HandleNotificationClick() {
|
||||
data as Record<string, unknown>,
|
||||
mDirects.has(roomId)
|
||||
);
|
||||
if (incomingCall && !isIncomingCallSuppressed(incomingCall, mutedRoomId)) {
|
||||
if (incomingCall && !isIncomingCallSuppressed(incomingCall, mutedRoomId, incomingVoiceRoomCallSoundEnabled)) {
|
||||
setIncomingCall(incomingCall);
|
||||
}
|
||||
};
|
||||
|
||||
navigator.serviceWorker.addEventListener('message', handleMessage);
|
||||
return () => navigator.serviceWorker.removeEventListener('message', handleMessage);
|
||||
}, [mDirects, mutedRoomId, navigate, setActiveSessionId, setIncomingCall, setPending]);
|
||||
}, [mDirects, mutedRoomId, navigate, setActiveSessionId, setIncomingCall, setPending, incomingVoiceRoomCallSoundEnabled]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import { mDirectAtom } from '$state/mDirectList';
|
||||
import { incomingCallAtom, mutedCallRoomIdAtom } from '$state/callEmbed';
|
||||
import { resolveIncomingCallFromSearchParams } from '$features/call/callNotificationBridge';
|
||||
import { isIncomingCallSuppressed } from '$features/call/callIncomingIngress';
|
||||
import { settingsAtom } from '$state/settings';
|
||||
import { useSetting } from '$state/hooks/settings';
|
||||
|
||||
// ToRoomEvent handles /to/:user_id/:room_id/:event_id? — the canonical deep-link
|
||||
// URL used by the service worker's notificationclick handler.
|
||||
@@ -24,6 +26,7 @@ export function ToRoomEvent() {
|
||||
const [searchParams] = useSearchParams();
|
||||
const mDirects = useAtomValue(mDirectAtom);
|
||||
const mutedRoomId = useAtomValue(mutedCallRoomIdAtom);
|
||||
const [incomingVoiceRoomCallSoundEnabled] = useSetting(settingsAtom, 'incomingVoiceRoomCallSoundEnabled');
|
||||
const setActiveSessionId = useSetAtom(activeSessionIdAtom);
|
||||
const setPending = useSetAtom(pendingNotificationAtom);
|
||||
const setIncomingCall = useSetAtom(incomingCallAtom);
|
||||
@@ -41,7 +44,7 @@ export function ToRoomEvent() {
|
||||
eventId,
|
||||
mDirects.has(roomId)
|
||||
);
|
||||
if (incomingCall && !isIncomingCallSuppressed(incomingCall, mutedRoomId)) {
|
||||
if (incomingCall && !isIncomingCallSuppressed(incomingCall, mutedRoomId, incomingVoiceRoomCallSoundEnabled)) {
|
||||
setIncomingCall(incomingCall);
|
||||
}
|
||||
|
||||
@@ -57,6 +60,7 @@ export function ToRoomEvent() {
|
||||
setIncomingCall,
|
||||
setPending,
|
||||
userId,
|
||||
incomingVoiceRoomCallSoundEnabled,
|
||||
]);
|
||||
|
||||
return null;
|
||||
|
||||
@@ -437,9 +437,9 @@ export class CallEmbed {
|
||||
border-radius: ${resolveCssVar(config.radii.R400)} !important;
|
||||
}
|
||||
|
||||
/* Make the main room background mimic standard DM call appearance */
|
||||
[class*="_inRoom_"], body {
|
||||
background: ${resolveCssVar(color.Background.Container)} !important;
|
||||
/* Make the main room background transparent to inherit CallView's background */
|
||||
[class*="_inRoom_"] {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
/* Completely dismantle Element Call's grouping pills to match Sable's discrete buttons */
|
||||
|
||||
Reference in new issue
Block a user