From 9b61d11f6abd8f10239496c4e65ca8403471fe80 Mon Sep 17 00:00:00 2001 From: FelixSe Date: Sat, 3 Feb 2018 21:16:10 +0100 Subject: [PATCH] Added settings window to configure which shell to use --- FluentTerminal.App/App.xaml.cs | 148 +++++++++++----- .../Assets/LockScreenLogo.scale-200.png | Bin 1430 -> 0 bytes .../Assets/SplashScreen.scale-200.png | Bin 7700 -> 0 bytes .../Assets/Square150x150Logo.scale-200.png | Bin 2937 -> 0 bytes .../Assets/Square44x44Logo.scale-200.png | Bin 1647 -> 0 bytes ...x44Logo.targetsize-24_altform-unplated.png | Bin 1255 -> 0 bytes FluentTerminal.App/Assets/StoreLogo.png | Bin 1451 -> 0 bytes .../Assets/Wide310x150Logo.scale-200.png | Bin 3204 -> 0 bytes .../Converters/FalseToVisibleConverter.cs | 27 +++ FluentTerminal.App/FluentTerminal.App.csproj | 159 ++++++++++++++++-- .../Models/TerminalConfiguration.cs | 15 -- FluentTerminal.App/Models/TerminalSize.cs | 14 -- FluentTerminal.App/Package.appxmanifest | 5 + .../Services/IDefaultValueProvider.cs | 9 + .../Services/ISettingsService.cs | 10 ++ .../Services/ITerminalService.cs | 11 ++ .../Implementation/DefaultValueProvider.cs | 19 +++ .../Implementation/SettingsService.cs | 38 +++++ .../Implementation/TerminalService.cs | 37 ++++ .../ApplicationDataContainerExtensions.cs | 23 +++ .../Utilities/HttpJsonContent.cs | 14 ++ .../Utilities/IHttpContentExtensions.cs | 16 ++ .../ViewModels/MainViewModel.cs | 19 ++- .../ViewModels/SettingsViewModel.cs | 157 +++++++++++++++++ .../ViewModels/TerminalViewModel.cs | 54 +++--- FluentTerminal.App/Views/ITerminalView.cs | 4 +- FluentTerminal.App/Views/MainPage.xaml | 7 +- FluentTerminal.App/Views/MainPage.xaml.cs | 24 ++- FluentTerminal.App/Views/SettingsPage.xaml | 93 +++++++++- FluentTerminal.App/Views/SettingsPage.xaml.cs | 79 ++++++++- .../Views/SettingsPages/ColorSettings.xaml | 11 ++ .../Views/SettingsPages/ColorSettings.xaml.cs | 30 ++++ .../Views/SettingsPages/FontSettings.xaml | 11 ++ .../Views/SettingsPages/FontSettings.xaml.cs | 30 ++++ .../Views/SettingsPages/GeneralSettings.xaml | 10 ++ .../SettingsPages/GeneralSettings.xaml.cs | 12 ++ .../SettingsPages/KeyBindingSettings.xaml | 11 ++ .../SettingsPages/KeyBindingSettings.xaml.cs | 30 ++++ .../Views/SettingsPages/ShellSettings.xaml | 52 ++++++ .../Views/SettingsPages/ShellSettings.xaml.cs | 24 +++ FluentTerminal.App/Views/TerminalView.xaml.cs | 8 +- FluentTerminal.Client/dist/bundle.js | 3 +- FluentTerminal.Client/src/index.js | 1 - .../CreateTerminalRequest.cs | 8 + .../CreateTerminalResponse.cs | 10 ++ FluentTerminal.Models/Enums/ShellType.cs | 9 + .../FluentTerminal.Models.csproj | 7 + FluentTerminal.Models/ShellConfiguration.cs | 12 ++ FluentTerminal.Models/TerminalSize.cs | 8 + FluentTerminal.SystemTray/Client/bundle.js | 3 +- .../Controllers/TerminalsController.cs | 24 +-- .../DataTransferObjects/TerminalOptions.cs | 10 -- .../FluentTerminal.SystemTray.csproj | 10 +- .../{Terminal.cs => TerminalSession.cs} | 121 +++++++------ .../Services/TerminalsManager.cs | 34 +++- .../SystemTrayApplicationContext.cs | 18 +- FluentTerminal.sln | 18 ++ 57 files changed, 1280 insertions(+), 227 deletions(-) delete mode 100644 FluentTerminal.App/Assets/LockScreenLogo.scale-200.png delete mode 100644 FluentTerminal.App/Assets/SplashScreen.scale-200.png delete mode 100644 FluentTerminal.App/Assets/Square150x150Logo.scale-200.png delete mode 100644 FluentTerminal.App/Assets/Square44x44Logo.scale-200.png delete mode 100644 FluentTerminal.App/Assets/Square44x44Logo.targetsize-24_altform-unplated.png delete mode 100644 FluentTerminal.App/Assets/StoreLogo.png delete mode 100644 FluentTerminal.App/Assets/Wide310x150Logo.scale-200.png create mode 100644 FluentTerminal.App/Converters/FalseToVisibleConverter.cs delete mode 100644 FluentTerminal.App/Models/TerminalConfiguration.cs delete mode 100644 FluentTerminal.App/Models/TerminalSize.cs create mode 100644 FluentTerminal.App/Services/IDefaultValueProvider.cs create mode 100644 FluentTerminal.App/Services/ISettingsService.cs create mode 100644 FluentTerminal.App/Services/ITerminalService.cs create mode 100644 FluentTerminal.App/Services/Implementation/DefaultValueProvider.cs create mode 100644 FluentTerminal.App/Services/Implementation/SettingsService.cs create mode 100644 FluentTerminal.App/Services/Implementation/TerminalService.cs create mode 100644 FluentTerminal.App/Utilities/ApplicationDataContainerExtensions.cs create mode 100644 FluentTerminal.App/Utilities/HttpJsonContent.cs create mode 100644 FluentTerminal.App/Utilities/IHttpContentExtensions.cs create mode 100644 FluentTerminal.App/ViewModels/SettingsViewModel.cs create mode 100644 FluentTerminal.App/Views/SettingsPages/ColorSettings.xaml create mode 100644 FluentTerminal.App/Views/SettingsPages/ColorSettings.xaml.cs create mode 100644 FluentTerminal.App/Views/SettingsPages/FontSettings.xaml create mode 100644 FluentTerminal.App/Views/SettingsPages/FontSettings.xaml.cs create mode 100644 FluentTerminal.App/Views/SettingsPages/GeneralSettings.xaml create mode 100644 FluentTerminal.App/Views/SettingsPages/GeneralSettings.xaml.cs create mode 100644 FluentTerminal.App/Views/SettingsPages/KeyBindingSettings.xaml create mode 100644 FluentTerminal.App/Views/SettingsPages/KeyBindingSettings.xaml.cs create mode 100644 FluentTerminal.App/Views/SettingsPages/ShellSettings.xaml create mode 100644 FluentTerminal.App/Views/SettingsPages/ShellSettings.xaml.cs create mode 100644 FluentTerminal.Models/CreateTerminalRequest.cs create mode 100644 FluentTerminal.Models/CreateTerminalResponse.cs create mode 100644 FluentTerminal.Models/Enums/ShellType.cs create mode 100644 FluentTerminal.Models/FluentTerminal.Models.csproj create mode 100644 FluentTerminal.Models/ShellConfiguration.cs create mode 100644 FluentTerminal.Models/TerminalSize.cs delete mode 100644 FluentTerminal.SystemTray/DataTransferObjects/TerminalOptions.cs rename FluentTerminal.SystemTray/Services/{Terminal.cs => TerminalSession.cs} (72%) diff --git a/FluentTerminal.App/App.xaml.cs b/FluentTerminal.App/App.xaml.cs index cf679c4..3d60690 100644 --- a/FluentTerminal.App/App.xaml.cs +++ b/FluentTerminal.App/App.xaml.cs @@ -1,8 +1,9 @@ using Autofac; +using FluentTerminal.App.Services; +using FluentTerminal.App.Services.Implementation; using FluentTerminal.App.ViewModels; using FluentTerminal.App.Views; using System; -using System.Collections.Generic; using System.Threading.Tasks; using Windows.ApplicationModel; using Windows.ApplicationModel.Activation; @@ -21,9 +22,10 @@ namespace FluentTerminal.App public static BackgroundTaskDeferral AppServiceDeferral = null; public static AppServiceConnection Connection = null; public static App Instance; + private bool _alreadyLaunched; private IContainer _container; + private int _openTerminalWindows; private int? _settingsWindowId; - private List _windowIds = new List(); public App() { @@ -31,54 +33,68 @@ namespace FluentTerminal.App Instance = this; var builder = new ContainerBuilder(); + builder.RegisterType().As().InstancePerDependency(); + builder.RegisterType().As().SingleInstance(); + builder.RegisterType().As().SingleInstance(); builder.RegisterType().InstancePerDependency(); + builder.RegisterType().InstancePerDependency(); _container = builder.Build(); } - public async Task CreateNewWindow(Type pageType, bool ExtendViewIntoTitleBar) + public async Task CreateNewTerminalWindow() { - var newView = CoreApplication.CreateNewView(); - int windowId = 0; - await newView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => - { - CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = ExtendViewIntoTitleBar; - var frame = new Frame(); - frame.Navigate(pageType, null); - Window.Current.Content = frame; - Window.Current.Activate(); - - windowId = ApplicationView.GetForCurrentView().Id; - }); - - for (int i = _windowIds.Count - 1; i >= 0; i--) - if (await ApplicationViewSwitcher.TryShowAsStandaloneAsync( - windowId, ViewSizePreference.Default, - _windowIds[i], ViewSizePreference.Default) - ) break; - - _windowIds.Add(windowId); - return windowId; + var id = await CreateSecondaryView(typeof(MainPage), true); + await ApplicationViewSwitcher.TryShowAsStandaloneAsync(id); } - public T Resolve() + public void SettingsWindowClosed() { - return _container.Resolve(); - } - - public async Task ShowNew() - { - var id = await CreateNewWindow(typeof(MainPage), true); - bool viewShown = await ApplicationViewSwitcher.TryShowAsStandaloneAsync(id); + _settingsWindowId = null; } public async Task ShowSettings() { if (_settingsWindowId == null) { - _settingsWindowId = await CreateNewWindow(typeof(Views.SettingsPage), false); + _settingsWindowId = await CreateSecondaryView(typeof(SettingsPage), true); + } + await ApplicationViewSwitcher.TryShowAsStandaloneAsync(_settingsWindowId.Value); + } + + public void TerminalWindowClosed() + { + _openTerminalWindows--; + } + + protected override async void OnActivated(IActivatedEventArgs args) + { + if (args is CommandLineActivatedEventArgs commandLineActivated) + { + var argument = commandLineActivated.Operation.Arguments.Trim(); + if (_alreadyLaunched) + { + if (argument == "settings") + { + await ShowSettings(); + } + else if (argument == "new") + { + await CreateNewTerminalWindow(); + } + } + else + { + if (argument == "settings") + { + CreateMainView(typeof(SettingsPage), true); + } + else if (argument == "new") + { + CreateMainView(typeof(MainPage), true); + } + } } - bool viewShown = await ApplicationViewSwitcher.TryShowAsStandaloneAsync(_settingsWindowId.Value); } protected override void OnBackgroundActivated(BackgroundActivatedEventArgs args) @@ -97,9 +113,21 @@ namespace FluentTerminal.App { var launch = FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync().AsTask(); var clearCache = WebView.ClearTemporaryWebDataAsync().AsTask(); - await Task.WhenAll(launch, clearCache); + if (!_alreadyLaunched) + { + CreateMainView(typeof(MainPage), true); + Window.Current.Activate(); + } + else if (_openTerminalWindows == 0) + { + await CreateSecondaryView(typeof(MainPage), true); + } + } + + private void CreateMainView(Type pageType, bool extendViewIntoTitleBar) + { Frame rootFrame = Window.Current.Content as Frame; if (rootFrame == null) { @@ -109,17 +137,53 @@ namespace FluentTerminal.App if (rootFrame.Content == null) { - CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true; - rootFrame.Navigate(typeof(MainPage), e.Arguments); - _windowIds.Add(ApplicationView.GetForCurrentView().Id); - } - else if (false) //todo: add option to create new windows on launch - { - await CreateNewWindow(typeof(MainPage), true); + CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = extendViewIntoTitleBar; + rootFrame.Navigate(pageType, GetViewModelForPageType(pageType)); + + if (pageType == typeof(MainPage)) + { + _openTerminalWindows++; + } } + _alreadyLaunched = true; Window.Current.Activate(); } + private async Task CreateSecondaryView(Type pageType, bool ExtendViewIntoTitleBar) + { + int windowId = 0; + await CoreApplication.CreateNewView().Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => + { + CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = ExtendViewIntoTitleBar; + var frame = new Frame(); + frame.Navigate(pageType, GetViewModelForPageType(pageType)); + Window.Current.Content = frame; + Window.Current.Activate(); + + windowId = ApplicationView.GetForCurrentView().Id; + }); + + if (pageType == typeof(MainPage)) + { + _openTerminalWindows++; + } + + return windowId; + } + + private object GetViewModelForPageType(Type pageType) + { + if (pageType == typeof(MainPage)) + { + return _container.Resolve(); + } + else if (pageType == typeof(SettingsPage)) + { + return _container.Resolve(); + } + throw new Exception("No ViewModel defined for Page: " + pageType.Name); + } + private void OnRequestReceived(AppServiceConnection sender, AppServiceRequestReceivedEventArgs args) { if (args.Request.Message.ContainsKey("exit")) diff --git a/FluentTerminal.App/Assets/LockScreenLogo.scale-200.png b/FluentTerminal.App/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 735f57adb5dfc01886d137b4e493d7e97cf13af3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1430 zcmaJ>TTC2P7~aKltDttVHYH6u8Io4i*}3fO&d$gd*bA_<3j~&e7%8(eXJLfhS!M@! zKrliY>>6yT4+Kr95$!DoD(Qn-5TP|{V_KS`k~E6(LGS@#`v$hQo&^^BKsw3HIsZBT z_y6C2n`lK@apunKojRQ^(_P}Mgewt$(^BBKCTZ;*xa?J3wQ7~@S0lUvbcLeq1Bg4o zH-bvQi|wt~L7q$~a-gDFP!{&TQfc3fX*6=uHv* zT&1&U(-)L%Xp^djI2?~eBF2cxC@YOP$+9d?P&h?lPy-9M2UT9fg5jKm1t$m#iWE{M zIf%q9@;fyT?0UP>tcw-bLkz;s2LlKl2qeP0w zECS7Ate+Awk|KQ+DOk;fl}Xsy4o^CY=pwq%QAAKKl628_yNPsK>?A>%D8fQG6IgdJ ztnxttBz#NI_a@fk7SU`WtrpsfZsNs9^0(2a z@C3#YO3>k~w7?2hipBf{#b6`}Xw1hlG$yi?;1dDs7k~xDAw@jiI*+tc;t2Lflg&bM)0!Y;0_@=w%`LW^8DsYpS#-bLOklX9r?Ei}TScw|4DbpW%+7 zFgAI)f51s}{y-eWb|vrU-Ya!GuYKP)J7z#*V_k^Xo>4!1Yqj*m)x&0L^tg3GJbVAJ zJ-Pl$R=NAabouV=^z_t;^K*0AvFs!vYU>_<|I^#c?>>CR<(T?=%{;U=aI*SbZADLH z&(f2wz_Y0??Tf|g;?|1Znw6}6U43Q#qNRwv1vp9uFn1)V#*4p&%$mP9x&15^OaBiDS(XppT|z^>;B{PLVEbS3IFYV yGvCsSX*m diff --git a/FluentTerminal.App/Assets/SplashScreen.scale-200.png b/FluentTerminal.App/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 023e7f1feda78d5100569825acedfd213a0d84e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7700 zcmeHLYj~4Yw%(;oxoEH#Kxq-eR|+VkP17b#Vk;?4QwkI+A{L04G+#<<(x#Un1#+h5>eArRq zTw$)ZvTWW_Y?bDho0nPVTh08+s`sp!j74rJTTtXIDww0SILedFv?sZ?yb@@}GN;#8 znk_b~Q(A0YR#uV4ef!osoV1M3;vQ8N$O|fStfgf$S5;ddUNv`tWtGjM;koG#N;7M< zP*84lnx(bn_KF&9Z5Ai$)#Cs3a|$OFw>WKCT$of*L7_CqQEinflT|W{JT+aKp-E0v zsxmYg)1(T>DROm+LN1eQw8}KCTp=C!$H7`PU!t9_Hw@TsTI2`udRZv*!a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53a}Uhm3BZI$N$6Se zLWlAmy1S0xKJm4G_U@sN_Tm=`$xWJSEwKU98rZ&)1R^*$$1vA3oG#&*%SMxY_~oGP zP&PFJatFLM-Ps%84IV-+Ow)T{C7cqUAvauy4C z(FRz&?6$Rypj{xO!`y=*J5o4@U8Q-(y5(*=YoKeZ+-1YdljXxkA#B)zo=FeQH#?Le zycNUmEEHWO9a=X^pb#&cOq7-`7UA87#|S22)<7RUtZo|(zibX=w;K3qur9vy#`MNV z6UUcf9ZwEnKCCp+OoBnF@OdbvH)ANXO0o~Pi9l8=x3))}L<#vO0-~O4!~--Ket?d} zJaqsj<@CD1%S2cTW%rOP{Vto%0sGW~1RMa_j^)5nil0Yw- z0EE#bP+l4#P^%PQ+N*oxu1Zq05xZ!bXfYTg>9c{(Iw*lnjR^>kz%lAN^zFce7rppy zY8zA~3GD=A6d*hze&l4D_wA~+O!56)BZTe_rEu}Ezi<4!kG|W#amBZ5{&XS2@6R~H z{9o^y*BkH4$~yX9U&@CgbOzX1bn9xqF|zh$Dh0Y5y*E0e90*$!ObrHY3Ok0`2=O~r zCuke6KrP9KOf?V(YDsM<6pX2nVoN%M$LT^q#FmtaF?1^27F*IcNX~XRB(|hCFvdcc zc)$=S-)acdk$g4?_>jRqxpI6M3vHZk?0c^3=byamYDNf;uB{3NlKW5IhnOS3DNkMV z?tK8?kJ}pmvp%&&eTVOVjHP`q34hN1@!aK}H(K!vI`~gf|Gv+FNEQD5Yd<~yX7k_l h&G-K)@HZb3BABY{)U1?^%I#E6`MGoTtustd{~yM6srvu` diff --git a/FluentTerminal.App/Assets/Square150x150Logo.scale-200.png b/FluentTerminal.App/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index af49fec1a5484db1d52a7f9b5ec90a27c7030186..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2937 zcma)84OCO-8BSud5)jwMLRVKgX(S?$n?Ld|vrsm<$CF7)&zTbyy1FE5bU`Q17MRv`9ue$;R(@8kR;#v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y|wA2g*5?`K?#7tzELQYNxGo$UB$4J8RJp1k(8Jj+~hMT zlN~>M@KTTh^--8y3PK_NZ@AC!{PT=CziBzGd+wTJ^@icH!Bd}%)g8V)%K?|c&WTUk zy}qv1C%(fjRoZ4ozC3{O%@5?)XzH35zHns$pgU*Q?fj4v?fp1Qbm+j;3l;9jam9Da zXVcKjPlQ73x78QPu|Ffm6x?`~e3oD=gl=4kYK?={kD5j~QCXU)`HSdduNNENzA*2$ zOm3PzF!lN5e*06-f1Uot67wY#{o-S1!KZ7E=!~7ynnk9_iJR#kFoNbAOT#^2Gd17F zMmvU6>lndZQGd|ax9kUoXXO+$N?|j@6qpsF&_j7YXvwo_C{JpmLw5&#e6k>atv%es z5)7r*Wvv_JkUpT}M!_o!nVlEk1Zbl=a*2hQ*<|%*K1Glj^FcF`6kTzGQ3lz~2tCc@ z&x|tj;aH&1&9HwcJBcT`;{?a+pnej;M1HO(6Z{#J!cZA04hnFl;NXA+&`=7bjW_^o zfC40u3LMG?NdPtwGl>Tq6u}*QG)}-y;)lu-_>ee3kibW(69n0$0Zy!}9rQz%*v1iO zT9_H>99yIrSPYVy6^);rR}7Yo=J_T@hi+qhTZXnVWyf;JDYm5#eYLTxr*?kiNn!+Y zQ+LUkBafNJ#rH#C(?d5^;gw9o#%daEI{mA*LHPIHPU`#|H$hD zwm>0&+kahQ)E#%~k>&5@&#Vg82H?s%71=)(soi@174pi9--2{w{1$}Sz4zGn3Du&x bht0Iza^2ykEt4(epJ78uh5nDlX8(TxzDYwP diff --git a/FluentTerminal.App/Assets/Square44x44Logo.scale-200.png b/FluentTerminal.App/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index ce342a2ec8a61291ba76c54604aea7e9d20af11b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1647 zcmaJ?eM}Q)7(e+G1Q(|`V9JhTI2>MkceK4;p;PR&$Pi?ejk3YQ_3o`S&|W_dsOZ8# zWPTt69g`t$ab`0cj-Y0yiBS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z6MK`kO$=jmt@FqggOhJ5j~e@ygRbG;<{Vu)*+nn9aQeo0;$#j;|MS=S$&L?BeV25z xs3B`@=#`5TF{^6(A1rvdY@|-RtQ|iS5{tyX+wH?;n8E)G$kykv-D^wh{{!TZT%7;_ diff --git a/FluentTerminal.App/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/FluentTerminal.App/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index f6c02ce97e0a802b85f6021e822c89f8bf57d5cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1255 zcmaJ>TWs4@7*5+{G#S+&C!qC#> zf>5N3P6jO*Cz>ug*(_DmW=)kea&m$gZ^+nyiF`;j%w@}y8)>p*SH}C`m?DXeieF2U zyQHecc_L%Gh!7GMt+hG06y;+|p4>m~}PjA}rKViGiEnn7G0ZO<>G|7q;2?NwGCM3s?eued6%hd$B+ z*kQJ{#~$S=DFE(%=E+UkmlEI*%3llUf~8Ja9YU1Vui0IbGBkW_gHB%Rd&!!ioX zs40O?i9I{};kle7GMvE7(rk`la=gTI)47=>%?q@^iL-nUo3}h4S}N-KHn8t5mVP8w z&bSErwp+37 zNJJ8?a|{r5Q3R0Z5s-LB1WHOwYC@7pCHWND#cL1cZ?{kJ368_*(UDWUDyb<}0y@o# zfMF016iMWPCb6obAxT$JlB6(2DrlXDTB&!0`!m??4F(qWMhjVZo?JXQmz`1*58Z=& zcDmB|S-E@j?BoFGix0flckqdS4jsPNzhfWyWIM98GxcLs89C(~dw%$_t;JjX-SD}E zfiGV;{8Q%8r}w9x>EEigW81>`kvnU@pK)4+xk9@+bNj9L!AAZ@SZ@q|)&BmY3+HZx zul~BeG4|}-;L%cHViQGQX?^zFfO0&#cHwel=d`lH9sJ-@Sl@n*(8J2>%Ac`IxyY?Q z{=GhWvC#gu-~Ia7*n{=+;qM?Ul_wy1+u7ho;=`>EwP^g~R@{unBds`!#@}tluZQpS zm)M~nYEifJWJGx?_6DcTy>#uh%>!H9=hb^(v`=m3F1{L>db=<5_tm+_&knAQ2EU$s Mu9UqpbNZeC0BbUo^Z)<= diff --git a/FluentTerminal.App/Assets/StoreLogo.png b/FluentTerminal.App/Assets/StoreLogo.png deleted file mode 100644 index 7385b56c0e4d3c6b0efe3324aa1194157d837826..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1451 zcmaJ>eN5D57_Z|bH;{0+1#mbl)eTU3{h)Wf7EZV?;HD@XL@{B`Ui%(2aMxQ~xdXSv z5nzWi(LW)U2=Vc-cY@s7nPt{i0hc6!7xN4NNHI#EQl>YNBy8l4%x9gr_W-j zEZMQmmTIy(>;lblRfh`dIyTgc9W5d!VP$L4(kKrN1c5G~(O_#xG zAJCNTstD^5SeXFB+&$h=ToJP2H>xr$iqPs-#O*;4(!Fjw25-!gEb*)mU}=)J;Iu>w zxK(5XoD0wrPSKQ~rbL^Cw6O_03*l*}i=ydbu7adJ6y;%@tjFeXIXT+ms30pmbOP%Q zX}S;+LBh8Tea~TSkHzvX6$rYb)+n&{kSbIqh|c7hmlxmwSiq5iVhU#iEQ<>a18|O^Sln-8t&+t`*{qBWo5M?wFM(JuimAOb5!K#D}XbslM@#1ZVz_;!9U zpfEpLAOz=0g@bd6Xj_ILi-x^!M}73h^o@}hM$1jflTs|Yuj9AL@A3<-?MV4!^4q`e z)fO@A;{9K^?W?DbnesnPr6kK>$zaKo&;FhFd(GYFCIU^T+OIMb%Tqo+P%oq(IdX7S zf6+HLO?7o0m+p>~Tp5UrXWh!UH!wZ5kv!E`_w)PTpI(#Iw{AS`gH4^b(bm^ZCq^FZ zY9DD7bH}rq9mg88+KgA$Zp!iWncuU2n1AuIa@=sWvUR-s`Qb{R*kk(SPU^`$6BXz8 zn#7yaFOIK%qGxyi`dYtm#&qqox0$h=pNi#u=M8zUG@bpiZ=3sT=1}Trr}39cC)H|v zbL?W)=&s4zrh)7>L(|cc%$1#!zfL?HjpeP%T+x_a+jZ16b^iKOHxFEX$7d|8${H-* zIrOJ5w&i$>*D>AKaIoYg`;{L@jM((Kt?$N$5OnuPqVvq**Nm}(f0wwOF%iX_Pba;V z;m@wxX&NcV3?<1+u?A{y_DIj7#m3Af1rCE)o`D&Y3}0%7E;iX1yMDiS)sh0wKi!36 zL!Wmq?P^Ku&rK~HJd97KkLTRl>ScGFYZNlYytWnhmuu|)L&ND8_PmkayQb{HOY640 bno1(wj@u8DCVuFR|31B*4ek@pZJqxCDDe1x diff --git a/FluentTerminal.App/Assets/Wide310x150Logo.scale-200.png b/FluentTerminal.App/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 288995b397fdbef1fb7e85afd71445d5de1952c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3204 zcmbVPeQXow8NYmBd90>}0NP?GhXW~VaeThm=a0tV#EwJMI!)6M3}|c4_Bl3=Kd>G0 z(GHx1wl<7(tP?FsOQkTilSo*iIvF%uArExJ73~P zSv1xEy!U(Wd4A9D`FQV@W3@F^qJ@PEF$@z`Z!*BbFsS(^?B zyiAzJ+q})bkgiQHWqEb*jJD-coHYr1^iocg)l!Qa{Xqs-l~6J}p-|##ZHYofskQ3$ zI0;xzXyhazBeXhIsg5A=%ufo@f)1yy&ScKS0;HF^!r_2UE^lpZEom(+@duma3awTv zCrCL-%D_SvYWIcdHkmI}#50(fkUi)Qgx!80ju>g1za^}ff>JI8Z@^-iCiaCgg@TgF z+vtE?Q9{VQUX&MW9SYYmGcxA14%N2@7FwBTD4N<(2{nWgV8$e3?-F=L^&FrtWn~(U_Q~~^uYiyeY6-KoTnfh9AWz@ zIKje0)u!_Lw)E}G!#kEfwKVdNt(UAf9*f>tEL_(=xco-T%jTi@7YlC3hs2ik%Le0H ztj}RTeCF(5mwvi3_56>-yB?l;J>-1%!9~=fs|QcNG3J~a@JCu`4SB460s0ZO+##4fFUSGLcj_ja^fL4&BKALfb#$6$O?>P@qx2Agl^x0i&ugt zsy5Pyu=()`7HRMG3IB7F1@`_ z+-!J%#i6e^U$e#+C%Q>_qVRzWRsG^W_n+@OcX@vzI&z;mzHNb!GQ?LWA(wtpqHqTM z1OFw_{Zn?fD)p)`c`kOgv{de=v@suGRqY{N^U7gI1VF3*F=obwaXI6ob5__Yn zVTguS!%(NI09J8x#AO_aW!9W7k*UvB;IWDFC3srwftr{kHj%g)fvnAm;&h_dnl~

MY- zf+K}sCe8qU6Ujs`3ua{U0Of$R_gVQBuUA za0v=mu#vIOqiiAZOr&h*$WyOw&k-xr$;G4Ixa!#TJNr>95(h>l%)PUy4p+^SgR(uR zta%k*?ny-+nAr8spEk1fo{J4i!b^Fia`N{_F6@zidA2ZTTrjl#^5Z-2KfB@Cu}l9s z(*|Z2jc?p~vn2f)3y9i*7zJV1L{$?|&q)4oaT;uXi6>1GkRXVTOzAz(RHEmr=eFIi z`}<>-Q?K0GN8!IYxeP1XKXO+jsJbp~o^);Bc;%b7Flpe7;1`Ny@3r7ZR;?R)aJt8C ziNlEC<@3f_lIV4TwV}&e;D!Ee5_|e#g0LUh=5vmYWYm7&2h*M>QPKvGh9-)wfMMW3 z8J9b%1k7dzPzO0_NGQy92BZ^FR6R~6;^6?lqO;-QUP4BY%cG%3vEhbm#>4vIhPBh3 z-+pZGjh$x%Hp{?=FHsMp0&wNPlj00us{&`1ZOZTqs8%4X&xH=UDr*xyBW(Zp&Em94 zf)ZSfn#yg0N)>!1kWdkqJ^S*z0FF5|fj&qcE#Na|%OY0$uO>!&hP+1ywfD_WXk@4J(?MBftK7>$Nvqh@tDuarN%PrTLQ2Uzysx>UV=V zk^RrDSvdQ?0;=hY67EgII-f4`t=+i*yS=Y~!XlqIy_4x&%+OdfbKOFPXS2X5%4R{N z$SQMX^AK6(fAtrue FluentTerminal.App_StoreKey.pfx 8FA8EF727E767FAE5409DDD1694C1CEE054A2962 - True + False Always x86|x64 @@ -99,11 +99,20 @@ App.xaml + - - + + + + + + + + + + @@ -113,6 +122,21 @@ SettingsPage.xaml + + ColorSettings.xaml + + + FontSettings.xaml + + + GeneralSettings.xaml + + + KeyBindingSettings.xaml + + + ShellSettings.xaml + TerminalView.xaml @@ -123,6 +147,8 @@ + + @@ -173,13 +199,6 @@ - - - - - - - @@ -194,11 +213,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -237,6 +352,26 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -262,6 +397,10 @@ + + {5EA40453-A0AA-449E-8406-D6EA51D7E70E} + FluentTerminal.Models + {BAAE6239-343F-454C-977F-F81F91715961} FluentTerminal.RuntimeComponent diff --git a/FluentTerminal.App/Models/TerminalConfiguration.cs b/FluentTerminal.App/Models/TerminalConfiguration.cs deleted file mode 100644 index 5bfbbba..0000000 --- a/FluentTerminal.App/Models/TerminalConfiguration.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FluentTerminal.App.Models -{ - public class TerminalConfiguration - { - public bool CursorBlinking { get; set; } - public string FontFamily { get; set; } - public int FontSize { get; set; } - } -} diff --git a/FluentTerminal.App/Models/TerminalSize.cs b/FluentTerminal.App/Models/TerminalSize.cs deleted file mode 100644 index 170a70f..0000000 --- a/FluentTerminal.App/Models/TerminalSize.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace FluentTerminal.App.Models -{ - public class TerminalSize - { - public TerminalSize(int columns, int rows) - { - Columns = columns; - Rows = rows; - } - - public int Columns { get; } - public int Rows { get; } - } -} \ No newline at end of file diff --git a/FluentTerminal.App/Package.appxmanifest b/FluentTerminal.App/Package.appxmanifest index 007eaa3..2f49700 100644 --- a/FluentTerminal.App/Package.appxmanifest +++ b/FluentTerminal.App/Package.appxmanifest @@ -30,6 +30,11 @@ + + + + + diff --git a/FluentTerminal.App/Services/IDefaultValueProvider.cs b/FluentTerminal.App/Services/IDefaultValueProvider.cs new file mode 100644 index 0000000..1637116 --- /dev/null +++ b/FluentTerminal.App/Services/IDefaultValueProvider.cs @@ -0,0 +1,9 @@ +using FluentTerminal.Models; + +namespace FluentTerminal.App.Services +{ + public interface IDefaultValueProvider + { + ShellConfiguration GetDefaultShellConfiguration(); + } +} diff --git a/FluentTerminal.App/Services/ISettingsService.cs b/FluentTerminal.App/Services/ISettingsService.cs new file mode 100644 index 0000000..e7668da --- /dev/null +++ b/FluentTerminal.App/Services/ISettingsService.cs @@ -0,0 +1,10 @@ +using FluentTerminal.Models; + +namespace FluentTerminal.App.Services +{ + public interface ISettingsService + { + ShellConfiguration GetShellConfiguration(); + void SaveShellConfiguration(ShellConfiguration spawnConfiguration); + } +} diff --git a/FluentTerminal.App/Services/ITerminalService.cs b/FluentTerminal.App/Services/ITerminalService.cs new file mode 100644 index 0000000..c0d5aca --- /dev/null +++ b/FluentTerminal.App/Services/ITerminalService.cs @@ -0,0 +1,11 @@ +using FluentTerminal.Models; +using System.Threading.Tasks; + +namespace FluentTerminal.App.Services +{ + public interface ITerminalService + { + Task CreateTerminal(TerminalSize size, ShellConfiguration shellConfiguration); + Task ResizeTerminal(int id, TerminalSize size); + } +} diff --git a/FluentTerminal.App/Services/Implementation/DefaultValueProvider.cs b/FluentTerminal.App/Services/Implementation/DefaultValueProvider.cs new file mode 100644 index 0000000..aad8553 --- /dev/null +++ b/FluentTerminal.App/Services/Implementation/DefaultValueProvider.cs @@ -0,0 +1,19 @@ +using FluentTerminal.Models; +using FluentTerminal.Models.Enums; + +namespace FluentTerminal.App.Services.Implementation +{ + internal class DefaultValueProvider : IDefaultValueProvider + { + public ShellConfiguration GetDefaultShellConfiguration() + { + return new ShellConfiguration + { + Shell = ShellType.PowerShell, + CustomShellLocation = string.Empty, + WorkingDirectory = string.Empty, + Arguments = string.Empty + }; + } + } +} diff --git a/FluentTerminal.App/Services/Implementation/SettingsService.cs b/FluentTerminal.App/Services/Implementation/SettingsService.cs new file mode 100644 index 0000000..e337734 --- /dev/null +++ b/FluentTerminal.App/Services/Implementation/SettingsService.cs @@ -0,0 +1,38 @@ +using FluentTerminal.App.Utilities; +using FluentTerminal.Models; +using Windows.Storage; + +namespace FluentTerminal.App.Services.Implementation +{ + internal class SettingsService : ISettingsService + { + private readonly IDefaultValueProvider _defaultValueProvider; + private ApplicationDataContainer _localSettings; + private ApplicationDataContainer _roamingSettings; + + public SettingsService(IDefaultValueProvider defaultValueProvider) + { + _defaultValueProvider = defaultValueProvider; + _localSettings = ApplicationData.Current.LocalSettings; + _roamingSettings = ApplicationData.Current.RoamingSettings; + ApplicationData.Current.DataChanged += OnDataChanged; + } + + private void OnDataChanged(ApplicationData sender, object args) + { + //todo handle data changed for roaming settings + } + + public ShellConfiguration GetShellConfiguration() + { + return _localSettings.ReadValueFromJson(nameof(ShellConfiguration), _defaultValueProvider.GetDefaultShellConfiguration()); + } + + public void SaveShellConfiguration(ShellConfiguration spawnConfiguration) + { + _localSettings.WriteValueAsJson(nameof(ShellConfiguration), spawnConfiguration); + } + + + } +} diff --git a/FluentTerminal.App/Services/Implementation/TerminalService.cs b/FluentTerminal.App/Services/Implementation/TerminalService.cs new file mode 100644 index 0000000..28ed3e8 --- /dev/null +++ b/FluentTerminal.App/Services/Implementation/TerminalService.cs @@ -0,0 +1,37 @@ +using System; +using System.Threading.Tasks; +using FluentTerminal.App.Utilities; +using FluentTerminal.Models; +using Windows.Web.Http; + +namespace FluentTerminal.App.Services.Implementation +{ + internal class TerminalService : ITerminalService + { + private readonly HttpClient _httpClient; + + public TerminalService() + { + _httpClient = new HttpClient(); + } + + public async Task CreateTerminal(TerminalSize size, ShellConfiguration shellConfiguration) + { + var request = new CreateTerminalRequest + { + Size = size, + Configuration = shellConfiguration + }; + + var response = await _httpClient.PostAsync(new Uri($"http://localhost:9000/terminals"), HttpJsonContent.From(request)); + var createTerminalResponse = await response.Content.ReadAs(); + + return createTerminalResponse; + } + + public Task ResizeTerminal(int id, TerminalSize size) + { + return _httpClient.PostAsync(new Uri($"http://localhost:9000/terminals/{id}/resize"), HttpJsonContent.From(size)).AsTask(); + } + } +} diff --git a/FluentTerminal.App/Utilities/ApplicationDataContainerExtensions.cs b/FluentTerminal.App/Utilities/ApplicationDataContainerExtensions.cs new file mode 100644 index 0000000..62c797b --- /dev/null +++ b/FluentTerminal.App/Utilities/ApplicationDataContainerExtensions.cs @@ -0,0 +1,23 @@ +using Newtonsoft.Json; +using Windows.Storage; + +namespace FluentTerminal.App.Utilities +{ + public static class ApplicationDataContainerExtensions + { + public static T ReadValueFromJson(this ApplicationDataContainer container, string name, T fallbackValue) + { + if (container.Values.TryGetValue(name, out object value)) + { + JsonConvert.PopulateObject((string)value, fallbackValue); + } + return fallbackValue; + } + + public static void WriteValueAsJson(this ApplicationDataContainer container, string name, T value) + { + var serialized = JsonConvert.SerializeObject(value); + container.Values[name] = serialized; + } + } +} diff --git a/FluentTerminal.App/Utilities/HttpJsonContent.cs b/FluentTerminal.App/Utilities/HttpJsonContent.cs new file mode 100644 index 0000000..51ecd19 --- /dev/null +++ b/FluentTerminal.App/Utilities/HttpJsonContent.cs @@ -0,0 +1,14 @@ +using Newtonsoft.Json; +using Windows.Web.Http; + +namespace FluentTerminal.App.Utilities +{ + public static class HttpJsonContent + { + public static HttpStringContent From(object content) + { + var serialized = JsonConvert.SerializeObject(content); + return new HttpStringContent(serialized, Windows.Storage.Streams.UnicodeEncoding.Utf8, "application/json"); + } + } +} diff --git a/FluentTerminal.App/Utilities/IHttpContentExtensions.cs b/FluentTerminal.App/Utilities/IHttpContentExtensions.cs new file mode 100644 index 0000000..29213ab --- /dev/null +++ b/FluentTerminal.App/Utilities/IHttpContentExtensions.cs @@ -0,0 +1,16 @@ +using Newtonsoft.Json; +using System; +using System.Threading.Tasks; +using Windows.Web.Http; + +namespace FluentTerminal.App.Utilities +{ + public static class IHttpContentExtensions + { + public static async Task ReadAs(this IHttpContent content) + { + var contentBody = await content.ReadAsStringAsync(); + return JsonConvert.DeserializeObject(contentBody); + } + } +} diff --git a/FluentTerminal.App/ViewModels/MainViewModel.cs b/FluentTerminal.App/ViewModels/MainViewModel.cs index 60b8671..35e03a1 100644 --- a/FluentTerminal.App/ViewModels/MainViewModel.cs +++ b/FluentTerminal.App/ViewModels/MainViewModel.cs @@ -1,24 +1,32 @@ -using GalaSoft.MvvmLight; +using FluentTerminal.App.Services; +using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using System.Collections.ObjectModel; +using System.Threading.Tasks; namespace FluentTerminal.App.ViewModels { public class MainViewModel : ViewModelBase { + private readonly ISettingsService _settingsService; + private readonly ITerminalService _terminalService; private TerminalViewModel _selectedTerminal; private string _title; - public MainViewModel() + public MainViewModel(ISettingsService settingsService, ITerminalService terminalService) { + _settingsService = settingsService; + _terminalService = terminalService; Title = "Fluent Terminal"; AddTerminalCommand = new RelayCommand(AddTerminal); + ShowSettingsCommand = new RelayCommand(async () => await ShowSettings()); AddTerminal(); } public RelayCommand AddTerminalCommand { get; } + public RelayCommand ShowSettingsCommand { get; } public TerminalViewModel SelectedTerminal { @@ -36,7 +44,7 @@ namespace FluentTerminal.App.ViewModels private void AddTerminal() { - var terminal = new TerminalViewModel(); + var terminal = new TerminalViewModel(_settingsService, _terminalService); terminal.PropertyChanged += (s, e) => { if (e.PropertyName == nameof(TerminalViewModel.Title) && Terminals.Count == 1) @@ -48,5 +56,10 @@ namespace FluentTerminal.App.ViewModels SelectedTerminal = terminal; } + + private Task ShowSettings() + { + return App.Instance.ShowSettings(); + } } } \ No newline at end of file diff --git a/FluentTerminal.App/ViewModels/SettingsViewModel.cs b/FluentTerminal.App/ViewModels/SettingsViewModel.cs new file mode 100644 index 0000000..fb746b3 --- /dev/null +++ b/FluentTerminal.App/ViewModels/SettingsViewModel.cs @@ -0,0 +1,157 @@ +using FluentTerminal.App.Services; +using FluentTerminal.Models; +using FluentTerminal.Models.Enums; +using GalaSoft.MvvmLight; +using GalaSoft.MvvmLight.Command; +using System; +using System.Threading.Tasks; +using Windows.Storage.Pickers; +using Windows.UI.Popups; + +namespace FluentTerminal.App.ViewModels +{ + public class SettingsViewModel : ViewModelBase + { + private readonly ISettingsService _settingsService; + private readonly IDefaultValueProvider _defaultValueProvider; + private ShellConfiguration _shellConfiguration; + + public SettingsViewModel(ISettingsService settingsService, IDefaultValueProvider defaultValueProvider) + { + _settingsService = settingsService; + _defaultValueProvider = defaultValueProvider; + + BrowseForCustomShellCommand = new RelayCommand(async () => await BrowseForCustomShell()); + BrowseForWorkingDirectoryCommand = new RelayCommand(async () => await BrowseForWorkingDirectory()); + RestoreDefaultsCommand = new RelayCommand(async (area) => await RestoreDefaults(area)); + + _shellConfiguration = _settingsService.GetShellConfiguration(); + ShellType = _shellConfiguration.Shell; + } + + public RelayCommand BrowseForCustomShellCommand { get; } + public RelayCommand BrowseForWorkingDirectoryCommand { get; } + public RelayCommand RestoreDefaultsCommand { get; } + + public bool CMDIsSelected + { + get => ShellType == ShellType.CMD; + set => ShellType = ShellType.CMD; + } + + public bool CustomShellIsSelected + { + get => ShellType == ShellType.Custom; + set => ShellType = ShellType.Custom; + } + + public string CustomShellLocation + { + get => _shellConfiguration.CustomShellLocation; + set + { + if (_shellConfiguration.CustomShellLocation != value) + { + _shellConfiguration.CustomShellLocation = value; + _settingsService.SaveShellConfiguration(_shellConfiguration); + RaisePropertyChanged(); + } + } + } + + public string WorkingDirectory + { + get => _shellConfiguration.WorkingDirectory; + set + { + if (_shellConfiguration.WorkingDirectory != value) + { + _shellConfiguration.WorkingDirectory = value; + _settingsService.SaveShellConfiguration(_shellConfiguration); + RaisePropertyChanged(); + } + } + } + + public string Arguments + { + get => _shellConfiguration.Arguments; + set + { + if (_shellConfiguration.Arguments != value) + { + _shellConfiguration.Arguments = value; + _settingsService.SaveShellConfiguration(_shellConfiguration); + RaisePropertyChanged(); + } + } + } + + public bool PoweShellIsSelected + { + get => ShellType == ShellType.PowerShell; + set => ShellType = ShellType.PowerShell; + } + + public ShellType ShellType + { + get => _shellConfiguration.Shell; + set + { + if (_shellConfiguration.Shell != value) + { + _shellConfiguration.Shell = value; + _settingsService.SaveShellConfiguration(_shellConfiguration); + RaisePropertyChanged(); + RaisePropertyChanged(nameof(CustomShellIsSelected)); + RaisePropertyChanged(nameof(PoweShellIsSelected)); + RaisePropertyChanged(nameof(CMDIsSelected)); + } + } + } + + private async Task BrowseForCustomShell() + { + var picker = new FileOpenPicker(); + picker.SuggestedStartLocation = PickerLocationId.ComputerFolder; + picker.FileTypeFilter.Add(".exe"); + + var file = await picker.PickSingleFileAsync().AsTask(); + if (file != null) + { + CustomShellLocation = file.Path; + } + } + + private async Task BrowseForWorkingDirectory() + { + var picker = new FolderPicker(); + picker.FileTypeFilter.Add(".whatever"); // else a ComException is thrown + picker.SuggestedStartLocation = PickerLocationId.ComputerFolder; + + var folder = await picker.PickSingleFolderAsync(); + if (folder != null) + { + WorkingDirectory = folder.Path; + } + } + + private async Task RestoreDefaults(string area) + { + var dialog = new MessageDialog("Are you sure you want to restore default values for this page?", "Please confirm"); + dialog.Commands.Add(new UICommand("OK")); + dialog.Commands.Add(new UICommand("Cancel")); + + var result = await dialog.ShowAsync(); + + if (result.Label == "OK" && area == "shell") + { + var defaults = _defaultValueProvider.GetDefaultShellConfiguration(); + ShellType = defaults.Shell; + CustomShellLocation = defaults.CustomShellLocation; + WorkingDirectory = defaults.WorkingDirectory; + Arguments = defaults.Arguments; + } + } + } +} \ No newline at end of file diff --git a/FluentTerminal.App/ViewModels/TerminalViewModel.cs b/FluentTerminal.App/ViewModels/TerminalViewModel.cs index 1826458..919ebbc 100644 --- a/FluentTerminal.App/ViewModels/TerminalViewModel.cs +++ b/FluentTerminal.App/ViewModels/TerminalViewModel.cs @@ -1,21 +1,24 @@ -using FluentTerminal.App.Models; +using FluentTerminal.App.Services; using FluentTerminal.App.Views; +using FluentTerminal.Models; using GalaSoft.MvvmLight; using System; using System.Threading.Tasks; +using Windows.UI.Popups; using Windows.UI.Xaml; -using Windows.Web.Http; namespace FluentTerminal.App.ViewModels { public class TerminalViewModel : ViewModelBase { - private static HttpClient _httpClient; private ITerminalView _terminalView; private string _title; private string _resizeOverlayContent; private bool _showResizeOverlay; private DispatcherTimer _resizeOverlayTimer; + private readonly ISettingsService _settingsService; + private readonly ITerminalService _terminalService; + private int _terminalId; public int Id { get; private set; } @@ -32,11 +35,6 @@ namespace FluentTerminal.App.ViewModels get => _showResizeOverlay; set { - if (!Initialized) - { - return; - } - Set(ref _showResizeOverlay, value); if (value) { @@ -55,8 +53,10 @@ namespace FluentTerminal.App.ViewModels set => Set(ref _resizeOverlayContent, value); } - public TerminalViewModel() + public TerminalViewModel(ISettingsService settingsService, ITerminalService terminalService) { + _settingsService = settingsService; + _terminalService = terminalService; _resizeOverlayTimer = new DispatcherTimer(); _resizeOverlayTimer.Interval = new TimeSpan(0, 0, 2); _resizeOverlayTimer.Tick += OnResizeOverlayTimerFinished; @@ -68,25 +68,29 @@ namespace FluentTerminal.App.ViewModels ShowResizeOverlay = false; } - static TerminalViewModel() - { - _httpClient = new HttpClient(); - } - public async Task OnViewIsReady(ITerminalView terminalView) { _terminalView = terminalView; - _terminalView.TerminalSizeChanged += OnTerminalSizeChanged; - _terminalView.TerminalTitleChanged += OnTerminalTitleChanged; - var size = await _terminalView.CreateTerminal(null); + var size = await _terminalView.CreateTerminal(); + var configuration = _settingsService.GetShellConfiguration(); - var response = await _httpClient.PostAsync(new Uri($"http://localhost:9000/terminals?cols={size.Columns}&rows={size.Rows}"), null); - var url = await response.Content.ReadAsStringAsync(); - Id = int.Parse(url.Split(":")[2].Trim('"')); + var response = await _terminalService.CreateTerminal(size, configuration); - await _terminalView.ConnectToSocket(url); - Initialized = true; + if (response.Success) + { + _terminalId = response.Id; + _terminalView.TerminalSizeChanged += OnTerminalSizeChanged; + _terminalView.TerminalTitleChanged += OnTerminalTitleChanged; + + await _terminalView.ConnectToSocket(response.WebSocketUrl); + Initialized = true; + } + else + { + var dialog = new MessageDialog(response.Error, "Error"); + await dialog.ShowAsync(); + } } private void OnTerminalTitleChanged(object sender, string e) @@ -96,9 +100,13 @@ namespace FluentTerminal.App.ViewModels private async void OnTerminalSizeChanged(object sender, TerminalSize e) { + if (!Initialized) + { + return; + } ResizeOverlayContent = $"{e.Columns} x {e.Rows}"; ShowResizeOverlay = true; - await _httpClient.PostAsync(new Uri($"http://localhost:9000/terminals/{Id}/size?cols={e.Columns}&rows={e.Rows}"), null); + await _terminalService.ResizeTerminal(_terminalId, e); } } } diff --git a/FluentTerminal.App/Views/ITerminalView.cs b/FluentTerminal.App/Views/ITerminalView.cs index fdece5e..e14cf11 100644 --- a/FluentTerminal.App/Views/ITerminalView.cs +++ b/FluentTerminal.App/Views/ITerminalView.cs @@ -1,4 +1,4 @@ -using FluentTerminal.App.Models; +using FluentTerminal.Models; using System; using System.Threading.Tasks; @@ -9,7 +9,7 @@ namespace FluentTerminal.App.Views event EventHandler TerminalSizeChanged; event EventHandler TerminalTitleChanged; - Task CreateTerminal(TerminalConfiguration configuration); + Task CreateTerminal(); Task ConnectToSocket(string url); } } \ No newline at end of file diff --git a/FluentTerminal.App/Views/MainPage.xaml b/FluentTerminal.App/Views/MainPage.xaml index d307ddf..12d9fae 100644 --- a/FluentTerminal.App/Views/MainPage.xaml +++ b/FluentTerminal.App/Views/MainPage.xaml @@ -31,16 +31,17 @@ - + diff --git a/FluentTerminal.App/Views/MainPage.xaml.cs b/FluentTerminal.App/Views/MainPage.xaml.cs index b06e38e..fe083b6 100644 --- a/FluentTerminal.App/Views/MainPage.xaml.cs +++ b/FluentTerminal.App/Views/MainPage.xaml.cs @@ -3,9 +3,11 @@ using System.ComponentModel; using Windows.ApplicationModel.Core; using Windows.UI; using Windows.UI.Core; +using Windows.UI.Core.Preview; using Windows.UI.ViewManagement; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Navigation; namespace FluentTerminal.App.Views { @@ -32,11 +34,10 @@ namespace FluentTerminal.App.Views } } - public MainViewModel ViewModel { get; } + public MainViewModel ViewModel { get; private set; } public MainPage() { - ViewModel = App.Instance.Resolve(); InitializeComponent(); Root.DataContext = this; SetTitleBarColors(); @@ -44,6 +45,20 @@ namespace FluentTerminal.App.Views Loaded += OnLoaded; Unloaded += OnUnloaded; Window.Current.Activated += OnWindowActivated; + SystemNavigationManagerPreview.GetForCurrentView().CloseRequested += OnCloseRequest; + } + + protected override void OnNavigatedTo(NavigationEventArgs e) + { + if (e.Parameter is MainViewModel viewModel) + { + ViewModel = viewModel; + } + } + + private void OnCloseRequest(object sender, SystemNavigationCloseRequestedPreviewEventArgs e) + { + App.Instance.TerminalWindowClosed(); } private async void OnWindowActivated(object sender, WindowActivatedEventArgs e) @@ -91,10 +106,5 @@ namespace FluentTerminal.App.Views PropertyChanged(this, new PropertyChangedEventArgs(nameof(CoreTitleBarPadding))); } } - - private async void OnSettingsButtonClick(object sender, RoutedEventArgs e) - { - await App.Instance.ShowSettings(); - } } } diff --git a/FluentTerminal.App/Views/SettingsPage.xaml b/FluentTerminal.App/Views/SettingsPage.xaml index 69ec4c4..2dd9c3c 100644 --- a/FluentTerminal.App/Views/SettingsPage.xaml +++ b/FluentTerminal.App/Views/SettingsPage.xaml @@ -2,12 +2,95 @@ x:Class="FluentTerminal.App.Views.SettingsPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:converters="using:FluentTerminal.App.Converters" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:local="using:FluentTerminal.App.Views" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/FluentTerminal.App/Views/SettingsPage.xaml.cs b/FluentTerminal.App/Views/SettingsPage.xaml.cs index 758e541..d312948 100644 --- a/FluentTerminal.App/Views/SettingsPage.xaml.cs +++ b/FluentTerminal.App/Views/SettingsPage.xaml.cs @@ -1,12 +1,87 @@ -using Windows.UI.Xaml.Controls; +using FluentTerminal.App.ViewModels; +using FluentTerminal.App.Views.SettingsPages; +using System.Linq; +using Windows.ApplicationModel.Core; +using Windows.UI; +using Windows.UI.Core.Preview; +using Windows.UI.ViewManagement; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Navigation; namespace FluentTerminal.App.Views { public sealed partial class SettingsPage : Page { + public double CoreTitleBarHeight { get; } + + public SettingsViewModel ViewModel { get; private set; } + public SettingsPage() { - this.InitializeComponent(); + InitializeComponent(); + Root.DataContext = this; + + ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar; + titleBar.ButtonBackgroundColor = Colors.Transparent; + titleBar.ButtonInactiveBackgroundColor = Colors.Transparent; + titleBar.ButtonForegroundColor = (Color)this.Resources["SystemBaseHighColor"]; + + ApplicationView.GetForCurrentView().Title = "Settings"; + + CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar; + coreTitleBar.LayoutMetricsChanged += TitleBar_LayoutMetricsChanged; + CoreTitleBarHeight = coreTitleBar.Height; + + SystemNavigationManagerPreview.GetForCurrentView().CloseRequested += SettingsPage_CloseRequested; + } + + protected override void OnNavigatedTo(NavigationEventArgs e) + { + if (e.Parameter is SettingsViewModel viewModel) + { + ViewModel = viewModel; + } + } + + private void SettingsPage_CloseRequested(object sender, SystemNavigationCloseRequestedPreviewEventArgs e) + { + App.Instance.SettingsWindowClosed(); + } + + private void TitleBar_LayoutMetricsChanged(CoreApplicationViewTitleBar sender, object args) + { + AppTitle.Margin = new Thickness(CoreApplication.GetCurrentView().TitleBar.SystemOverlayLeftInset + 12, 8, 0, 0); + } + + private void NavigationView_Loaded(object sender, RoutedEventArgs e) + { + NavigationView.SelectedItem = NavigationView.MenuItems.Cast().FirstOrDefault(m => m.Tag.ToString() == "shell"); + } + + private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) + { + if (args.SelectedItem is NavigationViewItem item) + { + switch (item.Tag) + { + case "general": + ContentFrame.Navigate(typeof(GeneralSettings), ViewModel); + break; + case "shell": + ContentFrame.Navigate(typeof(ShellSettings), ViewModel); + break; + case "colors": + ContentFrame.Navigate(typeof(ColorSettings), ViewModel); + break; + case "font": + ContentFrame.Navigate(typeof(FontSettings), ViewModel); + break; + case "keyBindings": + ContentFrame.Navigate(typeof(KeyBindingSettings), ViewModel); + break; + } + } } } } diff --git a/FluentTerminal.App/Views/SettingsPages/ColorSettings.xaml b/FluentTerminal.App/Views/SettingsPages/ColorSettings.xaml new file mode 100644 index 0000000..10550ea --- /dev/null +++ b/FluentTerminal.App/Views/SettingsPages/ColorSettings.xaml @@ -0,0 +1,11 @@ + + + + diff --git a/FluentTerminal.App/Views/SettingsPages/ColorSettings.xaml.cs b/FluentTerminal.App/Views/SettingsPages/ColorSettings.xaml.cs new file mode 100644 index 0000000..0af2252 --- /dev/null +++ b/FluentTerminal.App/Views/SettingsPages/ColorSettings.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// Die Elementvorlage "Leere Seite" wird unter https://go.microsoft.com/fwlink/?LinkId=234238 dokumentiert. + +namespace FluentTerminal.App.Views.SettingsPages +{ + ///

+ /// Eine leere Seite, die eigenständig verwendet oder zu der innerhalb eines Rahmens navigiert werden kann. + /// + public sealed partial class ColorSettings : Page + { + public ColorSettings() + { + this.InitializeComponent(); + } + } +} diff --git a/FluentTerminal.App/Views/SettingsPages/FontSettings.xaml b/FluentTerminal.App/Views/SettingsPages/FontSettings.xaml new file mode 100644 index 0000000..3feafa0 --- /dev/null +++ b/FluentTerminal.App/Views/SettingsPages/FontSettings.xaml @@ -0,0 +1,11 @@ + + + + diff --git a/FluentTerminal.App/Views/SettingsPages/FontSettings.xaml.cs b/FluentTerminal.App/Views/SettingsPages/FontSettings.xaml.cs new file mode 100644 index 0000000..c5565d7 --- /dev/null +++ b/FluentTerminal.App/Views/SettingsPages/FontSettings.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// Die Elementvorlage "Leere Seite" wird unter https://go.microsoft.com/fwlink/?LinkId=234238 dokumentiert. + +namespace FluentTerminal.App.Views.SettingsPages +{ + /// + /// Eine leere Seite, die eigenständig verwendet oder zu der innerhalb eines Rahmens navigiert werden kann. + /// + public sealed partial class FontSettings : Page + { + public FontSettings() + { + this.InitializeComponent(); + } + } +} diff --git a/FluentTerminal.App/Views/SettingsPages/GeneralSettings.xaml b/FluentTerminal.App/Views/SettingsPages/GeneralSettings.xaml new file mode 100644 index 0000000..b4dd2dd --- /dev/null +++ b/FluentTerminal.App/Views/SettingsPages/GeneralSettings.xaml @@ -0,0 +1,10 @@ + + + diff --git a/FluentTerminal.App/Views/SettingsPages/GeneralSettings.xaml.cs b/FluentTerminal.App/Views/SettingsPages/GeneralSettings.xaml.cs new file mode 100644 index 0000000..251ca34 --- /dev/null +++ b/FluentTerminal.App/Views/SettingsPages/GeneralSettings.xaml.cs @@ -0,0 +1,12 @@ +using Windows.UI.Xaml.Controls; + +namespace FluentTerminal.App.Views.SettingsPages +{ + public sealed partial class GeneralSettings : Page + { + public GeneralSettings() + { + this.InitializeComponent(); + } + } +} diff --git a/FluentTerminal.App/Views/SettingsPages/KeyBindingSettings.xaml b/FluentTerminal.App/Views/SettingsPages/KeyBindingSettings.xaml new file mode 100644 index 0000000..8d569de --- /dev/null +++ b/FluentTerminal.App/Views/SettingsPages/KeyBindingSettings.xaml @@ -0,0 +1,11 @@ + + + + diff --git a/FluentTerminal.App/Views/SettingsPages/KeyBindingSettings.xaml.cs b/FluentTerminal.App/Views/SettingsPages/KeyBindingSettings.xaml.cs new file mode 100644 index 0000000..a7552ed --- /dev/null +++ b/FluentTerminal.App/Views/SettingsPages/KeyBindingSettings.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// Die Elementvorlage "Leere Seite" wird unter https://go.microsoft.com/fwlink/?LinkId=234238 dokumentiert. + +namespace FluentTerminal.App.Views.SettingsPages +{ + /// + /// Eine leere Seite, die eigenständig verwendet oder zu der innerhalb eines Rahmens navigiert werden kann. + /// + public sealed partial class KeyBindingSettings : Page + { + public KeyBindingSettings() + { + this.InitializeComponent(); + } + } +} diff --git a/FluentTerminal.App/Views/SettingsPages/ShellSettings.xaml b/FluentTerminal.App/Views/SettingsPages/ShellSettings.xaml new file mode 100644 index 0000000..422c9e9 --- /dev/null +++ b/FluentTerminal.App/Views/SettingsPages/ShellSettings.xaml @@ -0,0 +1,52 @@ + + + + + + + + + + +