Merge branch 'dev' into fix_shell_and_change_query

This commit is contained in:
Jeremy Wu 2022-12-12 20:09:52 +11:00 committed by GitHub
commit dd0f42eaac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 504 additions and 252 deletions

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
namespace Flow.Launcher.Core.Plugin
{
@ -26,6 +27,8 @@ namespace Flow.Launcher.Core.Plugin
public string Name { get; set; }
public string Label { get; set; }
public string Description { get; set; }
public string urlLabel { get; set; }
public Uri url { get; set; }
public bool Validation { get; set; }
public List<string> Options { get; set; }
public string DefaultValue { get; set; }
@ -40,4 +43,4 @@ namespace Flow.Launcher.Core.Plugin
DefaultValue = this.DefaultValue;
}
}
}
}

View file

@ -22,6 +22,10 @@ using Control = System.Windows.Controls.Control;
using Orientation = System.Windows.Controls.Orientation;
using TextBox = System.Windows.Controls.TextBox;
using UserControl = System.Windows.Controls.UserControl;
using System.Windows.Documents;
using static System.Windows.Forms.LinkLabel;
using Droplex;
using System.Windows.Forms;
namespace Flow.Launcher.Core.Plugin
{
@ -33,7 +37,6 @@ namespace Flow.Launcher.Core.Plugin
{
protected PluginInitContext context;
public const string JsonRPC = "JsonRPC";
/// <summary>
/// The language this JsonRPCPlugin support
/// </summary>
@ -340,9 +343,14 @@ namespace Flow.Launcher.Core.Plugin
this.context = context;
await InitSettingAsync();
}
private static readonly Thickness settingControlMargin = new(10, 4, 10, 4);
private static readonly Thickness settingPanelMargin = new(15, 20, 15, 20);
private static readonly Thickness settingTextBlockMargin = new(10, 4, 10, 4);
private static readonly Thickness settingControlMargin = new(0, 9, 18, 9);
private static readonly Thickness settingCheckboxMargin = new(0, 9, 9, 9);
private static readonly Thickness settingPanelMargin = new(0, 0, 0, 0);
private static readonly Thickness settingTextBlockMargin = new(70, 9, 18, 9);
private static readonly Thickness settingLabelPanelMargin = new(70, 9, 18, 9);
private static readonly Thickness settingLabelMargin = new(0, 0, 0, 0);
private static readonly Thickness settingDescMargin = new(0, 2, 0, 0);
private static readonly Thickness settingSepMargin = new(0, 0, 0, 2);
private JsonRpcConfigurationModel _settingsTemplate;
public Control CreateSettingPanel()
@ -350,26 +358,60 @@ namespace Flow.Launcher.Core.Plugin
if (Settings == null)
return new();
var settingWindow = new UserControl();
var mainPanel = new StackPanel
var mainPanel = new Grid
{
Margin = settingPanelMargin, Orientation = Orientation.Vertical
Margin = settingPanelMargin, VerticalAlignment = VerticalAlignment.Center
};
settingWindow.Content = mainPanel;
ColumnDefinition gridCol1 = new ColumnDefinition();
ColumnDefinition gridCol2 = new ColumnDefinition();
gridCol1.Width = new GridLength(70, GridUnitType.Star);
gridCol2.Width = new GridLength(30, GridUnitType.Star);
mainPanel.ColumnDefinitions.Add(gridCol1);
mainPanel.ColumnDefinitions.Add(gridCol2);
settingWindow.Content = mainPanel;
int rowCount = 0;
foreach (var (type, attribute) in _settingsTemplate.Body)
{
Separator sep = new Separator();
sep.VerticalAlignment = VerticalAlignment.Top;
sep.Margin = settingSepMargin;
sep.SetResourceReference(Separator.BackgroundProperty, "Color03B"); /* for theme change */
var panel = new StackPanel
{
Orientation = Orientation.Horizontal, Margin = settingControlMargin
Orientation = Orientation.Vertical, VerticalAlignment = VerticalAlignment.Center,
Margin = settingLabelPanelMargin
};
RowDefinition gridRow = new RowDefinition();
mainPanel.RowDefinitions.Add(gridRow);
var name = new TextBlock()
{
Text = attribute.Label,
Width = 120,
VerticalAlignment = VerticalAlignment.Center,
Margin = settingControlMargin,
Margin = settingLabelMargin,
TextWrapping = TextWrapping.WrapWithOverflow
};
var desc = new TextBlock()
{
Text = attribute.Description, FontSize = 12,
VerticalAlignment = VerticalAlignment.Center,Margin = settingDescMargin,
TextWrapping = TextWrapping.WrapWithOverflow
};
desc.SetResourceReference(TextBlock.ForegroundProperty, "Color04B");
if (attribute.Description == null) /* if no description, hide */
desc.Visibility = Visibility.Collapsed;
if (type != "textBlock") /* if textBlock, hide desc */
{
panel.Children.Add(name);
panel.Children.Add(desc);
}
Grid.SetColumn(panel, 0);
Grid.SetRow(panel, rowCount);
FrameworkElement contentControl;
@ -381,18 +423,28 @@ namespace Flow.Launcher.Core.Plugin
{
Text = attribute.Description.Replace("\\r\\n", "\r\n"),
Margin = settingTextBlockMargin,
MaxWidth = 500,
TextWrapping = TextWrapping.WrapWithOverflow
Padding = new Thickness(0,0,0,0),
HorizontalAlignment = System.Windows.HorizontalAlignment.Left,
TextAlignment = TextAlignment.Left,
TextWrapping = TextWrapping.Wrap
};
break;
Grid.SetColumn(contentControl, 0);
Grid.SetColumnSpan(contentControl, 2);
Grid.SetRow(contentControl, rowCount);
if (rowCount != 0)
mainPanel.Children.Add(sep);
Grid.SetRow(sep, rowCount);
Grid.SetColumn(sep, 0);
Grid.SetColumnSpan(sep, 2);
break;
}
case "input":
{
var textBox = new TextBox()
{
Width = 300,
Text = Settings[attribute.Name] as string ?? string.Empty,
Margin = settingControlMargin,
HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
ToolTip = attribute.Description
};
textBox.TextChanged += (_, _) =>
@ -400,17 +452,60 @@ namespace Flow.Launcher.Core.Plugin
Settings[attribute.Name] = textBox.Text;
};
contentControl = textBox;
break;
Grid.SetColumn(contentControl, 1);
Grid.SetRow(contentControl, rowCount);
if (rowCount != 0)
mainPanel.Children.Add(sep);
Grid.SetRow(sep, rowCount);
Grid.SetColumn(sep, 0);
Grid.SetColumnSpan(sep, 2);
break;
}
case "inputWithFileBtn":
{
var textBox = new TextBox()
{
Margin = new Thickness(10, 0, 0, 0),
Text = Settings[attribute.Name] as string ?? string.Empty,
HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
ToolTip = attribute.Description
};
textBox.TextChanged += (_, _) =>
{
Settings[attribute.Name] = textBox.Text;
};
var Btn = new System.Windows.Controls.Button()
{
Margin = new Thickness(10,0,0,0),
Content = "Browse"
};
var dockPanel = new DockPanel()
{
Margin = settingControlMargin
};
DockPanel.SetDock(Btn, Dock.Right);
dockPanel.Children.Add(Btn);
dockPanel.Children.Add(textBox);
contentControl = dockPanel;
Grid.SetColumn(contentControl, 1);
Grid.SetRow(contentControl, rowCount);
if (rowCount != 0)
mainPanel.Children.Add(sep);
Grid.SetRow(sep, rowCount);
Grid.SetColumn(sep, 0);
Grid.SetColumnSpan(sep, 2);
break;
}
case "textarea":
{
var textBox = new TextBox()
{
Width = 300,
Height = 120,
Margin = settingControlMargin,
VerticalAlignment = VerticalAlignment.Center,
TextWrapping = TextWrapping.WrapWithOverflow,
AcceptsReturn = true,
HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
Text = Settings[attribute.Name] as string ?? string.Empty,
ToolTip = attribute.Description
};
@ -419,16 +514,23 @@ namespace Flow.Launcher.Core.Plugin
Settings[attribute.Name] = ((TextBox)sender).Text;
};
contentControl = textBox;
break;
Grid.SetColumn(contentControl, 1);
Grid.SetRow(contentControl, rowCount);
if (rowCount != 0)
mainPanel.Children.Add(sep);
Grid.SetRow(sep, rowCount);
Grid.SetColumn(sep, 0);
Grid.SetColumnSpan(sep, 2);
break;
}
case "passwordBox":
{
var passwordBox = new PasswordBox()
{
Width = 300,
Margin = settingControlMargin,
Password = Settings[attribute.Name] as string ?? string.Empty,
PasswordChar = attribute.passwordChar == default ? '*' : attribute.passwordChar,
HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
ToolTip = attribute.Description
};
passwordBox.PasswordChanged += (sender, _) =>
@ -436,29 +538,45 @@ namespace Flow.Launcher.Core.Plugin
Settings[attribute.Name] = ((PasswordBox)sender).Password;
};
contentControl = passwordBox;
break;
Grid.SetColumn(contentControl, 1);
Grid.SetRow(contentControl, rowCount);
if (rowCount != 0)
mainPanel.Children.Add(sep);
Grid.SetRow(sep, rowCount);
Grid.SetColumn(sep, 0);
Grid.SetColumnSpan(sep, 2);
break;
}
case "dropdown":
{
var comboBox = new ComboBox()
var comboBox = new System.Windows.Controls.ComboBox()
{
ItemsSource = attribute.Options,
SelectedItem = Settings[attribute.Name],
Margin = settingControlMargin,
HorizontalAlignment = System.Windows.HorizontalAlignment.Right,
ToolTip = attribute.Description
};
comboBox.SelectionChanged += (sender, _) =>
{
Settings[attribute.Name] = (string)((ComboBox)sender).SelectedItem;
Settings[attribute.Name] = (string)((System.Windows.Controls.ComboBox)sender).SelectedItem;
};
contentControl = comboBox;
break;
Grid.SetColumn(contentControl, 1);
Grid.SetRow(contentControl, rowCount);
if (rowCount != 0)
mainPanel.Children.Add(sep);
Grid.SetRow(sep, rowCount);
Grid.SetColumn(sep, 0);
Grid.SetColumnSpan(sep, 2);
break;
}
case "checkbox":
var checkBox = new CheckBox
{
IsChecked = Settings[attribute.Name] is bool isChecked ? isChecked : bool.Parse(attribute.DefaultValue),
Margin = settingControlMargin,
Margin = settingCheckboxMargin,
HorizontalAlignment = System.Windows.HorizontalAlignment.Right,
ToolTip = attribute.Description
};
checkBox.Click += (sender, _) =>
@ -466,15 +584,45 @@ namespace Flow.Launcher.Core.Plugin
Settings[attribute.Name] = ((CheckBox)sender).IsChecked;
};
contentControl = checkBox;
Grid.SetColumn(contentControl, 1);
Grid.SetRow(contentControl, rowCount);
if (rowCount != 0)
mainPanel.Children.Add(sep);
Grid.SetRow(sep, rowCount);
Grid.SetColumn(sep, 0);
Grid.SetColumnSpan(sep, 2);
break;
case "hyperlink":
var hyperlink = new Hyperlink
{
ToolTip = attribute.Description,
NavigateUri = attribute.url
};
var linkbtn = new System.Windows.Controls.Button
{
HorizontalAlignment = System.Windows.HorizontalAlignment.Right,
Margin = settingControlMargin
};
linkbtn.Content = attribute.urlLabel;
contentControl = linkbtn;
Grid.SetColumn(contentControl, 1);
Grid.SetRow(contentControl, rowCount);
if (rowCount != 0)
mainPanel.Children.Add(sep);
Grid.SetRow(sep, rowCount);
Grid.SetColumn(sep, 0);
Grid.SetColumnSpan(sep, 2);
break;
default:
continue;
}
if (type != "textBlock")
_settingControls[attribute.Name] = contentControl;
panel.Children.Add(name);
panel.Children.Add(contentControl);
mainPanel.Children.Add(panel);
mainPanel.Children.Add(contentControl);
rowCount++;
}
return settingWindow;
}
@ -510,7 +658,7 @@ namespace Flow.Launcher.Core.Plugin
case PasswordBox passwordBox:
passwordBox.Dispatcher.Invoke(() => passwordBox.Password = value as string);
break;
case ComboBox comboBox:
case System.Windows.Controls.ComboBox comboBox:
comboBox.Dispatcher.Invoke(() => comboBox.SelectedItem = value);
break;
case CheckBox checkBox:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Kunne ikke registrere genvejstast: {0}</system:String>
<system:String x:Key="couldnotStartCmd">Kunne ikke starte {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">af</system:String>
<system:String x:Key="plugin_init_time">Initaliseringstid:</system:String>
<system:String x:Key="plugin_query_time">Søgetid:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_version">Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String>

View file

@ -91,7 +91,7 @@
<system:String x:Key="author">by</system:String>
<system:String x:Key="plugin_init_time">Init time:</system:String>
<system:String x:Key="plugin_query_time">Query time:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_version">Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Error al registrar la tecla de acceso directo: {0}</system:String>
<system:String x:Key="couldnotStartCmd">No se pudo iniciar {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">por</system:String>
<system:String x:Key="plugin_init_time">Tiempo de inicio:</system:String>
<system:String x:Key="plugin_query_time">Tiempo de consulta:</system:String>
<system:String x:Key="plugin_query_version">| Versión</system:String>
<system:String x:Key="plugin_query_version">Versión</system:String>
<system:String x:Key="plugin_query_web">Sitio web</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">No se ha podido registrar el atajo de teclado: {0}</system:String>
<system:String x:Key="couldnotStartCmd">No se ha podido iniciar {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">por</system:String>
<system:String x:Key="plugin_init_time">Tiempo de inicio:</system:String>
<system:String x:Key="plugin_query_time">Tiempo de consulta:</system:String>
<system:String x:Key="plugin_query_version">| Versión</system:String>
<system:String x:Key="plugin_query_version">Versión</system:String>
<system:String x:Key="plugin_query_web">Sitio web</system:String>
<system:String x:Key="plugin_uninstall">Desinstalar</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Impossible d'enregistrer le raccourci clavier : {0}</system:String>
<system:String x:Key="couldnotStartCmd">Impossible de lancer {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">by</system:String>
<system:String x:Key="plugin_init_time">Chargement :</system:String>
<system:String x:Key="plugin_query_time">Utilisation :</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_version">Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Désinstaller</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Impossibile salvare il tasto di scelta rapida: {0}</system:String>
<system:String x:Key="couldnotStartCmd">Avvio fallito {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">da</system:String>
<system:String x:Key="plugin_init_time">Tempo di avvio:</system:String>
<system:String x:Key="plugin_query_time">Tempo ricerca:</system:String>
<system:String x:Key="plugin_query_version">| Versione</system:String>
<system:String x:Key="plugin_query_version">Versione</system:String>
<system:String x:Key="plugin_query_web">Sito Web</system:String>
<system:String x:Key="plugin_uninstall">Disinstalla</system:String>
@ -200,8 +203,8 @@
<system:String x:Key="newVersionTips">Una nuova versione {0} è disponibile, riavvia Flow Launcher per favore.</system:String>
<system:String x:Key="checkUpdatesFailed">Ricerca aggiornamenti fallita, per favore controlla la tua connessione e le eventuali impostazioni proxy per api.github.com.</system:String>
<system:String x:Key="downloadUpdatesFailed">
Download degli aggiornamenti fallito, per favore controlla la tua connessione ed eventuali impostazioni proxy per github-cloud.s3.amazonaws.com,
oppure vai su https://github.com/Flow-Launcher/Flow.Launcher/releases per scaricare gli aggiornamenti manualmente.
Download degli aggiornamenti fallito, per favore controlla la tua connessione ed eventuali impostazioni proxy per github-cloud.s3.amazonaws.com,
oppure vai su https://github.com/Flow-Launcher/Flow.Launcher/releases per scaricare gli aggiornamenti manualmente.
</system:String>
<system:String x:Key="releaseNotes">Note di rilascio</system:String>
<system:String x:Key="documentation">Usage Tips</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">ホットキー「{0}」の登録に失敗しました</system:String>
<system:String x:Key="couldnotStartCmd">{0}の起動に失敗しました</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">by</system:String>
<system:String x:Key="plugin_init_time">初期化時間:</system:String>
<system:String x:Key="plugin_query_time">クエリ時間:</system:String>
<system:String x:Key="plugin_query_version">| バージョン</system:String>
<system:String x:Key="plugin_query_version">バージョン</system:String>
<system:String x:Key="plugin_query_web">ウェブサイト</system:String>
<system:String x:Key="plugin_uninstall">アンインストール</system:String>
@ -250,7 +253,7 @@
<system:String x:Key="actionkeyword_tips">アクションキーボードを指定しない場合、* を使用してください</system:String>
<!-- Custom Query Hotkey Dialog -->
<system:String x:Key="customeQueryHotkeyTitle"></system:String>
<system:String x:Key="customeQueryHotkeyTitle" />
<system:String x:Key="customeQueryHotkeyTips">Press a custom hotkey to open Flow Laucher and input the specified query automatically.</system:String>
<system:String x:Key="preview">プレビュー</system:String>
<system:String x:Key="hotkeyIsNotUnavailable">ホットキーは使用できません。新しいホットキーを選択してください</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">단축키 등록 실패: {0}</system:String>
<system:String x:Key="couldnotStartCmd">{0}을 실행할 수 없습니다.</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">제작자</system:String>
<system:String x:Key="plugin_init_time">초기화 시간:</system:String>
<system:String x:Key="plugin_query_time">쿼리 시간:</system:String>
<system:String x:Key="plugin_query_version">| 버전</system:String>
<system:String x:Key="plugin_query_version">버전</system:String>
<system:String x:Key="plugin_query_web">웹사이트</system:String>
<system:String x:Key="plugin_uninstall">제거</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Failed to register hotkey: {0}</system:String>
<system:String x:Key="couldnotStartCmd">Could not start {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">by</system:String>
<system:String x:Key="plugin_init_time">Init time:</system:String>
<system:String x:Key="plugin_query_time">Query time:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_version">Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Nie udało się ustawić skrótu klawiszowego: {0}</system:String>
<system:String x:Key="couldnotStartCmd">Nie udało się uruchomić: {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">by</system:String>
<system:String x:Key="plugin_init_time">Czas ładowania:</system:String>
<system:String x:Key="plugin_query_time">Czas zapytania:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_version">Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Odinstalowywanie</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Falha ao registrar atalho: {0}</system:String>
<system:String x:Key="couldnotStartCmd">Não foi possível iniciar {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">by</system:String>
<system:String x:Key="plugin_init_time">Tempo de inicialização:</system:String>
<system:String x:Key="plugin_query_time">Tempo de consulta:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_version">Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Desinstalar</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Регистрация хоткея {0} не удалась</system:String>
<system:String x:Key="couldnotStartCmd">Не удалось запустить {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">by</system:String>
<system:String x:Key="plugin_init_time">Инициализация:</system:String>
<system:String x:Key="plugin_query_time">Запрос:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_version">Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Удалить</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Nepodarilo sa registrovať klávesovú skratku {0}</system:String>
<system:String x:Key="couldnotStartCmd">Nepodarilo sa spustiť {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">od</system:String>
<system:String x:Key="plugin_init_time">Inicializácia:</system:String>
<system:String x:Key="plugin_query_time">Trvanie dopytu:</system:String>
<system:String x:Key="plugin_query_version">| Verzia</system:String>
<system:String x:Key="plugin_query_version">Verzia</system:String>
<system:String x:Key="plugin_query_web">Webstránka</system:String>
<system:String x:Key="plugin_uninstall">Odinštalovať</system:String>
@ -292,7 +295,7 @@
<system:String x:Key="update_flowlauncher_updating">Aktualizuje sa...</system:String>
<system:String x:Key="update_flowlauncher_fail_moving_portable_user_profile_data">
Flow Launcher nedokázal presunúť používateľské údaje do aktualizovanej verzie.
Prosím, presuňte profilový priečinok data z {0} do {1}
Prosím, presuňte profilový priečinok data z {0} do {1}
</system:String>
<system:String x:Key="update_flowlauncher_new_update">Nová aktualizácia</system:String>
<system:String x:Key="update_flowlauncher_update_new_version_available">Je dostupná nová verzia Flow Launchera {0}</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Neuspešno registrovana prečica: {0}</system:String>
<system:String x:Key="couldnotStartCmd">Neuspešno pokretanje {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">by</system:String>
<system:String x:Key="plugin_init_time">Vreme inicijalizacije:</system:String>
<system:String x:Key="plugin_query_time">Vreme upita:</system:String>
<system:String x:Key="plugin_query_version">| Version</system:String>
<system:String x:Key="plugin_query_version">Version</system:String>
<system:String x:Key="plugin_query_web">Website</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String>
@ -200,7 +203,7 @@
<system:String x:Key="newVersionTips">Nove verzija {0} je dostupna, molim Vas ponovo pokrenite Flow Launcher.</system:String>
<system:String x:Key="checkUpdatesFailed">Neuspešna provera ažuriranja, molim Vas proverite vašu vezu i podešavanja za proksi prema api.github.com.</system:String>
<system:String x:Key="downloadUpdatesFailed">
Neuspešno preuzimanje ažuriranja, molim Vas proverite vašu vezu i podešavanja za proksi prema github-cloud.s3.amazonaws.com,
Neuspešno preuzimanje ažuriranja, molim Vas proverite vašu vezu i podešavanja za proksi prema github-cloud.s3.amazonaws.com,
ili posetite https://github.com/Flow-Launcher/Flow.Launcher/releases da preuzmete ažuriranja ručno.
</system:String>
<system:String x:Key="releaseNotes">U novoj verziji</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Реєстрація хоткея {0} не вдалася</system:String>
<system:String x:Key="couldnotStartCmd">Не вдалося запустити {0}</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">за</system:String>
<system:String x:Key="plugin_init_time">Ініціалізація:</system:String>
<system:String x:Key="plugin_query_time">Запит:</system:String>
<system:String x:Key="plugin_query_version">| Версія</system:String>
<system:String x:Key="plugin_query_version">Версія</system:String>
<system:String x:Key="plugin_query_web">Сайт</system:String>
<system:String x:Key="plugin_uninstall">Uninstall</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">注册热键:{0} 失败</system:String>
<system:String x:Key="couldnotStartCmd">启动命令 {0} 失败</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">出自</system:String>
<system:String x:Key="plugin_init_time">加载耗时:</system:String>
<system:String x:Key="plugin_query_time">查询耗时:</system:String>
<system:String x:Key="plugin_query_version">| 版本</system:String>
<system:String x:Key="plugin_query_version">版本</system:String>
<system:String x:Key="plugin_query_web">官方网站</system:String>
<system:String x:Key="plugin_uninstall">卸载</system:String>
@ -200,7 +203,7 @@
<system:String x:Key="newVersionTips">发现新版本 {0}, 请重启 Flow Launcher</system:String>
<system:String x:Key="checkUpdatesFailed">下载更新失败,请检查您与 api.github.com 的连接状态或检查代理设置</system:String>
<system:String x:Key="downloadUpdatesFailed">
下载更新失败,请检查您与 github-cloud.s3.amazonaws.com 的连接状态或检查代理设置,
下载更新失败,请检查您与 github-cloud.s3.amazonaws.com 的连接状态或检查代理设置,
或访问 https://github.com/Flow-Launcher/Flow.Launcher/releases 手动下载更新
</system:String>
<system:String x:Key="releaseNotes">更新说明</system:String>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
<?xml version="1.0" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">登錄快捷鍵:{0} 失敗</system:String>
<system:String x:Key="couldnotStartCmd">啟動命令 {0} 失敗</system:String>
@ -87,7 +90,7 @@
<system:String x:Key="author">作者</system:String>
<system:String x:Key="plugin_init_time">載入耗時:</system:String>
<system:String x:Key="plugin_query_time">查詢耗時:</system:String>
<system:String x:Key="plugin_query_version">| 版本</system:String>
<system:String x:Key="plugin_query_version">版本</system:String>
<system:String x:Key="plugin_query_web">官方網站</system:String>
<system:String x:Key="plugin_uninstall">解除安裝</system:String>

View file

@ -3230,4 +3230,26 @@
<ui:TextContextMenu x:Key="TextControlContextMenu" x:Shared="False" />
<!-- Text Button style for Plugin Area -->
<Style x:Key="LinkBtnStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource PluginInfoColor}" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />
<Setter Property="FontSize" Value="11" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="HyperLinkBtnStyle" TargetType="Hyperlink">
<Setter Property="Foreground" Value="{DynamicResource PluginInfoColor}" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>

View file

@ -1010,7 +1010,6 @@
TextAlignment="Left" />
<DockPanel DockPanel.Dock="Right">
<TextBox
Loaded="Plugin_GotFocus"
Name="pluginFilterTxb"
Width="150"
Height="34"
@ -1019,6 +1018,7 @@
DockPanel.Dock="Right"
FontSize="14"
KeyDown="PluginFilterTxb_OnKeyDown"
Loaded="Plugin_GotFocus"
LostFocus="RefreshPluginListEventHandler"
Text=""
TextAlignment="Left"
@ -1221,8 +1221,8 @@
Height="34"
Margin="5,0,0,0"
HorizontalAlignment="Right"
Content="{Binding ActionKeywordsText}"
Command="{Binding SetActionKeywordsCommand}"
Content="{Binding ActionKeywordsText}"
Cursor="Hand"
DockPanel.Dock="Right"
FontWeight="Bold"
@ -1271,7 +1271,7 @@
<StackPanel>
<Border
Margin="0"
Padding="0,12,0,12"
Padding="0,10,0,10"
VerticalAlignment="Center"
BorderThickness="0,1,0,0"
CornerRadius="0 0 5 5"
@ -1285,115 +1285,74 @@
Style="{StaticResource TextPanel}">
<TextBlock
Margin="10,0,0,0"
VerticalAlignment="center"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="{DynamicResource author}" />
<TextBlock
Margin="5,0,0,0"
VerticalAlignment="center"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="{Binding PluginPair.Metadata.Author}" />
<TextBlock
Margin="5,0,0,0"
VerticalAlignment="Center"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="|" />
<TextBlock
Margin="5,0,0,0"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="{DynamicResource plugin_init_time}" />
<TextBlock
MaxWidth="100"
Margin="5,0,0,0"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="{Binding InitilizaTime}" />
<TextBlock
Margin="5,0,0,0"
VerticalAlignment="Center"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="|" />
<TextBlock
Margin="5,0,0,0"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="{DynamicResource plugin_query_time}" />
<TextBlock
Margin="5,0,0,0"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="{Binding QueryTime}" />
<TextBlock
Margin="5,0,0,0"
VerticalAlignment="Center"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="{DynamicResource plugin_query_version}" />
<TextBlock
Margin="5,0,0,0"
VerticalAlignment="Center"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="{Binding PluginPair.Metadata.Version}" />
<TextBlock
Margin="10,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Cursor="Hand"
FontSize="11">
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="|" />
<TextBlock
Margin="10,0,5,0"
VerticalAlignment="Center"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="{Binding Version}"
ToolTip="{Binding InitAndQueryTime}"
ToolTipService.InitialShowDelay="500" />
<TextBlock
Margin="5,0,5,0"
VerticalAlignment="Center"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="|" />
<TextBlock
Margin="5,0,0,0"
Style="{DynamicResource LinkBtnStyle}"
ToolTip="{DynamicResource plugin_query_web}">
<Hyperlink
Foreground="{DynamicResource PluginInfoColor}"
NavigateUri="{Binding PluginPair.Metadata.Website}"
RequestNavigate="OnRequestNavigate">
<Run Text="{DynamicResource plugin_query_web}" />
RequestNavigate="OnRequestNavigate"
Style="{DynamicResource HyperLinkBtnStyle}"
TextDecorations="None">
<Run Text="&#xe80f;" />
</Hyperlink>
</TextBlock>
<TextBlock
Margin="10,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Cursor="Hand"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
MouseUp="OnExternalPluginUninstallClick"
Text="{DynamicResource plugin_uninstall}"
TextDecorations="Underline" />
Style="{DynamicResource LinkBtnStyle}"
Text="&#xe74d;"
ToolTip="{DynamicResource plugin_uninstall}" />
<TextBlock
Margin="10,0,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Cursor="Hand"
FontSize="11"
Foreground="{DynamicResource PluginInfoColor}"
Text="{DynamicResource pluginDirectory}"
TextDecorations="Underline" >
Margin="10,0,5,0"
Style="{DynamicResource LinkBtnStyle}"
Text="&#xe8b7;"
ToolTip="{DynamicResource pluginDirectory}">
<TextBlock.InputBindings>
<MouseBinding
Command="{Binding OpenPluginDirectoryCommand}"
MouseAction="LeftClick"/>
<MouseBinding Command="{Binding OpenPluginDirectoryCommand}" MouseAction="LeftClick" />
</TextBlock.InputBindings>
</TextBlock>
</StackPanel>
</ItemsControl>
</Border>
</StackPanel>
</StackPanel>
</Grid>
</Expander>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
</Grid>
</TabItem>

View file

@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using Flow.Launcher.Plugin;
@ -6,6 +6,7 @@ using Flow.Launcher.Infrastructure.Image;
using Flow.Launcher.Core.Plugin;
using System.Windows.Controls;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core.Resource;
namespace Flow.Launcher.ViewModel
{
@ -74,6 +75,8 @@ namespace Flow.Launcher.ViewModel
public Visibility ActionKeywordsVisibility => PluginPair.Metadata.ActionKeywords.Count == 1 ? Visibility.Visible : Visibility.Collapsed;
public string InitilizaTime => PluginPair.Metadata.InitTime + "ms";
public string QueryTime => PluginPair.Metadata.AvgQueryTime + "ms";
public string Version => InternationalizationManager.Instance.GetTranslation("plugin_query_version") + " " + PluginPair.Metadata.Version;
public string InitAndQueryTime => InternationalizationManager.Instance.GetTranslation("plugin_init_time") + " " + PluginPair.Metadata.InitTime + "ms, " + InternationalizationManager.Instance.GetTranslation("plugin_query_time") + " " + PluginPair.Metadata.AvgQueryTime + "ms";
public string ActionKeywordsText => string.Join(Query.ActionKeywordSeparator, PluginPair.Metadata.ActionKeywords);
public int Priority => PluginPair.Metadata.Priority;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -183,7 +183,8 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
return false;
}
},
IcoPath = "Images\\copylink.png"
IcoPath = "Images\\copylink.png",
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue8c8")
}
};
}
@ -200,4 +201,4 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
}
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -57,7 +57,7 @@ namespace Flow.Launcher.Plugin.Explorer
var icoPath = (record.Type == ResultType.File) ? Constants.FileImagePath : Constants.FolderImagePath;
var fileOrFolder = (record.Type == ResultType.File) ? "file" : "folder";
if (Settings.QuickAccessLinks.All(x => x.Path != record.FullPath))
if (Settings.QuickAccessLinks.All(x => !x.Path.Equals(record.FullPath, StringComparison.OrdinalIgnoreCase)))
{
contextMenus.Add(new Result
{
@ -82,7 +82,8 @@ namespace Flow.Launcher.Plugin.Explorer
},
SubTitleToolTip = Context.API.GetTranslation("plugin_explorer_contextmenu_titletooltip"),
TitleToolTip = Context.API.GetTranslation("plugin_explorer_contextmenu_titletooltip"),
IcoPath = Constants.QuickAccessImagePath
IcoPath = Constants.QuickAccessImagePath,
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue718"),
});
}
else
@ -107,7 +108,8 @@ namespace Flow.Launcher.Plugin.Explorer
},
SubTitleToolTip = Context.API.GetTranslation("plugin_explorer_contextmenu_remove_titletooltip"),
TitleToolTip = Context.API.GetTranslation("plugin_explorer_contextmenu_remove_titletooltip"),
IcoPath = Constants.RemoveQuickAccessImagePath
IcoPath = Constants.RemoveQuickAccessImagePath,
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uecc9")
});
}
@ -130,7 +132,8 @@ namespace Flow.Launcher.Plugin.Explorer
return false;
}
},
IcoPath = Constants.CopyImagePath
IcoPath = Constants.CopyImagePath,
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue8c8")
});
contextMenus.Add(new Result
@ -156,7 +159,8 @@ namespace Flow.Launcher.Plugin.Explorer
}
},
IcoPath = icoPath
IcoPath = icoPath,
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uf12b")
});
@ -199,7 +203,8 @@ namespace Flow.Launcher.Plugin.Explorer
return true;
},
IcoPath = Constants.DeleteFileFolderImagePath
IcoPath = Constants.DeleteFileFolderImagePath,
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue74d")
});
if (record.Type is not ResultType.Volume)
@ -297,7 +302,8 @@ namespace Flow.Launcher.Plugin.Explorer
return true;
},
IcoPath = Constants.FolderImagePath
IcoPath = Constants.FolderImagePath,
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue838")
};
}

