Phase 0 (T1-3/4/7/9/11): find bar w/ native Find API + search engine + site zoom + force reload + F11, wired into MainWindow, E2E smoke (39 tests)
This commit is contained in:
parent
470c9267f2
commit
00a822eaeb
11 changed files with 584 additions and 18 deletions
|
|
@ -4,6 +4,7 @@ using System.Windows.Controls;
|
|||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using Microsoft.Win32;
|
||||
using VideoDownloader.App.Browser;
|
||||
using VideoDownloader.Core.Config;
|
||||
using VideoDownloader.Core.Social;
|
||||
|
||||
|
|
@ -54,6 +55,19 @@ public partial class SettingsWindow : Window
|
|||
ProfileModeText.Text = config.PrivateMode
|
||||
? "개인정보 보호 모드(InPrivate) — 데이터를 저장하지 않습니다"
|
||||
: "일반 모드 — 쿠키·세션·localStorage 를 프로필에 보존합니다";
|
||||
|
||||
SearchEngineBox.ItemsSource = SearchEngines.Presets.Select(e => e.Name).ToList();
|
||||
SearchEngineBox.SelectedItem = SearchEngines.FindByName(config.SearchEngine)?.Name ?? "Google";
|
||||
if (SearchEngineBox.SelectedIndex < 0) SearchEngineBox.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private void SearchEngineBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (SearchEngineHint == null) return;
|
||||
var engine = SearchEngines.FindByName(SearchEngineBox.SelectedItem as string);
|
||||
SearchEngineHint.Text = engine == null
|
||||
? "주소창에 검색어를 입력하면 검색합니다"
|
||||
: $"주소창에 검색어 입력 시 {engine.Name}(으)로 검색합니다. `g 검색어`처럼 키워드로 즉시 전환도 가능해요";
|
||||
}
|
||||
|
||||
private void BrowseFolder(object sender, RoutedEventArgs e)
|
||||
|
|
@ -134,6 +148,7 @@ public partial class SettingsWindow : Window
|
|||
Config.AutoInstallDeno = AutoInstallDenoBox.IsChecked == true;
|
||||
Config.DefaultSocialQuality = (DefaultQualityBox.SelectedValue as string) ?? "best";
|
||||
Config.YoutubePlayerClients = string.IsNullOrWhiteSpace(YoutubeClientsBox.Text) ? null : YoutubeClientsBox.Text.Trim();
|
||||
Config.SearchEngine = SearchEngineBox.SelectedItem as string ?? "Google";
|
||||
|
||||
DialogResult = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue