commit 9704f9f36d1c115b72ccbaabaac7ab36243597a2 Author: Nouredeen06 Date: Thu Mar 19 04:03:19 2026 +0300 Initial Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8afdcb6 --- /dev/null +++ b/.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/Clario.Android/Clario.Android.csproj b/Clario.Android/Clario.Android.csproj new file mode 100644 index 0000000..c4ed782 --- /dev/null +++ b/Clario.Android/Clario.Android.csproj @@ -0,0 +1,33 @@ + + + Exe + net8.0-android + 34 + 21 + enable + com.CompanyName.Clario + 1 + 1.0 + apk + false + Clario.Android + + + + + Resources\drawable\Icon.png + + + + + + + + + + + + + + + diff --git a/Clario.Android/Icon.png b/Clario.Android/Icon.png new file mode 100644 index 0000000..e69de29 diff --git a/Clario.Android/MainActivity.cs b/Clario.Android/MainActivity.cs new file mode 100644 index 0000000..79920ec --- /dev/null +++ b/Clario.Android/MainActivity.cs @@ -0,0 +1,21 @@ +using Android.App; +using Android.Content.PM; +using Avalonia; +using Avalonia.Android; + +namespace Clario.Android; + +[Activity( + Label = "Clario.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(); + } +} \ No newline at end of file diff --git a/Clario.Android/Properties/AndroidManifest.xml b/Clario.Android/Properties/AndroidManifest.xml new file mode 100644 index 0000000..d30efe9 --- /dev/null +++ b/Clario.Android/Properties/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/Clario.Android/Resources/AboutResources.txt b/Clario.Android/Resources/AboutResources.txt new file mode 100644 index 0000000..c2bca97 --- /dev/null +++ b/Clario.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/Clario.Android/Resources/drawable-night-v31/avalonia_anim.xml b/Clario.Android/Resources/drawable-night-v31/avalonia_anim.xml new file mode 100644 index 0000000..dde4b5a --- /dev/null +++ b/Clario.Android/Resources/drawable-night-v31/avalonia_anim.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Clario.Android/Resources/drawable-v31/avalonia_anim.xml b/Clario.Android/Resources/drawable-v31/avalonia_anim.xml new file mode 100644 index 0000000..94f27d9 --- /dev/null +++ b/Clario.Android/Resources/drawable-v31/avalonia_anim.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Clario.Android/Resources/drawable/splash_screen.xml b/Clario.Android/Resources/drawable/splash_screen.xml new file mode 100644 index 0000000..2e920b4 --- /dev/null +++ b/Clario.Android/Resources/drawable/splash_screen.xml @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/Clario.Android/Resources/values-night/colors.xml b/Clario.Android/Resources/values-night/colors.xml new file mode 100644 index 0000000..3d47b6f --- /dev/null +++ b/Clario.Android/Resources/values-night/colors.xml @@ -0,0 +1,4 @@ + + + #212121 + diff --git a/Clario.Android/Resources/values-v31/styles.xml b/Clario.Android/Resources/values-v31/styles.xml new file mode 100644 index 0000000..d5ecec4 --- /dev/null +++ b/Clario.Android/Resources/values-v31/styles.xml @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/Clario.Android/Resources/values/colors.xml b/Clario.Android/Resources/values/colors.xml new file mode 100644 index 0000000..59279d5 --- /dev/null +++ b/Clario.Android/Resources/values/colors.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + diff --git a/Clario.Android/Resources/values/styles.xml b/Clario.Android/Resources/values/styles.xml new file mode 100644 index 0000000..6e534de --- /dev/null +++ b/Clario.Android/Resources/values/styles.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/Clario.Browser/Clario.Browser.csproj b/Clario.Browser/Clario.Browser.csproj new file mode 100644 index 0000000..29125f6 --- /dev/null +++ b/Clario.Browser/Clario.Browser.csproj @@ -0,0 +1,19 @@ + + + net8.0-browser + Exe + true + enable + + + + + + + + + + + + + diff --git a/Clario.Browser/Program.cs b/Clario.Browser/Program.cs new file mode 100644 index 0000000..28474ce --- /dev/null +++ b/Clario.Browser/Program.cs @@ -0,0 +1,15 @@ +using System.Threading.Tasks; +using Avalonia; +using Avalonia.Browser; + +namespace Clario.Browser; + +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/Clario.Browser/Properties/AssemblyInfo.cs b/Clario.Browser/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f31aed8 --- /dev/null +++ b/Clario.Browser/Properties/AssemblyInfo.cs @@ -0,0 +1 @@ +[assembly: System.Runtime.Versioning.SupportedOSPlatform("browser")] \ No newline at end of file diff --git a/Clario.Browser/Properties/launchSettings.json b/Clario.Browser/Properties/launchSettings.json new file mode 100644 index 0000000..b130f49 --- /dev/null +++ b/Clario.Browser/Properties/launchSettings.json @@ -0,0 +1,13 @@ +{ + "profiles": { + "Clario.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/Clario.Browser/runtimeconfig.template.json b/Clario.Browser/runtimeconfig.template.json new file mode 100644 index 0000000..b96a943 --- /dev/null +++ b/Clario.Browser/runtimeconfig.template.json @@ -0,0 +1,10 @@ +{ + "wasmHostProperties": { + "perHostConfig": [ + { + "name": "browser", + "host": "browser" + } + ] + } +} \ No newline at end of file diff --git a/Clario.Browser/wwwroot/app.css b/Clario.Browser/wwwroot/app.css new file mode 100644 index 0000000..1d6f754 --- /dev/null +++ b/Clario.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/Clario.Browser/wwwroot/favicon.ico b/Clario.Browser/wwwroot/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/Clario.Browser/wwwroot/index.html b/Clario.Browser/wwwroot/index.html new file mode 100644 index 0000000..9d948f0 --- /dev/null +++ b/Clario.Browser/wwwroot/index.html @@ -0,0 +1,36 @@ + + + + + Clario.Browser + + + + + + +
+
+

+ Powered by + + + + + + + + + + + + + + +

+
+
+ + + + diff --git a/Clario.Browser/wwwroot/main.js b/Clario.Browser/wwwroot/main.js new file mode 100644 index 0000000..bf1555e --- /dev/null +++ b/Clario.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/Clario.Desktop/Clario.Desktop.csproj b/Clario.Desktop/Clario.Desktop.csproj new file mode 100644 index 0000000..ae21efd --- /dev/null +++ b/Clario.Desktop/Clario.Desktop.csproj @@ -0,0 +1,29 @@ + + + WinExe + + net8.0 + enable + + + + app.manifest + + + + + + + None + All + + + + + + + + + + diff --git a/Clario.Desktop/Program.cs b/Clario.Desktop/Program.cs new file mode 100644 index 0000000..ebe8654 --- /dev/null +++ b/Clario.Desktop/Program.cs @@ -0,0 +1,26 @@ +using System; +using Avalonia; +using Clario.Services; + +namespace Clario.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(); +} \ No newline at end of file diff --git a/Clario.Desktop/app.manifest b/Clario.Desktop/app.manifest new file mode 100644 index 0000000..28b90f6 --- /dev/null +++ b/Clario.Desktop/app.manifest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/Clario.iOS/AppDelegate.cs b/Clario.iOS/AppDelegate.cs new file mode 100644 index 0000000..219e9a5 --- /dev/null +++ b/Clario.iOS/AppDelegate.cs @@ -0,0 +1,20 @@ +using Avalonia; +using Avalonia.iOS; +using Foundation; + +namespace Clario.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(); + } +} \ No newline at end of file diff --git a/Clario.iOS/Clario.iOS.csproj b/Clario.iOS/Clario.iOS.csproj new file mode 100644 index 0000000..ab5ee0b --- /dev/null +++ b/Clario.iOS/Clario.iOS.csproj @@ -0,0 +1,19 @@ + + + Exe + net8.0-ios + 13.0 + enable + + + + + + + + + + + + + diff --git a/Clario.iOS/Entitlements.plist b/Clario.iOS/Entitlements.plist new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/Clario.iOS/Entitlements.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Clario.iOS/Info.plist b/Clario.iOS/Info.plist new file mode 100644 index 0000000..347bee3 --- /dev/null +++ b/Clario.iOS/Info.plist @@ -0,0 +1,43 @@ + + + + + CFBundleDisplayName + ExpenseTracker + CFBundleIdentifier + companyName.ExpenseTracker + 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/Clario.iOS/Main.cs b/Clario.iOS/Main.cs new file mode 100644 index 0000000..c199e51 --- /dev/null +++ b/Clario.iOS/Main.cs @@ -0,0 +1,14 @@ +using UIKit; + +namespace Clario.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)); + } +} \ No newline at end of file diff --git a/Clario.iOS/Resources/LaunchScreen.xib b/Clario.iOS/Resources/LaunchScreen.xib new file mode 100644 index 0000000..53eca6d --- /dev/null +++ b/Clario.iOS/Resources/LaunchScreen.xib @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Clario.sln b/Clario.sln new file mode 100644 index 0000000..8cabca8 --- /dev/null +++ b/Clario.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}") = "Clario", "Clario\Clario.csproj", "{EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clario.Desktop", "Clario.Desktop\Clario.Desktop.csproj", "{ABC31E74-02FF-46EB-B3B2-4E6AE43B456C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clario.Browser", "Clario.Browser\Clario.Browser.csproj", "{1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clario.iOS", "Clario.iOS\Clario.iOS.csproj", "{EBD9022F-BC83-4846-9A11-6F7F3772DC64}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Clario.Android", "Clario.Android\Clario.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/Clario/App.axaml b/Clario/App.axaml new file mode 100644 index 0000000..fc6cda3 --- /dev/null +++ b/Clario/App.axaml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Clario/App.axaml.cs b/Clario/App.axaml.cs new file mode 100644 index 0000000..bda3905 --- /dev/null +++ b/Clario/App.axaml.cs @@ -0,0 +1,84 @@ +using System; +using System.Globalization; +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Data.Core; +using Avalonia.Data.Core.Plugins; +using System.Linq; +using System.Threading; +using Avalonia.Markup.Xaml; +using Clario.Data; +using Clario.Services; +using Clario.ViewModels; +using Clario.Views; + +namespace Clario; + +public partial class App : Application +{ + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + } + + public override async void OnFrameworkInitializationCompleted() + { + base.OnFrameworkInitializationCompleted(); + + var culture = new CultureInfo("en-US"); + + CultureInfo.DefaultThreadCurrentCulture = culture; + CultureInfo.DefaultThreadCurrentUICulture = culture; + await SupabaseService.InitializeAsync(new FileSessionStorage()); + try + { + await SupabaseService.Client.Auth.RetrieveSessionAsync(); + } + catch + { + /* session invalid or expired */ + } + + var user = SupabaseService.Client.Auth.CurrentUser; + + var profile = await DataRepo.General.FetchProfileInfo(); + if (profile is not null) + { + ThemeService.SwitchToTheme(profile.Theme); + } + + 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(); + + desktop.MainWindow = new MainWindow + { + DataContext = user is not null ? new MainViewModel() : new AuthViewModel() + }; + desktop.MainWindow.Show(); + } + + else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform) + { + singleViewPlatform.MainView = new MainView + { + DataContext = user is not null ? new MainViewModel() : new AuthViewModel() + }; + } + } + + 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/Clario/Assets/Clario-Logo.svg b/Clario/Assets/Clario-Logo.svg new file mode 100644 index 0000000..540aefa --- /dev/null +++ b/Clario/Assets/Clario-Logo.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Clario/Assets/Icons/arch.svg b/Clario/Assets/Icons/arch.svg new file mode 100644 index 0000000..7415960 --- /dev/null +++ b/Clario/Assets/Icons/arch.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Clario/Assets/Icons/arrow-down-left.svg b/Clario/Assets/Icons/arrow-down-left.svg new file mode 100644 index 0000000..89a3306 --- /dev/null +++ b/Clario/Assets/Icons/arrow-down-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/arrow-right-left.svg b/Clario/Assets/Icons/arrow-right-left.svg new file mode 100644 index 0000000..ffaf43c --- /dev/null +++ b/Clario/Assets/Icons/arrow-right-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/arrow-up-right.svg b/Clario/Assets/Icons/arrow-up-right.svg new file mode 100644 index 0000000..3a864fa --- /dev/null +++ b/Clario/Assets/Icons/arrow-up-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/audio-lines.svg b/Clario/Assets/Icons/audio-lines.svg new file mode 100644 index 0000000..61be820 --- /dev/null +++ b/Clario/Assets/Icons/audio-lines.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/banknote-arrow-up.svg b/Clario/Assets/Icons/banknote-arrow-up.svg new file mode 100644 index 0000000..df9b0fc --- /dev/null +++ b/Clario/Assets/Icons/banknote-arrow-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/banknote.svg b/Clario/Assets/Icons/banknote.svg new file mode 100644 index 0000000..046300a --- /dev/null +++ b/Clario/Assets/Icons/banknote.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/battery-charging.svg b/Clario/Assets/Icons/battery-charging.svg new file mode 100644 index 0000000..3533dc6 --- /dev/null +++ b/Clario/Assets/Icons/battery-charging.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/battery-full.svg b/Clario/Assets/Icons/battery-full.svg new file mode 100644 index 0000000..61af371 --- /dev/null +++ b/Clario/Assets/Icons/battery-full.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/briefcase.svg b/Clario/Assets/Icons/briefcase.svg new file mode 100644 index 0000000..151ed23 --- /dev/null +++ b/Clario/Assets/Icons/briefcase.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/calendar-days.svg b/Clario/Assets/Icons/calendar-days.svg new file mode 100644 index 0000000..ca612fc --- /dev/null +++ b/Clario/Assets/Icons/calendar-days.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/car.svg b/Clario/Assets/Icons/car.svg new file mode 100644 index 0000000..d3df672 --- /dev/null +++ b/Clario/Assets/Icons/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/chart-column-big.svg b/Clario/Assets/Icons/chart-column-big.svg new file mode 100644 index 0000000..3b7647b --- /dev/null +++ b/Clario/Assets/Icons/chart-column-big.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/chart-no-axes-combined.svg b/Clario/Assets/Icons/chart-no-axes-combined.svg new file mode 100644 index 0000000..a3086a0 --- /dev/null +++ b/Clario/Assets/Icons/chart-no-axes-combined.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/chart-pie.svg b/Clario/Assets/Icons/chart-pie.svg new file mode 100644 index 0000000..e1bd6e8 --- /dev/null +++ b/Clario/Assets/Icons/chart-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/check.svg b/Clario/Assets/Icons/check.svg new file mode 100644 index 0000000..847caf1 --- /dev/null +++ b/Clario/Assets/Icons/check.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/Clario/Assets/Icons/chevron-left.svg b/Clario/Assets/Icons/chevron-left.svg new file mode 100644 index 0000000..4828b06 --- /dev/null +++ b/Clario/Assets/Icons/chevron-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/chevron-right.svg b/Clario/Assets/Icons/chevron-right.svg new file mode 100644 index 0000000..5912481 --- /dev/null +++ b/Clario/Assets/Icons/chevron-right.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/Clario/Assets/Icons/circle-alert.svg b/Clario/Assets/Icons/circle-alert.svg new file mode 100644 index 0000000..b3f62b9 --- /dev/null +++ b/Clario/Assets/Icons/circle-alert.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/circle-dollar-sign.svg b/Clario/Assets/Icons/circle-dollar-sign.svg new file mode 100644 index 0000000..4037088 --- /dev/null +++ b/Clario/Assets/Icons/circle-dollar-sign.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/credit-card.svg b/Clario/Assets/Icons/credit-card.svg new file mode 100644 index 0000000..1a14a57 --- /dev/null +++ b/Clario/Assets/Icons/credit-card.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/ellipsis.svg b/Clario/Assets/Icons/ellipsis.svg new file mode 100644 index 0000000..9c3d1e5 --- /dev/null +++ b/Clario/Assets/Icons/ellipsis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/eye-closed.svg b/Clario/Assets/Icons/eye-closed.svg new file mode 100644 index 0000000..d621450 --- /dev/null +++ b/Clario/Assets/Icons/eye-closed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/eye.svg b/Clario/Assets/Icons/eye.svg new file mode 100644 index 0000000..f1efd5e --- /dev/null +++ b/Clario/Assets/Icons/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/filelist.txt b/Clario/Assets/Icons/filelist.txt new file mode 100644 index 0000000..e69de29 diff --git a/Clario/Assets/Icons/gamepad-2.svg b/Clario/Assets/Icons/gamepad-2.svg new file mode 100644 index 0000000..8492379 --- /dev/null +++ b/Clario/Assets/Icons/gamepad-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/gem.svg b/Clario/Assets/Icons/gem.svg new file mode 100644 index 0000000..501f400 --- /dev/null +++ b/Clario/Assets/Icons/gem.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/hamburger.svg b/Clario/Assets/Icons/hamburger.svg new file mode 100644 index 0000000..b96b7df --- /dev/null +++ b/Clario/Assets/Icons/hamburger.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/hand-coins.svg b/Clario/Assets/Icons/hand-coins.svg new file mode 100644 index 0000000..fc1d234 --- /dev/null +++ b/Clario/Assets/Icons/hand-coins.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/heart-pulse.svg b/Clario/Assets/Icons/heart-pulse.svg new file mode 100644 index 0000000..0e6bdbf --- /dev/null +++ b/Clario/Assets/Icons/heart-pulse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/heart.svg b/Clario/Assets/Icons/heart.svg new file mode 100644 index 0000000..ebade34 --- /dev/null +++ b/Clario/Assets/Icons/heart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/house.svg b/Clario/Assets/Icons/house.svg new file mode 100644 index 0000000..6e9d928 --- /dev/null +++ b/Clario/Assets/Icons/house.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/info.svg b/Clario/Assets/Icons/info.svg new file mode 100644 index 0000000..a2771b4 --- /dev/null +++ b/Clario/Assets/Icons/info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/landmark.svg b/Clario/Assets/Icons/landmark.svg new file mode 100644 index 0000000..eaae8f2 --- /dev/null +++ b/Clario/Assets/Icons/landmark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/layout-dashboard.svg b/Clario/Assets/Icons/layout-dashboard.svg new file mode 100644 index 0000000..9f64ebe --- /dev/null +++ b/Clario/Assets/Icons/layout-dashboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/list.svg b/Clario/Assets/Icons/list.svg new file mode 100644 index 0000000..9d3230f --- /dev/null +++ b/Clario/Assets/Icons/list.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/lock.svg b/Clario/Assets/Icons/lock.svg new file mode 100644 index 0000000..207dd2f --- /dev/null +++ b/Clario/Assets/Icons/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/mail.svg b/Clario/Assets/Icons/mail.svg new file mode 100644 index 0000000..54a9559 --- /dev/null +++ b/Clario/Assets/Icons/mail.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/minus.svg b/Clario/Assets/Icons/minus.svg new file mode 100644 index 0000000..3dedcc6 --- /dev/null +++ b/Clario/Assets/Icons/minus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/moon.svg b/Clario/Assets/Icons/moon.svg new file mode 100644 index 0000000..07b397d --- /dev/null +++ b/Clario/Assets/Icons/moon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/pause.svg b/Clario/Assets/Icons/pause.svg new file mode 100644 index 0000000..a59a140 --- /dev/null +++ b/Clario/Assets/Icons/pause.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/pencil.svg b/Clario/Assets/Icons/pencil.svg new file mode 100644 index 0000000..46821e8 --- /dev/null +++ b/Clario/Assets/Icons/pencil.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/piggy-bank.svg b/Clario/Assets/Icons/piggy-bank.svg new file mode 100644 index 0000000..ac73982 --- /dev/null +++ b/Clario/Assets/Icons/piggy-bank.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/pill.svg b/Clario/Assets/Icons/pill.svg new file mode 100644 index 0000000..60f107f --- /dev/null +++ b/Clario/Assets/Icons/pill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/plug-2.svg b/Clario/Assets/Icons/plug-2.svg new file mode 100644 index 0000000..4f8ed17 --- /dev/null +++ b/Clario/Assets/Icons/plug-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/plus.svg b/Clario/Assets/Icons/plus.svg new file mode 100644 index 0000000..12fd70c --- /dev/null +++ b/Clario/Assets/Icons/plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/receipt-text.svg b/Clario/Assets/Icons/receipt-text.svg new file mode 100644 index 0000000..4d9b361 --- /dev/null +++ b/Clario/Assets/Icons/receipt-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/rotate-ccw.svg b/Clario/Assets/Icons/rotate-ccw.svg new file mode 100644 index 0000000..99d7e6b --- /dev/null +++ b/Clario/Assets/Icons/rotate-ccw.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/search.svg b/Clario/Assets/Icons/search.svg new file mode 100644 index 0000000..320a59d --- /dev/null +++ b/Clario/Assets/Icons/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/settings.svg b/Clario/Assets/Icons/settings.svg new file mode 100644 index 0000000..e28dad8 --- /dev/null +++ b/Clario/Assets/Icons/settings.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/shopping-bag.svg b/Clario/Assets/Icons/shopping-bag.svg new file mode 100644 index 0000000..e102106 --- /dev/null +++ b/Clario/Assets/Icons/shopping-bag.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/shopping-cart.svg b/Clario/Assets/Icons/shopping-cart.svg new file mode 100644 index 0000000..fedbbae --- /dev/null +++ b/Clario/Assets/Icons/shopping-cart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/sun.svg b/Clario/Assets/Icons/sun.svg new file mode 100644 index 0000000..65c97c7 --- /dev/null +++ b/Clario/Assets/Icons/sun.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/trash-2.svg b/Clario/Assets/Icons/trash-2.svg new file mode 100644 index 0000000..d82ac24 --- /dev/null +++ b/Clario/Assets/Icons/trash-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/trending-down.svg b/Clario/Assets/Icons/trending-down.svg new file mode 100644 index 0000000..5a134a7 --- /dev/null +++ b/Clario/Assets/Icons/trending-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/trending-up.svg b/Clario/Assets/Icons/trending-up.svg new file mode 100644 index 0000000..b44aef1 --- /dev/null +++ b/Clario/Assets/Icons/trending-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/triangle-alert.svg b/Clario/Assets/Icons/triangle-alert.svg new file mode 100644 index 0000000..1a5b698 --- /dev/null +++ b/Clario/Assets/Icons/triangle-alert.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/utensils.svg b/Clario/Assets/Icons/utensils.svg new file mode 100644 index 0000000..df72d81 --- /dev/null +++ b/Clario/Assets/Icons/utensils.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/volume-2.svg b/Clario/Assets/Icons/volume-2.svg new file mode 100644 index 0000000..bf0d1ae --- /dev/null +++ b/Clario/Assets/Icons/volume-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/wallet.svg b/Clario/Assets/Icons/wallet.svg new file mode 100644 index 0000000..9d39e59 --- /dev/null +++ b/Clario/Assets/Icons/wallet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/wifi.svg b/Clario/Assets/Icons/wifi.svg new file mode 100644 index 0000000..912158c --- /dev/null +++ b/Clario/Assets/Icons/wifi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/x.svg b/Clario/Assets/Icons/x.svg new file mode 100644 index 0000000..eb194fd --- /dev/null +++ b/Clario/Assets/Icons/x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Icons/zap.svg b/Clario/Assets/Icons/zap.svg new file mode 100644 index 0000000..dd5ea1f --- /dev/null +++ b/Clario/Assets/Icons/zap.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Clario/Assets/Logo textmark.png b/Clario/Assets/Logo textmark.png new file mode 100644 index 0000000..e69de29 diff --git a/Clario/Assets/avalonia-logo.ico b/Clario/Assets/avalonia-logo.ico new file mode 100644 index 0000000..e69de29 diff --git a/Clario/Assets/diner-lonely-road.jpg b/Clario/Assets/diner-lonely-road.jpg new file mode 100644 index 0000000..e69de29 diff --git a/Clario/Assets/eddypfp.png b/Clario/Assets/eddypfp.png new file mode 100644 index 0000000..e69de29 diff --git a/Clario/Assets/logo-textmark.svg b/Clario/Assets/logo-textmark.svg new file mode 100644 index 0000000..57837f2 --- /dev/null +++ b/Clario/Assets/logo-textmark.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Clario/Clario.csproj b/Clario/Clario.csproj new file mode 100644 index 0000000..801406c --- /dev/null +++ b/Clario/Clario.csproj @@ -0,0 +1,28 @@ + + + net8.0 + enable + latest + true + Clario + + + + + + + + + + + + + + None + All + + + + + + diff --git a/Clario/Converters/AccountFromIdConverter.cs b/Clario/Converters/AccountFromIdConverter.cs new file mode 100644 index 0000000..172304b --- /dev/null +++ b/Clario/Converters/AccountFromIdConverter.cs @@ -0,0 +1,23 @@ +using System; +using System.Globalization; +using System.Linq; +using Avalonia.Data.Converters; +using Clario.Data; + +namespace Clario.Converters; + +public class AccountFromIdConverter : IValueConverter +{ + public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value is not Guid) return null; + var accounts = DataRepo.General.Accounts; + if (accounts is null) return null; + return accounts.FirstOrDefault(x => x.Id == (Guid)value)?.Name; + } + + public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Clario/Converters/AccountMaskToStringConverter.cs b/Clario/Converters/AccountMaskToStringConverter.cs new file mode 100644 index 0000000..1975fa7 --- /dev/null +++ b/Clario/Converters/AccountMaskToStringConverter.cs @@ -0,0 +1,19 @@ +using System; +using System.Globalization; +using Avalonia.Data.Converters; + +namespace Clario.Converters; + +public class AccountMaskToStringConverter : IValueConverter +{ + public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value is not string mask) return string.Empty; + return $"•••• {mask}"; + } + + public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Clario/Converters/AmountSignConverter.cs b/Clario/Converters/AmountSignConverter.cs new file mode 100644 index 0000000..89fa418 --- /dev/null +++ b/Clario/Converters/AmountSignConverter.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Avalonia.Data.Converters; + +namespace Clario.Converters; + +public class AmountSignConverter : IMultiValueConverter +{ + public object? Convert(IList values, Type targetType, object? parameter, CultureInfo culture) + { + if (values.Any(x => x is null) || values.Count < 2) return 0; + if (values[0] is decimal amount && values[1] is string type) + return (type.Equals("income", StringComparison.CurrentCultureIgnoreCase) ? amount : -amount); + return 0; + } +} \ No newline at end of file diff --git a/Clario/Converters/DateFormatConverter.cs b/Clario/Converters/DateFormatConverter.cs new file mode 100644 index 0000000..a53dc16 --- /dev/null +++ b/Clario/Converters/DateFormatConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using Avalonia.Data.Converters; + +namespace Clario.Converters; + +public class DateFormatConverter : IValueConverter +{ + private static readonly CultureInfo enUS = new("en-US"); + + public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + var format = parameter as string ?? "MMM dd, yyyy"; + return value switch + { + DateTime dt => dt.ToString(format, enUS), + DateOnly date => date.ToString(format, enUS), + _ => value + }; + } + + public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Clario/Converters/DecimalColorConverter.cs b/Clario/Converters/DecimalColorConverter.cs new file mode 100644 index 0000000..077d702 --- /dev/null +++ b/Clario/Converters/DecimalColorConverter.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Avalonia.Data.Converters; +using Avalonia.Media; + +namespace Clario.Converters; + +public class DecimalColorConverter : IMultiValueConverter +{ + public object? Convert(IList? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value.Count < 3 || value.Any(x => x is null)) return null; + if (value[0] is decimal amount) + return (amount < 0) ? value[1] : value[2]; + + return null; + } +} \ No newline at end of file diff --git a/Clario/Converters/DecimalSignConverter.cs b/Clario/Converters/DecimalSignConverter.cs new file mode 100644 index 0000000..663cfb9 --- /dev/null +++ b/Clario/Converters/DecimalSignConverter.cs @@ -0,0 +1,19 @@ +using System; +using System.Globalization; +using Avalonia.Data.Converters; + +namespace Clario.Converters; + +public class DecimalSignConverter : IValueConverter +{ + public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value is decimal d) return (d < 0 ? $"-${Math.Abs(Math.Round(d))}" : $"+${Math.Abs(Math.Round(d))}"); + return "$0"; + } + + public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Clario/Converters/FirstValueConverter.cs b/Clario/Converters/FirstValueConverter.cs new file mode 100644 index 0000000..375ae6f --- /dev/null +++ b/Clario/Converters/FirstValueConverter.cs @@ -0,0 +1,24 @@ +using System; +using System.Globalization; +using System.Runtime.InteropServices.JavaScript; +using Avalonia.Data.Converters; + +namespace Clario.Converters; + +public class FirstValueConverter : IValueConverter +{ + public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value is double[]) + { + return ((double[])value)[0]; + } + + return 0; + } + + public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Clario/Converters/HexToColorConverter.cs b/Clario/Converters/HexToColorConverter.cs new file mode 100644 index 0000000..259272f --- /dev/null +++ b/Clario/Converters/HexToColorConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using Avalonia.Data.Converters; +using Avalonia.Media; + +namespace Clario.Converters; + +public class HexToColorConverter : IValueConverter +{ + public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value is not string hex || parameter is not string type) return null; + if (type == "css") + return $"path, circle, rect, ellipse, line, polyline, polygon, text, use {{ stroke: {hex}; }}"; + if (type == "brush") + return new SolidColorBrush(Color.Parse(hex)); + if (type == "color") + return Color.Parse(hex); + return null; + } + + public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Clario/Converters/IsEqualValueConverter.cs b/Clario/Converters/IsEqualValueConverter.cs new file mode 100644 index 0000000..c04506d --- /dev/null +++ b/Clario/Converters/IsEqualValueConverter.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Avalonia.Data.Converters; +using Clario.Models; + +namespace Clario.Converters; + +public class IsEqualValueConverter : IMultiValueConverter +{ + public object? Convert(IList values, Type targetType, object? parameter, CultureInfo culture) + { + if (values.Count < 2 || values.Any(x => x is null)) return false; + if (values.All(x => x is Account)) return ((Account)values[0]).Id == ((Account)values[1]).Id; + return values[0].Equals(values[1]); + } +} \ No newline at end of file diff --git a/Clario/Converters/NetworthSumConverter.cs b/Clario/Converters/NetworthSumConverter.cs new file mode 100644 index 0000000..8bdac89 --- /dev/null +++ b/Clario/Converters/NetworthSumConverter.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Avalonia.Data.Converters; +using LiveChartsCore.SkiaSharpView.Avalonia; + +namespace Clario.Converters; + +public class NetworthSumConverter : IMultiValueConverter +{ + public object? Convert(IList? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value is null || value.Count < 2 || value.Any(x => x is null)) return 0; + if (value[0] is double incomeD && (value[1] is double expenseD)) + { + var net = incomeD - expenseD; + return (net < 0 ? $"- ${Math.Abs(net):F2}" : $"+ ${Math.Abs(net):F2}"); + } + + if (value[0] is decimal incomeDec && (value[1] is decimal expenseDec)) + { + var net = incomeDec - expenseDec; + return (net < 0 ? $"-${Math.Abs(net):F2}" : $"+${Math.Abs(net):F2}"); + } + + return 0; + } +} \ No newline at end of file diff --git a/Clario/Converters/PercentageConverter.cs b/Clario/Converters/PercentageConverter.cs new file mode 100644 index 0000000..1c9d68a --- /dev/null +++ b/Clario/Converters/PercentageConverter.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Avalonia.Data.Converters; + +namespace Clario.Converters; + +public class PercentageConverter : IMultiValueConverter +{ + public object? Convert(IList? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value.Count < 2 || value.Any(x => x is null)) return "0%"; + + if (value[0] is decimal part && value[1] is decimal total && part > 0) + { + var percentage = Math.Round(part / total, 2); + return percentage.ToString("0%"); + } + + return "0%"; + } +} \ No newline at end of file diff --git a/Clario/Converters/SKPaintToBrushConverter.cs b/Clario/Converters/SKPaintToBrushConverter.cs new file mode 100644 index 0000000..bd7da01 --- /dev/null +++ b/Clario/Converters/SKPaintToBrushConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using Avalonia.Data.Converters; +using Avalonia.Media; +using LiveChartsCore.SkiaSharpView.Painting; + +namespace Clario.Converters; + +public class SKPaintToBrushConverter : IValueConverter +{ + public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value is SolidColorPaint paint) + { + var color = Color.FromArgb(paint.Color.Alpha, paint.Color.Red, paint.Color.Green, paint.Color.Blue); + return new SolidColorBrush(color); + } + + return new SolidColorBrush(Colors.White); + } + + public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Clario/Converters/SvgPathFromName.cs b/Clario/Converters/SvgPathFromName.cs new file mode 100644 index 0000000..7b949b7 --- /dev/null +++ b/Clario/Converters/SvgPathFromName.cs @@ -0,0 +1,21 @@ +using System; +using System.Globalization; +using System.Linq; +using Avalonia.Data.Converters; +using Clario.Data; + +namespace Clario.Converters; + +public class SvgPathFromName : IValueConverter +{ + public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value is not string name) return null; + return $"../Assets/Icons/{name}.svg"; + } + + public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Clario/Converters/TransactionTypeToAmountColorConverter.cs b/Clario/Converters/TransactionTypeToAmountColorConverter.cs new file mode 100644 index 0000000..56146af --- /dev/null +++ b/Clario/Converters/TransactionTypeToAmountColorConverter.cs @@ -0,0 +1,27 @@ +using System; +using System.Globalization; +using Avalonia; +using Avalonia.Data.Converters; +using Avalonia.Media; + +namespace Clario.Converters; + +public class TransactionTypeToAmountColorConverter : IValueConverter +{ + public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value is not string type) return null; + var app = Application.Current; + if (app is null) return null; + app.TryGetResource("AccentRed", app.ActualThemeVariant, out var resourceRed); + app.TryGetResource("AccentGreen", app.ActualThemeVariant, out var resourceGreen); + if (resourceRed is SolidColorBrush red && resourceGreen is SolidColorBrush green) + return (type.Equals("income", StringComparison.CurrentCultureIgnoreCase) ? green : red); + return null; + } + + public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Clario/CustomControls/DateRangePicker.axaml b/Clario/CustomControls/DateRangePicker.axaml new file mode 100644 index 0000000..228fe08 --- /dev/null +++ b/Clario/CustomControls/DateRangePicker.axaml @@ -0,0 +1,50 @@ + + + + + + + + + \ No newline at end of file diff --git a/Clario/CustomControls/DateRangePicker.cs b/Clario/CustomControls/DateRangePicker.cs new file mode 100644 index 0000000..203b63a --- /dev/null +++ b/Clario/CustomControls/DateRangePicker.cs @@ -0,0 +1,153 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Controls.Primitives; + +namespace Clario.CustomControls; + +public class DateRangePicker : TemplatedControl +{ + public static readonly StyledProperty SelectionModeProperty = + AvaloniaProperty.Register( + nameof(SelectionMode), CalendarSelectionMode.SingleRange); + + public CalendarSelectionMode SelectionMode + { + get => GetValue(SelectionModeProperty); + set => SetValue(SelectionModeProperty, value); + } + + + public static readonly StyledProperty> SelectedDatesProperty = + AvaloniaProperty.Register>( + nameof(SelectedDates), new List()); + + public IList SelectedDates + { + get => GetValue(SelectedDatesProperty); + set => SetValue(SelectedDatesProperty, value); + } + + public static readonly StyledProperty DisplayTextProperty = + AvaloniaProperty.Register( + nameof(DisplayText), "Select Date"); + + public string DisplayText + { + get => GetValue(DisplayTextProperty); + set => SetValue(DisplayTextProperty, value); + } + + private Button _button; + private Popup _popup; + private Calendar _calendar; + + + protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) + { + base.OnPropertyChanged(change); + if (change.Property == SelectedDatesProperty && _calendar != null) + { + _calendar.SelectedDates.Clear(); + + foreach (var date in SelectedDates) + { + _calendar.SelectedDates.Add(date); + } + + if (SelectionMode == CalendarSelectionMode.SingleDate) + _popup.IsOpen = false; + } + } + + protected override void OnApplyTemplate(TemplateAppliedEventArgs e) + { + base.OnApplyTemplate(e); + _button = e.NameScope.Find + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Clario/Views/AccountsView.axaml.cs b/Clario/Views/AccountsView.axaml.cs new file mode 100644 index 0000000..cf85bee --- /dev/null +++ b/Clario/Views/AccountsView.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Clario.Views; + +public partial class AccountsView : UserControl +{ + public AccountsView() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Clario/Views/AuthView.axaml b/Clario/Views/AuthView.axaml new file mode 100644 index 0000000..2335a57 --- /dev/null +++ b/Clario/Views/AuthView.axaml @@ -0,0 +1,448 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Clario/Views/AuthView.axaml.cs b/Clario/Views/AuthView.axaml.cs new file mode 100644 index 0000000..82e7571 --- /dev/null +++ b/Clario/Views/AuthView.axaml.cs @@ -0,0 +1,14 @@ +using System; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Clario.Views; + +public partial class AuthView : UserControl +{ + public AuthView() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Clario/Views/BudgetCardMenuView.axaml b/Clario/Views/BudgetCardMenuView.axaml new file mode 100644 index 0000000..04a8cb9 --- /dev/null +++ b/Clario/Views/BudgetCardMenuView.axaml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Clario/Views/BudgetCardMenuView.axaml.cs b/Clario/Views/BudgetCardMenuView.axaml.cs new file mode 100644 index 0000000..af68276 --- /dev/null +++ b/Clario/Views/BudgetCardMenuView.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Clario.Views; + +public partial class BudgetCardMenuView : UserControl +{ + public BudgetCardMenuView() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Clario/Views/BudgetFormView.axaml b/Clario/Views/BudgetFormView.axaml new file mode 100644 index 0000000..b9c7103 --- /dev/null +++ b/Clario/Views/BudgetFormView.axaml @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Clario/Views/BudgetFormView.axaml.cs b/Clario/Views/BudgetFormView.axaml.cs new file mode 100644 index 0000000..7701460 --- /dev/null +++ b/Clario/Views/BudgetFormView.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Clario.Views; + +public partial class BudgetFormView : UserControl +{ + public BudgetFormView() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Clario/Views/BudgetView.axaml b/Clario/Views/BudgetView.axaml new file mode 100644 index 0000000..47b8783 --- /dev/null +++ b/Clario/Views/BudgetView.axaml @@ -0,0 +1,822 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Clario/Views/BudgetView.axaml.cs b/Clario/Views/BudgetView.axaml.cs new file mode 100644 index 0000000..fd72089 --- /dev/null +++ b/Clario/Views/BudgetView.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Clario.Views; + +public partial class BudgetView : UserControl +{ + public BudgetView() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Clario/Views/DashboardView.axaml b/Clario/Views/DashboardView.axaml new file mode 100644 index 0000000..eda850f --- /dev/null +++ b/Clario/Views/DashboardView.axaml @@ -0,0 +1,504 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Clario/Views/LockscreenView.axaml.cs b/Clario/Views/LockscreenView.axaml.cs new file mode 100644 index 0000000..927f7a6 --- /dev/null +++ b/Clario/Views/LockscreenView.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Clario.Views; + +public partial class LockscreenView : UserControl +{ + public LockscreenView() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Clario/Views/MainView.axaml b/Clario/Views/MainView.axaml new file mode 100644 index 0000000..95f428f --- /dev/null +++ b/Clario/Views/MainView.axaml @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Clario/Views/MainView.axaml.cs b/Clario/Views/MainView.axaml.cs new file mode 100644 index 0000000..c2aa879 --- /dev/null +++ b/Clario/Views/MainView.axaml.cs @@ -0,0 +1,11 @@ +using Avalonia.Controls; + +namespace Clario.Views; + +public partial class MainView : UserControl +{ + public MainView() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Clario/Views/MainWindow.axaml b/Clario/Views/MainWindow.axaml new file mode 100644 index 0000000..a754658 --- /dev/null +++ b/Clario/Views/MainWindow.axaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Clario/Views/MainWindow.axaml.cs b/Clario/Views/MainWindow.axaml.cs new file mode 100644 index 0000000..a063fc5 --- /dev/null +++ b/Clario/Views/MainWindow.axaml.cs @@ -0,0 +1,11 @@ +using Avalonia.Controls; + +namespace Clario.Views; + +public partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Clario/Views/TransactionsView.axaml b/Clario/Views/TransactionsView.axaml new file mode 100644 index 0000000..7a11422 --- /dev/null +++ b/Clario/Views/TransactionsView.axaml @@ -0,0 +1,640 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Clario/Views/TransactionsView.axaml.cs b/Clario/Views/TransactionsView.axaml.cs new file mode 100644 index 0000000..ad8e30a --- /dev/null +++ b/Clario/Views/TransactionsView.axaml.cs @@ -0,0 +1,19 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; +using Clario.Messages; +using CommunityToolkit.Mvvm.Messaging; + +namespace Clario.Views; + +public partial class TransactionsView : UserControl +{ + public TransactionsView() + { + InitializeComponent(); + WeakReferenceMessenger.Default.Register(this, (s, m) => + { + TransactionsScrollViewer.ScrollToHome(); + }); + } +} \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000..f09503f --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,23 @@ + + + + true + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/global.json b/global.json new file mode 100644 index 0000000..dad2db5 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "8.0.0", + "rollForward": "latestMajor", + "allowPrerelease": true + } +} \ No newline at end of file