<commit_before>﻿<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:KryptPadCSApp.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Models="using:KryptPadCSApp.Models"
    x:Class="KryptPadCSApp.Views.NewItemPage"
    mc:Ignorable="d">

    <Page.DataContext>
        <Models:NewItemPageViewModel/>
    </Page.DataContext>

    <Page.BottomAppBar>
        <CommandBar>
            <AppBarButton Icon="Accept" Label="Done" Command="{Binding AddItemCommand}" />
            <AppBarButton Icon="Cancel" Label="Cancel" Command="{Binding CancelCommand}" />
        </CommandBar>
    </Page.BottomAppBar>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="10">

        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Margin="0,0,0,10">

            <TextBlock Text="{Binding Category.Name}" FontSize="{ThemeResource SplitViewLargeNavFontSize }" />

            <TextBlock Text="Item type" />
            <ComboBox ItemsSource="{Binding ItemTypes}"
                      SelectedItem="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

            <TextBlock Text="Item name" />
            <TextBox Text="{Binding ItemName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                     HorizontalAlignment="Left"
                     Width="250"/>
        </StackPanel>

        <Grid Visibility="{Binding FieldsVisibility}" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <StackPanel Grid.Row="0">
                <!--Field list-->
                <TextBlock TextWrapping="WrapWholeWords">
                        Add fields to this profile (e.g. Username, Password, etc...)
                </TextBlock>
                <Button Command="{Binding AddFieldCommand}">Add Field</Button>
            </StackPanel>

            <ScrollViewer Grid.Row="1" Margin="0,10,0,0">
                <!--Display a list of fields-->
                <ItemsControl ItemsSource="{Binding Fields}" Margin="0,0,0,50">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,20">
                                <!--<TextBlock Text="Field name (e.g. Password)" />-->
                                <TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" PlaceholderText="Field name" Margin="0,0,0,5" />
                                <!--<TextBlock Text="Value (e.g. MyP@$$w0rd!)" />-->
                                <TextBox Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" PlaceholderText="Value" Margin="0,0,0,5"/>
                            </StackPanel><commit_msg>commit<commit_after>﻿<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:KryptPadCSApp.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Models="using:KryptPadCSApp.Models"
    x:Class="KryptPadCSApp.Views.NewItemPage"
    mc:Ignorable="d">

    <Page.DataContext>
        <Models:NewItemPageViewModel/>
    </Page.DataContext>

    <Page.BottomAppBar>
        <CommandBar>
            <AppBarButton Icon="Accept" Label="Done" Command="{Binding AddItemCommand}" />
            <AppBarButton Icon="Cancel" Label="Cancel" Command="{Binding CancelCommand}" />
        </CommandBar>
    </Page.BottomAppBar>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="10">

        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Margin="0,0,0,10">

            <TextBlock Text="{Binding Category.Name}" FontSize="{ThemeResource SplitViewLargeNavFontSize }" />

            <TextBlock Text="Item type" />
            <ComboBox ItemsSource="{Binding ItemTypes}"
                      SelectedItem="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

            <TextBlock Text="Item name" />
            <TextBox Text="{Binding ItemName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                     HorizontalAlignment="Left"
                     Width="250"/>
        </StackPanel>

        <Grid 
              Grid.Row="1"
              MaxWidth="250"
              HorizontalAlignment="Stretch"
            >
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <StackPanel Grid.Row="0" 
                        HorizontalAlignment="Left">
                <!--Field list-->
                <TextBlock TextWrapping="WrapWholeWords">
                        Add fields to this profile (e.g. Username, Password, etc...)
                </TextBlock>
                <Button Command="{Binding AddFieldCommand}">Add Field</Button>
            </StackPanel>

            <ScrollViewer Grid.Row="1" Margin="0,10,0,0" 
                          Padding="0,0,50,0">
                <!--Display a list of fields-->
                <ItemsControl ItemsSource="{Binding Fields}" Margin="0,0,0,50">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>

                            <Grid Margin="0,0,0,20">

                                <Grid.RowDefinitions>
                                    <RowDefinition Height="auto" />
                                    <RowDefinition Height="auto" />
                                </Grid.RowDefinitions>

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="auto"/>
                                </Grid.ColumnDefinitions>



                                <!--<TextBlock Text="Field name (e.g. Password)" />-->
                                <TextBlock Text="{Binding Name}" 
                                               Grid.Row="0"
                                               Grid.Column="0" />

                                <!--<TextBlock Text="Value (e.g. MyP@$$w0rd!)" />-->
                                <TextBox Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                                             PlaceholderText="Value" 
                                             Grid.Row="1"
                                             Grid.Column="0"/>


                                <Button Grid.Row="1"
                                        Grid.Column="1">
                                    <SymbolIcon Symbol="Delete" />
                                </Button>

                            </Grid>



{'fraction_non_alphanumeric': 0.12804711038071762, 'fraction_numerical': 0.015612161051766639, 'mean_word_length': 1.6317117117117117, 'pattern_counts': {'":': 0, '<': 108, '<?xml version=': 0, '>': 108, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1768762', 'n_tokens_mistral': 1996, 'n_tokens_neox': 1763, 'n_words': 291}