diff --git a/Gamenight.Ui/.gitignore b/Gamenight.Ui/.gitignore
new file mode 100644
index 0000000..48cc008
--- /dev/null
+++ b/Gamenight.Ui/.gitignore
@@ -0,0 +1,454 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# Tye
+.tye/
+
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
+
+##
+## Visual studio for Mac
+##
+
+
+# globs
+Makefile.in
+*.userprefs
+*.usertasks
+config.make
+config.status
+aclocal.m4
+install-sh
+autom4te.cache/
+*.tar.gz
+tarballs/
+test-results/
+
+# Mac bundle stuff
+*.dmg
+*.app
+
+# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
+# General
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
+# Windows thumbnail cache files
+Thumbs.db
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+[Dd]esktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+##
+## Visual Studio Code
+##
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
diff --git a/Gamenight.Ui/Directory.Packages.props b/Gamenight.Ui/Directory.Packages.props
new file mode 100644
index 0000000..76593db
--- /dev/null
+++ b/Gamenight.Ui/Directory.Packages.props
@@ -0,0 +1,23 @@
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/Gamenight.Ui.Android.csproj b/Gamenight.Ui/Gamenight.Ui.Android/Gamenight.Ui.Android.csproj
new file mode 100644
index 0000000..97a11f5
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Android/Gamenight.Ui.Android.csproj
@@ -0,0 +1,28 @@
+
+
+ Exe
+ net9.0-android
+ 21
+ enable
+ com.CompanyName.gamenight.ui
+ 1
+ 1.0
+ apk
+ false
+
+
+
+
+ Resources\drawable\Icon.png
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/Icon.png b/Gamenight.Ui/Gamenight.Ui.Android/Icon.png
new file mode 100644
index 0000000..3c39845
Binary files /dev/null and b/Gamenight.Ui/Gamenight.Ui.Android/Icon.png differ
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/MainActivity.cs b/Gamenight.Ui/Gamenight.Ui.Android/MainActivity.cs
new file mode 100644
index 0000000..52d15fc
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Android/MainActivity.cs
@@ -0,0 +1,21 @@
+using Android.App;
+using Android.Content.PM;
+using Avalonia;
+using Avalonia.Android;
+
+namespace gamenight.ui.Android;
+
+[Activity(
+ Label = "gamenight.ui.Android",
+ Theme = "@style/MyTheme.NoActionBar",
+ Icon = "@drawable/icon",
+ MainLauncher = true,
+ ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
+public class MainActivity : AvaloniaMainActivity
+{
+ protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
+ {
+ return base.CustomizeAppBuilder(builder)
+ .WithInterFont();
+ }
+}
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/Properties/AndroidManifest.xml b/Gamenight.Ui/Gamenight.Ui.Android/Properties/AndroidManifest.xml
new file mode 100644
index 0000000..1119df6
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Android/Properties/AndroidManifest.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/Resources/AboutResources.txt b/Gamenight.Ui/Gamenight.Ui.Android/Resources/AboutResources.txt
new file mode 100644
index 0000000..4cedede
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Android/Resources/AboutResources.txt
@@ -0,0 +1,44 @@
+Images, layout descriptions, binary blobs and string dictionaries can be included
+in your application as resource files. Various Android APIs are designed to
+operate on the resource IDs instead of dealing with images, strings or binary blobs
+directly.
+
+For example, a sample Android app that contains a user interface layout (main.axml),
+an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
+would keep its resources in the "Resources" directory of the application:
+
+Resources/
+ drawable/
+ icon.png
+
+ layout/
+ main.axml
+
+ values/
+ strings.xml
+
+In order to get the build system to recognize Android resources, set the build action to
+"AndroidResource". The native Android APIs do not operate directly with filenames, but
+instead operate on resource IDs. When you compile an Android application that uses resources,
+the build system will package the resources for distribution and generate a class called "R"
+(this is an Android convention) that contains the tokens for each one of the resources
+included. For example, for the above Resources layout, this is what the R class would expose:
+
+public class R {
+ public class drawable {
+ public const int icon = 0x123;
+ }
+
+ public class layout {
+ public const int main = 0x456;
+ }
+
+ public class strings {
+ public const int first_string = 0xabc;
+ public const int second_string = 0xbcd;
+ }
+}
+
+You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
+to reference the layout/main.axml file, or R.strings.first_string to reference the first
+string in the dictionary file values/strings.xml.
\ No newline at end of file
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/Resources/drawable-night-v31/avalonia_anim.xml b/Gamenight.Ui/Gamenight.Ui.Android/Resources/drawable-night-v31/avalonia_anim.xml
new file mode 100644
index 0000000..1fef3ac
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Android/Resources/drawable-night-v31/avalonia_anim.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/Resources/drawable-v31/avalonia_anim.xml b/Gamenight.Ui/Gamenight.Ui.Android/Resources/drawable-v31/avalonia_anim.xml
new file mode 100644
index 0000000..4784f80
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Android/Resources/drawable-v31/avalonia_anim.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/Resources/drawable/splash_screen.xml b/Gamenight.Ui/Gamenight.Ui.Android/Resources/drawable/splash_screen.xml
new file mode 100644
index 0000000..4cebfe2
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Android/Resources/drawable/splash_screen.xml
@@ -0,0 +1,13 @@
+
+
+
+ -
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/Resources/values-night/colors.xml b/Gamenight.Ui/Gamenight.Ui.Android/Resources/values-night/colors.xml
new file mode 100644
index 0000000..0f6f6c8
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Android/Resources/values-night/colors.xml
@@ -0,0 +1,4 @@
+
+
+ #212121
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/Resources/values-v31/styles.xml b/Gamenight.Ui/Gamenight.Ui.Android/Resources/values-v31/styles.xml
new file mode 100644
index 0000000..8075ffa
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Android/Resources/values-v31/styles.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/Resources/values/colors.xml b/Gamenight.Ui/Gamenight.Ui.Android/Resources/values/colors.xml
new file mode 100644
index 0000000..6fbae25
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Android/Resources/values/colors.xml
@@ -0,0 +1,4 @@
+
+
+ #FFFFFF
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Android/Resources/values/styles.xml b/Gamenight.Ui/Gamenight.Ui.Android/Resources/values/styles.xml
new file mode 100644
index 0000000..77ed2d7
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Android/Resources/values/styles.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Browser/Gamenight.Ui.Browser.csproj b/Gamenight.Ui/Gamenight.Ui.Browser/Gamenight.Ui.Browser.csproj
new file mode 100644
index 0000000..ad4048e
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Browser/Gamenight.Ui.Browser.csproj
@@ -0,0 +1,16 @@
+
+
+ net9.0-browser
+ Exe
+ true
+ enable
+
+
+
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Browser/Program.cs b/Gamenight.Ui/Gamenight.Ui.Browser/Program.cs
new file mode 100644
index 0000000..3d9c1ae
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Browser/Program.cs
@@ -0,0 +1,15 @@
+using System.Runtime.Versioning;
+using System.Threading.Tasks;
+using Avalonia;
+using Avalonia.Browser;
+using Gamenight.Ui;
+
+internal sealed partial class Program
+{
+ private static Task Main(string[] args) => BuildAvaloniaApp()
+ .WithInterFont()
+ .StartBrowserAppAsync("out");
+
+ public static AppBuilder BuildAvaloniaApp()
+ => AppBuilder.Configure();
+}
\ No newline at end of file
diff --git a/Gamenight.Ui/Gamenight.Ui.Browser/Properties/AssemblyInfo.cs b/Gamenight.Ui/Gamenight.Ui.Browser/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..99df742
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Browser/Properties/AssemblyInfo.cs
@@ -0,0 +1 @@
+[assembly:System.Runtime.Versioning.SupportedOSPlatform("browser")]
diff --git a/Gamenight.Ui/Gamenight.Ui.Browser/Properties/launchSettings.json b/Gamenight.Ui/Gamenight.Ui.Browser/Properties/launchSettings.json
new file mode 100644
index 0000000..243651e
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Browser/Properties/launchSettings.json
@@ -0,0 +1,13 @@
+{
+ "profiles": {
+ "Gamenight.Ui.Browser": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "https://localhost:7169;http://localhost:5235",
+ "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
+ }
+ }
+}
diff --git a/Gamenight.Ui/Gamenight.Ui.Browser/runtimeconfig.template.json b/Gamenight.Ui/Gamenight.Ui.Browser/runtimeconfig.template.json
new file mode 100644
index 0000000..92a0467
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Browser/runtimeconfig.template.json
@@ -0,0 +1,10 @@
+{
+ "wasmHostProperties": {
+ "perHostConfig": [
+ {
+ "name": "browser",
+ "host": "browser"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/app.css b/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/app.css
new file mode 100644
index 0000000..9b1f02b
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/app.css
@@ -0,0 +1,58 @@
+/* HTML styles for the splash screen */
+.avalonia-splash {
+ position: absolute;
+ height: 100%;
+ width: 100%;
+ background: white;
+ font-family: 'Outfit', sans-serif;
+ justify-content: center;
+ align-items: center;
+ display: flex;
+ pointer-events: none;
+}
+
+/* Light theme styles */
+@media (prefers-color-scheme: light) {
+ .avalonia-splash {
+ background: white;
+ }
+
+ .avalonia-splash h2 {
+ color: #1b2a4e;
+ }
+
+ .avalonia-splash a {
+ color: #0D6EFD;
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ .avalonia-splash {
+ background: #1b2a4e;
+ }
+
+ .avalonia-splash h2 {
+ color: white;
+ }
+
+ .avalonia-splash a {
+ color: white;
+ }
+}
+
+.avalonia-splash h2 {
+ font-weight: 400;
+ font-size: 1.5rem;
+}
+
+.avalonia-splash a {
+ text-decoration: none;
+ font-size: 2.5rem;
+ display: block;
+}
+
+.avalonia-splash.splash-close {
+ transition: opacity 200ms, display 200ms;
+ display: none;
+ opacity: 0;
+}
diff --git a/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/favicon.ico b/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/favicon.ico
new file mode 100644
index 0000000..f7da8bb
Binary files /dev/null and b/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/favicon.ico differ
diff --git a/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/index.html b/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/index.html
new file mode 100644
index 0000000..2311f69
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/index.html
@@ -0,0 +1,36 @@
+
+
+
+
+ gamenight.ui.Browser
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/main.js b/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/main.js
new file mode 100644
index 0000000..2402700
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Browser/wwwroot/main.js
@@ -0,0 +1,13 @@
+import { dotnet } from './_framework/dotnet.js'
+
+const is_browser = typeof window != "undefined";
+if (!is_browser) throw new Error(`Expected to be running in a browser`);
+
+const dotnetRuntime = await dotnet
+ .withDiagnosticTracing(false)
+ .withApplicationArgumentsFromQuery()
+ .create();
+
+const config = dotnetRuntime.getConfig();
+
+await dotnetRuntime.runMain(config.mainAssemblyName, [globalThis.location.href]);
diff --git a/Gamenight.Ui/Gamenight.Ui.Desktop/Gamenight.Ui.Desktop.csproj b/Gamenight.Ui/Gamenight.Ui.Desktop/Gamenight.Ui.Desktop.csproj
new file mode 100644
index 0000000..f358a47
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Desktop/Gamenight.Ui.Desktop.csproj
@@ -0,0 +1,26 @@
+
+
+ WinExe
+
+ net9.0
+ enable
+
+
+
+ app.manifest
+
+
+
+
+
+
+ None
+ All
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.Desktop/Program.cs b/Gamenight.Ui/Gamenight.Ui.Desktop/Program.cs
new file mode 100644
index 0000000..ea4a530
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Desktop/Program.cs
@@ -0,0 +1,21 @@
+using System;
+using Avalonia;
+
+namespace Gamenight.Ui.Desktop;
+
+sealed class Program
+{
+ // Initialization code. Don't use any Avalonia, third-party APIs or any
+ // SynchronizationContext-reliant code before AppMain is called: things aren't initialized
+ // yet and stuff might break.
+ [STAThread]
+ public static void Main(string[] args) => BuildAvaloniaApp()
+ .StartWithClassicDesktopLifetime(args);
+
+ // Avalonia configuration, don't remove; also used by visual designer.
+ public static AppBuilder BuildAvaloniaApp()
+ => AppBuilder.Configure()
+ .UsePlatformDetect()
+ .WithInterFont()
+ .LogToTrace();
+}
diff --git a/Gamenight.Ui/Gamenight.Ui.Desktop/app.manifest b/Gamenight.Ui/Gamenight.Ui.Desktop/app.manifest
new file mode 100644
index 0000000..a5bdecc
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.Desktop/app.manifest
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.iOS/AppDelegate.cs b/Gamenight.Ui/Gamenight.Ui.iOS/AppDelegate.cs
new file mode 100644
index 0000000..7ed3032
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.iOS/AppDelegate.cs
@@ -0,0 +1,23 @@
+using Foundation;
+using UIKit;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.iOS;
+using Avalonia.Media;
+
+namespace gamenight.ui.iOS;
+
+// The UIApplicationDelegate for the application. This class is responsible for launching the
+// User Interface of the application, as well as listening (and optionally responding) to
+// application events from iOS.
+[Register("AppDelegate")]
+#pragma warning disable CA1711 // Identifiers should not have incorrect suffix
+public partial class AppDelegate : AvaloniaAppDelegate
+#pragma warning restore CA1711 // Identifiers should not have incorrect suffix
+{
+ protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
+ {
+ return base.CustomizeAppBuilder(builder)
+ .WithInterFont();
+ }
+}
diff --git a/Gamenight.Ui/Gamenight.Ui.iOS/Entitlements.plist b/Gamenight.Ui/Gamenight.Ui.iOS/Entitlements.plist
new file mode 100644
index 0000000..c2cba09
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.iOS/Entitlements.plist
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.iOS/Gamenight.Ui.iOS.csproj b/Gamenight.Ui/Gamenight.Ui.iOS/Gamenight.Ui.iOS.csproj
new file mode 100644
index 0000000..ef5d0dc
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.iOS/Gamenight.Ui.iOS.csproj
@@ -0,0 +1,16 @@
+
+
+ Exe
+ net9.0-ios
+ 13.0
+ enable
+
+
+
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.iOS/Info.plist b/Gamenight.Ui/Gamenight.Ui.iOS/Info.plist
new file mode 100644
index 0000000..5232f56
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.iOS/Info.plist
@@ -0,0 +1,43 @@
+
+
+
+
+ CFBundleDisplayName
+ gamenight.ui
+ CFBundleIdentifier
+ companyName.gamenight.ui
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1.0
+ LSRequiresIPhoneOS
+
+ MinimumOSVersion
+ 13.0
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIRequiredDeviceCapabilities
+
+ armv7
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.iOS/Main.cs b/Gamenight.Ui/Gamenight.Ui.iOS/Main.cs
new file mode 100644
index 0000000..941b521
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.iOS/Main.cs
@@ -0,0 +1,14 @@
+using UIKit;
+
+namespace gamenight.ui.iOS;
+
+public class Application
+{
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, typeof(AppDelegate));
+ }
+}
diff --git a/Gamenight.Ui/Gamenight.Ui.iOS/Resources/LaunchScreen.xib b/Gamenight.Ui/Gamenight.Ui.iOS/Resources/LaunchScreen.xib
new file mode 100644
index 0000000..0be6773
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.iOS/Resources/LaunchScreen.xib
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui.sln b/Gamenight.Ui/Gamenight.Ui.sln
new file mode 100644
index 0000000..765635c
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui.sln
@@ -0,0 +1,54 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.3.32811.315
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gamenight.Ui", "Gamenight.Ui\Gamenight.Ui.csproj", "{EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gamenight.Ui.Desktop", "Gamenight.Ui.Desktop\Gamenight.Ui.Desktop.csproj", "{ABC31E74-02FF-46EB-B3B2-4E6AE43B456C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gamenight.Ui.Browser", "Gamenight.Ui.Browser\Gamenight.Ui.Browser.csproj", "{1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}"
+EndProject
+#Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gamenight.Ui.iOS", "Gamenight.Ui.iOS\Gamenight.Ui.iOS.csproj", "{EBD9022F-BC83-4846-9A11-6F7F3772DC64}"
+#EndProject
+#Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gamenight.Ui.Android", "Gamenight.Ui.Android\Gamenight.Ui.Android.csproj", "{7AD1DAC8-7FBE-49D5-8614-7321233DB82E}"
+#EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3DA99C4E-89E3-4049-9C22-0A7EC60D83D8}"
+ ProjectSection(SolutionItems) = preProject
+ Directory.Packages.props = Directory.Packages.props
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ABC31E74-02FF-46EB-B3B2-4E6AE43B456C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ABC31E74-02FF-46EB-B3B2-4E6AE43B456C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ABC31E74-02FF-46EB-B3B2-4E6AE43B456C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ABC31E74-02FF-46EB-B3B2-4E6AE43B456C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EBD9022F-BC83-4846-9A11-6F7F3772DC64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EBD9022F-BC83-4846-9A11-6F7F3772DC64}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EBD9022F-BC83-4846-9A11-6F7F3772DC64}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EBD9022F-BC83-4846-9A11-6F7F3772DC64}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7AD1DAC8-7FBE-49D5-8614-7321233DB82E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7AD1DAC8-7FBE-49D5-8614-7321233DB82E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7AD1DAC8-7FBE-49D5-8614-7321233DB82E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7AD1DAC8-7FBE-49D5-8614-7321233DB82E}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {83CB65B8-011F-4ED7-BCD3-A6CFA935EF7E}
+ EndGlobalSection
+EndGlobal
diff --git a/Gamenight.Ui/Gamenight.Ui/App.axaml b/Gamenight.Ui/Gamenight.Ui/App.axaml
new file mode 100644
index 0000000..1357414
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui/App.axaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Gamenight.Ui/Gamenight.Ui/App.axaml.cs b/Gamenight.Ui/Gamenight.Ui/App.axaml.cs
new file mode 100644
index 0000000..db55439
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui/App.axaml.cs
@@ -0,0 +1,86 @@
+using Avalonia;
+using Avalonia.Controls.ApplicationLifetimes;
+using Avalonia.Data.Core;
+using Avalonia.Data.Core.Plugins;
+using System.Linq;
+using Avalonia.Markup.Xaml;
+using Microsoft.Extensions.DependencyInjection;
+using System;
+using Refit;
+using System.Runtime.Serialization;
+using Gamenight.Ui.Services;
+using Gamenight.Ui.ViewModels;
+using Gamenight.Ui.Views;
+using MainView = Gamenight.Ui.Views.MainView;
+using MainViewModel = Gamenight.Ui.ViewModels.MainViewModel;
+using MainWindow = Gamenight.Ui.Views.MainWindow;
+
+namespace Gamenight.Ui;
+
+public partial class App : Application
+{
+ private IServiceProvider? ServiceProvider;
+
+ public override void Initialize()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+
+ public override void OnFrameworkInitializationCompleted()
+ {
+ // Register all the services needed for the application to run
+ var collection = new ServiceCollection();
+ var gamenightApi = RestService.For("https://localhost:8080",
+ new RefitSettings {
+ ContentSerializer = new NewtonsoftJsonContentSerializer()
+ }
+ );
+ collection.AddSingleton(gamenightApi);
+ collection.AddSingleton();
+ if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime)
+ {
+ collection.AddSingleton();
+ }
+ else if (ApplicationLifetime is ISingleViewApplicationLifetime)
+ {
+ collection.AddSingleton();
+ }
+
+ ServiceProvider = collection.BuildServiceProvider();
+
+ var mainViewModel = ServiceProvider.GetRequiredService();
+
+ if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+ {
+ // Avoid duplicate validations from both Avalonia and the CommunityToolkit.
+ // More info: https://docs.avaloniaui.net/docs/guides/development-guides/data-validation#manage-validationplugins
+ DisableAvaloniaDataAnnotationValidation();
+
+ var window = ServiceProvider.GetRequiredService();
+
+ window.DataContext = mainViewModel;
+ desktop.MainWindow = window;
+ }
+ else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform)
+ {
+ var mainView = ServiceProvider.GetRequiredService();
+ mainView.DataContext = mainViewModel;
+ singleViewPlatform.MainView = mainView;
+ }
+
+ base.OnFrameworkInitializationCompleted();
+ }
+
+ private void DisableAvaloniaDataAnnotationValidation()
+ {
+ // Get an array of plugins to remove
+ var dataValidationPluginsToRemove =
+ BindingPlugins.DataValidators.OfType().ToArray();
+
+ // remove each entry found
+ foreach (var plugin in dataValidationPluginsToRemove)
+ {
+ BindingPlugins.DataValidators.Remove(plugin);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Gamenight.Ui/Gamenight.Ui/Assets/avalonia-logo.ico b/Gamenight.Ui/Gamenight.Ui/Assets/avalonia-logo.ico
new file mode 100644
index 0000000..f7da8bb
Binary files /dev/null and b/Gamenight.Ui/Gamenight.Ui/Assets/avalonia-logo.ico differ
diff --git a/Gamenight.Ui/Gamenight.Ui/Gamenight.Ui.csproj b/Gamenight.Ui/Gamenight.Ui/Gamenight.Ui.csproj
new file mode 100644
index 0000000..c54ef2e
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui/Gamenight.Ui.csproj
@@ -0,0 +1,27 @@
+
+
+ net9.0
+ enable
+ latest
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+ None
+ All
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui/Services/IGamenight.cs b/Gamenight.Ui/Gamenight.Ui/Services/IGamenight.cs
new file mode 100644
index 0000000..f4a97bf
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui/Services/IGamenight.cs
@@ -0,0 +1,1082 @@
+//
+// This code was generated by Refitter.
+//
+
+
+using Refit;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+using System.Threading.Tasks;
+
+#nullable enable annotations
+
+namespace Gamenight.Ui.Services
+{
+ /// Gamenight
+ [System.CodeDom.Compiler.GeneratedCode("Refitter", "1.7.1.0")]
+ public partial interface IGamenightApi
+ {
+ /// Submit your credentials to get a JWT-token to use with the rest of the api.
+ /// Example response
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/token")]
+ Task TokenGet([Body] Login body);
+
+ /// Refresh your JWT-token without logging in again.
+ /// Example response
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ ///
+ ///
+ [Post("/token")]
+ Task TokenPost();
+
+ /// List of all Users
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 400
+ /// Example response
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/users")]
+ Task> Users();
+
+ /// Create a new user given a registration token and user information, username and email must be unique, and password and password_repeat must match.
+ /// A that completes when the request is finished.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Post("/user")]
+ Task UserPost([Body] Registration body);
+
+ /// Get a user from primary id
+ /// A user in the gamenight system
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 404
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/user")]
+ Task UserGet([Body] UserId body);
+
+ /// Get a all gamenights
+ /// Retrieve the list of gamenights on this gamenight server. Requires authorization.
+ /// Example response
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 400
+ /// Example response
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/gamenights")]
+ Task> Gamenights();
+
+ /// Get all participants for a gamenight
+ /// Retrieve the participants of a single gamenight by id.
+ /// Response with a list of participant uuids
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 400
+ /// Example response
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/participants")]
+ Task Participants([Body] GamenightId body);
+
+ /// Add a gamenight by providing a name and a date, only available when providing an JWT token.
+ /// A that completes when the request is finished.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Post("/gamenight")]
+ Task GamenightPost([Body] AddGamenightRequestBody body);
+
+ /// A gamenight being hosted
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/gamenight")]
+ Task GamenightGet([Body] GetGamenightRequestBody body);
+
+ /// A that completes when the request is finished.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Post("/join")]
+ Task Join([Body] GamenightId body);
+
+ /// A that completes when the request is finished.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Post("/leave")]
+ Task Leave([Body] GamenightId body);
+
+ /// A list of Games in this gamenight instance.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/games")]
+ Task> Games();
+
+ /// A game.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/game")]
+ Task GameGet([Body] GameId body);
+
+ /// a game id
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Post("/game")]
+ Task GamePost([Body] AddGameRequestBody body);
+
+ /// A that completes when the request is finished.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Delete("/game")]
+ Task GameDelete([Body] GameId body);
+
+ /// A that completes when the request is finished.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Post("/rename_game")]
+ Task RenameGame([Body] RenameGameRequestBody body);
+
+ /// A that completes when the request is finished.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Post("/own")]
+ Task Own([Body] OwnGameRequestBody body);
+
+ /// A that completes when the request is finished.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Post("/disown")]
+ Task Disown([Body] GameId body);
+
+ /// A list of game ids.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/owned_games")]
+ Task> OwnedGames([Body] UserId body);
+
+ /// A location
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/location")]
+ Task LocationGet([Body] LocationId body);
+
+ /// A location Id
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Post("/location")]
+ Task LocationPost([Body] AddLocationRequestBody body);
+
+ /// A list of all LocationsResponse
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/locations")]
+ Task> Locations();
+
+ /// A that completes when the request is finished.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Post("/location_authorize")]
+ Task LocationAuthorize([Body] AuthorizeLocationRequestBody body);
+
+ /// A list of user ids.
+ ///
+ /// Thrown when the request returns a non-success status code:
+ ///
+ ///
+ /// Status
+ /// Description
+ ///
+ /// -
+ /// 401
+ /// Example response
+ ///
+ /// -
+ /// 422
+ /// Example response
+ ///
+ ///
+ ///
+ [Get("/authorized_location_user_ids")]
+ Task> AuthorizedLocationUserIds([Body] LocationId body);
+
+
+ }
+
+}
+
+//----------------------
+//
+// Generated using the NSwag toolchain v14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
+//
+//----------------------
+
+#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended."
+#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword."
+#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?'
+#pragma warning disable 612 // Disable "CS0612 '...' is obsolete"
+#pragma warning disable 649 // Disable "CS0649 Field is never assigned to, and will always have its default value null"
+#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ...
+#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..."
+#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'"
+#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant"
+#pragma warning disable 8600 // Disable "CS8600 Converting null literal or possible null value to non-nullable type"
+#pragma warning disable 8602 // Disable "CS8602 Dereference of a possibly null reference"
+#pragma warning disable 8603 // Disable "CS8603 Possible null reference return"
+#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter"
+#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
+#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)."
+
+namespace Gamenight.Ui.Services
+{
+ using System = global::System;
+
+
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Gamenight
+ {
+
+ [JsonPropertyName("id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Id { get; set; }
+
+ [JsonPropertyName("name")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Name { get; set; }
+
+ [JsonPropertyName("location_id")]
+ public string LocationId { get; set; }
+
+ [JsonPropertyName("datetime")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Datetime { get; set; }
+
+ [JsonPropertyName("owner_id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string OwnerId { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Participants
+ {
+
+ [JsonPropertyName("participants")]
+ [System.ComponentModel.DataAnnotations.Required]
+ public ICollection Participants1 { get; set; } = new System.Collections.ObjectModel.Collection();
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ ///
+ /// Failure Reason
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Failure
+ {
+
+ [JsonPropertyName("message")]
+ public string Message { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Token
+ {
+
+ [JsonPropertyName("jwt_token")]
+ public string JwtToken { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Login
+ {
+
+ [JsonPropertyName("username")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Username { get; set; }
+
+ [JsonPropertyName("password")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Password { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Registration
+ {
+
+ [JsonPropertyName("username")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Username { get; set; }
+
+ [JsonPropertyName("email")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Email { get; set; }
+
+ [JsonPropertyName("password")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Password { get; set; }
+
+ [JsonPropertyName("password_repeat")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string PasswordRepeat { get; set; }
+
+ [JsonPropertyName("registration_token")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string RegistrationToken { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class UserId
+ {
+
+ [JsonPropertyName("user_id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string UserId1 { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class OwnedGame
+ {
+
+ [JsonPropertyName("game_id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string GameId { get; set; }
+
+ [JsonPropertyName("location_id")]
+ public string LocationId { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class LocationId
+ {
+
+ [JsonPropertyName("location_id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string LocationId1 { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class AddGamenightRequestBody
+ {
+
+ [JsonPropertyName("name")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Name { get; set; }
+
+ [JsonPropertyName("datetime")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Datetime { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class GamenightId
+ {
+
+ [JsonPropertyName("gamenight_id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string GamenightId1 { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class GameId
+ {
+
+ [JsonPropertyName("game_id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string GameId1 { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class GetGamenightRequestBody
+ {
+
+ [JsonPropertyName("id")]
+ public string Id { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class User
+ {
+
+ [JsonPropertyName("id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Id { get; set; }
+
+ [JsonPropertyName("username")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Username { get; set; }
+
+ [JsonPropertyName("email")]
+ public string Email { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Game
+ {
+
+ [JsonPropertyName("id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Id { get; set; }
+
+ [JsonPropertyName("name")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Name { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class AddGameRequestBody
+ {
+
+ [JsonPropertyName("name")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Name { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class RenameGameRequestBody
+ {
+
+ [JsonPropertyName("id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Id { get; set; }
+
+ [JsonPropertyName("name")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Name { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class OwnGameRequestBody
+ {
+
+ [JsonPropertyName("game_id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string GameId { get; set; }
+
+ [JsonPropertyName("location_id")]
+ public string LocationId { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class GameIdsResponse : System.Collections.ObjectModel.Collection
+ {
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class UserIdsResponse : System.Collections.ObjectModel.Collection
+ {
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class AddLocationRequestBody
+ {
+
+ [JsonPropertyName("name")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Name { get; set; }
+
+ [JsonPropertyName("address")]
+ public string Address { get; set; }
+
+ [JsonPropertyName("note")]
+ public string Note { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Location
+ {
+
+ [JsonPropertyName("id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Id { get; set; }
+
+ [JsonPropertyName("name")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string Name { get; set; }
+
+ [JsonPropertyName("address")]
+ public string Address { get; set; }
+
+ [JsonPropertyName("note")]
+ public string Note { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class AuthorizeLocationRequestBody
+ {
+
+ [JsonPropertyName("location_id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string LocationId { get; set; }
+
+ [JsonPropertyName("user_id")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ public string UserId { get; set; }
+
+ [JsonPropertyName("op")]
+ [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
+ [JsonConverter(typeof(JsonStringEnumConverter))]
+ public AuthorizeLocationRequestBodyOp Op { get; set; }
+
+ private IDictionary _additionalProperties;
+
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")]
+ public enum AuthorizeLocationRequestBodyOp
+ {
+
+ [System.Runtime.Serialization.EnumMember(Value = @"grant")]
+ Grant = 0,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"revoke")]
+ Revoke = 1,
+
+ }
+
+
+}
+
+#pragma warning restore 108
+#pragma warning restore 114
+#pragma warning restore 472
+#pragma warning restore 612
+#pragma warning restore 649
+#pragma warning restore 1573
+#pragma warning restore 1591
+#pragma warning restore 8073
+#pragma warning restore 3016
+#pragma warning restore 8600
+#pragma warning restore 8602
+#pragma warning restore 8603
+#pragma warning restore 8604
+#pragma warning restore 8625
+#pragma warning restore 8765
\ No newline at end of file
diff --git a/Gamenight.Ui/Gamenight.Ui/ViewLocator.cs b/Gamenight.Ui/Gamenight.Ui/ViewLocator.cs
new file mode 100644
index 0000000..2b79fb2
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui/ViewLocator.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using Avalonia.Controls;
+using Avalonia.Controls.Templates;
+using Gamenight.Ui.ViewModels;
+
+namespace Gamenight.Ui;
+
+///
+/// Given a view model, returns the corresponding view if possible.
+///
+[RequiresUnreferencedCode(
+ "Default implementation of ViewLocator involves reflection which may be trimmed away.",
+ Url = "https://docs.avaloniaui.net/docs/concepts/view-locator")]
+public class ViewLocator : IDataTemplate
+{
+ public Control? Build(object? param)
+ {
+ if (param is null)
+ return null;
+
+ var name = param.GetType().FullName!.Replace("ViewModel", "View", StringComparison.Ordinal);
+ var type = Type.GetType(name);
+
+ if (type != null)
+ {
+ return (Control)Activator.CreateInstance(type)!;
+ }
+
+ return new TextBlock { Text = "Not Found: " + name };
+ }
+
+ public bool Match(object? data)
+ {
+ return data is ViewModelBase;
+ }
+}
\ No newline at end of file
diff --git a/Gamenight.Ui/Gamenight.Ui/ViewModels/MainViewModel.cs b/Gamenight.Ui/Gamenight.Ui/ViewModels/MainViewModel.cs
new file mode 100644
index 0000000..a0f813d
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui/ViewModels/MainViewModel.cs
@@ -0,0 +1,28 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using Gamenight.Ui.Services;
+
+namespace Gamenight.Ui.ViewModels;
+
+public partial class MainViewModel : ViewModelBase
+{
+ [ObservableProperty]
+ private string _greeting = "Welcome to Avalonia!";
+
+ private IGamenightApi GamenightApi { get; }
+
+ public MainViewModel(IGamenightApi gamenightApi)
+ {
+ GamenightApi = gamenightApi;
+
+ Test();
+ }
+
+ public async void Test() {
+ var token = await GamenightApi.TokenGet(new Login() {
+ Username = "Admin",
+ Password = "Gamenight!"
+ });
+
+ System.Console.WriteLine($"Token: {token.JwtToken}");
+ }
+}
diff --git a/Gamenight.Ui/Gamenight.Ui/ViewModels/ViewModelBase.cs b/Gamenight.Ui/Gamenight.Ui/ViewModels/ViewModelBase.cs
new file mode 100644
index 0000000..062a339
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui/ViewModels/ViewModelBase.cs
@@ -0,0 +1,7 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace Gamenight.Ui.ViewModels;
+
+public abstract class ViewModelBase : ObservableObject
+{
+}
diff --git a/Gamenight.Ui/Gamenight.Ui/Views/MainView.axaml b/Gamenight.Ui/Gamenight.Ui/Views/MainView.axaml
new file mode 100644
index 0000000..1eb7c35
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui/Views/MainView.axaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui/Views/MainView.axaml.cs b/Gamenight.Ui/Gamenight.Ui/Views/MainView.axaml.cs
new file mode 100644
index 0000000..b3ec9f0
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui/Views/MainView.axaml.cs
@@ -0,0 +1,11 @@
+using Avalonia.Controls;
+
+namespace Gamenight.Ui.Views;
+
+public partial class MainView : UserControl
+{
+ public MainView()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/Gamenight.Ui/Gamenight.Ui/Views/MainWindow.axaml b/Gamenight.Ui/Gamenight.Ui/Views/MainWindow.axaml
new file mode 100644
index 0000000..bfb43e5
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui/Views/MainWindow.axaml
@@ -0,0 +1,12 @@
+
+
+
diff --git a/Gamenight.Ui/Gamenight.Ui/Views/MainWindow.axaml.cs b/Gamenight.Ui/Gamenight.Ui/Views/MainWindow.axaml.cs
new file mode 100644
index 0000000..ad71430
--- /dev/null
+++ b/Gamenight.Ui/Gamenight.Ui/Views/MainWindow.axaml.cs
@@ -0,0 +1,11 @@
+using Avalonia.Controls;
+
+namespace Gamenight.Ui.Views;
+
+public partial class MainWindow : Window
+{
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file