Skip to content

Commit 71ae7b3

Browse files
committed
Merge branch 'dev' into main
2 parents 46dc8a4 + 323321f commit 71ae7b3

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

client/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
async
4545
defer
4646
data-domain="buzzwords.gg"
47-
src="https://analytics.chuckdries.com/js/plausible.js"
47+
src="https://analytics.chuckdries.com/js/plausible.local.js"
4848
></script>
4949
</head>
5050
<body>

client/src/features/canvas/Wrap3d.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ const Wrap3d = ({ children }: { children: ReactNode }) => {
4646
setZoom(groupRef.current, width, height, boundingBox, camera);
4747
}
4848
}, 10);
49+
setTimeout(() => {
50+
if (groupRef.current) {
51+
setZoom(groupRef.current, width, height, boundingBox, camera);
52+
}
53+
}, 200);
4954
}
5055
}, [progress, width, height, groupRef, boundingBox, camera]);
5156
return (

client/src/features/settings/settingsActions.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ export const getColorSchemeSetting = () =>
2525
export const setColorSchemeSetting =
2626
(scheme: ColorScheme): AppThunk =>
2727
(dispatch) => {
28+
try {
29+
window.plausible?.("PickScheme", {
30+
props: { scheme },
31+
});
32+
} catch (e) {
33+
// do nothing
34+
}
2835
localStorage.setItem("colorScheme", scheme);
2936
dispatch(setColorScheme(scheme));
3037
};
@@ -35,6 +42,13 @@ export const getPreferredDarkThemeSetting = () =>
3542
export const setPreferredDarkThemeSetting =
3643
(preferredDarkTheme: ThemeNames): AppThunk =>
3744
(dispatch) => {
45+
try {
46+
window.plausible?.("PickDarkTheme", {
47+
props: { preferredDarkTheme },
48+
});
49+
} catch (e) {
50+
// do nothing
51+
}
3852
localStorage.setItem("preferredDarkTheme", preferredDarkTheme);
3953
dispatch(setPreferredDarkTheme(preferredDarkTheme));
4054
};

client/src/global.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
declare interface Window {
2+
plausible?: any;
3+
}

0 commit comments

Comments
 (0)