This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use sessions to log in and out
- Loading branch information
1 parent
7214bbf
commit ea7ccdc
Showing
12 changed files
with
134 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class AuthedRouteArguments { | ||
const AuthedRouteArguments({ | ||
this.userName = null, | ||
this.isSession = false, | ||
}); | ||
|
||
final String? userName; | ||
final bool isSession; | ||
|
||
static AuthedRouteArguments? maybeOf(BuildContext context) { | ||
final route = ModalRoute.of(context); | ||
if (route == null) return null; | ||
if (route.settings.arguments == null) return null; | ||
return route.settings.arguments as AuthedRouteArguments; | ||
} | ||
|
||
static AuthedRouteArguments of(BuildContext context) { | ||
return maybeOf(context) ?? AuthedRouteArguments(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#pragma once | ||
|
||
#include "channels/auth.h" | ||
#include "channels/session.h" | ||
|
||
struct _GenesisShellApplication { | ||
GtkApplication parent_instance; | ||
char** dart_entrypoint_arguments; | ||
FlMethodChannel* outputs; | ||
FlMethodChannel* account; | ||
FlMethodChannel* auth; | ||
AuthChannel auth; | ||
SessionChannel session; | ||
GtkWindow* win; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Genesis Shell login management | ||
|
||
auth include login | ||
auth substack login | ||
account include login | ||
password substack login | ||
session include login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters