Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor Hybrid android #1320

Merged
merged 111 commits into from
Dec 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
2c04ca2
import frontend work from setup blazor web branch
hahn-kev Dec 4, 2024
5fbd11f
import fw lite desktop changes
hahn-kev Dec 4, 2024
0a1ea77
import fw lite shared blazor changes
hahn-kev Dec 4, 2024
0cfd98b
import local web app changes
hahn-kev Dec 4, 2024
1819b61
tweak type generation to support async and i async enumerable, as wel…
hahn-kev Dec 4, 2024
d657b1f
continue polishing type generation, pull out multi-string to allow a …
hahn-kev Dec 6, 2024
769dc7f
rewrite `fetchProjects` to `localProjects`, let js call dotnet method…
hahn-kev Dec 6, 2024
f7ec94e
develop a way to map services between js and dotnet
hahn-kev Dec 6, 2024
8863c59
expose more services and use them from HomeView.svelte
hahn-kev Dec 6, 2024
e7ef1ab
commit generated ts types
hahn-kev Dec 6, 2024
bfff2d4
Merge branch 'refs/heads/develop' into feat/blazor-hybrid
hahn-kev Dec 6, 2024
05f7c9f
add create project api and call from home page
hahn-kev Dec 6, 2024
22e9b14
fix server authority issues
hahn-kev Dec 6, 2024
89111d9
wire up js invokable miniLcm service for crdts and fwdata
hahn-kev Dec 6, 2024
bb818e6
create dotnet project view to solve late binding of api service, fix …
hahn-kev Dec 6, 2024
e89f690
remove reference which was breaking android build of FwLiteDesktop
hahn-kev Dec 6, 2024
664f92b
dont set TargetFramework in build props as that prevents projects fro…
hahn-kev Dec 6, 2024
e2b99a3
fix some broken stuff due to services not existing
hahn-kev Dec 6, 2024
1d5a9d6
fix android app icon missing issue
hahn-kev Dec 6, 2024
f1b73a6
remove usage of `toSorted` which is not supported on older android ph…
hahn-kev Dec 9, 2024
dcfebb8
allow invoking logout/login via js
hahn-kev Dec 9, 2024
9c81f76
remove unused constructor fields on entry component change
hahn-kev Dec 9, 2024
bdba9d7
populate datacache when injecting a crdt project to the active scope
hahn-kev Dec 9, 2024
7f8ecf2
configure oauth client to support protocol handler on android to allo…
hahn-kev Dec 9, 2024
dc14a6e
fix port forwarding for staging
hahn-kev Dec 9, 2024
3fb2c1d
Merge branch 'refs/heads/develop' into feat/blazor-hybrid
hahn-kev Dec 13, 2024
6eb33aa
refactor some service setup after merge
hahn-kev Dec 13, 2024
bc080cb
refactor IsPackagedApp into IsPortableApp
hahn-kev Dec 13, 2024
34c2552
refactor FwLiteProvider to use constant for js function name and simp…
hahn-kev Dec 13, 2024
0973774
change svelte app binding to look for `id="svelte-app"` instead of ju…
hahn-kev Dec 13, 2024
db8e929
fix compile issues and dependency missmatch
hahn-kev Dec 13, 2024
07ff5de
prevent svelte from catching navigation to allow blazor to handle it,…
hahn-kev Dec 13, 2024
7c21439
setup watch builder build task
hahn-kev Dec 13, 2024
e98faaf
fix issue with rollup not resolving $lib
hahn-kev Dec 16, 2024
f31f371
configure linq2db to use the Microsoft SQLite library instead of syst…
hahn-kev Dec 16, 2024
5ee022d
prevent throwing errors when sending change notifications fails after…
hahn-kev Dec 16, 2024
0b3b21f
ensure hosted services run at startup as expected
hahn-kev Dec 16, 2024
bcca0d6
return the project when setting active project context
hahn-kev Dec 16, 2024
9ad5e32
!fixup ensure hosted services run at startup as expected
hahn-kev Dec 16, 2024
5a3722e
make all methods return async in generated ts code, support ValueTask
hahn-kev Dec 16, 2024
fca878b
update generated types
hahn-kev Dec 16, 2024
465f98e
connect js event bus to C# ChangeEventBus
hahn-kev Dec 16, 2024
94fd1bd
remove ProjectContext.cs and use stateful CurrentProjectService.cs in…
hahn-kev Dec 16, 2024
353d78a
correct nrt error
hahn-kev Dec 17, 2024
bb6a3f8
update swashbuckle version to fix build error
hahn-kev Dec 17, 2024
8a4b354
ignore csproj.user files
hahn-kev Dec 17, 2024
e6af4e4
remove unused layout files
hahn-kev Dec 17, 2024
bb94fa3
dispose of the module properly when the SvelteLayout is disposed of
hahn-kev Dec 17, 2024
33aa391
change crdt project pages to use OwningComponentBase which ensures th…
hahn-kev Dec 17, 2024
8dfe1ba
pass in jsRuntime as a parameter to FwLiteProvider rather than inject…
hahn-kev Dec 17, 2024
4335e05
make login buttons reactive
hahn-kev Dec 17, 2024
674a3ac
remove unused components
hahn-kev Dec 17, 2024
67dd28a
create an async disposing OwningComponentBase and use it for project …
hahn-kev Dec 17, 2024
4e3ce27
fix app header under status bar issue on android, ensure that status …
hahn-kev Dec 17, 2024
a2a73d4
use hsl color space rather than oklch to support older browsers on ol…
hahn-kev Dec 17, 2024
807e7f1
remove unused generated types
hahn-kev Dec 17, 2024
a8b6c3a
ensure that a specific target framework is set.
hahn-kev Dec 17, 2024
75e80ed
!fixup remove unused generated types
hahn-kev Dec 17, 2024
57b1c8b
configure `fw-lite:maui-desktop` task to run build-viewer-app
hahn-kev Dec 17, 2024
4288963
remove deleted generated file from index
hahn-kev Dec 17, 2024
1501ab8
update caniuse-lite
hahn-kev Dec 17, 2024
c2f8a14
specify condition for windows related properties
hahn-kev Dec 17, 2024
52f3514
refactor FwDataProjectContext.cs to be scoped and not a singleton
hahn-kev Dec 18, 2024
681ee30
make miniLcm disposable
hahn-kev Dec 18, 2024
522912e
refactor FieldWorksProjectList.cs and CrdtProjectsService.cs into a c…
hahn-kev Dec 18, 2024
f1999b8
refactor project import to make it optional. if import is called at r…
hahn-kev Dec 18, 2024
4001121
refactor FwShared to not depend on FwDataBridge, put that dependency …
hahn-kev Dec 18, 2024
46abe33
fix circular dependency between FieldWorksProjectList and FwDataFactory
hahn-kev Dec 18, 2024
050768c
ensure lcm service is cleared when going home
hahn-kev Dec 18, 2024
32f7085
update typegen
hahn-kev Dec 18, 2024
c845a13
only enable fwdata bridge when building for windows
hahn-kev Dec 18, 2024
3c3a487
use supportsFwData to determine if we show the fieldworks column
hahn-kev Dec 18, 2024
bf4b63a
introduce DurableInvoke helper which uses a method defined on window …
hahn-kev Dec 18, 2024
0a6ec60
always export methods as promises when converting from c# to TS
hahn-kev Dec 18, 2024
599e6b5
Replace remaining oklch colors
myieye Dec 18, 2024
1f526af
Add global error handling and tidy up error notifications
myieye Dec 18, 2024
a47095e
Explicitly empty viewer app out dir to prevent unexpected residue
myieye Dec 18, 2024
17a7bed
Add finally blocks to home view actions
myieye Dec 18, 2024
2df2aff
fix compile error in test
hahn-kev Dec 19, 2024
a5f1aa1
don't always copy Mercurial stuff
hahn-kev Dec 19, 2024
21fc21f
mark tests as slow
hahn-kev Dec 19, 2024
aa5067c
keep `CurrentProjectService` scoped when running tests
hahn-kev Dec 19, 2024
68e5f37
Merge branch 'develop' into feat/blazor-hybrid
hahn-kev Dec 19, 2024
382cbd4
fix frontend build issue because viewer output file was renamed
hahn-kev Dec 19, 2024
f4149cb
migrate away from types in viewer/lib/mini-lcm and use generated dotn…
hahn-kev Dec 19, 2024
c147442
make ProjectView about optional
hahn-kev Dec 19, 2024
a6cf3a7
resolve import errors when importing code to the frontend from the vi…
hahn-kev Dec 19, 2024
8bb8cba
change fw-lite build to use ubunut-latest on main build
hahn-kev Dec 19, 2024
9c454c3
build android
hahn-kev Dec 19, 2024
653975f
build maui on windows
hahn-kev Dec 19, 2024
0705281
fix eslint errors
hahn-kev Dec 19, 2024
c6d8fb9
specify os when building for android
hahn-kev Dec 19, 2024
7422da2
don't import Dotnet service in viewer because it breaks the build
hahn-kev Dec 19, 2024
7510dcb
make release depend on the publish-android job
hahn-kev Dec 19, 2024
a094d13
build android on mac, run tests on ubuntu, fix windows build
hahn-kev Dec 19, 2024
db1db88
remove setup maui from initial build since it doesn't work on linux
hahn-kev Dec 19, 2024
a099ff7
use windows for tests since linux doesn't seem to like the slnf file
hahn-kev Dec 19, 2024
81b42b9
install maui instead of maui-android
hahn-kev Dec 19, 2024
7bbfe75
fix os condition
hahn-kev Dec 19, 2024
8507512
Add Vs code tasks for FwLiteDesktop and android task
myieye Dec 19, 2024
44d2e47
avoid trimming SqliteConnection ClearAllPools
hahn-kev Dec 20, 2024
aba7a2c
publish single file when making portable windows builds
hahn-kev Dec 20, 2024
393eb6b
only use MsalCacheHelper on desktop platforms
hahn-kev Dec 20, 2024
21099b1
activate the desktop window once login is successful
hahn-kev Dec 20, 2024
62e07a2
Try to dispose service provider on shutdown
myieye Dec 20, 2024
0b9bfde
Make some JS more readable
myieye Dec 20, 2024
f75690b
Add FwLiteShared to FwLiteOnly.slnf
myieye Dec 20, 2024
bf505cd
remove typegen tool
hahn-kev Dec 20, 2024
413f83f
markup route parameters as services
hahn-kev Dec 20, 2024
6b987b1
enable file logging again
hahn-kev Dec 20, 2024
4c55686
Move comment
myieye Dec 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
allow invoking logout/login via js
hahn-kev committed Dec 9, 2024
commit dcfebb856058b10e0173effc2e0284448ae4f443
2 changes: 2 additions & 0 deletions backend/FwLite/FwLiteShared/Auth/AuthService.cs
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ public async Task<ServerStatus[]> Servers()
}).ToArrayAsync();
}

