| | 8 | 1 | | <Application xmlns="https://github.com/avaloniaui" |
| | | 2 | | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| | | 3 | | x:Class="LOCKnet.App.App" |
| | | 4 | | xmlns:local="using:LOCKnet.App" |
| | | 5 | | xmlns:conv="using:LOCKnet.App.Converters" |
| | | 6 | | xmlns:materialIcons="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia" |
| | 2 | 7 | | RequestedThemeVariant="Dark"> |
| | | 8 | | <!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. --> |
| | | 9 | | |
| | | 10 | | <Application.DataTemplates> |
| | 2 | 11 | | <local:ViewLocator/> |
| | | 12 | | </Application.DataTemplates> |
| | | 13 | | |
| | | 14 | | <Application.Resources> |
| | | 15 | | <!-- Color tokens --> |
| | 6 | 16 | | <Color x:Key="ColorBg">#111111</Color> |
| | 6 | 17 | | <Color x:Key="ColorSurface">#1A1A1A</Color> |
| | 6 | 18 | | <Color x:Key="ColorSurfaceHover">#232323</Color> |
| | 6 | 19 | | <Color x:Key="ColorSurfaceActive">#2C2C2C</Color> |
| | 6 | 20 | | <Color x:Key="ColorInput">#181818</Color> |
| | 6 | 21 | | <Color x:Key="ColorBorder">#333333</Color> |
| | | 22 | | |
| | 6 | 23 | | <Color x:Key="ColorAccent">#FF6B00</Color> |
| | 6 | 24 | | <Color x:Key="ColorAccentHover">#FF8126</Color> |
| | | 25 | | |
| | 6 | 26 | | <Color x:Key="ColorTextPrimary">#F5F5F5</Color> |
| | 6 | 27 | | <Color x:Key="ColorTextSecondary">#AAAAAA</Color> |
| | 6 | 28 | | <Color x:Key="ColorTextMuted">#666666</Color> |
| | | 29 | | |
| | 6 | 30 | | <Color x:Key="ColorError">#FF3B30</Color> |
| | 6 | 31 | | <Color x:Key="ColorSuccess">#30D158</Color> |
| | | 32 | | |
| | | 33 | | <!-- SolidColorBrush tokens (derived from Color tokens) --> |
| | 8 | 34 | | <SolidColorBrush x:Key="BrushBg" Color="{StaticResource ColorBg}"/> |
| | 10 | 35 | | <SolidColorBrush x:Key="BrushSurface" Color="{StaticResource ColorSurface}"/> |
| | 10 | 36 | | <SolidColorBrush x:Key="BrushSurfaceHover" Color="{StaticResource ColorSurfaceHover}"/> |
| | 6 | 37 | | <SolidColorBrush x:Key="BrushSurfaceActive" Color="{StaticResource ColorSurfaceActive}"/> |
| | 10 | 38 | | <SolidColorBrush x:Key="BrushInput" Color="{StaticResource ColorInput}"/> |
| | 10 | 39 | | <SolidColorBrush x:Key="BrushBorder" Color="{StaticResource ColorBorder}"/> |
| | 10 | 40 | | <SolidColorBrush x:Key="BrushAccent" Color="{StaticResource ColorAccent}"/> |
| | 10 | 41 | | <SolidColorBrush x:Key="BrushTextPrimary" Color="{StaticResource ColorTextPrimary}"/> |
| | 10 | 42 | | <SolidColorBrush x:Key="BrushTextSecondary" Color="{StaticResource ColorTextSecondary}"/> |
| | 8 | 43 | | <SolidColorBrush x:Key="BrushTextMuted" Color="{StaticResource ColorTextMuted}"/> |
| | 10 | 44 | | <SolidColorBrush x:Key="BrushError" Color="{StaticResource ColorError}"/> |
| | 8 | 45 | | <SolidColorBrush x:Key="BrushSuccess" Color="{StaticResource ColorSuccess}"/> |
| | | 46 | | |
| | | 47 | | <!-- CornerRadius tokens --> |
| | 6 | 48 | | <CornerRadius x:Key="RadiusSm">4</CornerRadius> |
| | 6 | 49 | | <CornerRadius x:Key="RadiusMd">8</CornerRadius> |
| | 6 | 50 | | <CornerRadius x:Key="RadiusLg">12</CornerRadius> |
| | 6 | 51 | | <CornerRadius x:Key="RadiusXl">16</CornerRadius> |
| | | 52 | | |
| | 7 | 53 | | <conv:IconSelectedBrushConverter x:Key="IconSelectedBrushConverter"/> |
| | 7 | 54 | | <conv:StringToMaterialIconKindConverter x:Key="StringToMaterialIconKindConverter"/> |
| | 7 | 55 | | <conv:CredentialTypeIsApiKeyConverter x:Key="CredentialTypeIsApiKeyConverter"/> |
| | 7 | 56 | | <conv:CredentialTypeIsBackupCodesConverter x:Key="CredentialTypeIsBackupCodesConverter"/> |
| | | 57 | | </Application.Resources> |
| | | 58 | | |
| | | 59 | | <Application.Styles> |
| | 2 | 60 | | <FluentTheme /> |
| | 2 | 61 | | <materialIcons:MaterialIconStyles /> |
| | | 62 | | |
| | | 63 | | <!-- Button.primary --> |
| | 2 | 64 | | <Style Selector="Button.primary"> |
| | 6 | 65 | | <Setter Property="Background" Value="{StaticResource BrushAccent}"/> |
| | 6 | 66 | | <Setter Property="Foreground" Value="White"/> |
| | 6 | 67 | | <Setter Property="FontWeight" Value="SemiBold"/> |
| | 6 | 68 | | <Setter Property="CornerRadius" Value="{StaticResource RadiusMd}"/> |
| | 6 | 69 | | <Setter Property="Padding" Value="0,12"/> |
| | | 70 | | </Style> |
| | 2 | 71 | | <Style Selector="Button.primary:pointerover /template/ ContentPresenter"> |
| | 6 | 72 | | <Setter Property="Background" Value="{StaticResource ColorAccentHover}"/> |
| | 6 | 73 | | <Setter Property="Foreground" Value="White"/> |
| | | 74 | | </Style> |
| | | 75 | | |
| | | 76 | | <!-- Button.secondary --> |
| | 2 | 77 | | <Style Selector="Button.secondary"> |
| | 6 | 78 | | <Setter Property="Background" Value="{StaticResource BrushSurface}"/> |
| | 6 | 79 | | <Setter Property="Foreground" Value="{StaticResource BrushTextSecondary}"/> |
| | 6 | 80 | | <Setter Property="CornerRadius" Value="{StaticResource RadiusMd}"/> |
| | 6 | 81 | | <Setter Property="Padding" Value="0,12"/> |
| | | 82 | | </Style> |
| | 2 | 83 | | <Style Selector="Button.secondary:pointerover /template/ ContentPresenter"> |
| | 6 | 84 | | <Setter Property="Background" Value="{StaticResource BrushSurfaceHover}"/> |
| | 6 | 85 | | <Setter Property="Foreground" Value="{StaticResource BrushTextPrimary}"/> |
| | | 86 | | </Style> |
| | | 87 | | |
| | | 88 | | <!-- Button.ghost --> |
| | 2 | 89 | | <Style Selector="Button.ghost"> |
| | 6 | 90 | | <Setter Property="Background" Value="Transparent"/> |
| | 6 | 91 | | <Setter Property="Foreground" Value="{StaticResource BrushTextSecondary}"/> |
| | 6 | 92 | | <Setter Property="CornerRadius" Value="{StaticResource RadiusMd}"/> |
| | | 93 | | </Style> |
| | 2 | 94 | | <Style Selector="Button.ghost:pointerover /template/ ContentPresenter"> |
| | 6 | 95 | | <Setter Property="Background" Value="{StaticResource BrushSurfaceHover}"/> |
| | 6 | 96 | | <Setter Property="Foreground" Value="{StaticResource BrushTextPrimary}"/> |
| | | 97 | | </Style> |
| | | 98 | | |
| | | 99 | | <!-- Button.danger --> |
| | 2 | 100 | | <Style Selector="Button.danger"> |
| | 6 | 101 | | <Setter Property="Background" Value="Transparent"/> |
| | 6 | 102 | | <Setter Property="Foreground" Value="{StaticResource BrushError}"/> |
| | 6 | 103 | | <Setter Property="CornerRadius" Value="{StaticResource RadiusMd}"/> |
| | | 104 | | </Style> |
| | 2 | 105 | | <Style Selector="Button.danger:pointerover /template/ ContentPresenter"> |
| | 6 | 106 | | <Setter Property="Background" Value="{StaticResource BrushSurfaceHover}"/> |
| | 6 | 107 | | <Setter Property="Foreground" Value="{StaticResource BrushError}"/> |
| | | 108 | | </Style> |
| | | 109 | | |
| | | 110 | | <!-- TextBox global style --> |
| | 2 | 111 | | <Style Selector="TextBox"> |
| | 6 | 112 | | <Setter Property="Background" Value="{StaticResource BrushInput}"/> |
| | 6 | 113 | | <Setter Property="BorderBrush" Value="{StaticResource BrushBorder}"/> |
| | 6 | 114 | | <Setter Property="Foreground" Value="{StaticResource BrushTextPrimary}"/> |
| | 6 | 115 | | <Setter Property="CornerRadius" Value="{StaticResource RadiusMd}"/> |
| | 6 | 116 | | <Setter Property="Padding" Value="12,10"/> |
| | 6 | 117 | | <Setter Property="CaretBrush" Value="{StaticResource BrushAccent}"/> |
| | | 118 | | </Style> |
| | 2 | 119 | | <Style Selector="TextBox:focus /template/ Border#PART_BorderElement"> |
| | 6 | 120 | | <Setter Property="BorderBrush" Value="{StaticResource BrushAccent}"/> |
| | 6 | 121 | | <Setter Property="Background" Value="{StaticResource BrushInput}"/> |
| | | 122 | | </Style> |
| | 2 | 123 | | <Style Selector="TextBox:pointerover /template/ Border#PART_BorderElement"> |
| | 6 | 124 | | <Setter Property="BorderBrush" Value="{StaticResource BrushAccent}"/> |
| | 6 | 125 | | <Setter Property="Background" Value="{StaticResource BrushInput}"/> |
| | | 126 | | </Style> |
| | | 127 | | |
| | | 128 | | <!-- ListBoxItem global style --> |
| | 2 | 129 | | <Style Selector="ListBoxItem"> |
| | 6 | 130 | | <Setter Property="Background" Value="Transparent"/> |
| | 6 | 131 | | <Setter Property="Padding" Value="0"/> |
| | 6 | 132 | | <Setter Property="Margin" Value="0,4"/> |
| | | 133 | | </Style> |
| | 2 | 134 | | <Style Selector="ListBoxItem:pointerover /template/ ContentPresenter"> |
| | 6 | 135 | | <Setter Property="Background" Value="Transparent"/> |
| | | 136 | | </Style> |
| | 2 | 137 | | <Style Selector="ListBoxItem:selected /template/ ContentPresenter"> |
| | 6 | 138 | | <Setter Property="Background" Value="Transparent"/> |
| | | 139 | | </Style> |
| | 2 | 140 | | <Style Selector="ListBoxItem:selected:focus /template/ ContentPresenter"> |
| | 6 | 141 | | <Setter Property="Background" Value="Transparent"/> |
| | | 142 | | </Style> |
| | 2 | 143 | | <Style Selector="ListBoxItem:selected:pointerover /template/ ContentPresenter"> |
| | 6 | 144 | | <Setter Property="Background" Value="Transparent"/> |
| | | 145 | | </Style> |
| | | 146 | | |
| | | 147 | | </Application.Styles> |
| | | 148 | | </Application> |