- Fixed DateRangePicker when mode is singledate
- added Transaction Creation/Editing/Deletion - added confirmation for transaction deletion - added app icon
This commit is contained in:
@@ -36,9 +36,9 @@
|
||||
Margin="0,0,0,32">
|
||||
<Border
|
||||
CornerRadius="16"
|
||||
Height="100"
|
||||
HorizontalAlignment="Center">
|
||||
<!-- <Image Source="../Assets/Logo textmark.png"></Image> -->
|
||||
Height="80"
|
||||
HorizontalAlignment="Center" Margin="0 0 0 10">
|
||||
<Image Source="../Assets/logo-textmark.png"/>
|
||||
</Border>
|
||||
<!-- REPLACE: app name -->
|
||||
<StackPanel Spacing="4" HorizontalAlignment="Center">
|
||||
|
||||
@@ -121,42 +121,58 @@
|
||||
CornerRadius="{StaticResource RadiusIcon}" Padding="10,6">
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
<lvc:CartesianChart Series="{Binding SpendingByCategoryChartSeries}" Height="250" Background="{DynamicResource BgSurface}"
|
||||
LegendPosition="Hidden" TooltipPosition="Hidden" ZoomMode="None" Name="chart">
|
||||
<lvc:CartesianChart.XAxes>
|
||||
<lvc:XamlAxis IsVisible="False" />
|
||||
</lvc:CartesianChart.XAxes>
|
||||
<lvc:CartesianChart.YAxes>
|
||||
<lvc:XamlLogarithmicAxis LogBase="10" IsVisible="False" MinLimit="1" />
|
||||
</lvc:CartesianChart.YAxes>
|
||||
</lvc:CartesianChart>
|
||||
<ItemsControl ItemsSource="{Binding SpendingByCategoryChartData}" Margin="0 -10 ">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="model:ColumnChartData">
|
||||
<TextBlock Text="{Binding Name}" HorizontalAlignment="Center" Foreground="{DynamicResource TextDisabled}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Border HorizontalAlignment="Stretch" Height="1" Background="{DynamicResource BorderSubtle}" Margin="5 0" />
|
||||
<ItemsControl ItemsSource="{Binding SpendingByCategoryChartData}" Margin="0 -10 0 0 ">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="model:ColumnChartData">
|
||||
<TextBlock Text="{Binding Values, Converter={StaticResource FirstValueConverter},StringFormat='$0,00'}"
|
||||
HorizontalAlignment="Center" Foreground="{Binding Fill, Converter={StaticResource SkPaintToBrushConverter}}"
|
||||
FontWeight="SemiBold" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Panel>
|
||||
<StackPanel Spacing="20" IsVisible="{Binding HasSpendingData}">
|
||||
<lvc:CartesianChart Series="{Binding SpendingByCategoryChartSeries}" Height="250" Background="{DynamicResource BgSurface}"
|
||||
LegendPosition="Hidden" TooltipPosition="Hidden" ZoomMode="None" Name="chart">
|
||||
<lvc:CartesianChart.XAxes>
|
||||
<lvc:XamlAxis IsVisible="False" />
|
||||
</lvc:CartesianChart.XAxes>
|
||||
<lvc:CartesianChart.YAxes>
|
||||
<lvc:XamlLogarithmicAxis LogBase="10" IsVisible="False" MinLimit="1" />
|
||||
</lvc:CartesianChart.YAxes>
|
||||
</lvc:CartesianChart>
|
||||
<ItemsControl ItemsSource="{Binding SpendingByCategoryChartData}" Margin="0 -10 ">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1" HorizontalAlignment="Stretch" MaxWidth="{Binding MaxChartWidth}" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="model:ColumnChartData">
|
||||
<TextBlock Text="{Binding Name}" HorizontalAlignment="Center" Foreground="{DynamicResource TextDisabled}"
|
||||
Margin="4 0" TextTrimming="CharacterEllipsis" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Border HorizontalAlignment="Stretch" Height="1" Background="{DynamicResource BorderSubtle}" Margin="5 0" />
|
||||
<ItemsControl ItemsSource="{Binding SpendingByCategoryChartData}" Margin="0 -10 0 0 ">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1" HorizontalAlignment="Stretch" MaxWidth="{Binding MaxChartWidth}" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="model:ColumnChartData">
|
||||
<TextBlock Text="{Binding Values, Converter={StaticResource FirstValueConverter},StringFormat='$0'}"
|
||||
HorizontalAlignment="Center" Margin="4 0" TextTrimming="CharacterEllipsis"
|
||||
Foreground="{Binding Fill, Converter={StaticResource SkPaintToBrushConverter}}"
|
||||
FontWeight="SemiBold" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="12" Margin="0,60"
|
||||
IsVisible="{Binding !HasSpendingData}">
|
||||
<Svg Path="../Assets/Icons/chart-column.svg" Css="{DynamicResource SvgDisabled}" Height="40" Width="40" />
|
||||
<TextBlock Text="No spending data" FontSize="15" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextDisabled}" HorizontalAlignment="Center" />
|
||||
<TextBlock Text="Add expense transactions to see your spending breakdown." FontSize="13"
|
||||
Foreground="{DynamicResource TextDisabled}" HorizontalAlignment="Center" TextWrapping="Wrap"
|
||||
TextAlignment="Center"
|
||||
MaxWidth="250" />
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<!-- Budget Tracker -->
|
||||
@@ -168,49 +184,63 @@
|
||||
Foreground="{DynamicResource TextPrimary}" />
|
||||
<TextBlock Classes="muted" Text="Monthly limits" />
|
||||
</StackPanel>
|
||||
<ItemsControl ItemsSource="{Binding BudgetsTrackerData}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Spacing="20" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="model:Budget">
|
||||
<StackPanel Spacing="8">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="4">
|
||||
<Svg Path="{Binding Category.Icon, Converter={StaticResource SvgPathFromName}}" Height="13" Width="13"
|
||||
VerticalAlignment="Center" />
|
||||
<TextBlock Text="{Binding Category.Name}" FontSize="{StaticResource FontSizeBody}"
|
||||
VerticalAlignment="Center" Foreground="{DynamicResource TextSecondary}" />
|
||||
</StackPanel>
|
||||
<Panel Grid.Column="1">
|
||||
<StackPanel Orientation="Horizontal" IsVisible="{Binding !IsOverBudget}">
|
||||
<TextBlock Text="{Binding Spent, StringFormat='$0'}" FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource TextMuted}" />
|
||||
<TextBlock Text=" / " FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource TextMuted}" />
|
||||
<TextBlock Text="{Binding LimitAmount, StringFormat='$0'}" FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource TextMuted}" />
|
||||
<Panel>
|
||||
<ItemsControl ItemsSource="{Binding BudgetsTrackerData}" IsVisible="{Binding HasBudgetData}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Spacing="20" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="model:Budget">
|
||||
<StackPanel Spacing="8">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="4">
|
||||
<Svg Path="{Binding Category.Icon, Converter={StaticResource SvgPathFromName}}" Height="13"
|
||||
Width="13"
|
||||
VerticalAlignment="Center" />
|
||||
<TextBlock Text="{Binding Category.Name}" FontSize="{StaticResource FontSizeBody}"
|
||||
VerticalAlignment="Center" Foreground="{DynamicResource TextSecondary}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" IsVisible="{Binding IsOverBudget}">
|
||||
<TextBlock Text="{Binding Spent, StringFormat='$0'}" FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource AccentRed}" />
|
||||
<TextBlock Text=" / " FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource AccentRed}" />
|
||||
<TextBlock Text="{Binding LimitAmount, StringFormat='$0'}" FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource AccentRed}" />
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</Grid>
|
||||
<ProgressBar Classes.green="{Binding IsOnTrack}" Classes.yellow="{Binding IsWarning}"
|
||||
Classes.red="{Binding IsOverBudget}" Minimum="0" Value="{Binding Spent}"
|
||||
Maximum="{Binding LimitAmount}" />
|
||||
<Separator Margin="-8 4" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Panel Grid.Column="1">
|
||||
<StackPanel Orientation="Horizontal" IsVisible="{Binding !IsOverBudget}">
|
||||
<TextBlock Text="{Binding Spent, StringFormat='$0'}" FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource TextMuted}" />
|
||||
<TextBlock Text=" / " FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource TextMuted}" />
|
||||
<TextBlock Text="{Binding LimitAmount, StringFormat='$0'}"
|
||||
FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource TextMuted}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" IsVisible="{Binding IsOverBudget}">
|
||||
<TextBlock Text="{Binding Spent, StringFormat='$0'}" FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource AccentRed}" />
|
||||
<TextBlock Text=" / " FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource AccentRed}" />
|
||||
<TextBlock Text="{Binding LimitAmount, StringFormat='$0'}"
|
||||
FontSize="{StaticResource FontSizeMeta}"
|
||||
Foreground="{DynamicResource AccentRed}" />
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</Grid>
|
||||
<ProgressBar Classes.green="{Binding IsOnTrack}" Classes.yellow="{Binding IsWarning}"
|
||||
Classes.red="{Binding IsOverBudget}" Minimum="0" Value="{Binding Spent}"
|
||||
Maximum="{Binding LimitAmount}" />
|
||||
<Separator Margin="-8 4" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="12" Margin="0,60"
|
||||
IsVisible="{Binding !HasBudgetData}">
|
||||
<Svg Path="../Assets/Icons/wallet.svg" Css="{DynamicResource SvgDisabled}" Height="40" Width="40" />
|
||||
<TextBlock Text="No budgets set" FontSize="15" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextDisabled}" HorizontalAlignment="Center" />
|
||||
<TextBlock Text="Create budgets to track your spending limits." FontSize="13"
|
||||
Foreground="{DynamicResource TextDisabled}" HorizontalAlignment="Center" TextWrapping="Wrap"
|
||||
TextAlignment="Center" MaxWidth="200" />
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
@@ -231,50 +261,64 @@
|
||||
FontSize="{StaticResource FontSizeBody}" Cursor="Hand" Content="View all →" VerticalAlignment="Center"
|
||||
Command="{Binding ViewAllTransactionsCommand}" />
|
||||
</Grid>
|
||||
<ItemsControl ItemsSource="{Binding RecentTransactions}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Spacing="18" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="model:Transaction">
|
||||
<StackPanel Spacing="4">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto" Margin="0,4,0,0">
|
||||
<Border Grid.Column="0" CornerRadius="{StaticResource RadiusControl}" Width="42" Height="42" Margin="0,0,14,0">
|
||||
<Border.Background>
|
||||
<SolidColorBrush
|
||||
Color="{Binding Category.Color, Converter={StaticResource HexToColorConverter},ConverterParameter=color}"
|
||||
Opacity="0.15" />
|
||||
</Border.Background>
|
||||
<Svg Path="{Binding Category.Icon,Converter={StaticResource SvgPathFromName}}" Height="18" Width="18"
|
||||
Css="{Binding Category.Color, Converter={StaticResource HexToColorConverter},ConverterParameter=css}" />
|
||||
</Border>
|
||||
<StackPanel Grid.Column="1" VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Description}" FontSize="{StaticResource FontSizeBody}" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextSecondary}" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Category.Name}" Classes="muted" /> <TextBlock Text=" · " Classes="muted" />
|
||||
<TextBlock
|
||||
Text="{Binding Date,Converter={StaticResource DateFormatConverter},ConverterParameter='MMM d'}"
|
||||
Classes="muted" />
|
||||
<Panel>
|
||||
<ItemsControl ItemsSource="{Binding RecentTransactions}" IsVisible="{Binding HasTransactionData}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Spacing="18" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="model:Transaction">
|
||||
<StackPanel Spacing="4">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto" Margin="0,4,0,0">
|
||||
<Border Grid.Column="0" CornerRadius="{StaticResource RadiusControl}" Width="42" Height="42"
|
||||
Margin="0,0,14,0">
|
||||
<Border.Background>
|
||||
<SolidColorBrush
|
||||
Color="{Binding Category.Color, Converter={StaticResource HexToColorConverter},ConverterParameter=color}"
|
||||
Opacity="0.15" />
|
||||
</Border.Background>
|
||||
<Svg Path="{Binding Category.Icon,Converter={StaticResource SvgPathFromName}}" Height="18" Width="18"
|
||||
Css="{Binding Category.Color, Converter={StaticResource HexToColorConverter},ConverterParameter=css}" />
|
||||
</Border>
|
||||
<StackPanel Grid.Column="1" VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Description}" FontSize="{StaticResource FontSizeBody}" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextSecondary}" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Category.Name}" Classes="muted" />
|
||||
<TextBlock Text=" · " Classes="muted" />
|
||||
<TextBlock
|
||||
Text="{Binding Date,Converter={StaticResource DateFormatConverter},ConverterParameter='MMM d'}"
|
||||
Classes="muted" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Column="2" FontSize="{StaticResource FontSizeAmount}" FontWeight="SemiBold"
|
||||
Foreground="{Binding Type, Converter={StaticResource AmountColorConverter}}"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource AmountSignConverter}">
|
||||
<Binding Path="Amount" /> <Binding Path="Type" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
<Separator />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<TextBlock Grid.Column="2" FontSize="{StaticResource FontSizeAmount}" FontWeight="SemiBold"
|
||||
Foreground="{Binding Type, Converter={StaticResource AmountColorConverter}}"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource AmountSignConverter}">
|
||||
<Binding Path="Amount" /> <Binding Path="Type" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
<Separator />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="12" Margin="0,60"
|
||||
IsVisible="{Binding !HasTransactionData}">
|
||||
<Svg Path="../Assets/Icons/receipt.svg" Css="{DynamicResource SvgDisabled}" Height="40" Width="40" />
|
||||
<TextBlock Text="No transactions yet" FontSize="15" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextDisabled}" HorizontalAlignment="Center" />
|
||||
<TextBlock Text="Start tracking your finances by adding a transaction." FontSize="13"
|
||||
Foreground="{DynamicResource TextDisabled}" HorizontalAlignment="Center" TextWrapping="Wrap"
|
||||
TextAlignment="Center"
|
||||
MaxWidth="250" />
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<!-- Accounts Summary -->
|
||||
|
||||
@@ -91,20 +91,12 @@
|
||||
<Grid Grid.Row="1" ColumnDefinitions="220,*">
|
||||
<!-- ───────────────────────────────────── SIDEBAR ───────────────────────────────────── -->
|
||||
<Border Grid.Column="0" Background="{DynamicResource BgSidebar}" BorderBrush="{DynamicResource BorderSubtle}"
|
||||
BorderThickness="0,0,1,0" Padding="16,28,16,24">
|
||||
BorderThickness="0,0,1,0" Padding="16,28,16,24" IsEnabled="{Binding !IsTransactionFormVisible}">
|
||||
<DockPanel>
|
||||
<!-- Logo / App Name -->
|
||||
<StackPanel DockPanel.Dock="Top" Margin="0,0,0,36">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<Border Background="{DynamicResource AccentBlue}" CornerRadius="{StaticResource RadiusIcon}" Width="32" Height="32">
|
||||
<TextBlock Text="F" FontSize="16" FontWeight="Bold" Foreground="{DynamicResource BgBase}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="Clario" FontSize="17" FontWeight="Bold"
|
||||
Foreground="{DynamicResource TextPrimary}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel DockPanel.Dock="Top" Margin="0,0,0,24">
|
||||
<!-- <Svg Path="../Assets/logo-textmark-no-color.svg" Css="{DynamicResource SvgSecondary}" HorizontalAlignment="Stretch" -->
|
||||
<!-- Margin="4,12,24,0"/> -->
|
||||
</StackPanel>
|
||||
<!-- User Profile (bottom) -->
|
||||
<Border DockPanel.Dock="Bottom" Background="{DynamicResource BgSurface}" CornerRadius="{StaticResource RadiusInset}"
|
||||
@@ -186,10 +178,11 @@
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Border Grid.Column="0" Background="#70000000" IsVisible="{Binding IsTransactionFormVisible}" />
|
||||
<Grid Grid.Column="1">
|
||||
<ContentControl Content="{Binding CurrentView}" />
|
||||
<views:TransactionFormView
|
||||
DataContext="{Binding TransactionFormViewModel}"
|
||||
DataContext="{Binding TransactionFormViewModel}"
|
||||
IsVisible="{Binding DataContext.IsTransactionFormVisible,ElementName=MainControl}">
|
||||
</views:TransactionFormView>
|
||||
</Grid>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
MinWidth="1000" MinHeight="600"
|
||||
x:Class="Clario.Views.MainWindow"
|
||||
Icon="../Assets/logo-no-bg.ico"
|
||||
Title="Clario"
|
||||
x:CompileBindings="False">
|
||||
<ContentControl Content="{Binding}" />
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:Clario.ViewModels"
|
||||
xmlns:cc="clr-namespace:Clario.CustomControls"
|
||||
xmlns:behaviors="clr-namespace:Clario.Behaviors"
|
||||
mc:Ignorable="d"
|
||||
x:Class="Clario.Views.TransactionFormView"
|
||||
x:DataType="vm:TransactionFormViewModel">
|
||||
@@ -87,7 +88,7 @@
|
||||
CommandParameter="expense">
|
||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||
<Svg Path="../Assets/Icons/arrow-up-right.svg"
|
||||
Width="13" Height="13"/>
|
||||
Width="13" Height="13" />
|
||||
<TextBlock Text="Expense"
|
||||
FontSize="13"
|
||||
FontWeight="SemiBold"
|
||||
@@ -107,7 +108,7 @@
|
||||
CommandParameter="income">
|
||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||
<Svg Path="../Assets/Icons/arrow-down-left.svg"
|
||||
Width="13" Height="13"/>
|
||||
Width="13" Height="13" />
|
||||
<TextBlock Text="Income"
|
||||
FontSize="13"
|
||||
VerticalAlignment="Center" />
|
||||
@@ -141,7 +142,11 @@
|
||||
Foreground="{DynamicResource TextPrimary}"
|
||||
Height="54"
|
||||
Padding="0"
|
||||
VerticalContentAlignment="Center" />
|
||||
VerticalContentAlignment="Center">
|
||||
<Interaction.Behaviors>
|
||||
<behaviors:NumericInputBehavior />
|
||||
</Interaction.Behaviors>
|
||||
</TextBox>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding Currency}"
|
||||
FontSize="12"
|
||||
@@ -165,7 +170,12 @@
|
||||
|
||||
<!-- Category -->
|
||||
<StackPanel Grid.Column="0" Spacing="6">
|
||||
<TextBlock Text="CATEGORY" Classes="label" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="CATEGORY" Classes="label" />
|
||||
<Button Classes="nav" Padding="2 0">
|
||||
<Svg Path="../Assets/Icons/plus.svg" Height="11" Width="11"></Svg>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<Border Background="{DynamicResource BgBase}"
|
||||
BorderBrush="{DynamicResource BorderSubtle}"
|
||||
BorderThickness="1"
|
||||
@@ -248,7 +258,7 @@
|
||||
SelectionMode="SingleDate"
|
||||
SelectedDates="{Binding Dates}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="12,10"/>
|
||||
Padding="12,10" />
|
||||
<Button Grid.Column="1"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
@@ -302,7 +312,7 @@
|
||||
Padding="0,10"
|
||||
Margin="0,0,0,10"
|
||||
IsVisible="{Binding IsEditMode}"
|
||||
Command="{Binding DeleteCommand}">
|
||||
Command="{Binding RequestDeleteCommand}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<Svg Path="../Assets/Icons/trash-2.svg"
|
||||
Width="13" Height="13"
|
||||
@@ -316,9 +326,8 @@
|
||||
</Button>
|
||||
|
||||
<!-- ── Actions ──────────────────────── -->
|
||||
<Grid ColumnDefinitions="*,*">
|
||||
<Button Grid.Column="0"
|
||||
Classes="base"
|
||||
<UniformGrid Rows="1">
|
||||
<Button Classes="base"
|
||||
Margin="0,0,6,0"
|
||||
Padding="0,11"
|
||||
HorizontalAlignment="Stretch"
|
||||
@@ -326,8 +335,7 @@
|
||||
FontSize="13"
|
||||
Content="Cancel"
|
||||
Command="{Binding CancelCommand}" />
|
||||
<Button Grid.Column="1"
|
||||
Classes="accented"
|
||||
<Button Classes="accented"
|
||||
Margin="6,0,0,0"
|
||||
Padding="0,11"
|
||||
HorizontalAlignment="Stretch"
|
||||
@@ -345,9 +353,87 @@
|
||||
VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- DELETE CONFIRM MODAL -->
|
||||
<!-- ── Delete confirm modal ──────────────── -->
|
||||
<Grid IsVisible="{Binding ShowDeleteConfirm}">
|
||||
<Border Background="#50000000" />
|
||||
<Border HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Background="{DynamicResource BgSurface}"
|
||||
BorderBrush="{DynamicResource AccentRed}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="18"
|
||||
Padding="28"
|
||||
Width="340"
|
||||
BoxShadow="0 24 72 0 #60000000">
|
||||
<StackPanel Spacing="0">
|
||||
|
||||
<!-- Icon -->
|
||||
<Border Background="#2A0D0D"
|
||||
CornerRadius="14"
|
||||
Width="52" Height="52"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,0,0,16">
|
||||
<Svg Path="../Assets/Icons/trash-2.svg"
|
||||
Width="22" Height="22"
|
||||
Css="path, circle, rect, ellipse, line, polyline, polygon, text, use { stroke: #FF5E5E; }" />
|
||||
</Border>
|
||||
|
||||
<!-- Title -->
|
||||
<TextBlock Text="Delete Transaction"
|
||||
FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource TextPrimary}"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,0,0,8" />
|
||||
|
||||
<!-- Description -->
|
||||
<TextBlock Text="This action cannot be undone. The transaction will be permanently removed from your records."
|
||||
FontSize="13"
|
||||
Foreground="{DynamicResource TextMuted}"
|
||||
TextWrapping="Wrap"
|
||||
TextAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,0,0,24" />
|
||||
|
||||
<!-- Actions -->
|
||||
<UniformGrid Rows="1">
|
||||
<Button Classes="base"
|
||||
Margin="0,0,6,0"
|
||||
Padding="0,11"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
FontSize="13"
|
||||
Content="Cancel"
|
||||
Command="{Binding CancelDeleteCommand}" />
|
||||
<Button Margin="6,0,0,0"
|
||||
Padding="0,11"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
Background="#FF5E5E"
|
||||
BorderThickness="0"
|
||||
CornerRadius="{DynamicResource RadiusControl}"
|
||||
Command="{Binding ConfirmDeleteCommand}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<Svg Path="../Assets/Icons/trash-2.svg"
|
||||
Width="13" Height="13"
|
||||
Css="path, circle, rect, ellipse, line, polyline, polygon, text, use { stroke: #FFFFFF; }" />
|
||||
<TextBlock Text="Delete"
|
||||
FontSize="13"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="#FFFFFF"
|
||||
VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user