View file

@ -21,16 +21,15 @@ namespace Flow.Launcher.Plugin.Explorer.Search
Settings = settings;
}
private static string GetPathWithActionKeyword(string path, ResultType type)
private static string GetPathWithActionKeyword(string path, ResultType type, string actionKeyword)
{
// one of it is enabled
var keyword = Settings.SearchActionKeywordEnabled ? Settings.SearchActionKeyword : Settings.PathSearchActionKeyword;
keyword = keyword == Query.GlobalPluginWildcardSign ? string.Empty : keyword + " ";
// Query.ActionKeyword is string.Empty when Global Action Keyword ('*') is used
var keyword = actionKeyword != string.Empty ? actionKeyword + " " : string.Empty;
var formatted_path = path;
if (type == ResultType.Folder)
// the seperator is needed so when navigating the folder structure contents of the folder are listed
formatted_path = path.EndsWith(Constants.DirectorySeperator) ? path : path + Constants.DirectorySeperator;
return $"{keyword}{formatted_path}";
@ -55,7 +54,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
Title = title,
IcoPath = path,
SubTitle = Path.GetDirectoryName(path),
AutoCompleteText = GetPathWithActionKeyword(path, ResultType.Folder),
AutoCompleteText = GetPathWithActionKeyword(path, ResultType.Folder, query.ActionKeyword),
TitleHighlightData = StringMatcher.FuzzySearch(query.Search, title).MatchData,
CopyText = path,
Action = c =>
@ -74,7 +73,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
}
}
Context.API.ChangeQuery(GetPathWithActionKeyword(path, ResultType.Folder));
Context.API.ChangeQuery(GetPathWithActionKeyword(path, ResultType.Folder, query.ActionKeyword));
return false;
},
@ -90,7 +89,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
};
}
internal static Result CreateDriveSpaceDisplayResult(string path, bool windowsIndexed = false)
internal static Result CreateDriveSpaceDisplayResult(string path, string actionKeyword, bool windowsIndexed = false)
{
var progressBarColor = "#26a0da";
var title = string.Empty; // hide title when use progress bar,
@ -109,7 +108,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
{
Title = title,
SubTitle = subtitle,
AutoCompleteText = GetPathWithActionKeyword(path, ResultType.Folder),
AutoCompleteText = GetPathWithActionKeyword(path, ResultType.Folder, actionKeyword),
IcoPath = path,
Score = 500,
ProgressBar = progressValue,
@ -166,9 +165,13 @@ namespace Flow.Launcher.Plugin.Explorer.Search
return returnStr;
}
internal static Result CreateOpenCurrentFolderResult(string path, bool windowsIndexed = false)
internal static Result CreateOpenCurrentFolderResult(string path, string actionKeyword, bool windowsIndexed = false)
{
var folderName = path.TrimEnd(Constants.DirectorySeperator).Split(new[]
// Path passed from PathSearchAsync ends with Constants.DirectorySeperator ('\'), need to remove the seperator
// so it's consistent with folder results returned by index search which does not end with one
var folderPath = path.TrimEnd(Constants.DirectorySeperator);
var folderName = folderPath.TrimEnd(Constants.DirectorySeperator).Split(new[]
{
Path.DirectorySeparatorChar
}, StringSplitOptions.None).Last();
@ -186,19 +189,19 @@ namespace Flow.Launcher.Plugin.Explorer.Search
Title = title,
SubTitle = $"Use > to search within {subtitleFolderName}, " +
$"* to search for file extensions or >* to combine both searches.",
AutoCompleteText = GetPathWithActionKeyword(path, ResultType.Folder),
IcoPath = path,
AutoCompleteText = GetPathWithActionKeyword(folderPath, ResultType.Folder, actionKeyword),
IcoPath = folderPath,
Score = 500,
CopyText = path,
CopyText = folderPath,
Action = _ =>
{
Context.API.OpenDirectory(path);
Context.API.OpenDirectory(folderPath);
return true;
},
ContextData = new SearchResult
{
Type = ResultType.Folder,
FullPath = path,
FullPath = folderPath,
WindowsIndexed = windowsIndexed
}
};
@ -217,7 +220,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
SubTitle = Path.GetDirectoryName(filePath),
IcoPath = filePath,
Preview = preview,
AutoCompleteText = GetPathWithActionKeyword(filePath, ResultType.File),
AutoCompleteText = GetPathWithActionKeyword(filePath, ResultType.File, query.ActionKeyword),
TitleHighlightData = StringMatcher.FuzzySearch(query.Search, Path.GetFileName(filePath)).MatchData,
Score = score,
CopyText = filePath,

View file

@ -176,8 +176,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search
var retrievedDirectoryPath = FilesFolders.ReturnPreviousDirectoryIfIncompleteString(locationPath);
results.Add(retrievedDirectoryPath.EndsWith(":\\")
? ResultManager.CreateDriveSpaceDisplayResult(retrievedDirectoryPath, useIndexSearch)
: ResultManager.CreateOpenCurrentFolderResult(retrievedDirectoryPath, useIndexSearch));
? ResultManager.CreateDriveSpaceDisplayResult(retrievedDirectoryPath, query.ActionKeyword, useIndexSearch)
: ResultManager.CreateOpenCurrentFolderResult(retrievedDirectoryPath, query.ActionKeyword, useIndexSearch));
if (token.IsCancellationRequested)
return new List<Result>();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -101,7 +101,7 @@
DockPanel.Dock="Right" />
<TextBox
Name="Directory"
MinWidth="300"
Width="350"
Margin="10"
HorizontalAlignment="Stretch"
VerticalAlignment="Center" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -12,6 +12,9 @@
<system:String x:Key="flowlauncher_plugin_program_enable">Enable</system:String>
<system:String x:Key="flowlauncher_plugin_program_enabled">Enabled</system:String>
<system:String x:Key="flowlauncher_plugin_program_disable">Disable</system:String>
<system:String x:Key="flowlauncher_plugin_program_status">Status</system:String>
<system:String x:Key="flowlauncher_plugin_program_true">Enabled</system:String>
<system:String x:Key="flowlauncher_plugin_program_false">Disabled</system:String>
<system:String x:Key="flowlauncher_plugin_program_location">Location</system:String>
<system:String x:Key="flowlauncher_plugin_program_all_programs">All Programs</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes">File Type</system:String>
@ -28,7 +31,7 @@
<system:String x:Key="flowlauncher_plugin_program_enable_hidelnkpath">Hide app path</system:String>
<system:String x:Key="flowlauncher_plugin_program_enable_hidelnkpath_tooltip">For executable files such as UWP or lnk, hide the file path from being visible</system:String>
<system:String x:Key="flowlauncher_plugin_program_enable_description">Search in Program Description</system:String>
<system:String x:Key="flowlauncher_plugin_program_enable_description_tooltip">Disabling this will also stop Flow from searching via the program desciption</system:String>
<system:String x:Key="flowlauncher_plugin_program_enable_description_tooltip">Flow will search program's description</system:String>
<system:String x:Key="flowlauncher_plugin_program_suffixes_header">Suffixes</system:String>
<system:String x:Key="flowlauncher_plugin_program_max_depth_header">Max Depth</system:String>

View file

@ -90,10 +90,9 @@
BorderBrush="{DynamicResource Color03B}"
BorderThickness="1" />
<StackPanel
Width="Auto"
Height="55"
Margin="60,6,0,0"
Margin="60,0,0,2"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnLoadAllProgramSource"
@ -149,7 +148,8 @@
MouseDoubleClick="programSourceView_MouseDoubleClick"
PreviewMouseRightButtonUp="ProgramSourceView_PreviewMouseRightButtonUp"
SelectionChanged="programSourceView_SelectionChanged"
SelectionMode="Extended">
SelectionMode="Extended"
SizeChanged="ListView_SizeChanged">
<ListView.View>
<GridView>
<GridViewColumn Width="150" Header="{DynamicResource flowlauncher_plugin_program_name}">
@ -159,20 +159,28 @@
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{DynamicResource flowlauncher_plugin_program_enabled}">
<GridViewColumn Width="90" Header="{DynamicResource flowlauncher_plugin_program_status}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock
MaxWidth="60"
Text="{Binding Enabled}"
TextAlignment="Center" />
<TextBlock TextAlignment="Left">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_program_false}" />
<Style.Triggers>
<DataTrigger Binding="{Binding Enabled, UpdateSourceTrigger=PropertyChanged}" Value="True">
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_program_true}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="550" Header="{DynamicResource flowlauncher_plugin_program_location}">
<GridViewColumn Header="{DynamicResource flowlauncher_plugin_program_location}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Location, ConverterParameter=(null), Converter={program:LocationConverter}}" />
<TextBlock Text="{Binding Location, ConverterParameter=(null), Converter={program:LocationConverter}}" TextTrimming="CharacterEllipsis" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
@ -182,7 +190,7 @@
<DockPanel
Grid.Row="3"
Grid.RowSpan="1"
Margin="0,0,20,10">
Margin="0,0,20,0">
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button
x:Name="btnProgramSourceStatus"

