mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Rename Variable & adjust window size
This commit is contained in:
parent
eac61fb40c
commit
672616ef62
8 changed files with 15 additions and 15 deletions
|
|
@ -8,7 +8,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
public CustomChromiumBookmarkLoader(CustomBrowser browser)
|
||||
{
|
||||
BrowserName = browser.Name;
|
||||
BrowserDataPath = browser.Path;
|
||||
BrowserDataPath = browser.DataDirectoryPath;
|
||||
}
|
||||
public string BrowserDataPath { get; init; }
|
||||
public string BookmarkFilePath { get; init; }
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
|
||||
_settings = context.API.LoadSettingJsonStorage<Settings>();
|
||||
|
||||
cachedBookmarks = BookmarkLoader.LoadAllBookmarks();
|
||||
cachedBookmarks = BookmarkLoader.LoadAllBookmarks(_settings);
|
||||
}
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
|
|
@ -93,7 +93,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
{
|
||||
cachedBookmarks.Clear();
|
||||
|
||||
cachedBookmarks = BookmarkLoader.LoadAllBookmarks();
|
||||
cachedBookmarks = BookmarkLoader.LoadAllBookmarks(_settings);
|
||||
}
|
||||
|
||||
public string GetTranslatedPluginTitle()
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
public class CustomBrowser : BaseModel
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Path { get; set; }
|
||||
public string DataDirectoryPath { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -15,12 +15,12 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Models
|
|||
new CustomBrowser
|
||||
{
|
||||
Name="awefawef",
|
||||
Path="awefawef"
|
||||
DataDirectoryPath="awefawef"
|
||||
},
|
||||
new CustomBrowser
|
||||
{
|
||||
Name = "awefawefawefawef",
|
||||
Path = "aweawefawfawef"
|
||||
DataDirectoryPath = "aweawefawfawef"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Plugin.BrowserBookmark.Models"
|
||||
mc:Ignorable="d"
|
||||
Title="CustomBrowserSetting" Height="300" Width="400"
|
||||
Title="CustomBrowserSetting" Height="450" Width="600"
|
||||
>
|
||||
<Window.DataContext>
|
||||
<local:CustomBrowser/>
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Browser Name" FontSize="15"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Browser Path" FontSize="15"
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Browser Data Directory Path" FontSize="15"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Name}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" Width="100" Height="30"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path}"
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding DataDirectoryPath}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="30"/>
|
||||
<StackPanel HorizontalAlignment="Right" Grid.Row="2" Orientation="Horizontal" Grid.Column="1" Height="60">
|
||||
<Button Content="Confirm" Margin="15" Click="ConfirmEditCustomBrowser"/>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
|
|||
DataContext = new CustomBrowser
|
||||
{
|
||||
Name = browser.Name,
|
||||
Path = browser.Path
|
||||
DataDirectoryPath = browser.DataDirectoryPath
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
|
|||
if (DataContext is CustomBrowser editedBrowser)
|
||||
{
|
||||
currentCustomBrowser.Name = editedBrowser.Name;
|
||||
currentCustomBrowser.Path = editedBrowser.Path;
|
||||
currentCustomBrowser.DataDirectoryPath = editedBrowser.DataDirectoryPath;
|
||||
}
|
||||
Close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn DisplayMemberBinding="{Binding Name}" Header="Browser Name"/>
|
||||
<GridViewColumn DisplayMemberBinding="{Binding Path}" Header="Path"/>
|
||||
<GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath}" Header="DataDirectoryPath"/>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
|
|||
if (newBrowser is not
|
||||
{
|
||||
Name: null,
|
||||
Path: null
|
||||
DataDirectoryPath: null
|
||||
})
|
||||
{
|
||||
Settings.CustomBrowsers.Add(newBrowser);
|
||||
Settings.CustomChromiumBrowsers.Add(newBrowser);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views
|
|||
{
|
||||
if(CustomBrowsers.SelectedItem is CustomBrowser selectedCustomBrowser)
|
||||
{
|
||||
Settings.CustomBrowsers.Remove(selectedCustomBrowser);
|
||||
Settings.CustomChromiumBrowsers.Remove(selectedCustomBrowser);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue