Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35c1f2d305 | ||
|
|
4c5e13607f | ||
|
|
ae4a82ab5d | ||
|
|
76312e042b | ||
|
|
2bd2ec94b3 | ||
|
|
b0f651dccb | ||
|
|
c63a6bbc53 | ||
|
|
e7df4a0743 | ||
|
|
823205fa69 | ||
|
|
5fd7b00778 | ||
|
|
3fb321a0d8 | ||
|
|
a815ccb64a | ||
|
|
ebccdc0329 | ||
|
|
f9860ae8dd | ||
|
|
1a8a77bf66 | ||
|
|
0d02b83279 | ||
|
|
c263489f40 | ||
|
|
b8610f6ccb | ||
|
|
9a1783c221 | ||
|
|
6a123ed953 | ||
|
|
3fd4625d9e | ||
|
|
783d03848f | ||
|
|
74e63f9abf | ||
|
|
92edcd224d |
No files matched your search
@@ -17,7 +17,7 @@ jobs:
|
||||
yarn build
|
||||
|
||||
- name: Setup MSBuild.exe
|
||||
uses: warrenbuckley/Setup-MSBuild@v1
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
|
||||
- name: MSBuild
|
||||
run: msbuild FluentTerminal.sln -t:build -p:Configuration=Debug -p:Platform=x64 -m -restore
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
@@ -1,3 +1,4 @@
|
||||
reg add "HKCU\Software\Classes\Directory\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%1\"" /f
|
||||
reg add "HKCU\Software\Classes\Directory\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f
|
||||
reg add "HKCU\Software\Classes\Directory\Background\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f
|
||||
reg add "HKCU\Software\Classes\Drive\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f
|
||||
reg add "HKCU\Software\Classes\LibraryFolder\Background\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f
|
||||
@@ -0,0 +1,9 @@
|
||||
copy /y FluentTerminal.ico "%LOCALAPPDATA%\Microsoft\WindowsApps"
|
||||
reg add "HKCU\Software\Classes\Directory\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f
|
||||
reg add "HKCU\Software\Classes\Directory\shell\Open Fluent Terminal here" /v icon /t REG_SZ /d "%LOCALAPPDATA%\Microsoft\WindowsApps\FluentTerminal.ico" /f
|
||||
reg add "HKCU\Software\Classes\Directory\Background\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f
|
||||
reg add "HKCU\Software\Classes\Directory\Background\shell\Open Fluent Terminal here" /v icon /t REG_SZ /d "%LOCALAPPDATA%\Microsoft\WindowsApps\FluentTerminal.ico" /f
|
||||
reg add "HKCU\Software\Classes\Drive\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f
|
||||
reg add "HKCU\Software\Classes\Drive\shell\Open Fluent Terminal here" /v icon /t REG_SZ /d "%LOCALAPPDATA%\Microsoft\WindowsApps\FluentTerminal.ico" /f
|
||||
reg add "HKCU\Software\Classes\LibraryFolder\Background\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f
|
||||
reg add "HKCU\Software\Classes\LibraryFolder\Background\shell\Open Fluent Terminal here" /v icon /t REG_SZ /d "%LOCALAPPDATA%\Microsoft\WindowsApps\FluentTerminal.ico" /f
|
||||
@@ -0,0 +1,2 @@
|
||||
If you want a an icon for the context menu entries, download the .ico file and put in the same directory as the Install_with_icon.bat file then run it.
|
||||
The same Uninstall.bat works for both Install.bat files.
|
||||
@@ -1,3 +1,5 @@
|
||||
reg delete "HKCU\Software\Classes\Directory\shell\Open Fluent Terminal here" /f
|
||||
reg delete "HKCU\Software\Classes\Directory\Background\shell\Open Fluent Terminal here" /f
|
||||
reg delete "HKCU\Software\Classes\Drive\shell\Open Fluent Terminal here" /f
|
||||
reg delete "HKCU\Software\Classes\LibraryFolder\Background\shell\Open Fluent Terminal here" /f
|
||||
del %LOCALAPPDATA%\Microsoft\WindowsApps\FluentTerminal.ico
|
||||
@@ -11,11 +11,11 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoFixture" Version="4.14.0" />
|
||||
<PackageReference Include="AutoFixture" Version="4.17.0" />
|
||||
<PackageReference Include="FluentAssertions" Version="5.10.3" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
|
||||
<PackageReference Include="Moq" Version="4.14.7" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
|
||||
<PackageReference Include="Moq" Version="4.16.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using AutoFixture;
|
||||
using FluentAssertions;
|
||||
using FluentTerminal.App.Services.Implementation;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.Models.Enums;
|
||||
using Moq;
|
||||
@@ -11,8 +10,8 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using FluentTerminal.Models.Messages;
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using Xunit;
|
||||
using Microsoft.Toolkit.Mvvm.Messaging;
|
||||
|
||||
namespace FluentTerminal.App.Services.Test
|
||||
{
|
||||
@@ -167,8 +166,8 @@ namespace FluentTerminal.App.Services.Test
|
||||
};
|
||||
var currentThemeChangedEventInvoked = false;
|
||||
var settingsService = new SettingsService(defaultValueProvider, applicationDataContainers);
|
||||
Messenger.Default.Register<CurrentThemeChangedMessage>(this,
|
||||
message => currentThemeChangedEventInvoked = true);
|
||||
WeakReferenceMessenger.Default.Register<CurrentThemeChangedMessage>(this,
|
||||
(r, m) => currentThemeChangedEventInvoked = true);
|
||||
|
||||
settingsService.SaveCurrentThemeId(currentThemeId);
|
||||
|
||||
@@ -217,8 +216,8 @@ namespace FluentTerminal.App.Services.Test
|
||||
SshProfiles = Mock.Of<IApplicationDataContainer>()
|
||||
};
|
||||
var settingsService = new SettingsService(defaultValueProvider, applicationDataContainers);
|
||||
Messenger.Default.Register<CurrentThemeChangedMessage>(this,
|
||||
message => currentThemeChangedEventInvoked = true);
|
||||
WeakReferenceMessenger.Default.Register<CurrentThemeChangedMessage>(this,
|
||||
(r, m) => currentThemeChangedEventInvoked = true);
|
||||
|
||||
settingsService.SaveTheme(theme);
|
||||
|
||||
@@ -382,8 +381,8 @@ namespace FluentTerminal.App.Services.Test
|
||||
SshProfiles = Mock.Of<IApplicationDataContainer>()
|
||||
};
|
||||
var settingsService = new SettingsService(defaultValueProvider, applicationDataContainers);
|
||||
Messenger.Default.Register<TerminalOptionsChangedMessage>(this,
|
||||
message => terminalOptionsChangedEventInvoked = true);
|
||||
WeakReferenceMessenger.Default.Register<TerminalOptionsChangedMessage>(this,
|
||||
(r, m) => terminalOptionsChangedEventInvoked = true);
|
||||
|
||||
settingsService.SaveTerminalOptions(terminalOptions);
|
||||
|
||||
@@ -453,8 +452,7 @@ namespace FluentTerminal.App.Services.Test
|
||||
SshProfiles = Mock.Of<IApplicationDataContainer>()
|
||||
};
|
||||
var settingsService = new SettingsService(defaultValueProvider, applicationDataContainers);
|
||||
Messenger.Default.Register<ApplicationSettingsChangedMessage>(this,
|
||||
a => applicationSettingsChangedEventInvoked = true);
|
||||
WeakReferenceMessenger.Default.Register<ApplicationSettingsChangedMessage>(this, (r, m) => applicationSettingsChangedEventInvoked = true);
|
||||
|
||||
settingsService.SaveApplicationSettings(applicationSettings);
|
||||
|
||||
@@ -556,8 +554,8 @@ namespace FluentTerminal.App.Services.Test
|
||||
SshProfiles = Mock.Of<IApplicationDataContainer>()
|
||||
};
|
||||
var settingsService = new SettingsService(defaultValueProvider, applicationDataContainers);
|
||||
Messenger.Default.Register<KeyBindingsChangedMessage>(this,
|
||||
message => keyBindingsChangedEventInvoked = true);
|
||||
WeakReferenceMessenger.Default.Register<KeyBindingsChangedMessage>(this,
|
||||
(r, m) => keyBindingsChangedEventInvoked = true);
|
||||
|
||||
settingsService.SaveKeyBindings(command.ToString(), keyBindings);
|
||||
|
||||
@@ -605,8 +603,8 @@ namespace FluentTerminal.App.Services.Test
|
||||
SshProfiles = Mock.Of<IApplicationDataContainer>()
|
||||
};
|
||||
var settingsService = new SettingsService(defaultValueProvider, applicationDataContainers);
|
||||
Messenger.Default.Register<KeyBindingsChangedMessage>(this,
|
||||
message => keyBindingsChangedEventInvoked = true);
|
||||
WeakReferenceMessenger.Default.Register<KeyBindingsChangedMessage>(this,
|
||||
(r, m) => keyBindingsChangedEventInvoked = true);
|
||||
|
||||
settingsService.ResetKeyBindings();
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml;
|
||||
|
||||
namespace FluentTerminal.App.Services.EventArgs
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace FluentTerminal.App.Services.Exceptions
|
||||
{
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="MvvmLightLibsStd10" Version="5.4.1.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.0.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="PListNet" Version="3.2.0" />
|
||||
<PackageReference Include="RestSharp" Version="106.11.7" />
|
||||
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
|
||||
<PackageReference Include="RestSharp" Version="106.12.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="System.Runtime.InteropServices.WindowsRuntime" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.Models.Messages;
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using Microsoft.Toolkit.Mvvm.Messaging;
|
||||
|
||||
namespace FluentTerminal.App.Services.Implementation
|
||||
{
|
||||
@@ -169,14 +169,14 @@ namespace FluentTerminal.App.Services.Implementation
|
||||
public void DeleteShellProfile(Guid id)
|
||||
{
|
||||
_shellProfiles.Delete(id.ToString());
|
||||
Messenger.Default.Send(new ShellProfileDeletedMessage(id));
|
||||
WeakReferenceMessenger.Default.Send(new ShellProfileDeletedMessage(id));
|
||||
}
|
||||
|
||||
public void DeleteSshProfile(Guid id)
|
||||
{
|
||||
_sshProfiles.Delete(id.ToString());
|
||||
Messenger.Default.Send(new ShellProfileDeletedMessage(id));
|
||||
Messenger.Default.Send(new KeyBindingsChangedMessage());
|
||||
WeakReferenceMessenger.Default.Send(new ShellProfileDeletedMessage(id));
|
||||
WeakReferenceMessenger.Default.Send(new KeyBindingsChangedMessage());
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace FluentTerminal.App.Services.Implementation
|
||||
}
|
||||
}
|
||||
|
||||
Messenger.Default.Send(new ThemeDeletedMessage(id));
|
||||
WeakReferenceMessenger.Default.Send(new ThemeDeletedMessage(id));
|
||||
}
|
||||
|
||||
public ApplicationSettings GetApplicationSettings()
|
||||
@@ -333,32 +333,32 @@ namespace FluentTerminal.App.Services.Implementation
|
||||
_keyBindings.WriteValueAsJson(command.ToString(), _defaultValueProvider.GetDefaultKeyBindings(command));
|
||||
}
|
||||
|
||||
Messenger.Default.Send(new KeyBindingsChangedMessage());
|
||||
WeakReferenceMessenger.Default.Send(new KeyBindingsChangedMessage());
|
||||
}
|
||||
|
||||
public void SaveApplicationSettings(ApplicationSettings applicationSettings)
|
||||
{
|
||||
_roamingSettings.WriteValueAsJson(nameof(ApplicationSettings), applicationSettings);
|
||||
Messenger.Default.Send(new ApplicationSettingsChangedMessage(applicationSettings.Clone()));
|
||||
WeakReferenceMessenger.Default.Send(new ApplicationSettingsChangedMessage(applicationSettings.Clone()));
|
||||
}
|
||||
|
||||
public void NotifyApplicationSettingsChanged(ApplicationSettings applicationSettings)
|
||||
{
|
||||
Messenger.Default.Send(new ApplicationSettingsChangedMessage(applicationSettings.Clone()));
|
||||
WeakReferenceMessenger.Default.Send(new ApplicationSettingsChangedMessage(applicationSettings.Clone()));
|
||||
}
|
||||
|
||||
public void SaveCurrentThemeId(Guid id)
|
||||
{
|
||||
_roamingSettings.SetValue(CurrentThemeKey, id);
|
||||
|
||||
Messenger.Default.Send(new CurrentThemeChangedMessage(id));
|
||||
WeakReferenceMessenger.Default.Send(new CurrentThemeChangedMessage(id));
|
||||
}
|
||||
|
||||
public void SaveDefaultShellProfileId(Guid id)
|
||||
{
|
||||
_localSettings.SetValue(DefaultShellProfileKey, id);
|
||||
|
||||
Messenger.Default.Send(new DefaultShellProfileChangedMessage(id));
|
||||
WeakReferenceMessenger.Default.Send(new DefaultShellProfileChangedMessage(id));
|
||||
}
|
||||
|
||||
public void SaveKeyBindings(string command, ICollection<KeyBinding> keyBindings)
|
||||
@@ -369,7 +369,7 @@ namespace FluentTerminal.App.Services.Implementation
|
||||
}
|
||||
|
||||
_keyBindings.WriteValueAsJson(enumValue.ToString(), keyBindings);
|
||||
Messenger.Default.Send(new KeyBindingsChangedMessage());
|
||||
WeakReferenceMessenger.Default.Send(new KeyBindingsChangedMessage());
|
||||
}
|
||||
|
||||
public void SaveShellProfile(ShellProfile shellProfile, bool newShell = false)
|
||||
@@ -377,15 +377,15 @@ namespace FluentTerminal.App.Services.Implementation
|
||||
_shellProfiles.WriteValueAsJson(shellProfile.Id.ToString(), shellProfile);
|
||||
|
||||
// When saving the shell profile, we also need to update keybindings for everywhere.
|
||||
Messenger.Default.Send(new KeyBindingsChangedMessage());
|
||||
WeakReferenceMessenger.Default.Send(new KeyBindingsChangedMessage());
|
||||
|
||||
if (newShell)
|
||||
{
|
||||
Messenger.Default.Send(new ShellProfileAddedMessage(shellProfile));
|
||||
WeakReferenceMessenger.Default.Send(new ShellProfileAddedMessage(shellProfile));
|
||||
}
|
||||
else
|
||||
{
|
||||
Messenger.Default.Send(new ShellProfileChangedMessage(shellProfile));
|
||||
WeakReferenceMessenger.Default.Send(new ShellProfileChangedMessage(shellProfile));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,22 +394,22 @@ namespace FluentTerminal.App.Services.Implementation
|
||||
_sshProfiles.WriteValueAsJson(sshProfile.Id.ToString(), sshProfile);
|
||||
|
||||
// When saving the shell profile, we also need to update keybindings for everywhere.
|
||||
Messenger.Default.Send(new KeyBindingsChangedMessage());
|
||||
WeakReferenceMessenger.Default.Send(new KeyBindingsChangedMessage());
|
||||
|
||||
if (newShell)
|
||||
{
|
||||
Messenger.Default.Send(new ShellProfileAddedMessage(sshProfile));
|
||||
WeakReferenceMessenger.Default.Send(new ShellProfileAddedMessage(sshProfile));
|
||||
}
|
||||
else
|
||||
{
|
||||
Messenger.Default.Send(new ShellProfileChangedMessage(sshProfile));
|
||||
WeakReferenceMessenger.Default.Send(new ShellProfileChangedMessage(sshProfile));
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveTerminalOptions(TerminalOptions terminalOptions)
|
||||
{
|
||||
_roamingSettings.WriteValueAsJson(nameof(TerminalOptions), terminalOptions);
|
||||
Messenger.Default.Send(new TerminalOptionsChangedMessage(terminalOptions));
|
||||
WeakReferenceMessenger.Default.Send(new TerminalOptionsChangedMessage(terminalOptions));
|
||||
}
|
||||
|
||||
public void SaveTheme(TerminalTheme theme, bool newTheme = false)
|
||||
@@ -418,12 +418,12 @@ namespace FluentTerminal.App.Services.Implementation
|
||||
|
||||
if (theme.Id == GetCurrentThemeId())
|
||||
{
|
||||
Messenger.Default.Send(new CurrentThemeChangedMessage(theme.Id));
|
||||
WeakReferenceMessenger.Default.Send(new CurrentThemeChangedMessage(theme.Id));
|
||||
}
|
||||
|
||||
if (newTheme)
|
||||
{
|
||||
Messenger.Default.Send(new ThemeAddedMessage(theme));
|
||||
WeakReferenceMessenger.Default.Send(new ThemeAddedMessage(theme));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels
|
||||
{
|
||||
public class EnvironmentVariableViewModel : ViewModelBase
|
||||
public class EnvironmentVariableViewModel : ObservableObject
|
||||
{
|
||||
private string _name;
|
||||
private string _value;
|
||||
@@ -13,13 +13,13 @@ namespace FluentTerminal.App.ViewModels
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
set => Set(ref _name, value);
|
||||
set => SetProperty(ref _name, value);
|
||||
}
|
||||
|
||||
public string Value
|
||||
{
|
||||
get => _value;
|
||||
set => Set(ref _value, value);
|
||||
set => SetProperty(ref _value, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MvvmLightLibsStd10" Version="5.4.1.1" />
|
||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
using FluentTerminal.App.ViewModels.Utilities;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Infrastructure
|
||||
{
|
||||
public class AsyncCommand : IAsyncCommand
|
||||
{
|
||||
public event EventHandler CanExecuteChanged;
|
||||
|
||||
private bool _isExecuting;
|
||||
private readonly Func<Task> _execute;
|
||||
private readonly Func<bool> _canExecute;
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
public AsyncCommand(
|
||||
Func<Task> execute,
|
||||
Func<bool> canExecute = null,
|
||||
IErrorHandler errorHandler = null)
|
||||
{
|
||||
_execute = execute;
|
||||
_canExecute = canExecute;
|
||||
_errorHandler = errorHandler;
|
||||
}
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
return !_isExecuting && (_canExecute?.Invoke() ?? true);
|
||||
}
|
||||
|
||||
public async Task ExecuteAsync()
|
||||
{
|
||||
if (CanExecute())
|
||||
{
|
||||
try
|
||||
{
|
||||
// TODO: If we're using class field _isExecuting, maybe we should introduce some locking?
|
||||
_isExecuting = true;
|
||||
await _execute();
|
||||
}
|
||||
finally
|
||||
{
|
||||
_isExecuting = false;
|
||||
}
|
||||
}
|
||||
|
||||
RaiseCanExecuteChanged();
|
||||
}
|
||||
|
||||
public void RaiseCanExecuteChanged()
|
||||
{
|
||||
CanExecuteChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
#region Explicit implementations
|
||||
bool ICommand.CanExecute(object parameter)
|
||||
{
|
||||
return CanExecute();
|
||||
}
|
||||
|
||||
void ICommand.Execute(object parameter)
|
||||
{
|
||||
ExecuteAsync().FireAndForgetSafeAsync(_errorHandler);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class AsyncCommand<T> : IAsyncCommand<T>
|
||||
{
|
||||
public event EventHandler CanExecuteChanged;
|
||||
|
||||
private bool _isExecuting;
|
||||
private readonly Func<T, Task> _execute;
|
||||
private readonly Func<T, bool> _canExecute;
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
public AsyncCommand(Func<T, Task> execute, Func<T, bool> canExecute = null, IErrorHandler errorHandler = null)
|
||||
{
|
||||
_execute = execute;
|
||||
_canExecute = canExecute;
|
||||
_errorHandler = errorHandler;
|
||||
}
|
||||
|
||||
public bool CanExecute(T parameter)
|
||||
{
|
||||
return !_isExecuting && (_canExecute?.Invoke(parameter) ?? true);
|
||||
}
|
||||
|
||||
public async Task ExecuteAsync(T parameter)
|
||||
{
|
||||
if (CanExecute(parameter))
|
||||
{
|
||||
try
|
||||
{
|
||||
_isExecuting = true;
|
||||
await _execute(parameter);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_isExecuting = false;
|
||||
}
|
||||
}
|
||||
|
||||
RaiseCanExecuteChanged();
|
||||
}
|
||||
|
||||
public void RaiseCanExecuteChanged()
|
||||
{
|
||||
CanExecuteChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
#region Explicit implementations
|
||||
bool ICommand.CanExecute(object parameter)
|
||||
{
|
||||
return CanExecute((T)parameter);
|
||||
}
|
||||
|
||||
void ICommand.Execute(object parameter)
|
||||
{
|
||||
ExecuteAsync((T)parameter).FireAndForgetSafeAsync(_errorHandler);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Infrastructure
|
||||
{
|
||||
/// <summary>
|
||||
/// based on: https://github.com/johnthiriet/AsyncVoid
|
||||
/// </summary>
|
||||
public interface IAsyncCommand : ICommand
|
||||
{
|
||||
Task ExecuteAsync();
|
||||
bool CanExecute();
|
||||
}
|
||||
|
||||
public interface IAsyncCommand<in T> : ICommand
|
||||
{
|
||||
Task ExecuteAsync(T parameter);
|
||||
bool CanExecute(T parameter);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ using FluentTerminal.App.Services.EventArgs;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.Models.Enums;
|
||||
using GalaSoft.MvvmLight;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -14,13 +13,22 @@ using System.Threading.Tasks;
|
||||
using Windows.UI.Core;
|
||||
using FluentTerminal.App.ViewModels.Menu;
|
||||
using FluentTerminal.Models.Messages;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using System.Windows.Input;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Messaging;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels
|
||||
{
|
||||
public class MainViewModel : ViewModelBase
|
||||
public class MainViewModel : ObservableObject,
|
||||
IRecipient<ApplicationSettingsChangedMessage>,
|
||||
IRecipient<ShellProfileAddedMessage>,
|
||||
IRecipient<ShellProfileDeletedMessage>,
|
||||
IRecipient<ShellProfileChangedMessage>,
|
||||
IRecipient<DefaultShellProfileChangedMessage>,
|
||||
IRecipient<TerminalOptionsChangedMessage>,
|
||||
IRecipient<CommandHistoryChangedMessage>,
|
||||
IRecipient<KeyBindingsChangedMessage>
|
||||
{
|
||||
private readonly IClipboardService _clipboardService;
|
||||
private readonly IDialogService _dialogService;
|
||||
@@ -39,15 +47,6 @@ namespace FluentTerminal.App.ViewModels
|
||||
public MainViewModel(ISettingsService settingsService, ITrayProcessCommunicationService trayProcessCommunicationService, IDialogService dialogService, IKeyboardCommandService keyboardCommandService,
|
||||
IApplicationView applicationView, IClipboardService clipboardService, ICommandHistoryService commandHistoryService)
|
||||
{
|
||||
MessengerInstance.Register<ApplicationSettingsChangedMessage>(this, OnApplicationSettingsChanged);
|
||||
MessengerInstance.Register<ShellProfileAddedMessage>(this, OnShellProfileAdded);
|
||||
MessengerInstance.Register<ShellProfileDeletedMessage>(this, OnShellProfileDeleted);
|
||||
MessengerInstance.Register<ShellProfileChangedMessage>(this, OnShellProfileChanged);
|
||||
MessengerInstance.Register<DefaultShellProfileChangedMessage>(this, OnDefaultShellProfileChanged);
|
||||
MessengerInstance.Register<TerminalOptionsChangedMessage>(this, OnTerminalOptionsChanged);
|
||||
MessengerInstance.Register<CommandHistoryChangedMessage>(this, OnCommandHistoryChanged);
|
||||
MessengerInstance.Register<KeyBindingsChangedMessage>(this, OnKeyBindingChanged);
|
||||
|
||||
_settingsService = settingsService;
|
||||
|
||||
_trayProcessCommunicationService = trayProcessCommunicationService;
|
||||
@@ -69,7 +68,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
_keyboardCommandService.RegisterCommandHandler(nameof(Command.ChangeTabTitle), async () => await SelectedTerminal.EditTitleAsync());
|
||||
_keyboardCommandService.RegisterCommandHandler(nameof(Command.CloseTab), CloseCurrentTab);
|
||||
_keyboardCommandService.RegisterCommandHandler(nameof(Command.DuplicateTab), async () => await AddTabAsync(SelectedTerminal.ShellProfile.Clone()));
|
||||
_keyboardCommandService.RegisterCommandHandler(nameof(Command.ReconnectTab), async () => { if (SelectedTerminal.ReconnectTabCommand.CanExecute()) await SelectedTerminal.ReconnectTabAsync(); });
|
||||
_keyboardCommandService.RegisterCommandHandler(nameof(Command.ReconnectTab), async () => { if (SelectedTerminal.ReconnectTabCommand.CanExecute(null)) await SelectedTerminal.ReconnectTabAsync(); });
|
||||
|
||||
// empty command handlers for copy and paste so that the main window does not execute these when copy keyboard shortcut is used in a popup search panel
|
||||
// in such a case an exception would be thrown if no handlers are available so these empty ones mitigate that. Also there is no need for these on the main window anyway
|
||||
@@ -126,12 +125,14 @@ namespace FluentTerminal.App.ViewModels
|
||||
_newQuickLaunchWindowCommand = new RelayCommand(async () => await AddQuickLaunchProfileAsync(NewTerminalLocation.Window));
|
||||
|
||||
_settingsCommand = new RelayCommand(ShowSettings);
|
||||
_aboutCommand = new RelayCommand(async () => await _dialogService.ShowAboutDialogAsync());
|
||||
_quitCommand = new AsyncCommand(() => _trayProcessCommunicationService.QuitApplicationAsync());
|
||||
_aboutCommand = new AsyncRelayCommand(_dialogService.ShowAboutDialogAsync);
|
||||
_quitCommand = new AsyncRelayCommand(_trayProcessCommunicationService.QuitApplicationAsync);
|
||||
|
||||
_defaultProfile = _settingsService.GetDefaultShellProfile();
|
||||
|
||||
CreateMenuViewModel();
|
||||
|
||||
WeakReferenceMessenger.Default.RegisterAll(this);
|
||||
}
|
||||
|
||||
private ShellProfile _defaultProfile;
|
||||
@@ -156,7 +157,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
|
||||
private void OnClosed(object sender, EventArgs e)
|
||||
{
|
||||
MessengerInstance.Unregister(this);
|
||||
//MessengerInstance.Unregister(this); todo do we still need this?
|
||||
|
||||
ApplicationView.CloseRequested -= OnCloseRequest;
|
||||
ApplicationView.Closed -= OnClosed;
|
||||
@@ -171,41 +172,10 @@ namespace FluentTerminal.App.ViewModels
|
||||
Closed?.Invoke(this, e);
|
||||
}
|
||||
|
||||
private void OnShellProfileDeleted(ShellProfileDeletedMessage message)
|
||||
{
|
||||
_keyboardCommandService.DeregisterCommandHandler(message.ProfileId.ToString());
|
||||
|
||||
UpdateDefaultShellProfile();
|
||||
|
||||
CreateMenuViewModel();
|
||||
}
|
||||
|
||||
private void OnShellProfileChanged(ShellProfileChangedMessage message)
|
||||
{
|
||||
UpdateDefaultShellProfile();
|
||||
|
||||
CreateMenuViewModel();
|
||||
}
|
||||
|
||||
private void OnShellProfileAdded(ShellProfileAddedMessage message)
|
||||
{
|
||||
_keyboardCommandService.RegisterCommandHandler(message.ShellProfile.Id.ToString(),
|
||||
async () => await AddProfileByGuidAsync(message.ShellProfile.Id));
|
||||
|
||||
UpdateDefaultShellProfile();
|
||||
|
||||
CreateMenuViewModel();
|
||||
}
|
||||
|
||||
private void OnDefaultShellProfileChanged(DefaultShellProfileChangedMessage message)
|
||||
{
|
||||
UpdateDefaultShellProfile();
|
||||
}
|
||||
|
||||
private void OnTerminalsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
RaisePropertyChanged(nameof(ShowTabsOnTop));
|
||||
RaisePropertyChanged(nameof(ShowTabsOnBottom));
|
||||
OnPropertyChanged(nameof(ShowTabsOnTop));
|
||||
OnPropertyChanged(nameof(ShowTabsOnBottom));
|
||||
}
|
||||
|
||||
public event EventHandler Closed;
|
||||
@@ -228,14 +198,14 @@ namespace FluentTerminal.App.ViewModels
|
||||
ActivatedMv?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
public RelayCommand AddDefaultTabCommand { get; private set; }
|
||||
public ICommand AddDefaultTabCommand { get; private set; }
|
||||
|
||||
public string WindowTitle
|
||||
{
|
||||
get => _windowTitle;
|
||||
set
|
||||
{
|
||||
if (Set(ref _windowTitle, value))
|
||||
if (SetProperty(ref _windowTitle, value))
|
||||
{
|
||||
ApplicationView.Title = value;
|
||||
}
|
||||
@@ -255,13 +225,13 @@ namespace FluentTerminal.App.ViewModels
|
||||
public bool UseAcrylicBackground
|
||||
{
|
||||
get => _useAcrylicBackground;
|
||||
set => Set(ref _useAcrylicBackground, value);
|
||||
set => SetProperty(ref _useAcrylicBackground, value);
|
||||
}
|
||||
|
||||
public double BackgroundOpacity
|
||||
{
|
||||
get => _backgroundOpacity;
|
||||
set => Set(ref _backgroundOpacity, value);
|
||||
set => SetProperty(ref _backgroundOpacity, value);
|
||||
}
|
||||
|
||||
public TerminalViewModel SelectedTerminal
|
||||
@@ -271,7 +241,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
{
|
||||
var oldValue = _selectedTerminal;
|
||||
|
||||
if (Set(ref _selectedTerminal, value))
|
||||
if (SetProperty(ref _selectedTerminal, value))
|
||||
{
|
||||
if (oldValue != null)
|
||||
{
|
||||
@@ -292,7 +262,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public TabsPosition TabsPosition
|
||||
{
|
||||
get => _tabsPosition;
|
||||
set => Set(ref _tabsPosition, value);
|
||||
set => SetProperty(ref _tabsPosition, value);
|
||||
}
|
||||
|
||||
public ObservableCollection<TerminalViewModel> Terminals { get; } = new ObservableCollection<TerminalViewModel>();
|
||||
@@ -428,7 +398,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
await Task.WhenAll(Terminals.Where(t => t != terminal).Select(t =>
|
||||
{
|
||||
Logger.Instance.Debug("Terminal with Id: {@id} closed.", t.Terminal.Id);
|
||||
return t.CloseCommand.ExecuteAsync();
|
||||
return t.CloseAsync();
|
||||
})).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
@@ -442,7 +412,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
await Task.WhenAll(toRemove.Select(t =>
|
||||
{
|
||||
Logger.Instance.Debug("Terminal with Id: {@id} closed.", t.Terminal.Id);
|
||||
return t.CloseCommand.ExecuteAsync();
|
||||
return t.CloseAsync();
|
||||
})).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
@@ -456,7 +426,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
await Task.WhenAll(toRemove.Select(t =>
|
||||
{
|
||||
Logger.Instance.Debug("Terminal with Id: {@id} closed.", t.Terminal.Id);
|
||||
return t.CloseCommand.ExecuteAsync();
|
||||
return t.CloseAsync();
|
||||
})).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
@@ -477,33 +447,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
|
||||
private void CloseCurrentTab()
|
||||
{
|
||||
SelectedTerminal?.CloseCommand.ExecuteAsync();
|
||||
}
|
||||
|
||||
private void OnApplicationSettingsChanged(ApplicationSettingsChangedMessage message)
|
||||
{
|
||||
var updateMenu = _applicationSettings != null &&
|
||||
(_applicationSettings.TabWindowCascadingAppMenu !=
|
||||
message.ApplicationSettings.TabWindowCascadingAppMenu ||
|
||||
!message.ApplicationSettings.TabWindowCascadingAppMenu &&
|
||||
_applicationSettings.NewTerminalLocation !=
|
||||
message.ApplicationSettings.NewTerminalLocation);
|
||||
|
||||
_applicationSettings = message.ApplicationSettings;
|
||||
|
||||
SetWindowTitle(SelectedTerminal);
|
||||
|
||||
ApplicationView.ExecuteOnUiThreadAsync(() =>
|
||||
{
|
||||
TabsPosition = message.ApplicationSettings.TabsPosition;
|
||||
RaisePropertyChanged(nameof(ShowTabsOnTop));
|
||||
RaisePropertyChanged(nameof(ShowTabsOnBottom));
|
||||
});
|
||||
|
||||
if (updateMenu)
|
||||
{
|
||||
ApplicationView.ExecuteOnUiThreadAsync(CreateMenuViewModel, CoreDispatcherPriority.Low, true);
|
||||
}
|
||||
SelectedTerminal?.CloseAsync();
|
||||
}
|
||||
|
||||
private async Task OnCloseRequest(object sender, CancelableEventArgs e)
|
||||
@@ -561,7 +505,64 @@ namespace FluentTerminal.App.ViewModels
|
||||
});
|
||||
}
|
||||
|
||||
private void OnTerminalOptionsChanged(TerminalOptionsChangedMessage message)
|
||||
public void Receive(ShellProfileDeletedMessage message)
|
||||
{
|
||||
_keyboardCommandService.DeregisterCommandHandler(message.ProfileId.ToString());
|
||||
|
||||
UpdateDefaultShellProfile();
|
||||
|
||||
ApplicationView.ExecuteOnUiThreadAsync(CreateMenuViewModel, CoreDispatcherPriority.Low, true);
|
||||
}
|
||||
|
||||
public void Receive(ShellProfileChangedMessage message)
|
||||
{
|
||||
UpdateDefaultShellProfile();
|
||||
|
||||
ApplicationView.ExecuteOnUiThreadAsync(CreateMenuViewModel, CoreDispatcherPriority.Low, true);
|
||||
}
|
||||
|
||||
public void Receive(ShellProfileAddedMessage message)
|
||||
{
|
||||
_keyboardCommandService.RegisterCommandHandler(message.ShellProfile.Id.ToString(),
|
||||
async () => await AddProfileByGuidAsync(message.ShellProfile.Id));
|
||||
|
||||
UpdateDefaultShellProfile();
|
||||
|
||||
ApplicationView.ExecuteOnUiThreadAsync(CreateMenuViewModel, CoreDispatcherPriority.Low, true);
|
||||
}
|
||||
|
||||
public void Receive(DefaultShellProfileChangedMessage message)
|
||||
{
|
||||
UpdateDefaultShellProfile();
|
||||
}
|
||||
|
||||
public void Receive(ApplicationSettingsChangedMessage message)
|
||||
{
|
||||
var updateMenu = _applicationSettings != null &&
|
||||
(_applicationSettings.TabWindowCascadingAppMenu !=
|
||||
message.ApplicationSettings.TabWindowCascadingAppMenu ||
|
||||
!message.ApplicationSettings.TabWindowCascadingAppMenu &&
|
||||
_applicationSettings.NewTerminalLocation !=
|
||||
message.ApplicationSettings.NewTerminalLocation);
|
||||
|
||||
_applicationSettings = message.ApplicationSettings;
|
||||
|
||||
SetWindowTitle(SelectedTerminal);
|
||||
|
||||
ApplicationView.ExecuteOnUiThreadAsync(() =>
|
||||
{
|
||||
TabsPosition = message.ApplicationSettings.TabsPosition;
|
||||
OnPropertyChanged(nameof(ShowTabsOnTop));
|
||||
OnPropertyChanged(nameof(ShowTabsOnBottom));
|
||||
});
|
||||
|
||||
if (updateMenu)
|
||||
{
|
||||
ApplicationView.ExecuteOnUiThreadAsync(CreateMenuViewModel, CoreDispatcherPriority.Low, true);
|
||||
}
|
||||
}
|
||||
|
||||
public void Receive(TerminalOptionsChangedMessage message)
|
||||
{
|
||||
ApplicationView.ExecuteOnUiThreadAsync(() =>
|
||||
{
|
||||
@@ -570,14 +571,14 @@ namespace FluentTerminal.App.ViewModels
|
||||
}, CoreDispatcherPriority.Low);
|
||||
}
|
||||
|
||||
private void OnKeyBindingChanged(KeyBindingsChangedMessage message)
|
||||
public void Receive(KeyBindingsChangedMessage message)
|
||||
{
|
||||
LoadKeyBindings();
|
||||
|
||||
ApplicationView.ExecuteOnUiThreadAsync(CreateMenuViewModel, CoreDispatcherPriority.Low, true);
|
||||
}
|
||||
|
||||
private void OnCommandHistoryChanged(CommandHistoryChangedMessage message)
|
||||
public void Receive(CommandHistoryChangedMessage message)
|
||||
{
|
||||
ApplicationView.ExecuteOnUiThreadAsync(CreateMenuViewModel, CoreDispatcherPriority.Low, true);
|
||||
}
|
||||
@@ -631,20 +632,20 @@ namespace FluentTerminal.App.ViewModels
|
||||
|
||||
private MenuViewModel _menuViewModel;
|
||||
|
||||
private readonly RelayCommand _newDefaultTabCommand;
|
||||
private readonly RelayCommand _newDefaultWindowCommand;
|
||||
private readonly RelayCommand _newRemoteTabCommand;
|
||||
private readonly RelayCommand _newRemoteWindowCommand;
|
||||
private readonly RelayCommand _newQuickLaunchTabCommand;
|
||||
private readonly RelayCommand _newQuickLaunchWindowCommand;
|
||||
private readonly RelayCommand _settingsCommand;
|
||||
private readonly RelayCommand _aboutCommand;
|
||||
private readonly ICommand _newDefaultTabCommand;
|
||||
private readonly ICommand _newDefaultWindowCommand;
|
||||
private readonly ICommand _newRemoteTabCommand;
|
||||
private readonly ICommand _newRemoteWindowCommand;
|
||||
private readonly ICommand _newQuickLaunchTabCommand;
|
||||
private readonly ICommand _newQuickLaunchWindowCommand;
|
||||
private readonly ICommand _settingsCommand;
|
||||
private readonly ICommand _aboutCommand;
|
||||
private readonly ICommand _quitCommand;
|
||||
|
||||
public MenuViewModel AppMenuViewModel
|
||||
{
|
||||
get => _menuViewModel;
|
||||
private set => Set(ref _menuViewModel, value);
|
||||
private set => SetProperty(ref _menuViewModel, value);
|
||||
}
|
||||
|
||||
private void CreateMenuViewModel()
|
||||
@@ -787,7 +788,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
|
||||
foreach (var profile in _settingsService.GetShellProfiles().Concat(_settingsService.GetSshProfiles()).OrderBy(x => x.Name))
|
||||
{
|
||||
items.Add(new MenuItemViewModel(profile.Name, new AsyncCommand(() => AddProfileAsync(profile, location))));
|
||||
items.Add(new MenuItemViewModel(profile.Name, new AsyncRelayCommand(() => AddProfileAsync(profile, location))));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -797,8 +798,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
|
||||
private MenuItemViewModel CommandToMenuItem(ExecutedCommand command)
|
||||
{
|
||||
var itemCommand = new RelayCommand(async () => await AddProfileAsync(command.ShellProfile),
|
||||
keepTargetAlive: true);
|
||||
var itemCommand = new AsyncRelayCommand(() => AddProfileAsync(command.ShellProfile));
|
||||
var keyBinding = command.ShellProfile.KeyBindings?.FirstOrDefault() is KeyBinding kb
|
||||
? new MenuItemKeyBindingViewModel(kb)
|
||||
: null;
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Menu
|
||||
namespace FluentTerminal.App.ViewModels.Menu
|
||||
{
|
||||
public sealed class Mdl2Icon
|
||||
{
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.Models.Enums;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Windows.System;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Menu
|
||||
{
|
||||
public class MenuItemKeyBindingViewModel : ViewModelBase
|
||||
public class MenuItemKeyBindingViewModel : ObservableObject
|
||||
{
|
||||
private int _key;
|
||||
|
||||
public int Key
|
||||
{
|
||||
get => _key;
|
||||
set => Set(ref _key, value);
|
||||
set => SetProperty(ref _key, value);
|
||||
}
|
||||
|
||||
private int _keyModifiers;
|
||||
@@ -24,7 +24,7 @@ namespace FluentTerminal.App.ViewModels.Menu
|
||||
public int KeyModifiers
|
||||
{
|
||||
get => _keyModifiers;
|
||||
private set => Set(ref _keyModifiers, value);
|
||||
private set => SetProperty(ref _keyModifiers, value);
|
||||
}
|
||||
|
||||
private bool _ctrl;
|
||||
@@ -34,7 +34,7 @@ namespace FluentTerminal.App.ViewModels.Menu
|
||||
get => _ctrl;
|
||||
set
|
||||
{
|
||||
if (Set(ref _ctrl, value))
|
||||
if (SetProperty(ref _ctrl, value))
|
||||
{
|
||||
SetKeyModifiers();
|
||||
}
|
||||
@@ -48,7 +48,7 @@ namespace FluentTerminal.App.ViewModels.Menu
|
||||
get => _alt;
|
||||
set
|
||||
{
|
||||
if (Set(ref _alt, value))
|
||||
if (SetProperty(ref _alt, value))
|
||||
{
|
||||
SetKeyModifiers();
|
||||
}
|
||||
@@ -62,7 +62,7 @@ namespace FluentTerminal.App.ViewModels.Menu
|
||||
get => _shift;
|
||||
set
|
||||
{
|
||||
if (Set(ref _shift, value))
|
||||
if (SetProperty(ref _shift, value))
|
||||
{
|
||||
SetKeyModifiers();
|
||||
}
|
||||
@@ -76,7 +76,7 @@ namespace FluentTerminal.App.ViewModels.Menu
|
||||
get => _windows;
|
||||
set
|
||||
{
|
||||
if (Set(ref _windows, value))
|
||||
if (SetProperty(ref _windows, value))
|
||||
{
|
||||
SetKeyModifiers();
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace FluentTerminal.App.ViewModels.Menu
|
||||
public MenuItemKeyBindingViewModel KeyBinding
|
||||
{
|
||||
get => _keyBinding;
|
||||
set => Set(ref _keyBinding, value);
|
||||
set => SetProperty(ref _keyBinding, value);
|
||||
}
|
||||
|
||||
public ICommand Command { get; }
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Menu
|
||||
{
|
||||
public class MenuItemViewModelBase : ViewModelBase
|
||||
public class MenuItemViewModelBase : ObservableObject
|
||||
{
|
||||
#region Properties
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace FluentTerminal.App.ViewModels.Menu
|
||||
public string Text
|
||||
{
|
||||
get => _text;
|
||||
set => Set(ref _text, value);
|
||||
set => SetProperty(ref _text, value);
|
||||
}
|
||||
|
||||
private string _description;
|
||||
@@ -20,7 +20,7 @@ namespace FluentTerminal.App.ViewModels.Menu
|
||||
public string Description
|
||||
{
|
||||
get => _description;
|
||||
set => Set(ref _description, value);
|
||||
set => SetProperty(ref _description, value);
|
||||
}
|
||||
|
||||
private Mdl2Icon _icon;
|
||||
@@ -28,7 +28,7 @@ namespace FluentTerminal.App.ViewModels.Menu
|
||||
public Mdl2Icon Icon
|
||||
{
|
||||
get => _icon;
|
||||
set => Set(ref _icon, value);
|
||||
set => SetProperty(ref _icon, value);
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Menu
|
||||
{
|
||||
public class MenuViewModel : ViewModelBase
|
||||
public class MenuViewModel : ObservableObject
|
||||
{
|
||||
public ObservableCollection<MenuItemViewModelBase> Items { get; }
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
using Windows.UI.Xaml;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels
|
||||
{
|
||||
public class OverlayViewModel : ViewModelBase
|
||||
public class OverlayViewModel : ObservableObject
|
||||
{
|
||||
private readonly DispatcherTimer _overlayTimer;
|
||||
private bool _showOverlay;
|
||||
@@ -19,13 +19,13 @@ namespace FluentTerminal.App.ViewModels
|
||||
public bool ShowOverlay
|
||||
{
|
||||
get => _showOverlay;
|
||||
set => Set(ref _showOverlay, value);
|
||||
set => SetProperty(ref _showOverlay, value);
|
||||
}
|
||||
|
||||
public string OverlayContent
|
||||
{
|
||||
get => _overlayContent;
|
||||
set => Set(ref _overlayContent, value);
|
||||
set => SetProperty(ref _overlayContent, value);
|
||||
}
|
||||
|
||||
public void Show(string message)
|
||||
|
||||
@@ -3,21 +3,21 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using FluentTerminal.App.ViewModels.Profiles;
|
||||
using FluentTerminal.App.ViewModels.Settings;
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class for all profile view models. Implements logic for saving, editing, resetting, etc.
|
||||
/// </summary>
|
||||
public abstract class ProfileViewModelBase<T> : ViewModelBase where T : ProfileProviderViewModelBase
|
||||
public abstract class ProfileViewModelBase<T> : ObservableObject where T : ProfileProviderViewModelBase
|
||||
{
|
||||
#region Fields
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public bool InEditMode
|
||||
{
|
||||
get => _inEditMode;
|
||||
set => Set(ref _inEditMode, value);
|
||||
set => SetProperty(ref _inEditMode, value);
|
||||
}
|
||||
|
||||
private string _name;
|
||||
@@ -49,7 +49,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
set => Set(ref _name, value);
|
||||
set => SetProperty(ref _name, value);
|
||||
}
|
||||
|
||||
public KeyBindingsViewModel KeyBindings { get; }
|
||||
@@ -69,15 +69,15 @@ namespace FluentTerminal.App.ViewModels
|
||||
|
||||
#region Commands
|
||||
|
||||
public IAsyncCommand CancelEditCommand { get; }
|
||||
public ICommand CancelEditCommand { get; }
|
||||
|
||||
public IAsyncCommand DeleteCommand { get; }
|
||||
public ICommand DeleteCommand { get; }
|
||||
|
||||
public RelayCommand EditCommand { get; }
|
||||
public ICommand EditCommand { get; }
|
||||
|
||||
public IAsyncCommand SaveChangesCommand { get; }
|
||||
public ICommand SaveChangesCommand { get; }
|
||||
|
||||
public IAsyncCommand AddKeyboardShortcutCommand { get; }
|
||||
public ICommand AddKeyboardShortcutCommand { get; }
|
||||
|
||||
#endregion Commands
|
||||
|
||||
@@ -102,11 +102,11 @@ namespace FluentTerminal.App.ViewModels
|
||||
|
||||
Initialize(shellProfile);
|
||||
|
||||
DeleteCommand = new AsyncCommand(DeleteAsync, CanDelete);
|
||||
DeleteCommand = new AsyncRelayCommand(DeleteAsync, CanDelete);
|
||||
EditCommand = new RelayCommand(Edit);
|
||||
CancelEditCommand = new AsyncCommand(CancelEditAsync);
|
||||
SaveChangesCommand = new AsyncCommand(SaveChangesAsync);
|
||||
AddKeyboardShortcutCommand = new AsyncCommand(AddKeyboardShortcut);
|
||||
CancelEditCommand = new AsyncRelayCommand(CancelEditAsync);
|
||||
SaveChangesCommand = new AsyncRelayCommand(SaveChangesAsync);
|
||||
AddKeyboardShortcutCommand = new AsyncRelayCommand(AddKeyboardShortcutAsync);
|
||||
}
|
||||
|
||||
#endregion Constructor
|
||||
@@ -248,7 +248,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
IsNew = false;
|
||||
}
|
||||
|
||||
private Task AddKeyboardShortcut()
|
||||
private Task AddKeyboardShortcutAsync()
|
||||
{
|
||||
return KeyBindings.ShowAddKeyBindingDialogAsync();
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using FluentTerminal.Models;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Profiles
|
||||
{
|
||||
@@ -26,7 +27,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public string Location
|
||||
{
|
||||
get => _location;
|
||||
set => Set(ref _location, value);
|
||||
set => SetProperty(ref _location, value);
|
||||
}
|
||||
|
||||
private string _workingDirectory;
|
||||
@@ -34,7 +35,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public string WorkingDirectory
|
||||
{
|
||||
get => _workingDirectory;
|
||||
set => Set(ref _workingDirectory, value);
|
||||
set => SetProperty(ref _workingDirectory, value);
|
||||
}
|
||||
|
||||
private string _arguments;
|
||||
@@ -42,16 +43,16 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public string Arguments
|
||||
{
|
||||
get => _arguments;
|
||||
set => Set(ref _arguments, value);
|
||||
set => SetProperty(ref _arguments, value);
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Commands
|
||||
|
||||
public IAsyncCommand BrowseForCustomShellCommand { get; }
|
||||
public ICommand BrowseForCustomShellCommand { get; }
|
||||
|
||||
public IAsyncCommand BrowseForWorkingDirectoryCommand { get; }
|
||||
public ICommand BrowseForWorkingDirectoryCommand { get; }
|
||||
|
||||
#endregion Commands
|
||||
|
||||
@@ -63,8 +64,8 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
{
|
||||
_fileSystemService = fileSystemService;
|
||||
|
||||
BrowseForCustomShellCommand = new AsyncCommand(BrowseForCustomShell);
|
||||
BrowseForWorkingDirectoryCommand = new AsyncCommand(BrowseForWorkingDirectory);
|
||||
BrowseForCustomShellCommand = new AsyncRelayCommand(BrowseForCustomShell);
|
||||
BrowseForWorkingDirectoryCommand = new AsyncRelayCommand(BrowseForWorkingDirectory);
|
||||
|
||||
Initialize(Model);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,8 @@ using Windows.UI.Core;
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.Models.Messages;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Messaging;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Profiles
|
||||
{
|
||||
@@ -16,7 +17,9 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
/// Base class for all profile view model classes. It contains properties shared by all other view models
|
||||
/// (theme-related properties, line-ending translation, and WinPTY/ConPTY selection).
|
||||
/// </summary>
|
||||
public abstract class ProfileProviderViewModelBase : ViewModelBase
|
||||
public abstract class ProfileProviderViewModelBase : ObservableObject,
|
||||
IRecipient<ThemeAddedMessage>,
|
||||
IRecipient<ThemeDeletedMessage>
|
||||
{
|
||||
#region Fields
|
||||
|
||||
@@ -78,7 +81,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
? value
|
||||
: TabThemes.FirstOrDefault(t => t.Id == value.Id) ?? TabThemes.First();
|
||||
|
||||
if (Set(ref _selectedTabTheme, theme))
|
||||
if (SetProperty(ref _selectedTabTheme, theme))
|
||||
{
|
||||
_tabThemeId = theme.Id;
|
||||
}
|
||||
@@ -92,7 +95,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
get => _tabThemeId;
|
||||
set
|
||||
{
|
||||
if (Set(ref _tabThemeId, value))
|
||||
if (SetProperty(ref _tabThemeId, value))
|
||||
{
|
||||
SelectedTabTheme = TabThemes.FirstOrDefault(t => t.Id.Equals(value));
|
||||
}
|
||||
@@ -119,7 +122,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
theme = TerminalThemes.FirstOrDefault(t => t.Id.Equals(theme.Id)) ?? TerminalThemes.First();
|
||||
}
|
||||
|
||||
if (Set(ref _selectedTerminalTheme, theme))
|
||||
if (SetProperty(ref _selectedTerminalTheme, theme))
|
||||
{
|
||||
_terminalThemeId = theme.Id;
|
||||
}
|
||||
@@ -133,7 +136,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
get => _terminalThemeId;
|
||||
set
|
||||
{
|
||||
if (Set(ref _terminalThemeId, value))
|
||||
if (SetProperty(ref _terminalThemeId, value))
|
||||
{
|
||||
SelectedTerminalTheme = TerminalThemes.FirstOrDefault(t => t.Id.Equals(value));
|
||||
}
|
||||
@@ -145,7 +148,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public bool UseConPty
|
||||
{
|
||||
get => _useConPty;
|
||||
set => Set(ref _useConPty, value);
|
||||
set => SetProperty(ref _useConPty, value);
|
||||
}
|
||||
|
||||
private bool _useBuffer;
|
||||
@@ -153,7 +156,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public bool UseBuffer
|
||||
{
|
||||
get => _useBuffer;
|
||||
set => Set(ref _useBuffer, value);
|
||||
set => SetProperty(ref _useBuffer, value);
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
@@ -179,17 +182,16 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
|
||||
SelectedTerminalTheme = TerminalThemes.First();
|
||||
|
||||
MessengerInstance.Register<ThemeAddedMessage>(this, OnThemeAdded);
|
||||
MessengerInstance.Register<ThemeDeletedMessage>(this, OnThemeDeleted);
|
||||
|
||||
Initialize(Model);
|
||||
|
||||
WeakReferenceMessenger.Default.RegisterAll(this);
|
||||
}
|
||||
|
||||
#endregion Constructor
|
||||
|
||||
#region Methods
|
||||
|
||||
private void OnThemeDeleted(ThemeDeletedMessage message)
|
||||
public void Receive(ThemeDeletedMessage message)
|
||||
{
|
||||
var theme = TerminalThemes.FirstOrDefault(t => t.Id.Equals(message.ThemeId));
|
||||
|
||||
@@ -209,7 +211,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
}, CoreDispatcherPriority.Low, true);
|
||||
}
|
||||
|
||||
private void OnThemeAdded(ThemeAddedMessage message)
|
||||
public void Receive(ThemeAddedMessage message)
|
||||
{
|
||||
ApplicationView.ExecuteOnUiThreadAsync(() => TerminalThemes.Add(message.Theme), CoreDispatcherPriority.Low);
|
||||
}
|
||||
|
||||
@@ -6,10 +6,11 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Windows.Input;
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using FluentTerminal.Models;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Profiles
|
||||
{
|
||||
@@ -59,7 +60,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public string Host
|
||||
{
|
||||
get => _host;
|
||||
set => Set(ref _host, value);
|
||||
set => SetProperty(ref _host, value);
|
||||
}
|
||||
|
||||
private ushort _sshPort;
|
||||
@@ -67,7 +68,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public ushort SshPort
|
||||
{
|
||||
get => _sshPort;
|
||||
set => Set(ref _sshPort, value);
|
||||
set => SetProperty(ref _sshPort, value);
|
||||
}
|
||||
|
||||
private string _username;
|
||||
@@ -75,7 +76,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public string Username
|
||||
{
|
||||
get => _username;
|
||||
set => Set(ref _username, value);
|
||||
set => SetProperty(ref _username, value);
|
||||
}
|
||||
|
||||
private string _identityFile;
|
||||
@@ -83,7 +84,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public string IdentityFile
|
||||
{
|
||||
get => _identityFile;
|
||||
set => Set(ref _identityFile, value);
|
||||
set => SetProperty(ref _identityFile, value);
|
||||
}
|
||||
|
||||
private bool _useMosh;
|
||||
@@ -91,7 +92,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public bool UseMosh
|
||||
{
|
||||
get => _useMosh;
|
||||
set => Set(ref _useMosh, value);
|
||||
set => SetProperty(ref _useMosh, value);
|
||||
}
|
||||
|
||||
private ushort _moshPortFrom;
|
||||
@@ -99,7 +100,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public ushort MoshPortFrom
|
||||
{
|
||||
get => _moshPortFrom;
|
||||
set => Set(ref _moshPortFrom, value);
|
||||
set => SetProperty(ref _moshPortFrom, value);
|
||||
}
|
||||
|
||||
private ushort _moshPortTo;
|
||||
@@ -107,14 +108,14 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
public ushort MoshPortTo
|
||||
{
|
||||
get => _moshPortTo;
|
||||
set => Set(ref _moshPortTo, value);
|
||||
set => SetProperty(ref _moshPortTo, value);
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Commands
|
||||
|
||||
public IAsyncCommand BrowseForIdentityFileCommand { get; }
|
||||
public ICommand BrowseForIdentityFileCommand { get; }
|
||||
|
||||
#endregion Commands
|
||||
|
||||
@@ -132,7 +133,7 @@ namespace FluentTerminal.App.ViewModels.Profiles
|
||||
|
||||
Initialize((SshProfile)Model);
|
||||
|
||||
BrowseForIdentityFileCommand = new AsyncCommand(BrowseForIdentityFileAsync);
|
||||
BrowseForIdentityFileCommand = new AsyncRelayCommand(BrowseForIdentityFileAsync);
|
||||
}
|
||||
|
||||
#endregion Constructor
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
public class AboutPageViewModel : ViewModelBase
|
||||
public class AboutPageViewModel : ObservableObject
|
||||
{
|
||||
private const string BaseUrl = "https://github.com/felixse/FluentTerminal/releases/tag/";
|
||||
private readonly IUpdateService _updateService;
|
||||
@@ -17,10 +18,10 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
_updateService = updateService;
|
||||
_applicationView = applicationView;
|
||||
|
||||
CheckForUpdatesCommand = new AsyncCommand(() => CheckForUpdateAsync(true));
|
||||
CheckForUpdatesCommand = new AsyncRelayCommand(() => CheckForUpdateAsync(true));
|
||||
}
|
||||
|
||||
public IAsyncCommand CheckForUpdatesCommand { get; }
|
||||
public ICommand CheckForUpdatesCommand { get; }
|
||||
|
||||
public string CurrentVersion
|
||||
{
|
||||
@@ -38,12 +39,12 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
get => _latestVersion;
|
||||
set
|
||||
{
|
||||
if (Set(ref _latestVersion, value))
|
||||
if (SetProperty(ref _latestVersion, value))
|
||||
{
|
||||
RaisePropertyChanged(nameof(LatestVersionFound));
|
||||
RaisePropertyChanged(nameof(LatestVersionLoading));
|
||||
RaisePropertyChanged(nameof(LatestVersionNotFound));
|
||||
RaisePropertyChanged(nameof(LatestVersionReleaseNotesURL));
|
||||
OnPropertyChanged(nameof(LatestVersionFound));
|
||||
OnPropertyChanged(nameof(LatestVersionLoading));
|
||||
OnPropertyChanged(nameof(LatestVersionNotFound));
|
||||
OnPropertyChanged(nameof(LatestVersionReleaseNotesURL));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.Models.Enums;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
public class GeneralPageViewModel : ViewModelBase
|
||||
public class GeneralPageViewModel : ObservableObject
|
||||
{
|
||||
private readonly ApplicationSettings _applicationSettings;
|
||||
private readonly IDefaultValueProvider _defaultValueProvider;
|
||||
@@ -39,8 +40,8 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
|
||||
_applicationSettings = _settingsService.GetApplicationSettings();
|
||||
|
||||
RestoreDefaultsCommand = new AsyncCommand(RestoreDefaultsAsync);
|
||||
BrowseLogDirectoryCommand = new AsyncCommand(BrowseLogDirectoryAsync);
|
||||
RestoreDefaultsCommand = new AsyncRelayCommand(RestoreDefaultsAsync);
|
||||
BrowseLogDirectoryCommand = new AsyncRelayCommand(BrowseLogDirectoryAsync);
|
||||
}
|
||||
|
||||
public IEnumerable<string> Languages => _applicationLanguageService.Languages;
|
||||
@@ -48,7 +49,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
public bool NeedsToRestart
|
||||
{
|
||||
get => _needsToRestart;
|
||||
set => Set(ref _needsToRestart, value);
|
||||
set => SetProperty(ref _needsToRestart, value);
|
||||
}
|
||||
|
||||
public string SelectedLanguage
|
||||
@@ -78,7 +79,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.ShowCustomTitleInTitlebar = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,7 +93,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.EnableTrayIcon = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
|
||||
// Toggle message telling user to restart the program
|
||||
ShouldRestartForTrayMessage = !ShouldRestartForTrayMessage;
|
||||
@@ -103,7 +104,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
public bool ShouldRestartForTrayMessage
|
||||
{
|
||||
get => _shouldRestartForTrayMessage;
|
||||
set => Set(ref _shouldRestartForTrayMessage, value);
|
||||
set => SetProperty(ref _shouldRestartForTrayMessage, value);
|
||||
}
|
||||
|
||||
public bool ShowNewOutputIndicator
|
||||
@@ -115,7 +116,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.ShowNewOutputIndicator = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,7 +130,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.UseMoshByDefault = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,7 +144,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.AutoFallbackToWindowsUsernameInLinks = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,7 +158,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.RTrimCopiedLines = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,7 +172,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.MuteTerminalBeeps = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
|
||||
_trayProcessCommunicationService.MuteTerminalAsync(value);
|
||||
}
|
||||
@@ -186,7 +187,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.EnableLogging = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -200,7 +201,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.PrintableOutputOnly = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -214,7 +215,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.LogDirectoryPath = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -228,7 +229,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.UseConPty = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,7 +243,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
public bool CanEnableStartupTask
|
||||
{
|
||||
get => _canEnableStartupTask;
|
||||
set => Set(ref _canEnableStartupTask, value);
|
||||
set => SetProperty(ref _canEnableStartupTask, value);
|
||||
}
|
||||
|
||||
public bool ConfirmClosingTabs
|
||||
@@ -254,7 +255,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.ConfirmClosingTabs = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -268,7 +269,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.ConfirmClosingWindows = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -282,8 +283,8 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.NewTerminalLocation = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
RaisePropertyChanged(nameof(TabIsSelected));
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(TabIsSelected));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -297,21 +298,21 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.TabWindowCascadingAppMenu = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IAsyncCommand RestoreDefaultsCommand { get; }
|
||||
public ICommand RestoreDefaultsCommand { get; }
|
||||
|
||||
public IAsyncCommand BrowseLogDirectoryCommand { get; }
|
||||
public ICommand BrowseLogDirectoryCommand { get; }
|
||||
|
||||
public bool StartupTaskEnabled
|
||||
{
|
||||
get => _startupTaskEnabled;
|
||||
set
|
||||
{
|
||||
if (Set(ref _startupTaskEnabled, value))
|
||||
if (SetProperty(ref _startupTaskEnabled, value))
|
||||
{
|
||||
// ReSharper disable once AssignmentIsFullyDiscarded
|
||||
_ = SetStartupTaskStateAsync(value);
|
||||
@@ -322,7 +323,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
public string StartupTaskErrorMessage
|
||||
{
|
||||
get => _startupTaskErrorMessage;
|
||||
set => Set(ref _startupTaskErrorMessage, value);
|
||||
set => SetProperty(ref _startupTaskErrorMessage, value);
|
||||
}
|
||||
|
||||
public bool TabIsSelected
|
||||
@@ -340,7 +341,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.TabsPosition = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -360,7 +361,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.UnderlineSelectedTab = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -386,7 +387,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.InactiveTabColorMode = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -400,7 +401,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.ShowTextCopied = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
public class KeyBindingViewModel : ViewModelBase
|
||||
public class KeyBindingViewModel : ObservableObject
|
||||
{
|
||||
private readonly IDialogService _dialogService;
|
||||
|
||||
@@ -17,8 +18,8 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
Model = keyBinding;
|
||||
Parent = parent;
|
||||
_dialogService = dialogService;
|
||||
EditCommand = new AsyncCommand(EditAsync);
|
||||
DeleteCommand = new AsyncCommand(DeleteAsync);
|
||||
EditCommand = new AsyncRelayCommand(EditAsync);
|
||||
DeleteCommand = new AsyncRelayCommand(DeleteAsync);
|
||||
}
|
||||
|
||||
// Needs to be triggered from the UI thread
|
||||
@@ -36,7 +37,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
if (Model.Meta != value)
|
||||
{
|
||||
Model.Meta = value;
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,7 +50,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
if (Model.Alt != value)
|
||||
{
|
||||
Model.Alt = value;
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,13 +63,13 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
if (Model.Ctrl != value)
|
||||
{
|
||||
Model.Ctrl = value;
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IAsyncCommand DeleteCommand { get; }
|
||||
public IAsyncCommand EditCommand { get; }
|
||||
public ICommand DeleteCommand { get; }
|
||||
public ICommand EditCommand { get; }
|
||||
|
||||
public int Key
|
||||
{
|
||||
@@ -78,7 +79,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
if (Model.Key != value)
|
||||
{
|
||||
Model.Key = value;
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,7 +94,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
if (Model.Shift != value)
|
||||
{
|
||||
Model.Shift = value;
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,17 +2,18 @@
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.Models.Enums;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
public class KeyBindingsPageViewModel : ViewModelBase
|
||||
public class KeyBindingsPageViewModel : ObservableObject
|
||||
{
|
||||
private readonly IDialogService _dialogService;
|
||||
private readonly ISettingsService _settingsService;
|
||||
@@ -23,15 +24,15 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
_settingsService = settingsService;
|
||||
_dialogService = dialogService;
|
||||
_trayProcessCommunicationService = trayProcessCommunicationService;
|
||||
RestoreDefaultsCommand = new RelayCommand(async () => await RestoreDefaultsAsync().ConfigureAwait(false));
|
||||
AddCommand = new RelayCommand<string>(async command => await AddAsync(command).ConfigureAwait(false));
|
||||
RestoreDefaultsCommand = new AsyncRelayCommand(RestoreDefaultsAsync);
|
||||
AddCommand = new AsyncRelayCommand<string>(AddAsync);
|
||||
|
||||
Initialize(_settingsService.GetCommandKeyBindings());
|
||||
}
|
||||
|
||||
public RelayCommand<string> AddCommand { get; }
|
||||
public ICommand AddCommand { get; }
|
||||
public ObservableCollection<KeyBindingsViewModel> KeyBindings { get; } = new ObservableCollection<KeyBindingsViewModel>();
|
||||
public RelayCommand RestoreDefaultsCommand { get; }
|
||||
public ICommand RestoreDefaultsCommand { get; }
|
||||
|
||||
private Task AddAsync(string command)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
public class KeyBindingsViewModel : ViewModelBase
|
||||
public class KeyBindingsViewModel : ObservableObject
|
||||
{
|
||||
private readonly IDialogService _dialogService;
|
||||
private bool _editable;
|
||||
@@ -37,7 +37,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
public bool Editable
|
||||
{
|
||||
get => _editable;
|
||||
set => Set(ref _editable, value);
|
||||
set => SetProperty(ref _editable, value);
|
||||
}
|
||||
|
||||
public ObservableCollection<KeyBindingViewModel> KeyBindings { get; } = new ObservableCollection<KeyBindingViewModel>();
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.Models.Enums;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
public class MousePageViewModel : ViewModelBase
|
||||
public class MousePageViewModel : ObservableObject
|
||||
{
|
||||
private readonly ISettingsService _settingsService;
|
||||
private readonly IDialogService _dialogService;
|
||||
@@ -22,7 +23,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
_defaultValueProvider = defaultValueProvider;
|
||||
_applicationSettings = _settingsService.GetApplicationSettings();
|
||||
|
||||
RestoreDefaultsCommand = new RelayCommand(async () => await RestoreDefaultsAsync().ConfigureAwait(false));
|
||||
RestoreDefaultsCommand = new AsyncRelayCommand(RestoreDefaultsAsync);
|
||||
}
|
||||
|
||||
public bool CopyOnSelect
|
||||
@@ -34,7 +35,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.CopyOnSelect = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,7 +49,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.MouseRightClickAction = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,7 +87,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_applicationSettings.MouseMiddleClickAction = value;
|
||||
_settingsService.SaveApplicationSettings(_applicationSettings);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,7 +116,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
set { if (value) MouseMiddleClickAction = MouseAction.CopySelectionOrPaste; }
|
||||
}
|
||||
|
||||
public RelayCommand RestoreDefaultsCommand { get; }
|
||||
public ICommand RestoreDefaultsCommand { get; }
|
||||
|
||||
// Requires UI thread
|
||||
private async Task RestoreDefaultsAsync()
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
public class ProfilesPageViewModel : ViewModelBase
|
||||
public class ProfilesPageViewModel : ObservableObject
|
||||
{
|
||||
private readonly IDefaultValueProvider _defaultValueProvider;
|
||||
private readonly IDialogService _dialogService;
|
||||
@@ -79,9 +80,9 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
}
|
||||
}
|
||||
|
||||
public RelayCommand CreateShellProfileCommand { get; }
|
||||
public ICommand CreateShellProfileCommand { get; }
|
||||
|
||||
public RelayCommand<ShellProfileViewModel> CloneCommand { get; }
|
||||
public ICommand CloneCommand { get; }
|
||||
|
||||
private void CreateShellProfile()
|
||||
{
|
||||
@@ -122,7 +123,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
public ShellProfileViewModel SelectedShellProfile
|
||||
{
|
||||
get => _selectedShellProfile;
|
||||
set => Set(ref _selectedShellProfile, value);
|
||||
set => SetProperty(ref _selectedShellProfile, value);
|
||||
}
|
||||
|
||||
public ObservableCollection<ShellProfileViewModel> ShellProfiles { get; } = new ObservableCollection<ShellProfileViewModel>();
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
public class SshProfilesPageViewModel: ViewModelBase
|
||||
public class SshProfilesPageViewModel: ObservableObject
|
||||
{
|
||||
private readonly IDialogService _dialogService;
|
||||
private readonly ISettingsService _settingsService;
|
||||
@@ -63,9 +64,9 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
}
|
||||
}
|
||||
|
||||
public RelayCommand CreateSshProfileCommand { get; }
|
||||
public ICommand CreateSshProfileCommand { get; }
|
||||
|
||||
public RelayCommand<SshProfileViewModel> CloneCommand { get; }
|
||||
public ICommand CloneCommand { get; }
|
||||
|
||||
public void CreateSshProfile()
|
||||
{
|
||||
@@ -112,7 +113,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
public SshProfileViewModel SelectedSshProfile
|
||||
{
|
||||
get => _selectedShellProfile;
|
||||
set => Set(ref _selectedShellProfile, value);
|
||||
set => SetProperty(ref _selectedShellProfile, value);
|
||||
}
|
||||
|
||||
public ObservableCollection<SshProfileViewModel> SshProfiles { get; } = new ObservableCollection<SshProfileViewModel>();
|
||||
|
||||
@@ -3,15 +3,16 @@ using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Utilities;
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.Models.Enums;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
public class TerminalPageViewModel : ViewModelBase
|
||||
public class TerminalPageViewModel : ObservableObject
|
||||
{
|
||||
private readonly TerminalOptions _terminalOptions;
|
||||
private readonly ISettingsService _settingsService;
|
||||
@@ -63,7 +64,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_terminalOptions.CursorBlink = value;
|
||||
_settingsService.SaveTerminalOptions(_terminalOptions);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,7 +78,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_terminalOptions.UseAcrylicBackground = value;
|
||||
_settingsService.SaveTerminalOptions(_terminalOptions);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,7 +92,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_terminalOptions.FontFamily = value;
|
||||
_settingsService.SaveTerminalOptions(_terminalOptions);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,7 +106,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_terminalOptions.FontWeight = value;
|
||||
_settingsService.SaveTerminalOptions(_terminalOptions);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,7 +120,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_terminalOptions.BackgroundOpacity = value;
|
||||
_settingsService.SaveTerminalOptions(_terminalOptions);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,7 +134,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_terminalOptions.Padding = value;
|
||||
_settingsService.SaveTerminalOptions(_terminalOptions);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -153,12 +154,12 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_terminalOptions.ScrollBackLimit = intValue;
|
||||
_settingsService.SaveTerminalOptions(_terminalOptions);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,7 +174,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_terminalOptions.WordSeparator = value;
|
||||
_settingsService.SaveTerminalOptions(_terminalOptions);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -189,14 +190,14 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_terminalOptions.FontSize = value;
|
||||
_settingsService.SaveTerminalOptions(_terminalOptions);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<int> Sizes { get; }
|
||||
|
||||
public RelayCommand RestoreDefaultsCommand { get; }
|
||||
public ICommand RestoreDefaultsCommand { get; }
|
||||
|
||||
private CursorStyle CursorStyle
|
||||
{
|
||||
@@ -207,7 +208,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_terminalOptions.CursorStyle = value;
|
||||
_settingsService.SaveTerminalOptions(_terminalOptions);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,7 +222,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
_terminalOptions.ScrollBarStyle = value;
|
||||
_settingsService.SaveTerminalOptions(_terminalOptions);
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -255,7 +256,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
_dialogService = dialogService;
|
||||
_defaultValueProvider = defaultValueProvider;
|
||||
|
||||
RestoreDefaultsCommand = new RelayCommand(async () => await RestoreDefaultsAsync().ConfigureAwait(false));
|
||||
RestoreDefaultsCommand = new AsyncRelayCommand(RestoreDefaultsAsync);
|
||||
|
||||
Fonts = systemFontService.GetSystemFontFamilies().OrderBy(s => s.Name);
|
||||
Sizes = Enumerable.Range(2, 72);
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using FluentTerminal.Models.Messages;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using Microsoft.Toolkit.Mvvm.Messaging;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels.Settings
|
||||
{
|
||||
public class ThemesPageViewModel : ViewModelBase
|
||||
public class ThemesPageViewModel : ObservableObject,
|
||||
IRecipient<TerminalOptionsChangedMessage>
|
||||
{
|
||||
private readonly IDefaultValueProvider _defaultValueProvider;
|
||||
private readonly IDialogService _dialogService;
|
||||
@@ -42,11 +44,9 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
_imageFileSystemService = imageFileSystemService;
|
||||
|
||||
CreateThemeCommand = new RelayCommand(CreateTheme);
|
||||
ImportThemeCommand = new AsyncCommand(ImportThemeAsync);
|
||||
ImportThemeCommand = new AsyncRelayCommand(ImportThemeAsync);
|
||||
CloneCommand = new RelayCommand<ThemeViewModel>(CloneTheme);
|
||||
|
||||
MessengerInstance.Register<TerminalOptionsChangedMessage>(this, OnTerminalOptionsChanged);
|
||||
|
||||
BackgroundOpacity = _settingsService.GetTerminalOptions().BackgroundOpacity;
|
||||
|
||||
var activeThemeId = _settingsService.GetCurrentThemeId();
|
||||
@@ -64,16 +64,18 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
}
|
||||
|
||||
SelectedTheme = Themes.First(t => t.IsActive);
|
||||
|
||||
WeakReferenceMessenger.Default.RegisterAll(this);
|
||||
}
|
||||
|
||||
public RelayCommand CreateThemeCommand { get; }
|
||||
public IAsyncCommand ImportThemeCommand { get; }
|
||||
public RelayCommand<ThemeViewModel> CloneCommand { get; set; }
|
||||
public ICommand CreateThemeCommand { get; }
|
||||
public ICommand ImportThemeCommand { get; }
|
||||
public ICommand CloneCommand { get; set; }
|
||||
|
||||
public double BackgroundOpacity
|
||||
{
|
||||
get => _backgroundOpacity;
|
||||
set => Set(ref _backgroundOpacity, value);
|
||||
set => SetProperty(ref _backgroundOpacity, value);
|
||||
}
|
||||
|
||||
public ThemeViewModel SelectedTheme
|
||||
@@ -87,7 +89,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
_selectedTheme.BackgroundImageChanged -= OnSelectedThemeBackgroundImageChanged;
|
||||
}
|
||||
|
||||
Set(ref _selectedTheme, value);
|
||||
SetProperty(ref _selectedTheme, value);
|
||||
SelectedThemeChanged?.Invoke(this, _selectedTheme);
|
||||
|
||||
if (value != null)
|
||||
@@ -218,7 +220,7 @@ namespace FluentTerminal.App.ViewModels.Settings
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTerminalOptionsChanged(TerminalOptionsChangedMessage message)
|
||||
public void Receive(TerminalOptionsChangedMessage message)
|
||||
{
|
||||
BackgroundOpacity = message.TerminalOptions.BackgroundOpacity;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.ViewModels.Settings;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels
|
||||
{
|
||||
public class SettingsViewModel : ViewModelBase
|
||||
public class SettingsViewModel : ObservableObject
|
||||
{
|
||||
public SettingsViewModel(ISettingsService settingsService, IDefaultValueProvider defaultValueProvider, IDialogService dialogService,
|
||||
ITrayProcessCommunicationService trayProcessCommunicationService, IThemeParserFactory themeParserFactory, ISystemFontService systemFontService,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using FluentTerminal.App.ViewModels.Profiles;
|
||||
using System.Windows.Input;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels
|
||||
{
|
||||
@@ -28,7 +28,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public bool IsDefault
|
||||
{
|
||||
get => _isDefault;
|
||||
set => Set(ref _isDefault, value);
|
||||
set => SetProperty(ref _isDefault, value);
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
@@ -41,9 +41,9 @@ namespace FluentTerminal.App.ViewModels
|
||||
|
||||
#region Commands
|
||||
|
||||
public RelayCommand SetDefaultCommand { get; }
|
||||
public ICommand SetDefaultCommand { get; }
|
||||
|
||||
public IAsyncCommand RestoreDefaultsCommand { get; }
|
||||
public ICommand RestoreDefaultsCommand { get; }
|
||||
|
||||
#endregion Commands
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
shellProfile);
|
||||
|
||||
SetDefaultCommand = new RelayCommand(SetDefault);
|
||||
RestoreDefaultsCommand = new AsyncCommand(RestoreDefaultsAsync);
|
||||
RestoreDefaultsCommand = new AsyncRelayCommand(RestoreDefaultsAsync);
|
||||
}
|
||||
|
||||
#endregion Constrcutor
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels
|
||||
{
|
||||
public class TabThemeViewModel : ViewModelBase
|
||||
public class TabThemeViewModel : ObservableObject
|
||||
{
|
||||
private bool _isSelected;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
get => _isSelected;
|
||||
set
|
||||
{
|
||||
if (Set(ref _isSelected, value) && value)
|
||||
if (SetProperty(ref _isSelected, value) && value)
|
||||
{
|
||||
Terminal.TabTheme = this;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.Models.Enums;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -15,14 +12,18 @@ using Windows.UI.Core;
|
||||
using FluentTerminal.Models.Messages;
|
||||
using System.Windows.Input;
|
||||
using FluentTerminal.App.ViewModels.Menu;
|
||||
using Windows.UI.Xaml.Data;
|
||||
using Windows.UI.Xaml;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Messaging;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels
|
||||
{
|
||||
public class TerminalViewModel : ViewModelBase
|
||||
public class TerminalViewModel : ObservableObject,
|
||||
IRecipient<ApplicationSettingsChangedMessage>,
|
||||
IRecipient<CurrentThemeChangedMessage>,
|
||||
IRecipient<TerminalOptionsChangedMessage>,
|
||||
IRecipient<KeyBindingsChangedMessage>
|
||||
{
|
||||
#region Static
|
||||
|
||||
@@ -126,11 +127,6 @@ namespace FluentTerminal.App.ViewModels
|
||||
IKeyboardCommandService keyboardCommandService, ApplicationSettings applicationSettings, ShellProfile shellProfile,
|
||||
IApplicationView applicationView, IClipboardService clipboardService, string terminalState = null)
|
||||
{
|
||||
MessengerInstance.Register<ApplicationSettingsChangedMessage>(this, OnApplicationSettingsChanged);
|
||||
MessengerInstance.Register<CurrentThemeChangedMessage>(this, OnCurrentThemeChanged);
|
||||
MessengerInstance.Register<TerminalOptionsChangedMessage>(this, OnTerminalOptionsChanged);
|
||||
MessengerInstance.Register<KeyBindingsChangedMessage>(this, OnKeyBindingsChanged);
|
||||
|
||||
SettingsService = settingsService;
|
||||
|
||||
_terminalOptions = SettingsService.GetTerminalOptions();
|
||||
@@ -147,19 +143,19 @@ namespace FluentTerminal.App.ViewModels
|
||||
TerminalTheme = shellProfile.TerminalThemeId == Guid.Empty ? SettingsService.GetCurrentTheme() : SettingsService.GetTheme(shellProfile.TerminalThemeId);
|
||||
|
||||
TabThemes = new ObservableCollection<TabThemeViewModel>(SettingsService.GetTabThemes().Select(theme => new TabThemeViewModel(theme, this)));
|
||||
CloseCommand = new AsyncCommand(TryCloseAsync, CanExecuteCommand);
|
||||
CloseCommand = new AsyncRelayCommand(TryCloseAsync, CanExecuteCommand);
|
||||
CloseLeftTabsCommand = new RelayCommand(CloseLeftTabs, CanExecuteCommand);
|
||||
CloseRightTabsCommand = new RelayCommand(CloseRightTabs, CanExecuteCommand);
|
||||
CloseOtherTabsCommand = new RelayCommand(CloseOtherTabs, CanExecuteCommand);
|
||||
FindNextCommand = new RelayCommand(FindNext, CanExecuteCommand);
|
||||
FindPreviousCommand = new RelayCommand(FindPrevious, CanExecuteCommand);
|
||||
CloseSearchPanelCommand = new RelayCommand(CloseSearchPanel, CanExecuteCommand);
|
||||
EditTitleCommand = new AsyncCommand(EditTitleAsync, CanExecuteCommand);
|
||||
EditTitleCommand = new AsyncRelayCommand(EditTitleAsync, CanExecuteCommand);
|
||||
DuplicateTabCommand = new RelayCommand(DuplicateTab, CanExecuteCommand);
|
||||
ReconnectTabCommand = new AsyncCommand(ReconnectTabAsync, () => CanExecuteCommand() && HasExitedWithError);
|
||||
CopyCommand = new AsyncCommand(Copy, () => HasSelection);
|
||||
PasteCommand = new AsyncCommand(Paste);
|
||||
CopyLinkCommand = new AsyncCommand(() => CopyTextAsync(HoveredUri), () => !string.IsNullOrWhiteSpace(HoveredUri));
|
||||
ReconnectTabCommand = new AsyncRelayCommand(ReconnectTabAsync, () => CanExecuteCommand() && HasExitedWithError);
|
||||
CopyCommand = new AsyncRelayCommand(Copy, () => HasSelection);
|
||||
PasteCommand = new AsyncRelayCommand(Paste);
|
||||
CopyLinkCommand = new AsyncRelayCommand(() => CopyTextAsync(HoveredUri), () => !string.IsNullOrWhiteSpace(HoveredUri));
|
||||
ShowSearchPanelCommand = new RelayCommand(() => ShowSearchPanel = true, () => !ShowSearchPanel);
|
||||
|
||||
FontSize = _terminalOptions.FontSize;
|
||||
@@ -186,18 +182,20 @@ namespace FluentTerminal.App.ViewModels
|
||||
|
||||
ContextMenu = BuidContextMenu();
|
||||
TabContextMenu = BuildTabContextMenu();
|
||||
|
||||
WeakReferenceMessenger.Default.RegisterAll(this);
|
||||
}
|
||||
|
||||
public MenuViewModel ContextMenu
|
||||
{
|
||||
get => _contextMenu;
|
||||
set => Set(ref _contextMenu, value);
|
||||
set => SetProperty(ref _contextMenu, value);
|
||||
}
|
||||
|
||||
public MenuViewModel TabContextMenu
|
||||
{
|
||||
get => _tabContextMenu;
|
||||
set => Set(ref _tabContextMenu, value);
|
||||
set => SetProperty(ref _tabContextMenu, value);
|
||||
}
|
||||
|
||||
private bool _disposalRequested;
|
||||
@@ -241,27 +239,27 @@ namespace FluentTerminal.App.ViewModels
|
||||
|
||||
public string XtermBufferState { get; private set; }
|
||||
|
||||
public AsyncCommand CloseCommand { get; private set; }
|
||||
public ICommand CloseCommand { get; private set; }
|
||||
|
||||
public RelayCommand CloseRightTabsCommand { get; }
|
||||
public ICommand CloseRightTabsCommand { get; }
|
||||
|
||||
public RelayCommand CloseLeftTabsCommand { get; }
|
||||
public ICommand CloseLeftTabsCommand { get; }
|
||||
|
||||
public RelayCommand CloseOtherTabsCommand { get; }
|
||||
public ICommand CloseOtherTabsCommand { get; }
|
||||
|
||||
public RelayCommand CloseSearchPanelCommand { get; }
|
||||
public ICommand CloseSearchPanelCommand { get; }
|
||||
|
||||
public IDialogService DialogService { get; }
|
||||
|
||||
public IAsyncCommand EditTitleCommand { get; }
|
||||
public ICommand EditTitleCommand { get; }
|
||||
|
||||
public RelayCommand FindNextCommand { get; }
|
||||
public ICommand FindNextCommand { get; }
|
||||
|
||||
public RelayCommand FindPreviousCommand { get; }
|
||||
public ICommand FindPreviousCommand { get; }
|
||||
|
||||
public RelayCommand DuplicateTabCommand { get; }
|
||||
public ICommand DuplicateTabCommand { get; }
|
||||
|
||||
public AsyncCommand ReconnectTabCommand { get; }
|
||||
public AsyncRelayCommand ReconnectTabCommand { get; }
|
||||
|
||||
public ICommand CopyLinkCommand { get; private set; }
|
||||
|
||||
@@ -278,7 +276,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
get => _isSelected;
|
||||
set
|
||||
{
|
||||
if (Set(ref _isSelected, value))
|
||||
if (SetProperty(ref _isSelected, value))
|
||||
{
|
||||
if (IsSelected)
|
||||
{
|
||||
@@ -291,9 +289,9 @@ namespace FluentTerminal.App.ViewModels
|
||||
_keyboardCommandService.DeregisterCommandHandler(nameof(Command.Search));
|
||||
_keyboardCommandService.DeregisterCommandHandler(nameof(Command.CloseSearch));
|
||||
}
|
||||
RaisePropertyChanged(nameof(IsUnderlined));
|
||||
RaisePropertyChanged(nameof(BackgroundTabTheme));
|
||||
RaisePropertyChanged(nameof(ShowCloseButton));
|
||||
OnPropertyChanged(nameof(IsUnderlined));
|
||||
OnPropertyChanged(nameof(BackgroundTabTheme));
|
||||
OnPropertyChanged(nameof(ShowCloseButton));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -301,7 +299,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public bool HasSelection
|
||||
{
|
||||
get => _hasSelection;
|
||||
set => Set(ref _hasSelection, value);
|
||||
set => SetProperty(ref _hasSelection, value);
|
||||
}
|
||||
|
||||
public string HoveredUri
|
||||
@@ -309,7 +307,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
get => _hoveredUri;
|
||||
set
|
||||
{
|
||||
if (Set(ref _hoveredUri, value))
|
||||
if (SetProperty(ref _hoveredUri, value))
|
||||
{
|
||||
ContextMenu = BuidContextMenu();
|
||||
}
|
||||
@@ -321,9 +319,9 @@ namespace FluentTerminal.App.ViewModels
|
||||
get => _isHovered;
|
||||
set
|
||||
{
|
||||
if (Set(ref _isHovered, value))
|
||||
if (SetProperty(ref _isHovered, value))
|
||||
{
|
||||
RaisePropertyChanged(nameof(ShowCloseButton));
|
||||
OnPropertyChanged(nameof(ShowCloseButton));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -339,7 +337,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public bool HasNewOutput
|
||||
{
|
||||
get => _hasNewOutput;
|
||||
set => Set(ref _hasNewOutput, value);
|
||||
set => SetProperty(ref _hasNewOutput, value);
|
||||
}
|
||||
|
||||
public bool HasExitedWithError
|
||||
@@ -347,36 +345,36 @@ namespace FluentTerminal.App.ViewModels
|
||||
get => _hasExitedWithError;
|
||||
set
|
||||
{
|
||||
if (Set(ref _hasExitedWithError, value) && value)
|
||||
if (SetProperty(ref _hasExitedWithError, value) && value)
|
||||
{
|
||||
HasNewOutput = false;
|
||||
}
|
||||
ReconnectTabCommand.RaiseCanExecuteChanged();
|
||||
ReconnectTabCommand.NotifyCanExecuteChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public string SearchText
|
||||
{
|
||||
get => _searchText;
|
||||
set => Set(ref _searchText, value);
|
||||
set => SetProperty(ref _searchText, value);
|
||||
}
|
||||
|
||||
public bool SearchMatchCase
|
||||
{
|
||||
get => _searchMatchCase;
|
||||
set => Set(ref _searchMatchCase, value);
|
||||
set => SetProperty(ref _searchMatchCase, value);
|
||||
}
|
||||
|
||||
public bool SearchWholeWord
|
||||
{
|
||||
get => _searchWholeWord;
|
||||
set => Set(ref _searchWholeWord, value);
|
||||
set => SetProperty(ref _searchWholeWord, value);
|
||||
}
|
||||
|
||||
public bool SearchWithRegex
|
||||
{
|
||||
get => _searchWithRegex;
|
||||
set => Set(ref _searchWithRegex, value);
|
||||
set => SetProperty(ref _searchWithRegex, value);
|
||||
}
|
||||
|
||||
public ISettingsService SettingsService { get; }
|
||||
@@ -386,7 +384,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public bool ShowSearchPanel
|
||||
{
|
||||
get => _showSearchPanel;
|
||||
set => Set(ref _showSearchPanel, value);
|
||||
set => SetProperty(ref _showSearchPanel, value);
|
||||
}
|
||||
|
||||
public bool SearchHasFocus { get; set; }
|
||||
@@ -396,9 +394,9 @@ namespace FluentTerminal.App.ViewModels
|
||||
get => _tabTheme;
|
||||
set
|
||||
{
|
||||
Set(ref _tabTheme, value);
|
||||
RaisePropertyChanged(nameof(IsUnderlined));
|
||||
RaisePropertyChanged(nameof(BackgroundTabTheme));
|
||||
SetProperty(ref _tabTheme, value);
|
||||
OnPropertyChanged(nameof(IsUnderlined));
|
||||
OnPropertyChanged(nameof(BackgroundTabTheme));
|
||||
|
||||
// necessary to update this constantly so that duplicated tabs will also carry over the color
|
||||
ShellProfile.TabThemeId = value.Theme.Id;
|
||||
@@ -414,7 +412,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public TerminalTheme TerminalTheme
|
||||
{
|
||||
get => _terminalTheme;
|
||||
set => Set(ref _terminalTheme, value);
|
||||
set => SetProperty(ref _terminalTheme, value);
|
||||
}
|
||||
|
||||
public bool Initialized { get; set; }
|
||||
@@ -445,7 +443,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
Set(ref _tabTitle, title);
|
||||
SetProperty(ref _tabTitle, title);
|
||||
ShellProfile.Name = title;
|
||||
}
|
||||
}
|
||||
@@ -455,7 +453,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
get => _shellTitle;
|
||||
set
|
||||
{
|
||||
if (Set(ref _shellTitle, value) && !_hasCustomTitle)
|
||||
if (SetProperty(ref _shellTitle, value) && !_hasCustomTitle)
|
||||
{
|
||||
TabTitle = value;
|
||||
}
|
||||
@@ -475,7 +473,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
|
||||
public Task CloseAsync()
|
||||
{
|
||||
MessengerInstance.Unregister(this);
|
||||
//MessengerInstance.Unregister(this); // todo necessary?
|
||||
|
||||
return Terminal.CloseAsync();
|
||||
}
|
||||
@@ -579,18 +577,18 @@ namespace FluentTerminal.App.ViewModels
|
||||
await TerminalView?.ReconnectAsync();
|
||||
}
|
||||
|
||||
private void OnApplicationSettingsChanged(ApplicationSettingsChangedMessage message)
|
||||
public void Receive(ApplicationSettingsChangedMessage message)
|
||||
{
|
||||
ApplicationSettings = message.ApplicationSettings;
|
||||
|
||||
ApplicationView.ExecuteOnUiThreadAsync(() =>
|
||||
{
|
||||
RaisePropertyChanged(nameof(IsUnderlined));
|
||||
RaisePropertyChanged(nameof(BackgroundTabTheme));
|
||||
OnPropertyChanged(nameof(IsUnderlined));
|
||||
OnPropertyChanged(nameof(BackgroundTabTheme));
|
||||
});
|
||||
}
|
||||
|
||||
private void OnCurrentThemeChanged(CurrentThemeChangedMessage message)
|
||||
public void Receive(CurrentThemeChangedMessage message)
|
||||
{
|
||||
// only change theme if not overwritten by profile
|
||||
if (ShellProfile.TerminalThemeId == Guid.Empty)
|
||||
@@ -605,13 +603,13 @@ namespace FluentTerminal.App.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTerminalOptionsChanged(TerminalOptionsChangedMessage message)
|
||||
public void Receive(TerminalOptionsChangedMessage message)
|
||||
{
|
||||
_terminalOptions = message.TerminalOptions;
|
||||
ApplicationView.ExecuteOnUiThreadAsync(() => RaisePropertyChanged(nameof(BackgroundOpacity)), CoreDispatcherPriority.Low);
|
||||
ApplicationView.ExecuteOnUiThreadAsync(() => OnPropertyChanged(nameof(BackgroundOpacity)), CoreDispatcherPriority.Low);
|
||||
}
|
||||
|
||||
private void OnKeyBindingsChanged(KeyBindingsChangedMessage message)
|
||||
public void Receive(KeyBindingsChangedMessage message)
|
||||
{
|
||||
ApplicationView.ExecuteOnUiThreadAsync(() =>
|
||||
{
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
@@ -11,7 +10,7 @@ using System.Windows.Input;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels
|
||||
{
|
||||
public class ThemeViewModel : ViewModelBase
|
||||
public class ThemeViewModel : ObservableObject
|
||||
{
|
||||
private readonly IDialogService _dialogService;
|
||||
private readonly ISettingsService _settingsService;
|
||||
@@ -95,13 +94,13 @@ namespace FluentTerminal.App.ViewModels
|
||||
BackgroundThemeFile = Model.BackgroundImage;
|
||||
|
||||
SetActiveCommand = new RelayCommand(SetActive);
|
||||
DeleteCommand = new AsyncCommand(DeleteAsync, NotPreInstalled);
|
||||
DeleteCommand = new AsyncRelayCommand(DeleteAsync, NotPreInstalled);
|
||||
EditCommand = new RelayCommand(Edit, NotPreInstalled);
|
||||
CancelEditCommand = new AsyncCommand(CancelEditAsync);
|
||||
SaveChangesCommand = new AsyncCommand(SaveChangesAsync);
|
||||
ExportCommand = new AsyncCommand(Export, NotPreInstalled);
|
||||
ChooseBackgroundImageCommand = new AsyncCommand(ChooseBackgroundImageAsync, NotPreInstalled);
|
||||
DeleteBackgroundImageCommand = new AsyncCommand(DeleteBackgroundImageAsync, NotPreInstalled);
|
||||
CancelEditCommand = new AsyncRelayCommand(CancelEditAsync);
|
||||
SaveChangesCommand = new AsyncRelayCommand(SaveChangesAsync);
|
||||
ExportCommand = new AsyncRelayCommand(Export, NotPreInstalled);
|
||||
ChooseBackgroundImageCommand = new AsyncRelayCommand(ChooseBackgroundImageAsync, NotPreInstalled);
|
||||
DeleteBackgroundImageCommand = new AsyncRelayCommand(DeleteBackgroundImageAsync, NotPreInstalled);
|
||||
}
|
||||
|
||||
public event EventHandler Activated;
|
||||
@@ -113,7 +112,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public string Author
|
||||
{
|
||||
get => _author;
|
||||
set => Set(ref _author, value);
|
||||
set => SetProperty(ref _author, value);
|
||||
}
|
||||
|
||||
public string Background
|
||||
@@ -121,7 +120,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
get => _background;
|
||||
set
|
||||
{
|
||||
Set(ref _background, value);
|
||||
SetProperty(ref _background, value);
|
||||
BackgroundChanged?.Invoke(this, value);
|
||||
}
|
||||
}
|
||||
@@ -129,67 +128,67 @@ namespace FluentTerminal.App.ViewModels
|
||||
public double BackgroundOpacity
|
||||
{
|
||||
get => _backgroundOpacity;
|
||||
set => Set(ref _backgroundOpacity, value);
|
||||
set => SetProperty(ref _backgroundOpacity, value);
|
||||
}
|
||||
|
||||
public string Black
|
||||
{
|
||||
get => _black;
|
||||
set => Set(ref _black, value);
|
||||
set => SetProperty(ref _black, value);
|
||||
}
|
||||
|
||||
public string Blue
|
||||
{
|
||||
get => _blue;
|
||||
set => Set(ref _blue, value);
|
||||
set => SetProperty(ref _blue, value);
|
||||
}
|
||||
|
||||
public string BrightBlack
|
||||
{
|
||||
get => _brightBlack;
|
||||
set => Set(ref _brightBlack, value);
|
||||
set => SetProperty(ref _brightBlack, value);
|
||||
}
|
||||
|
||||
public string BrightBlue
|
||||
{
|
||||
get => _brightBlue;
|
||||
set => Set(ref _brightBlue, value);
|
||||
set => SetProperty(ref _brightBlue, value);
|
||||
}
|
||||
|
||||
public string BrightCyan
|
||||
{
|
||||
get => _brightCyan;
|
||||
set => Set(ref _brightCyan, value);
|
||||
set => SetProperty(ref _brightCyan, value);
|
||||
}
|
||||
|
||||
public string BrightGreen
|
||||
{
|
||||
get => _brightGreen;
|
||||
set => Set(ref _brightGreen, value);
|
||||
set => SetProperty(ref _brightGreen, value);
|
||||
}
|
||||
|
||||
public string BrightMagenta
|
||||
{
|
||||
get => _brightMagenta;
|
||||
set => Set(ref _brightMagenta, value);
|
||||
set => SetProperty(ref _brightMagenta, value);
|
||||
}
|
||||
|
||||
public string BrightRed
|
||||
{
|
||||
get => _brightRed;
|
||||
set => Set(ref _brightRed, value);
|
||||
set => SetProperty(ref _brightRed, value);
|
||||
}
|
||||
|
||||
public string BrightWhite
|
||||
{
|
||||
get => _brightWhite;
|
||||
set => Set(ref _brightWhite, value);
|
||||
set => SetProperty(ref _brightWhite, value);
|
||||
}
|
||||
|
||||
public string BrightYellow
|
||||
{
|
||||
get => _brightYellow;
|
||||
set => Set(ref _brightYellow, value);
|
||||
set => SetProperty(ref _brightYellow, value);
|
||||
}
|
||||
|
||||
public ICommand CancelEditCommand { get; }
|
||||
@@ -197,19 +196,19 @@ namespace FluentTerminal.App.ViewModels
|
||||
public string Cursor
|
||||
{
|
||||
get => _cursor;
|
||||
set => Set(ref _cursor, value);
|
||||
set => SetProperty(ref _cursor, value);
|
||||
}
|
||||
|
||||
public string CursorAccent
|
||||
{
|
||||
get => _cursorAccent;
|
||||
set => Set(ref _cursorAccent, value);
|
||||
set => SetProperty(ref _cursorAccent, value);
|
||||
}
|
||||
|
||||
public string Cyan
|
||||
{
|
||||
get => _cyan;
|
||||
set => Set(ref _cyan, value);
|
||||
set => SetProperty(ref _cyan, value);
|
||||
}
|
||||
|
||||
public ICommand DeleteCommand { get; }
|
||||
@@ -219,13 +218,13 @@ namespace FluentTerminal.App.ViewModels
|
||||
public string Foreground
|
||||
{
|
||||
get => _foreground;
|
||||
set => Set(ref _foreground, value);
|
||||
set => SetProperty(ref _foreground, value);
|
||||
}
|
||||
|
||||
public string Green
|
||||
{
|
||||
get => _green;
|
||||
set => Set(ref _green, value);
|
||||
set => SetProperty(ref _green, value);
|
||||
}
|
||||
|
||||
public Guid Id { get; }
|
||||
@@ -233,31 +232,31 @@ namespace FluentTerminal.App.ViewModels
|
||||
public bool InEditMode
|
||||
{
|
||||
get => _inEditMode;
|
||||
set => Set(ref _inEditMode, value);
|
||||
set => SetProperty(ref _inEditMode, value);
|
||||
}
|
||||
|
||||
public bool IsActive
|
||||
{
|
||||
get => _isActive;
|
||||
set => Set(ref _isActive, value);
|
||||
set => SetProperty(ref _isActive, value);
|
||||
}
|
||||
|
||||
public string Magenta
|
||||
{
|
||||
get => _magenta;
|
||||
set => Set(ref _magenta, value);
|
||||
set => SetProperty(ref _magenta, value);
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
set => Set(ref _name, value);
|
||||
set => SetProperty(ref _name, value);
|
||||
}
|
||||
|
||||
public string Red
|
||||
{
|
||||
get => _red;
|
||||
set => Set(ref _red, value);
|
||||
set => SetProperty(ref _red, value);
|
||||
}
|
||||
|
||||
public ICommand SaveChangesCommand { get; }
|
||||
@@ -265,7 +264,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public string Selection
|
||||
{
|
||||
get => _selection;
|
||||
set => Set(ref _selection, value);
|
||||
set => SetProperty(ref _selection, value);
|
||||
}
|
||||
|
||||
public ICommand SetActiveCommand { get; }
|
||||
@@ -273,13 +272,13 @@ namespace FluentTerminal.App.ViewModels
|
||||
public string White
|
||||
{
|
||||
get => _white;
|
||||
set => Set(ref _white, value);
|
||||
set => SetProperty(ref _white, value);
|
||||
}
|
||||
|
||||
public string Yellow
|
||||
{
|
||||
get => _yellow;
|
||||
set => Set(ref _yellow, value);
|
||||
set => SetProperty(ref _yellow, value);
|
||||
}
|
||||
|
||||
public ImageFile BackgroundThemeFile
|
||||
@@ -287,7 +286,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
get => _backgroundThemeFile;
|
||||
set
|
||||
{
|
||||
Set(ref _backgroundThemeFile, value);
|
||||
SetProperty(ref _backgroundThemeFile, value);
|
||||
BackgroundImageChanged?.Invoke(this, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ using IContainer = Autofac.IContainer;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Profiles;
|
||||
using FluentTerminal.Models.Messages;
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using Microsoft.Toolkit.Mvvm.Messaging;
|
||||
|
||||
namespace FluentTerminal.App
|
||||
{
|
||||
@@ -114,7 +114,7 @@ namespace FluentTerminal.App
|
||||
|
||||
_container = builder.Build();
|
||||
|
||||
Messenger.Default.Register<ApplicationSettingsChangedMessage>(this, OnApplicationSettingsChanged);
|
||||
WeakReferenceMessenger.Default.Register<App, ApplicationSettingsChangedMessage>(this, (r, m) => r.OnApplicationSettingsChanged(m));
|
||||
|
||||
_settingsService = _container.Resolve<ISettingsService>();
|
||||
_notificationService = _container.Resolve<INotificationService>();
|
||||
@@ -279,7 +279,8 @@ namespace FluentTerminal.App
|
||||
Id = Guid.Empty,
|
||||
Location = null,
|
||||
Arguments = runVerb.Command,
|
||||
WorkingDirectory = runVerb.Directory
|
||||
WorkingDirectory = runVerb.Directory,
|
||||
UseConPty = _settingsService.GetApplicationSettings().UseConPty
|
||||
};
|
||||
|
||||
if (runVerb.SmartBuffer.HasValue)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Microsoft.Toolkit.Uwp.Helpers;
|
||||
using System;
|
||||
using Windows.UI;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Data;
|
||||
using Windows.UI.Xaml.Media;
|
||||
|
||||
@@ -3,7 +3,6 @@ using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Data;
|
||||
using FluentTerminal.App.ViewModels.Menu;
|
||||
using Windows.UI.Xaml.Controls.Primitives;
|
||||
using Windows.Foundation.Metadata;
|
||||
|
||||
namespace FluentTerminal.App.Converters
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using FluentTerminal.App.ViewModels;
|
||||
using FluentTerminal.Models;
|
||||
using System;
|
||||
using Windows.UI.Xaml.Data;
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
using FluentTerminal.App.Services.Dialogs;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using Windows.System;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using FluentTerminal.App.Services;
|
||||
|
||||
namespace FluentTerminal.App.Dialogs
|
||||
{
|
||||
@@ -25,25 +25,25 @@ namespace FluentTerminal.App.Dialogs
|
||||
public bool Ctrl
|
||||
{
|
||||
get => _ctrl;
|
||||
set => Set(ref _ctrl, value);
|
||||
set => SetProperty(ref _ctrl, value);
|
||||
}
|
||||
|
||||
public bool Shift
|
||||
{
|
||||
get => _shift;
|
||||
set => Set(ref _shift, value);
|
||||
set => SetProperty(ref _shift, value);
|
||||
}
|
||||
|
||||
public bool Alt
|
||||
{
|
||||
get => _alt;
|
||||
set => Set(ref _alt, value);
|
||||
set => SetProperty(ref _alt, value);
|
||||
}
|
||||
|
||||
public bool Meta
|
||||
{
|
||||
get => _meta;
|
||||
set => Set(ref _meta, value);
|
||||
set => SetProperty(ref _meta, value);
|
||||
}
|
||||
|
||||
public int Key
|
||||
@@ -51,7 +51,7 @@ namespace FluentTerminal.App.Dialogs
|
||||
get => _key;
|
||||
set
|
||||
{
|
||||
Set(ref _key, value);
|
||||
SetProperty(ref _key, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace FluentTerminal.App.Dialogs
|
||||
this.SecondaryButtonText = I18N.Translate("Cancel");
|
||||
}
|
||||
|
||||
public RelayCommand ResetCommand { get; }
|
||||
public ICommand ResetCommand { get; }
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace FluentTerminal.App.Dialogs
|
||||
ResetButton.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private void Set<T>(ref T field, T value, [CallerMemberName]string propertyName = "")
|
||||
private void SetProperty<T>(ref T field, T value, [CallerMemberName]string propertyName = "")
|
||||
{
|
||||
if (field?.Equals(value) ?? value == null)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,8 @@ using Windows.Foundation;
|
||||
using Windows.System;
|
||||
using Windows.UI.Xaml.Input;
|
||||
using FluentTerminal.App.ViewModels;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using System.Windows.Input;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
|
||||
// The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
||||
|
||||
@@ -40,7 +41,7 @@ namespace FluentTerminal.App.Dialogs
|
||||
|
||||
public CommandProfileProviderViewModel ViewModel { get; private set; }
|
||||
|
||||
public IAsyncCommand SaveLinkCommand { get; }
|
||||
public ICommand SaveLinkCommand { get; }
|
||||
|
||||
public CustomCommandDialog(ISettingsService settingsService, IApplicationView applicationView,
|
||||
ITrayProcessCommunicationService trayProcessCommunicationService, ICommandHistoryService historyService)
|
||||
@@ -52,7 +53,7 @@ namespace FluentTerminal.App.Dialogs
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
SaveLinkCommand = new AsyncCommand(SaveLink);
|
||||
SaveLinkCommand = new AsyncRelayCommand(SaveLink);
|
||||
|
||||
PrimaryButtonText = I18N.Translate("OK");
|
||||
SecondaryButtonText = I18N.Translate("Cancel");
|
||||
|
||||
@@ -12,7 +12,8 @@ using FluentTerminal.App.Services;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Profiles;
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.App.ViewModels.Infrastructure;
|
||||
using System.Windows.Input;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
|
||||
namespace FluentTerminal.App.Dialogs
|
||||
{
|
||||
@@ -26,8 +27,8 @@ namespace FluentTerminal.App.Dialogs
|
||||
|
||||
public SshConnectViewModel ViewModel { get; private set; }
|
||||
|
||||
public IAsyncCommand BrowseIdentityFileCommand { get; }
|
||||
public IAsyncCommand SaveLinkCommand { get; }
|
||||
public ICommand BrowseIdentityFileCommand { get; }
|
||||
public ICommand SaveLinkCommand { get; }
|
||||
|
||||
public SshInfoDialog(ISettingsService settingsService, IApplicationView applicationView,
|
||||
IFileSystemService fileSystemService, ITrayProcessCommunicationService trayProcessCommunicationService)
|
||||
@@ -39,8 +40,8 @@ namespace FluentTerminal.App.Dialogs
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
BrowseIdentityFileCommand = new AsyncCommand(BrowseIdentityFile);
|
||||
SaveLinkCommand = new AsyncCommand(SaveLink);
|
||||
BrowseIdentityFileCommand = new AsyncRelayCommand(BrowseIdentityFile);
|
||||
SaveLinkCommand = new AsyncRelayCommand(SaveLink);
|
||||
|
||||
PrimaryButtonText = I18N.Translate("OK");
|
||||
SecondaryButtonText = I18N.Translate("Cancel");
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<UseAppLocalCoreFramework>true</UseAppLocalCoreFramework>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
@@ -11,8 +14,8 @@
|
||||
<AssemblyName>FluentTerminal.App</AssemblyName>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
@@ -353,28 +356,31 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac">
|
||||
<Version>6.0.0</Version>
|
||||
<Version>6.2.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommandLineParser">
|
||||
<Version>2.8.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||
<Version>6.2.10</Version>
|
||||
<Version>6.2.12</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Toolkit.Mvvm">
|
||||
<Version>7.0.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Toolkit.Uwp.UI">
|
||||
<Version>6.1.1</Version>
|
||||
<Version>7.0.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls">
|
||||
<Version>6.1.1</Version>
|
||||
<Version>7.0.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.UI.Xaml">
|
||||
<Version>2.5.0-prerelease.201027002</Version>
|
||||
<Version>2.6.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed">
|
||||
<Version>2.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json">
|
||||
<Version>12.0.3</Version>
|
||||
<Version>13.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.IO.FileSystem.Primitives">
|
||||
<Version>4.3.0</Version>
|
||||
@@ -386,7 +392,7 @@
|
||||
<Version>4.3.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Win2D.uwp">
|
||||
<Version>1.25.0</Version>
|
||||
<Version>1.26.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -407,11 +413,6 @@
|
||||
<Name>FluentTerminal.RuntimeComponent</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<SDKReference Include="WindowsDesktop, Version=10.0.18362.0">
|
||||
<Name>Windows Desktop Extensions for the UWP</Name>
|
||||
</SDKReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PRIResource Include="Strings\ro\Resources.resw" />
|
||||
</ItemGroup>
|
||||
@@ -469,6 +470,14 @@
|
||||
<ItemGroup>
|
||||
<PRIResource Include="Strings\uz-Latn\Resources.resw" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PRIResource Include="Strings\bs\Resources.resw" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<SDKReference Include="WindowsDesktop, Version=10.0.19041.0">
|
||||
<Name>Windows Desktop Extensions for the UWP</Name>
|
||||
</SDKReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace FluentTerminal.App.Services
|
||||
["ar"] = "العربية",
|
||||
["ar-IQ"] = "اللهجة العراقية",
|
||||
["az-Latn"] = "azərbaycan dili",
|
||||
["bs"] = "bosanski",
|
||||
["de"] = "Deutsch",
|
||||
["en"] = "English",
|
||||
["eo"] = "Esperanto",
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Text;
|
||||
using FluentTerminal.App.Services.Implementation;
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.Models.Messages;
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using Microsoft.Toolkit.Mvvm.Messaging;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace FluentTerminal.App.Services
|
||||
@@ -153,7 +153,7 @@ namespace FluentTerminal.App.Services
|
||||
{
|
||||
_historyContainer.WriteValueAsJson(GetHash(executedCommand.Value), executedCommand);
|
||||
|
||||
Messenger.Default.Send(new CommandHistoryChangedMessage());
|
||||
WeakReferenceMessenger.Default.Send(new CommandHistoryChangedMessage());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -357,7 +357,7 @@ namespace FluentTerminal.App.Services
|
||||
|
||||
_historyContainer.Clear();
|
||||
|
||||
Messenger.Default.Send(new CommandHistoryChangedMessage());
|
||||
WeakReferenceMessenger.Default.Send(new CommandHistoryChangedMessage());
|
||||
}
|
||||
|
||||
public void Delete(ExecutedCommand executedCommand)
|
||||
@@ -366,7 +366,7 @@ namespace FluentTerminal.App.Services
|
||||
|
||||
_historyContainer.Delete(GetHash(executedCommand.Value));
|
||||
|
||||
Messenger.Default.Send(new CommandHistoryChangedMessage());
|
||||
WeakReferenceMessenger.Default.Send(new CommandHistoryChangedMessage());
|
||||
}
|
||||
|
||||
#endregion Methods
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1116,15 +1116,15 @@ Fuzzy</comment>
|
||||
<value>Sesija je prekinuta.</value>
|
||||
</data>
|
||||
<data name="Command.IncreaseFontSize" xml:space="preserve">
|
||||
<value>Increase font size</value>
|
||||
<value>Povećajte veličinu fonta</value>
|
||||
</data>
|
||||
<data name="Command.DecreaseFontSize" xml:space="preserve">
|
||||
<value>Decrease font size</value>
|
||||
<value>Smanji veličinu fonta</value>
|
||||
</data>
|
||||
<data name="Command.ResetFontSize" xml:space="preserve">
|
||||
<value>Reset font size</value>
|
||||
<value>Poništi veličinu fonta</value>
|
||||
</data>
|
||||
<data name="Command.ReconnectTab" xml:space="preserve">
|
||||
<value>Reconnect tab</value>
|
||||
<value>Ponovno spojite karticu</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1125,6 +1125,6 @@ Fuzzy</comment>
|
||||
<value>Zresetuj rozmiar czcionki</value>
|
||||
</data>
|
||||
<data name="Command.ReconnectTab" xml:space="preserve">
|
||||
<value>Reconnect tab</value>
|
||||
<value>Przełącz zakładke</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -992,7 +992,7 @@ Fuzzy</comment>
|
||||
<value>Najdi prejšnjega</value>
|
||||
</data>
|
||||
<data name="SearchTextBox.PlaceholderText" xml:space="preserve">
|
||||
<value>Vstavi iskano frazo</value>
|
||||
<value>Vnesi iskani pojem</value>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="Search.Text" xml:space="preserve">
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
@@ -139,7 +139,7 @@
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
<data name="ConfirmTabClosing.Header" xml:space="preserve">
|
||||
<value>Sekmeleri kaptmadan önce sor</value>
|
||||
<value>Sekmeleri kapatmadan önce sor</value>
|
||||
<comment>GeneralSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="Color.Text" xml:space="preserve">
|
||||
@@ -147,7 +147,7 @@ Fuzzy</comment>
|
||||
<comment>TabBar.xaml</comment>
|
||||
</data>
|
||||
<data name="ColorInactiveTabs.Text" xml:space="preserve">
|
||||
<value>Aktif olmayan sekme rengi</value>
|
||||
<value>Deaktif sekme rengi</value>
|
||||
<comment>GeneralSettings.xaml
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
@@ -161,7 +161,7 @@ Fuzzy</comment>
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
<data name="EditTitle.Text" xml:space="preserve">
|
||||
<value>Başlığı Düzenle</value>
|
||||
<value>Başlığı düzenle</value>
|
||||
<comment>TabBar.xaml
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
@@ -174,7 +174,7 @@ Fuzzy</comment>
|
||||
<comment>TabBar.xaml</comment>
|
||||
</data>
|
||||
<data name="IndicatorOutput.Header" xml:space="preserve">
|
||||
<value>Aktif olmayan pencerelerde yeni çıktı olursa beni bilgilendir</value>
|
||||
<value>Deaktif pencerelerde yeni çıktı olduğunda bilgilendir</value>
|
||||
<comment>GeneralSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="NeedRelaunch.Text" xml:space="preserve">
|
||||
@@ -220,12 +220,11 @@ Fuzzy</comment>
|
||||
<comment>TabBar.xaml</comment>
|
||||
</data>
|
||||
<data name="Restore.Label" xml:space="preserve">
|
||||
<value>Varsayılana Ayarla</value>
|
||||
<value>Varsayılana ayarla</value>
|
||||
<comment>GeneralSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="RunOnStartup.Header" xml:space="preserve">
|
||||
<value>Başlangıçta çalıştır
|
||||
</value>
|
||||
<value>Başlangıçta çalıştır</value>
|
||||
<comment>GeneralSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="Setting" xml:space="preserve">
|
||||
@@ -258,7 +257,7 @@ Fuzzy</comment>
|
||||
<comment>GeneralSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="Underline.Content" xml:space="preserve">
|
||||
<value>Alt Çizgi</value>
|
||||
<value>Alt çizgi</value>
|
||||
<comment>GeneralSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="UnderlineTab.Header" xml:space="preserve">
|
||||
@@ -274,11 +273,11 @@ Fuzzy</comment>
|
||||
<comment>SettingsPage.xaml</comment>
|
||||
</data>
|
||||
<data name="Setting_Keybindings.Content" xml:space="preserve">
|
||||
<value>Kısa yollar</value>
|
||||
<value>Kısayollar</value>
|
||||
<comment>SettingsPage.xaml</comment>
|
||||
</data>
|
||||
<data name="Setting_Mouse.Content" xml:space="preserve">
|
||||
<value>Mouse</value>
|
||||
<value>Fare</value>
|
||||
<comment>SettingsPage.xaml</comment>
|
||||
</data>
|
||||
<data name="Setting_Profiles.Content" xml:space="preserve">
|
||||
@@ -310,7 +309,7 @@ Fuzzy</comment>
|
||||
<comment>TerminalSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="BoldText.Header" xml:space="preserve">
|
||||
<value>Bold yazı</value>
|
||||
<value>Kalın yazı</value>
|
||||
<comment>TerminalSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="CancelAppBarButton.Label" xml:space="preserve">
|
||||
@@ -366,7 +365,7 @@ Fuzzy</comment>
|
||||
<comment>TerminalSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="CursorUnderline.Content" xml:space="preserve">
|
||||
<value>Alt Çizgi</value>
|
||||
<value>Alt çizgi</value>
|
||||
<comment>TerminalSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="DeleteAppBarButton.Label" xml:space="preserve">
|
||||
@@ -390,12 +389,12 @@ Fuzzy</comment>
|
||||
<comment>TerminalSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="FontSize.Header" xml:space="preserve">
|
||||
<value>Font Boyutu</value>
|
||||
<value>Font boyutu</value>
|
||||
<comment>TerminalSettings.xaml
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
<data name="ImportTheme.Text" xml:space="preserve">
|
||||
<value>İçe Aktar</value>
|
||||
<value>İçe aktar</value>
|
||||
<comment>ThemeSettings.xaml
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
@@ -409,7 +408,7 @@ Fuzzy</comment>
|
||||
<comment>ShellProfileSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="LatestVersion.Text" xml:space="preserve">
|
||||
<value>Son veriyon</value>
|
||||
<value>Güncel versiyon</value>
|
||||
<comment>About.xaml</comment>
|
||||
</data>
|
||||
<data name="License.Text" xml:space="preserve">
|
||||
@@ -430,7 +429,7 @@ Fuzzy</comment>
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
<data name="Mouse.Text" xml:space="preserve">
|
||||
<value>Mouse</value>
|
||||
<value>Fare</value>
|
||||
<comment>MouseSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="MouseContextMenu.Content" xml:space="preserve">
|
||||
@@ -455,7 +454,7 @@ Fuzzy</comment>
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
<data name="ProfileName.Header" xml:space="preserve">
|
||||
<value>İsim</value>
|
||||
<value>Ad</value>
|
||||
<comment>ShellProfileSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="Profiles.Text" xml:space="preserve">
|
||||
@@ -493,7 +492,7 @@ Fuzzy</comment>
|
||||
<comment>TerminalSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="ScrollbarStyle.Text" xml:space="preserve">
|
||||
<value>Kaydırma çubuğu stili</value>
|
||||
<value>Scrollbar stili</value>
|
||||
<comment>TerminalSettings.xaml
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
@@ -526,7 +525,7 @@ Fuzzy</comment>
|
||||
<comment>ThemeSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="ThemeAuthor.Header" xml:space="preserve">
|
||||
<value>Tema Sahibi</value>
|
||||
<value>Tema sahibi</value>
|
||||
<comment>ThemeSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="ThemeName.Header" xml:space="preserve">
|
||||
@@ -534,15 +533,15 @@ Fuzzy</comment>
|
||||
<comment>ThemeSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="LineEndingStyle.ToCR" xml:space="preserve">
|
||||
<value>Satır sonlarını CR'ye dönüştürme</value>
|
||||
<value>Satır sonlarını CR'ye dönüştür (\r)</value>
|
||||
<comment>ShellProfileSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="LineEndingStyle.ToCRLF" xml:space="preserve">
|
||||
<value>Satır sonlarını CR + LF'ye dönüştürme</value>
|
||||
<value>Satır sonlarını CR + LF'ye dönüştür (\r\n)</value>
|
||||
<comment>ShellProfileSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="LineEndingStyle.ToLF" xml:space="preserve">
|
||||
<value>Satır sonlarını LF'ye dönüştür</value>
|
||||
<value>Satır sonlarını LF'ye dönüştür (\n)</value>
|
||||
<comment>ShellProfileSettings.xaml</comment>
|
||||
</data>
|
||||
<data name="WorkingDir.Header" xml:space="preserve">
|
||||
@@ -601,7 +600,7 @@ Fuzzy</comment>
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
<data name="DisabledByPolicy" xml:space="preserve">
|
||||
<value>Politika tarafından devre dışı bırakıldı.</value>
|
||||
<value>Yetki ilkesi tarafından devre dışı bırakıldı.</value>
|
||||
<comment>ViewModel
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
@@ -611,7 +610,7 @@ Fuzzy</comment>
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
<data name="EditTitleString" xml:space="preserve">
|
||||
<value>Başlığı Düzenle</value>
|
||||
<value>Başlığı düzenle</value>
|
||||
<comment>ViewModel
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
@@ -673,7 +672,7 @@ Fuzzy</comment>
|
||||
<comment>Command</comment>
|
||||
</data>
|
||||
<data name="Keybindings.Text" xml:space="preserve">
|
||||
<value>Keybindings</value>
|
||||
<value>Tuş atamaları</value>
|
||||
<comment>KeyBindingSettings.xaml
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
@@ -686,11 +685,11 @@ Fuzzy</comment>
|
||||
<comment>KeyBindingsView.xaml</comment>
|
||||
</data>
|
||||
<data name="Command.NewTab" xml:space="preserve">
|
||||
<value>Yeni Sekme</value>
|
||||
<value>Yeni sekme</value>
|
||||
<comment>Command</comment>
|
||||
</data>
|
||||
<data name="Command.NewWindow" xml:space="preserve">
|
||||
<value>Yeni Pencere</value>
|
||||
<value>Yeni pencere</value>
|
||||
<comment>Command
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
@@ -707,11 +706,11 @@ Fuzzy</comment>
|
||||
<comment>Command</comment>
|
||||
</data>
|
||||
<data name="Command.Search" xml:space="preserve">
|
||||
<value>Arama</value>
|
||||
<value>Ara</value>
|
||||
<comment>Command</comment>
|
||||
</data>
|
||||
<data name="Command.SelectAll" xml:space="preserve">
|
||||
<value>Tümünü Seç</value>
|
||||
<value>Tümünü seç</value>
|
||||
<comment>Command</comment>
|
||||
</data>
|
||||
<data name="Command.ShowSettings" xml:space="preserve">
|
||||
@@ -766,14 +765,14 @@ Fuzzy</comment>
|
||||
Fuzzy</comment>
|
||||
</data>
|
||||
<data name="NewSshTab.Text" xml:space="preserve">
|
||||
<value>Yeni uzak (remote) sekmesi</value>
|
||||
<value>Yeni uzaktan bağlantı sekmesi</value>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="Command.NewSshTab" xml:space="preserve">
|
||||
<value>Yeni SSH sekmesi</value>
|
||||
</data>
|
||||
<data name="SshInfoDialog.Title" xml:space="preserve">
|
||||
<value>SSH Bilgisi</value>
|
||||
<value>SSH bilgisi</value>
|
||||
</data>
|
||||
<data name="UserTextBox.PlaceholderText" xml:space="preserve">
|
||||
<value>kullanıcı</value>
|
||||
@@ -792,24 +791,24 @@ Fuzzy</comment>
|
||||
<value>Araştır</value>
|
||||
</data>
|
||||
<data name="UseMoshCheckBox.Content" xml:space="preserve">
|
||||
<value>Mosh Kullan</value>
|
||||
<value>Mosh kullan</value>
|
||||
</data>
|
||||
<data name="AdvancedExpander.Header" xml:space="preserve">
|
||||
<value>ileri</value>
|
||||
<value>Gelişmiş</value>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="MoshPorts.Text" xml:space="preserve">
|
||||
<value>Mosh limanları:</value>
|
||||
<value>Mosh portları:</value>
|
||||
</data>
|
||||
<data name="SaveShortcutButton.Content" xml:space="preserve">
|
||||
<value>Kısayolu Kaydet</value>
|
||||
<value>Kısayolu kaydet</value>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="NeedsToRestart.Text" xml:space="preserve">
|
||||
<value>Bu değişikliğin geçerli olması için uygulamanın yeniden başlatılması gerekiyor.</value>
|
||||
</data>
|
||||
<data name="InvalidInput" xml:space="preserve">
|
||||
<value>Geçersiz Giriş</value>
|
||||
<value>Geçersiz giriş</value>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="PortCannotBeZero" xml:space="preserve">
|
||||
@@ -830,7 +829,7 @@ Fuzzy</comment>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="SshConnectionInfoValidationResult.MoshPortZeroOrNegative" xml:space="preserve">
|
||||
<value>Mosh limanı sıfır olamaz.</value>
|
||||
<value>Mosh portu sıfır olamaz.</value>
|
||||
</data>
|
||||
<data name="SshConnectionInfoValidationResult.MoshPortRangeInvalid" xml:space="preserve">
|
||||
<value>Mosh bağlantı noktası aralığı geçersiz.</value>
|
||||
@@ -863,28 +862,28 @@ Fuzzy</comment>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="Setting_SShProfiles.Content" xml:space="preserve">
|
||||
<value>SSH Profilleri</value>
|
||||
<value>SSH profilleri</value>
|
||||
</data>
|
||||
<data name="SshInfoDialog_TabColor.Text" xml:space="preserve">
|
||||
<value>Sekme rengi:</value>
|
||||
</data>
|
||||
<data name="UseConPty" xml:space="preserve">
|
||||
<value>ConPty kullanın</value>
|
||||
<value>ConPty kullan</value>
|
||||
</data>
|
||||
<data name="Username.Header" xml:space="preserve">
|
||||
<value>Kullanıcı adı</value>
|
||||
</data>
|
||||
<data name="MoshPortFrom.Header" xml:space="preserve">
|
||||
<value>Limandan</value>
|
||||
<value>Mosh portundan</value>
|
||||
</data>
|
||||
<data name="MoshPortTo.Header" xml:space="preserve">
|
||||
<value>limana</value>
|
||||
<value>Mosh portuna</value>
|
||||
</data>
|
||||
<data name="MoshPortRange.Text" xml:space="preserve">
|
||||
<value>Mosh liman aralığı</value>
|
||||
<value>Mosh port aralığı</value>
|
||||
</data>
|
||||
<data name="Authenticate" xml:space="preserve">
|
||||
<value>kimlik doğrulaması</value>
|
||||
<value>Kimlik doğrulaması</value>
|
||||
</data>
|
||||
<data name="SettingsExported" xml:space="preserve">
|
||||
<value>Ayarlar dosyaya aktarıldı</value>
|
||||
@@ -894,17 +893,17 @@ Fuzzy</comment>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="SshConnectionInfoValidationResult.IdentityFileDoesNotExist" xml:space="preserve">
|
||||
<value>Dosya tanımlama yok</value>
|
||||
<value>Kimlik dosyası yok</value>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="AutoFallbackToWindowsUsername.Header" xml:space="preserve">
|
||||
<value>Birini belirtmeyen SSH URL'lerini açarken Windows kullanıcı adını kullanın</value>
|
||||
<value>SSH URL'lerini açarken Windows kullanıcı adını kullanın</value>
|
||||
</data>
|
||||
<data name="UseMoshByDefault.Header" xml:space="preserve">
|
||||
<value>SSH bağlantıları için varsayılan olarak Mosh</value>
|
||||
<value>SSH bağlantıları için varsayılan olarak Mosh kullan</value>
|
||||
</data>
|
||||
<data name="RTrimCopiedLines.Header" xml:space="preserve">
|
||||
<value>Kopyalanan satırları sağ kırpma</value>
|
||||
<value>Kopyalanan satırları sonundaki boşlukları kırp</value>
|
||||
</data>
|
||||
<data name="QuickSshDefault.Header" xml:space="preserve">
|
||||
<value>Varsayılan olarak hızlı SSH kullan</value>
|
||||
@@ -917,23 +916,23 @@ Fuzzy</comment>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="MuteTerminalBeeps.Header" xml:space="preserve">
|
||||
<value>Terminal bip seslerini kapatma</value>
|
||||
<value>Terminal bip seslerini kapat</value>
|
||||
</data>
|
||||
<data name="CommandTextBox.PlaceholderText" xml:space="preserve">
|
||||
<value>Bir komut girin (örn. 'Ssh kullanıcı adı @ host')</value>
|
||||
<value>Bir komut girin (örn. 'ssh kullanıcı adı @ host')</value>
|
||||
</data>
|
||||
<data name="CommandLine.Header" xml:space="preserve">
|
||||
<value>komuta</value>
|
||||
<value>Komut satırı</value>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="UnsupportedCommand" xml:space="preserve">
|
||||
<value>Desteklenmeyen komut:</value>
|
||||
</data>
|
||||
<data name="CommandArgumentsMandatory" xml:space="preserve">
|
||||
<value>Komut bağımsız değişkenleri eksik.</value>
|
||||
<value>Komut argümanları eksik.</value>
|
||||
</data>
|
||||
<data name="QuickCommandDialog.Title" xml:space="preserve">
|
||||
<value>Hızlı Başlatma</value>
|
||||
<value>Hızlı başlatma</value>
|
||||
</data>
|
||||
<data name="Command.NewCustomCommandTab" xml:space="preserve">
|
||||
<value>Yeni hızlı başlatma sekmesi</value>
|
||||
@@ -968,7 +967,7 @@ Fuzzy</comment>
|
||||
<value>Yinelenen sekme</value>
|
||||
</data>
|
||||
<data name="Duplicate.Text" xml:space="preserve">
|
||||
<value>Çiftleme</value>
|
||||
<value>Yinele</value>
|
||||
</data>
|
||||
<data name="DuplicateEnvironmentVariable" xml:space="preserve">
|
||||
<value>Aynı ada sahip iki ortam değişkeni tanımlanamıyor.</value>
|
||||
@@ -979,7 +978,7 @@ Fuzzy</comment>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="EnvironmentVariables.Text" xml:space="preserve">
|
||||
<value>Ortam Değişkenleri</value>
|
||||
<value>Ortam değişkenleri</value>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="CloseSearchPanel.ToolTipService.ToolTip" xml:space="preserve">
|
||||
@@ -987,17 +986,17 @@ Fuzzy</comment>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="FindNext.ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Sonraki Bul</value>
|
||||
<value>Sonraki bul</value>
|
||||
</data>
|
||||
<data name="FindPrevious.ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Öncekini bul</value>
|
||||
</data>
|
||||
<data name="SearchTextBox.PlaceholderText" xml:space="preserve">
|
||||
<value>Arama terimini gir</value>
|
||||
<value>Aranacak terimi yazınız</value>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="Search.Text" xml:space="preserve">
|
||||
<value>Arama</value>
|
||||
<value>Ara</value>
|
||||
<comment>Fuzzy</comment>
|
||||
</data>
|
||||
<data name="PrintableOutputOnly.Content" xml:space="preserve">
|
||||
@@ -1015,13 +1014,13 @@ Fuzzy</comment>
|
||||
<value>Son</value>
|
||||
</data>
|
||||
<data name="NewTab_Description" xml:space="preserve">
|
||||
<value>Varsayılan profili yeni bir sekmede açar.</value>
|
||||
<value>Varsayılan profili yeni sekmede açar.</value>
|
||||
</data>
|
||||
<data name="NewSshTab_Description" xml:space="preserve">
|
||||
<value>Yeni bir sekmede yeni bir SSH veya Mosh oturumu açar.</value>
|
||||
<value>Yeni sekmede yeni bir SSH veya Mosh oturumu açar.</value>
|
||||
</data>
|
||||
<data name="NewQuickTab_Description" xml:space="preserve">
|
||||
<value>"Hızlı Başlatma" iletişim kutusunu açar ve oturumu yeni bir sekmede başlatır.</value>
|
||||
<value>"Hızlı Başlatma" iletişim kutusunu açar ve oturumu yeni sekmede başlatır.</value>
|
||||
</data>
|
||||
<data name="Settings_Description" xml:space="preserve">
|
||||
<value>Ayarlar penceresini açar.</value>
|
||||
@@ -1036,28 +1035,28 @@ Fuzzy</comment>
|
||||
<value>Varsayılan profile göre yeni terminal oturumu başlatır.</value>
|
||||
</data>
|
||||
<data name="MenuItem_Remote_Text" xml:space="preserve">
|
||||
<value>Uzaktan Bağlantı ...</value>
|
||||
<value>Uzaktan bağlantı ...</value>
|
||||
</data>
|
||||
<data name="MenuItem_Remote_Description" xml:space="preserve">
|
||||
<value>Yeni bir SSH veya Mosh terminal oturumu başlatmak için bir iletişim kutusu açar.</value>
|
||||
<value>Yeni SSH veya Mosh terminal oturumu başlatmak için bir iletişim kutusu açar.</value>
|
||||
</data>
|
||||
<data name="MenuItem_QuickLaunch_Text" xml:space="preserve">
|
||||
<value>Hızlı Başlat ...</value>
|
||||
<value>Hızlı başlat ...</value>
|
||||
</data>
|
||||
<data name="MenuItem_QuickLaunch_Description" xml:space="preserve">
|
||||
<value>Yeni bir terminal oturumu başlatmak için bir "Hızlı Başlatma" iletişim kutusu açar.</value>
|
||||
<value>Yeni terminal oturumu başlatmak için bir "Hızlı Başlatma" iletişim kutusu açar.</value>
|
||||
</data>
|
||||
<data name="MenuItem_NewWindow_Text" xml:space="preserve">
|
||||
<value>Yeni Pencere</value>
|
||||
<value>Yeni pencere</value>
|
||||
</data>
|
||||
<data name="MenuItem_NewTab_Text" xml:space="preserve">
|
||||
<value>Yeni Sekme</value>
|
||||
<value>Yeni sekme</value>
|
||||
</data>
|
||||
<data name="MenuItem_NewTab_Description" xml:space="preserve">
|
||||
<value>Yeni bir sekmede bir oturum başlatır.</value>
|
||||
<value>Yeni sekmede bir oturum başlatır.</value>
|
||||
</data>
|
||||
<data name="MenuItem_NewWindow_Description" xml:space="preserve">
|
||||
<value>Bir oturumu yeni bir pencerede başlatır.</value>
|
||||
<value>Oturumu yeni pencerede başlatır.</value>
|
||||
</data>
|
||||
<data name="AppMenuType.Text" xml:space="preserve">
|
||||
<value>Uygulama menü türü</value>
|
||||
@@ -1069,22 +1068,22 @@ Fuzzy</comment>
|
||||
<value>"Yeni Sekme" / "Yeni Pencere" basamaklı</value>
|
||||
</data>
|
||||
<data name="Quit.Text" xml:space="preserve">
|
||||
<value>çıkmak</value>
|
||||
<value>Çıkış</value>
|
||||
</data>
|
||||
<data name="Quit.Description" xml:space="preserve">
|
||||
<value>Akıcı Terminalden Çık</value>
|
||||
<value>Fluent terminalden çık</value>
|
||||
</data>
|
||||
<data name="EnabledByPolicy" xml:space="preserve">
|
||||
<value>Politika tarafından etkinleştirildi.</value>
|
||||
<value>Yetki ilkesi tarafından etkinleştirildi.</value>
|
||||
</data>
|
||||
<data name="BackgroundImage.Content" xml:space="preserve">
|
||||
<value>Arka plan görüntüsü</value>
|
||||
<value>Arkaplan resmi</value>
|
||||
</data>
|
||||
<data name="AcrylicBackground.Header" xml:space="preserve">
|
||||
<value>Akrilik arka plan kullanın</value>
|
||||
<value>Akrilik arkaplan kullan</value>
|
||||
</data>
|
||||
<data name="ConfirmDeleteBackgroundImage" xml:space="preserve">
|
||||
<value>Bu arka plan resmini silmek istediğinizden emin misiniz?</value>
|
||||
<value>Bu arkaplan resmini silmek istediğinizden emin misiniz?</value>
|
||||
</data>
|
||||
<data name="Colors.Text" xml:space="preserve">
|
||||
<value>Renkler</value>
|
||||
@@ -1096,10 +1095,10 @@ Fuzzy</comment>
|
||||
<value>Bağlantıyı kopyala</value>
|
||||
</data>
|
||||
<data name="SearchWithRegex.ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Regex</value>
|
||||
<value>Regular Expressions - Regex</value>
|
||||
</data>
|
||||
<data name="SearchWholeWord.ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Tüm dünya</value>
|
||||
<value>Bütün kelime</value>
|
||||
</data>
|
||||
<data name="SearchCaseSensitive.ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Büyük/Küçük harfe duyarlı</value>
|
||||
@@ -1117,7 +1116,7 @@ Fuzzy</comment>
|
||||
<value>Oturum bağlantısı kesildi.</value>
|
||||
</data>
|
||||
<data name="Command.IncreaseFontSize" xml:space="preserve">
|
||||
<value>Yazı tipi boyutunu büyüt</value>
|
||||
<value>Yazı tipi boyutunu büyült</value>
|
||||
</data>
|
||||
<data name="Command.DecreaseFontSize" xml:space="preserve">
|
||||
<value>Yazı tipi boyutunu küçült</value>
|
||||
@@ -1128,4 +1127,4 @@ Fuzzy</comment>
|
||||
<data name="Command.ReconnectTab" xml:space="preserve">
|
||||
<value>Sekmeye yeniden bağlan</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
||||
@@ -4,11 +4,11 @@ using System.Linq;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Documents;
|
||||
using FluentTerminal.Models;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Microsoft.Toolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace FluentTerminal.App.ViewModels
|
||||
{
|
||||
public class CommandItemViewModel : ViewModelBase
|
||||
public class CommandItemViewModel : ObservableObject
|
||||
{
|
||||
#region Fields
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public bool IsMatch
|
||||
{
|
||||
get => _isMatch;
|
||||
private set => Set(ref _isMatch, value);
|
||||
private set => SetProperty(ref _isMatch, value);
|
||||
}
|
||||
|
||||
private RichTextBlock _richTextBlock;
|
||||
@@ -45,7 +45,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
get => _richTextBlock;
|
||||
private set
|
||||
{
|
||||
if (Set(ref _richTextBlock, value))
|
||||
if (SetProperty(ref _richTextBlock, value))
|
||||
{
|
||||
IsMatch = value != null;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public string Command
|
||||
{
|
||||
get => _command;
|
||||
set => Set(ref _command, value);
|
||||
set => SetProperty(ref _command, value);
|
||||
}
|
||||
|
||||
private ObservableCollection<CommandItemViewModel> _commands;
|
||||
@@ -97,7 +97,7 @@ namespace FluentTerminal.App.ViewModels
|
||||
public ObservableCollection<CommandItemViewModel> Commands
|
||||
{
|
||||
get => _commands;
|
||||
private set => Set(ref _commands, value);
|
||||
private set => SetProperty(ref _commands, value);
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="{ThemeResource SystemControlBackgroundAltHighBrush}"
|
||||
DefaultLabelPosition="Right">
|
||||
<AppBarButton
|
||||
x:Uid="Restore"
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using FluentTerminal.App.ViewModels.Settings;
|
||||
using Windows.Storage.Pickers;
|
||||
using FluentTerminal.App.ViewModels.Settings;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="{ThemeResource SystemControlBackgroundAltHighBrush}"
|
||||
DefaultLabelPosition="Right">
|
||||
<AppBarButton
|
||||
x:Uid="AddAppBarButton"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels.Settings;
|
||||
using FluentTerminal.Models.Enums;
|
||||
using FluentTerminal.Models;
|
||||
using System;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="{ThemeResource SystemControlBackgroundAltHighBrush}"
|
||||
DefaultLabelPosition="Right">
|
||||
<AppBarButton
|
||||
x:Uid="Restore"
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="{ThemeResource SystemControlBackgroundAltHighBrush}"
|
||||
DefaultLabelPosition="Right">
|
||||
<AppBarButton
|
||||
x:Uid="Restore"
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
using FluentTerminal.App.Services.EventArgs;
|
||||
using FluentTerminal.App.Services.Utilities;
|
||||
using FluentTerminal.App.ViewModels;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using Windows.ApplicationModel.DataTransfer;
|
||||
using Windows.Foundation;
|
||||
using Windows.UI.Xaml;
|
||||
@@ -21,7 +21,7 @@ namespace FluentTerminal.App.Views
|
||||
DependencyProperty.Register(nameof(ItemsSource), typeof(ObservableCollection<TerminalViewModel>), typeof(TabBar), new PropertyMetadata(null));
|
||||
|
||||
public static readonly DependencyProperty MyPropertyProperty =
|
||||
DependencyProperty.Register(nameof(AddCommand), typeof(RelayCommand), typeof(TabBar), new PropertyMetadata(null));
|
||||
DependencyProperty.Register(nameof(AddCommand), typeof(ICommand), typeof(TabBar), new PropertyMetadata(null));
|
||||
|
||||
public static readonly DependencyProperty SelectedItemProperty =
|
||||
DependencyProperty.Register(nameof(SelectedItem), typeof(object), typeof(TabBar), new PropertyMetadata(null));
|
||||
@@ -53,9 +53,9 @@ namespace FluentTerminal.App.Views
|
||||
ScrollViewer.UnregisterPropertyChangedCallback(ScrollViewer.ScrollableWidthProperty, _scrollableWidthChangedToken);
|
||||
}
|
||||
|
||||
public RelayCommand AddCommand
|
||||
public ICommand AddCommand
|
||||
{
|
||||
get { return (RelayCommand)GetValue(MyPropertyProperty); }
|
||||
get { return (ICommand)GetValue(MyPropertyProperty); }
|
||||
set { SetValue(MyPropertyProperty, value); }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using FluentTerminal.Models;
|
||||
using FluentTerminal.Models.Enums;
|
||||
using FluentTerminal.Models.Enums;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Data;
|
||||
|
||||
@@ -4,24 +4,23 @@ using Windows.System;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using FluentTerminal.Models.Messages;
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using FluentTerminal.Models;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Media.Imaging;
|
||||
using Windows.UI;
|
||||
using Microsoft.Toolkit.Mvvm.Messaging;
|
||||
|
||||
namespace FluentTerminal.App.Views
|
||||
{
|
||||
// ReSharper disable once RedundantExtendsListEntry
|
||||
public sealed partial class TerminalView : UserControl
|
||||
public sealed partial class TerminalView : UserControl,
|
||||
IRecipient<KeyBindingsChangedMessage>,
|
||||
IRecipient<TerminalOptionsChangedMessage>
|
||||
{
|
||||
private ITerminalView _terminalView;
|
||||
|
||||
public TerminalView(TerminalViewModel viewModel)
|
||||
{
|
||||
Messenger.Default.Register<KeyBindingsChangedMessage>(this, OnKeyBindingsChanged);
|
||||
Messenger.Default.Register<TerminalOptionsChangedMessage>(this, OnTerminalOptionsChanged);
|
||||
|
||||
ViewModel = viewModel;
|
||||
ViewModel.SearchStarted += OnSearchStarted;
|
||||
ViewModel.Activated += OnActivated;
|
||||
@@ -39,6 +38,8 @@ namespace FluentTerminal.App.Views
|
||||
SetGridBackgroundTheme(ViewModel.TerminalTheme);
|
||||
|
||||
viewModel.Overlay = (OverlayViewModel) MessageOverlay.DataContext;
|
||||
|
||||
WeakReferenceMessenger.Default.RegisterAll(this);
|
||||
}
|
||||
|
||||
public void DisposalPrepare()
|
||||
@@ -48,7 +49,7 @@ namespace FluentTerminal.App.Views
|
||||
_terminalView?.Dispose();
|
||||
_terminalView = null;
|
||||
|
||||
Messenger.Default.Unregister(this);
|
||||
// Messenger.Default.Unregister(this); // todo do we need this?
|
||||
|
||||
ViewModel.SearchStarted -= OnSearchStarted;
|
||||
ViewModel.Activated -= OnActivated;
|
||||
@@ -77,12 +78,12 @@ namespace FluentTerminal.App.Views
|
||||
_terminalView.FindPreviousAsync(e);
|
||||
}
|
||||
|
||||
private void OnKeyBindingsChanged(KeyBindingsChangedMessage message)
|
||||
public void Receive(KeyBindingsChangedMessage message)
|
||||
{
|
||||
_terminalView.ChangeKeyBindingsAsync();
|
||||
}
|
||||
|
||||
private void OnTerminalOptionsChanged(TerminalOptionsChangedMessage message)
|
||||
public void Receive(TerminalOptionsChangedMessage message)
|
||||
{
|
||||
_terminalView.ChangeOptionsAsync(message.TerminalOptions);
|
||||
}
|
||||
|
||||
Generated
+2235
-657
File diff suppressed because it is too large.
Load diff
@@ -16,10 +16,10 @@
|
||||
"webpack-cli": "^4.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"xterm": "^4.9.0",
|
||||
"xterm-addon-fit": "^0.4.0",
|
||||
"xterm-addon-search": "^0.7.0",
|
||||
"xterm-addon-serialize": "^0.4.0",
|
||||
"xterm": "4.11.0",
|
||||
"xterm-addon-fit": "^0.5.0",
|
||||
"xterm-addon-search": "^0.8.0",
|
||||
"xterm-addon-serialize": "^0.5.0",
|
||||
"xterm-addon-unicode11": "^0.2.0",
|
||||
"xterm-addon-web-links": "^0.4.0"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace FluentTerminal.Models.Enums
|
||||
namespace FluentTerminal.Models.Enums
|
||||
{
|
||||
public enum TabThemeKey
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FluentTerminal.Models
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace FluentTerminal.Models
|
||||
namespace FluentTerminal.Models
|
||||
{
|
||||
public class FontInfo
|
||||
{
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FluentTerminal.Models
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace FluentTerminal.Models.Messages
|
||||
|
||||
public ApplicationSettingsChangedMessage(ApplicationSettings applicationSettings)
|
||||
{
|
||||
ApplicationSettings = applicationSettings ?? throw new ArgumentNullException();
|
||||
ApplicationSettings = applicationSettings ?? throw new ArgumentNullException(nameof(applicationSettings));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace FluentTerminal.Models
|
||||
namespace FluentTerminal.Models
|
||||
{
|
||||
public class TabTheme
|
||||
{
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>da0bf206-f386-404c-82df-5eae2f5b1aa5</ProjectGuid>
|
||||
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
|
||||
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
|
||||
<PackageCertificateKeyFile>FluentTerminal.App_StoreKey.pfx</PackageCertificateKeyFile>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
|
||||
IgnorableNamespaces="uap rescap desktop">
|
||||
|
||||
<Identity Name="53621FSApps.FluentTerminal" Publisher="CN=BDC72197-B634-438A-B863-16DCB7D90C85" Version="0.7.4.0" />
|
||||
<Identity Name="53621FSApps.FluentTerminal" Publisher="CN=BDC72197-B634-438A-B863-16DCB7D90C85" Version="0.7.5.0" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>Fluent Terminal</DisplayName>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<default>
|
||||
<qualifier name="Language" value="ar;ar-IQ;az-Latn;de;en-US;eo;es;fa;fr;he;hi;hr;hu;id;it;ja;ko;nl;pl;pt-BR;ro;ru;sl;sv;tr;ug-Arab;uk;uz-Latn;zh-Hans;zh-Hant" />
|
||||
<qualifier name="Language" value="ar;ar-IQ;az-Latn;bs;de;en-US;eo;es;fa;fr;he;hi;hr;hu;id;it;ja;ko;nl;pl;pt-BR;ro;ru;sl;sv;tr;ug-Arab;uk;uz-Latn;zh-Hans;zh-Hant" />
|
||||
</default>
|
||||
@@ -122,7 +122,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||
<Version>6.2.10</Version>
|
||||
<Version>6.2.12</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Windows">
|
||||
<HintPath>$(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\Facade\Windows.WinMD</HintPath>
|
||||
<HintPath>$(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\10.0.16299.0\Facade\Windows.WinMD</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Windows.Foundation.FoundationContract">
|
||||
@@ -203,7 +203,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac">
|
||||
<Version>6.0.0</Version>
|
||||
<Version>6.2.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="GlobalHotKey">
|
||||
<Version>1.1.0</Version>
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Management;
|
||||
|
||||
using FluentTerminal.App.Services;
|
||||
|
||||
namespace FluentTerminal.SystemTray
|
||||
{
|
||||
public static class ProcessUtils
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Windows.ApplicationModel;
|
||||
using FluentTerminal.Models.Messages;
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using Microsoft.Toolkit.Mvvm.Messaging;
|
||||
|
||||
namespace FluentTerminal.SystemTray.Services
|
||||
{
|
||||
@@ -42,7 +42,7 @@ namespace FluentTerminal.SystemTray.Services
|
||||
public TerminalsManager(ISettingsService settingsService)
|
||||
{
|
||||
_applicationSettings = settingsService.GetApplicationSettings();
|
||||
Messenger.Default.Register<ApplicationSettingsChangedMessage>(this, OnApplicationSettingsChanged);
|
||||
WeakReferenceMessenger.Default.Register<TerminalsManager, ApplicationSettingsChangedMessage>(this, (r, m) => r.OnApplicationSettingsChanged(m));
|
||||
}
|
||||
|
||||
private void OnApplicationSettingsChanged(ApplicationSettingsChangedMessage message)
|
||||
|
||||
@@ -5,12 +5,9 @@ using GlobalHotKey;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Threading;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Core;
|
||||
using Windows.System;
|
||||
using static FluentTerminal.SystemTray.Native.WindowApi;
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ A Terminal Emulator based on UWP and web technologies.
|
||||
- Arabic
|
||||
- Arabic (Iraq)
|
||||
- Azerbaijani
|
||||
- Bosnian
|
||||
- Chinese (Simplified)
|
||||
- Chinese (Traditional)
|
||||
- Dutch
|
||||
@@ -56,6 +57,7 @@ A Terminal Emulator based on UWP and web technologies.
|
||||
- Romanian
|
||||
- Russian
|
||||
- Spanish
|
||||
- Turkish
|
||||
- Ukrainian
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ DownloadLanguageFile "es"
|
||||
DownloadLanguageFile "fr"
|
||||
DownloadLanguageFile "he"
|
||||
DownloadLanguageFile "hi"
|
||||
DownloadLanguageFile "bs"
|
||||
DownloadLanguageFile "hr"
|
||||
DownloadLanguageFile "pt-BR"
|
||||
DownloadLanguageFile "ru"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
|
||||
<clear />
|
||||
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
Reference in new issue
Block a user