-
-
Notifications
You must be signed in to change notification settings - Fork 455
Plugin Page Control Swap Feature & Restore "Search Delay" Field in General Page #3421
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
1eacdf8
Add Control in PluginDisplay
onesounds 5fa244c
Add setting filter
onesounds 0136c57
Add Setting Filter
onesounds fb50e6d
Add search delay control
onesounds d77400d
Add customcontrol for searchdelay
onesounds 378e98f
Merge branch 'dev' into 250331-NewPluginsPage
onesounds 3ca958c
Merge remote-tracking branch 'origin/dev' into 250331-NewPluginsPage
onesounds a65e89b
Adjust advanced control UI
onesounds f3fcaee
- Add strings
onesounds 276af43
Remove Delay item in plugin setting page layout
onesounds 44a1a47
Add help window with content dialogue style
onesounds b81f9be
Adjust numberbox
onesounds cd39164
Fix Typo
onesounds adbd262
Merge branch 'dev' into 250331-NewPluginsPage
Jack251970 81715f1
Cleanup codes
Jack251970 bf63dda
Improve code quality
Jack251970 44f136c
Use binding instead of local functions
Jack251970 dc7b812
Change search delay time to int & Improve code quality & Improve strings
Jack251970 dfb6b0a
Fix string resource issue
Jack251970 24bbfcc
Support numerical box for priority
Jack251970 6726828
Support numerical box for search delay
Jack251970 65f48e3
Force priority to 0 when inputing empty
Jack251970 e955e47
- Change combobox to numberbox
onesounds cbf5031
Fix content dialog style
onesounds d30f292
Remove unused string
Jack251970 970bb3a
Add code comments
Jack251970 61fa460
Disable search delay number box when search delay is disabled
Jack251970 ade4fbf
Adjust number box width
Jack251970 c33fae9
Change default search delay time to value
Jack251970 d09899e
Adjust Placeholder color
onesounds c351a38
Merge branch 'dev' into 250331-NewPluginsPage
onesounds File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
Flow.Launcher/Converters/StringEqualityToVisibilityConverter.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| using System; | ||
| using System.Globalization; | ||
| using System.Windows; | ||
| using System.Windows.Data; | ||
|
|
||
| namespace Flow.Launcher.Converters | ||
| { | ||
| public class StringEqualityToVisibilityConverter : IValueConverter | ||
| { | ||
| public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
| { | ||
| if (value == null || parameter == null) | ||
| return Visibility.Collapsed; | ||
|
|
||
| return value.ToString() == parameter.ToString() ? Visibility.Visible : Visibility.Collapsed; | ||
| } | ||
|
|
||
| public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
| { | ||
| throw new NotImplementedException(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <UserControl | ||
| x:Class="Flow.Launcher.Resources.Controls.InstalledPluginSearchDelayCombobox" | ||
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
| xmlns:viewModel="clr-namespace:Flow.Launcher.ViewModel" | ||
| d:DataContext="{d:DesignInstance viewModel:PluginViewModel}" | ||
| d:DesignHeight="300" | ||
| d:DesignWidth="300" | ||
| mc:Ignorable="d"> | ||
| <Border | ||
| Width="Auto" | ||
| Height="Auto" | ||
| Margin="0" | ||
| Padding="0" | ||
| BorderThickness="0" | ||
| CornerRadius="0"> | ||
| <DockPanel> | ||
| <TextBlock Visibility="Collapsed" | ||
| Margin="0 0 8 0" | ||
| HorizontalAlignment="Left" | ||
| VerticalAlignment="Center" | ||
| DockPanel.Dock="Left" | ||
| Text="{DynamicResource pluginSearchDelayTime}" | ||
| FontSize="13" | ||
| Foreground="{DynamicResource Color08B}" /> | ||
| <ComboBox | ||
| x:Name="cbDelay" | ||
| Width="100" | ||
| HorizontalAlignment="Right" | ||
| DisplayMemberPath="Display" | ||
| SelectedValuePath="Value" | ||
| SelectionChanged="CbDelay_SelectionChanged" | ||
| DockPanel.Dock="Right" | ||
| ToolTip="{DynamicResource pluginSearchDelayTimeTooltip}" /> | ||
| </DockPanel> | ||
| </Border> | ||
| </UserControl> |
84 changes: 84 additions & 0 deletions
84
Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| using System.Collections.Generic; | ||
| using System.Windows.Controls; | ||
| using Flow.Launcher.Plugin; | ||
|
|
||
| namespace Flow.Launcher.Resources.Controls | ||
| { | ||
| public partial class InstalledPluginSearchDelayCombobox | ||
| { | ||
| public InstalledPluginSearchDelayCombobox() | ||
| { | ||
| InitializeComponent(); | ||
| LoadDelayOptions(); | ||
| Loaded += InstalledPluginSearchDelayCombobox_Loaded; | ||
| } | ||
|
|
||
| private void InstalledPluginSearchDelayCombobox_Loaded(object sender, System.Windows.RoutedEventArgs e) | ||
| { | ||
| if (DataContext is ViewModel.PluginViewModel viewModel) | ||
| { | ||
| // 초기 값 설정 | ||
| int currentDelayMs = GetCurrentDelayMs(viewModel); | ||
| foreach (DelayOption option in cbDelay.Items) | ||
| { | ||
| if (option.Value == currentDelayMs) | ||
| { | ||
| cbDelay.SelectedItem = option; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private int GetCurrentDelayMs(ViewModel.PluginViewModel viewModel) | ||
| { | ||
| // SearchDelayTime enum 값을 int로 변환 | ||
| SearchDelayTime? delayTime = viewModel.PluginPair.Metadata.SearchDelayTime; | ||
| if (delayTime.HasValue) | ||
| { | ||
| return (int)delayTime.Value; | ||
| } | ||
| return 0; // 기본값 | ||
| } | ||
|
|
||
| private void LoadDelayOptions() | ||
| { | ||
| // 검색 지연 시간 옵션들 (SearchDelayTime enum 값에 맞춰야 함) | ||
| var delayOptions = new List<DelayOption> | ||
| { | ||
| new DelayOption { Display = "0 ms", Value = 0 }, | ||
| new DelayOption { Display = "50 ms", Value = 50 }, | ||
| new DelayOption { Display = "100 ms", Value = 100 }, | ||
| new DelayOption { Display = "150 ms", Value = 150 }, | ||
| new DelayOption { Display = "200 ms", Value = 200 }, | ||
| new DelayOption { Display = "250 ms", Value = 250 }, | ||
| new DelayOption { Display = "300 ms", Value = 300 }, | ||
| new DelayOption { Display = "350 ms", Value = 350 }, | ||
| new DelayOption { Display = "400 ms", Value = 400 }, | ||
| new DelayOption { Display = "450 ms", Value = 450 }, | ||
| new DelayOption { Display = "500 ms", Value = 500 }, | ||
| }; | ||
|
|
||
| cbDelay.ItemsSource = delayOptions; | ||
| } | ||
Jack251970 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| private void CbDelay_SelectionChanged(object sender, SelectionChangedEventArgs e) | ||
| { | ||
| if (DataContext is ViewModel.PluginViewModel viewModel && cbDelay.SelectedItem is DelayOption selectedOption) | ||
| { | ||
| // int 값을 SearchDelayTime enum으로 변환 | ||
| int delayValue = selectedOption.Value; | ||
| viewModel.PluginPair.Metadata.SearchDelayTime = (SearchDelayTime)delayValue; | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| // 설정 저장 | ||
| //How to save? | ||
Jack251970 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
Jack251970 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
|
|
||
| public class DelayOption | ||
| { | ||
| public string Display { get; set; } | ||
| public int Value { get; set; } | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.