View file

@ -9,6 +9,7 @@ using Flow.Launcher.Plugin.Program.Views.Commands;
using Flow.Launcher.Plugin.Program.Programs;
using System.ComponentModel;
using System.Windows.Data;
using System;
namespace Flow.Launcher.Plugin.Program.Views
{
@ -383,5 +384,20 @@ namespace Flow.Launcher.Plugin.Program.Views
{
return items.All(x => _settings.ProgramSources.Any(y => y.UniqueIdentifier == x.UniqueIdentifier));
}
private void ListView_SizeChanged(object sender, SizeChangedEventArgs e)
{
ListView listView = sender as ListView;
GridView gView = listView.View as GridView;
var workingWidth = listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
var col1 = 0.25;
var col2 = 0.15;
var col3 = 0.60;
gView.Columns[0].Width = workingWidth * col1;
gView.Columns[1].Width = workingWidth * col2;
gView.Columns[2].Width = workingWidth * col3;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -387,7 +387,8 @@ namespace Flow.Launcher.Plugin.Shell
Execute(ShellCommand.RunAsDifferentUser, PrepareProcessStartInfo(selectedResult.Title));
return true;
},
IcoPath = "Images/user.png"
IcoPath = "Images/user.png",
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ee")
},
new Result
{
@ -397,7 +398,8 @@ namespace Flow.Launcher.Plugin.Shell
Execute(Process.Start, PrepareProcessStartInfo(selectedResult.Title, true));
return true;
},
IcoPath = "Images/admin.png"
IcoPath = "Images/admin.png",
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ef")
},
new Result
{
@ -407,7 +409,8 @@ namespace Flow.Launcher.Plugin.Shell
Clipboard.SetDataObject(selectedResult.Title);
return true;
},
IcoPath = "Images/copy.png"
IcoPath = "Images/copy.png",
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe8c8")
}
};

