feat(ui): wallet name field in creation wizard
The last wizard step (password) now shows an optional name field. The name becomes the filename: <name>.wallet.json in the wallets directory. Invalid filename characters are replaced with '_'. If left empty, the existing auto-name logic applies (default.wallet.json, wallet-2.wallet.json, …). If the chosen name already exists the wizard shows an error instead of overwriting. The name field is visually separated from the encryption section by a distinct background panel and a horizontal divider.
This commit is contained in:
@@ -254,18 +254,39 @@
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Passo finale: password del file (cifratura, stile Electrum) -->
|
||||
<StackPanel IsVisible="{Binding IsStepPassword}" Spacing="12">
|
||||
<!-- Passo finale: nome + password del file (cifratura, stile Electrum) -->
|
||||
<StackPanel IsVisible="{Binding IsStepPassword}" Spacing="16">
|
||||
<TextBlock Text="{Binding Loc[wiz.password.title]}" FontSize="18" FontWeight="Bold"/>
|
||||
<TextBox PlaceholderText="{Binding Loc[wiz.password.placeholder]}"
|
||||
PasswordChar="●" Text="{Binding PasswordInput}"/>
|
||||
<TextBox PlaceholderText="{Binding Loc[wiz.password.confirm]}"
|
||||
PasswordChar="●" Text="{Binding ConfirmPasswordInput}"/>
|
||||
<CheckBox Content="{Binding Loc[wiz.password.encrypt]}"
|
||||
IsChecked="{Binding EncryptWallet}"/>
|
||||
<TextBlock Text="{Binding Loc[wiz.password.encrypt.hint]}"
|
||||
Foreground="Gray" FontSize="12" TextWrapping="Wrap"
|
||||
IsVisible="{Binding !EncryptWallet}"/>
|
||||
|
||||
<!-- Sezione nome: bordo distinto dal gruppo password -->
|
||||
<Border BorderBrush="{DynamicResource SystemAccentColor}"
|
||||
BorderThickness="0,0,0,0"
|
||||
Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
|
||||
CornerRadius="6" Padding="12,10">
|
||||
<StackPanel Spacing="6">
|
||||
<TextBlock Text="{Binding Loc[wiz.name.label]}"
|
||||
FontWeight="SemiBold" FontSize="13"/>
|
||||
<TextBox PlaceholderText="{Binding Loc[wiz.name.placeholder]}"
|
||||
Text="{Binding WalletNameInput}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Separatore visivo -->
|
||||
<Separator Margin="0,0"/>
|
||||
|
||||
<!-- Sezione cifratura -->
|
||||
<StackPanel Spacing="8">
|
||||
<TextBox PlaceholderText="{Binding Loc[wiz.password.placeholder]}"
|
||||
PasswordChar="●" Text="{Binding PasswordInput}"/>
|
||||
<TextBox PlaceholderText="{Binding Loc[wiz.password.confirm]}"
|
||||
PasswordChar="●" Text="{Binding ConfirmPasswordInput}"/>
|
||||
<CheckBox Content="{Binding Loc[wiz.password.encrypt]}"
|
||||
IsChecked="{Binding EncryptWallet}"/>
|
||||
<TextBlock Text="{Binding Loc[wiz.password.encrypt.hint]}"
|
||||
Foreground="Gray" FontSize="12" TextWrapping="Wrap"
|
||||
IsVisible="{Binding !EncryptWallet}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<Button Content="{Binding Loc[wiz.back]}" Command="{Binding WizardBackCommand}"/>
|
||||
<Button Content="{Binding Loc[wiz.password.create]}" Classes="accent"
|
||||
|
||||
Reference in New Issue
Block a user