Implement membership notifications and deep-link handling for Electron desktop app (#246)
* security: add cors for desktop app scheme
* Revert "security: add cors for desktop app scheme"
This reverts commit d450fced75.
* ignore tags
* add commands for windows dev
* cleanup unnecessary parts of main desktop process
* resolve lint errors
* add format command for go
* fix: send email on new member joining
Closes #228
* add proper deeplinking on desktop
The desktop app was merely focusing before, but now it will navigate to the proper route
* honor email notifications setting
* prevent sending email when no recipients
This commit was merged in pull request #246.
This commit is contained in:
@@ -52,6 +52,19 @@ const App = () => {
|
||||
);
|
||||
};
|
||||
|
||||
function DeepLinkNavigationListener() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
window.electronDeepLink.getPending().then((path) => {
|
||||
if (path) navigate(path);
|
||||
});
|
||||
return window.electronDeepLink.onNavigate((path) => navigate(path));
|
||||
}, [navigate]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function AutoplayNavigationListener() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -68,6 +81,7 @@ function AuthenticatedApp() {
|
||||
return (
|
||||
<RouterShell>
|
||||
<AutoplayNavigationListener />
|
||||
<DeepLinkNavigationListener />
|
||||
<InAppAutoplayCard />
|
||||
<RouteErrorBoundary>
|
||||
<Routes>
|
||||
|
||||
Reference in New Issue
Block a user