View file

@ -1,33 +1,39 @@
<UserControl x:Class="Flow.Launcher.Plugin.Sys.SysSettings"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid Margin="10">
<ListView x:Name="lbxCommands" Grid.Row="0" Style="{StaticResource {x:Static GridView.GridViewStyleKey}}"
BorderBrush="DarkGray"
BorderThickness="1"
Margin="7 15 0 25">
<ListView.View>
<GridView>
<GridViewColumn Header="{DynamicResource flowlauncher_plugin_sys_command}" Width="150">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Title}"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{DynamicResource flowlauncher_plugin_sys_desc}" Width="379">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding SubTitle}"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</Grid>
<UserControl
x:Class="Flow.Launcher.Plugin.Sys.SysSettings"
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"
d:DesignHeight="300"
d:DesignWidth="300"
mc:Ignorable="d">
<Grid Margin="70,18,18,18">
<ListView
x:Name="lbxCommands"
Grid.Row="0"
Margin="0"
BorderBrush="DarkGray"
BorderThickness="1"
SizeChanged="ListView_SizeChanged"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
<ListView.View>
<GridView>
<GridViewColumn Width="150" Header="{DynamicResource flowlauncher_plugin_sys_command}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Title}" TextTrimming="CharacterEllipsis" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="379" Header="{DynamicResource flowlauncher_plugin_sys_desc}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding SubTitle}" TextTrimming="CharacterEllipsis" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</Grid>
</UserControl>

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
namespace Flow.Launcher.Plugin.Sys
@ -14,5 +15,17 @@ namespace Flow.Launcher.Plugin.Sys
lbxCommands.Items.Add(Result);
}
}
private void ListView_SizeChanged(object sender, SizeChangedEventArgs e)
{
ListView listView = sender as ListView;
GridView gView = listView.View as GridView;
var workingWidth = listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
var col1 = 0.3;
var col2 = 0.7;
gView.Columns[0].Width = workingWidth * col1;
gView.Columns[1].Width = workingWidth * col2;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -12,6 +12,8 @@
<system:String x:Key="flowlauncher_plugin_websearch_delete">Delete</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_edit">Edit</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_add">Add</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_true">Enabled</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_false">Disabled</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_confirm">Confirm</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_action_keyword">Action Keyword</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_url">URL</system:String>
@ -32,7 +34,7 @@
<!-- web search edit -->
<system:String x:Key="flowlauncher_plugin_websearch_title">Title</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_enable">Enable</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_enable">Status</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_select_icon">Select Icon</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_icon">Icon</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_cancel">Cancel</system:String>

View file

@ -35,7 +35,7 @@
</DockPanel>
</DataTemplate>
</UserControl.Resources>
<Grid Margin="14,14,14,0">
<Grid Margin="0,4,0,0">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="56" />
@ -44,7 +44,7 @@
<ListView
x:Name="SearchSourcesListView"
Grid.Row="0"
Margin="0,18,0,0"
Margin="18,18,18,0"
BorderBrush="DarkGray"
BorderThickness="1"
GridViewColumnHeader.Click="SortByColumn"
@ -86,13 +86,21 @@
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn
Width="80"
DisplayMemberBinding="{Binding Enabled}"
Header="{DynamicResource flowlauncher_plugin_websearch_enable}">
<GridViewColumn Width="140" Header="{DynamicResource flowlauncher_plugin_websearch_enable}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Enabled}" />
<TextBlock>
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_websearch_false}" />
<Style.Triggers>
<DataTrigger Binding="{Binding Enabled, UpdateSourceTrigger=PropertyChanged}" Value="True">
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_websearch_true}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
@ -115,7 +123,7 @@
Content="{DynamicResource flowlauncher_plugin_websearch_edit}" />
<Button
Width="100"
Margin="10,10,0,10"
Margin="10,10,18,10"
Click="OnAddSearchSearchClick"
Content="{DynamicResource flowlauncher_plugin_websearch_add}" />
</StackPanel>
@ -123,9 +131,9 @@
Grid.Row="2"
Margin="0,0,0,0"
HorizontalAlignment="Stretch"
BorderBrush="#cecece"
BorderBrush="{DynamicResource Color03B}"
BorderThickness="0,1,0,0">
<DockPanel Margin="0,14,0,0" HorizontalAlignment="Right">
<DockPanel HorizontalAlignment="Right">
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
<Label
Margin="14,0,10,0"
@ -147,7 +155,7 @@
Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion}" />
<CheckBox
Name="EnableSuggestion"
Margin="0,0,0,0"
Margin="0,0,8,0"
IsChecked="{Binding Settings.EnableSuggestion}" />
</StackPanel>
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSaerchSuggestion is not working -->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB