Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: enter submits sign in information#90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ibetitsmike merged 6 commits intomainfrommike/88-enter-submits-sign-in
May 8, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletionApp/Views/Pages/SignInTokenPage.xaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,8 +62,9 @@
Grid.Row="2"
HorizontalAlignment="Stretch"
PlaceholderText="Paste your token here"
KeyDown="PasswordBox_KeyDown"
LostFocus="{x:Bind ViewModel.ApiToken_FocusLost, Mode=OneWay}"
Password="{x:Bind ViewModel.ApiToken, Mode=TwoWay}" />
Password="{x:Bind ViewModel.ApiToken, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

<TextBlock
Grid.Column="1"
Expand Down
10 changes: 10 additions & 0 deletionsApp/Views/Pages/SignInTokenPage.xaml.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
using Coder.Desktop.App.ViewModels;
using Microsoft.UI.Xaml.Controls;
using Windows.System;

namespace Coder.Desktop.App.Views.Pages;

Expand All@@ -17,4 +18,13 @@ public SignInTokenPage(SignInWindow parent, SignInViewModel viewModel)
ViewModel = viewModel;
SignInWindow = parent;
}

private async void PasswordBox_KeyDown(object sender, Microsoft.UI.Xaml.Input.KeyRoutedEventArgs e)
{
if (e.Key == VirtualKey.Enter)
{
await ViewModel.TokenPage_SignIn(SignInWindow);
e.Handled = true;
}
}
}
3 changes: 2 additions & 1 deletionApp/Views/Pages/SignInUrlPage.xaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -48,7 +48,8 @@
PlaceholderText="https://coder.example.com"
Loaded="{x:Bind ViewModel.CoderUrl_Loaded, Mode=OneWay}"
LostFocus="{x:Bind ViewModel.CoderUrl_FocusLost, Mode=OneWay}"
Text="{x:Bind ViewModel.CoderUrl, Mode=TwoWay}" />
Text="{x:Bind ViewModel.CoderUrl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
KeyDown="TextBox_KeyDown"/>

<TextBlock
Grid.Column="1"
Expand Down
10 changes: 10 additions & 0 deletionsApp/Views/Pages/SignInUrlPage.xaml.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
using Coder.Desktop.App.ViewModels;
using Microsoft.UI.Xaml.Controls;
using Windows.System;

namespace Coder.Desktop.App.Views.Pages;

Expand All@@ -17,4 +18,13 @@ public SignInUrlPage(SignInWindow parent, SignInViewModel viewModel)
ViewModel = viewModel;
SignInWindow = parent;
}

private void TextBox_KeyDown(object sender, Microsoft.UI.Xaml.Input.KeyRoutedEventArgs e)
{
if (e.Key == VirtualKey.Enter)
{
ViewModel.UrlPage_Next(SignInWindow);
e.Handled = true;
}
}
}
Loading

[8]ページ先頭

©2009-2025 Movatter.jp