[JSInvokable]
public async Task SignInWebView(LexboxServer server)
{
var result = await clientFactory.GetClient(server).SignIn(string.Empty);//does nothing here
@@ -34,6 +35,7 @@ public async Task<string> SignInWebApp(LexboxServer server, string returnUrl)
return result.AuthUri.ToString();
}

[JSInvokable]
public async Task Logout(LexboxServer server)
{
await clientFactory.GetClient(server).Logout();
4 changes: 2 additions & 2 deletions frontend/viewer/src/HomeView.svelte
Original file line number Diff line number Diff line change
@@ -232,9 +232,9 @@
<p class="mr-2 px-2 py-1 text-sm border rounded-full">{status.loggedInAs}</p>
{/if}
{#if status.loggedIn}
<Button variant="fill" color="primary" href="/api/auth/logout/{server.id}" icon={mdiLogout}>Logout</Button>
<Button variant="fill" color="primary" on:click={() => authService.logout(server)} icon={mdiLogout}>Logout</Button>
{:else}
<Button variant="fill-light" color="primary" href="/api/auth/login/{server.id}" icon={mdiLogin}>Login</Button>
<Button variant="fill-light" color="primary" on:click={() => authService.signInWebView(server)} icon={mdiLogin}>Login</Button>
{/if}
</div>
{@const serverProjects = remoteProjects[server.authority]?.filter(p => p.crdt) ?? []}