diff --git a/windows/src/desktop/kmshell/main/Keyman.System.UpdateCheckStorage.pas b/windows/src/desktop/kmshell/main/Keyman.System.UpdateCheckStorage.pas index 376721c6bb..a7a822df7c 100644 --- a/windows/src/desktop/kmshell/main/Keyman.System.UpdateCheckStorage.pas +++ b/windows/src/desktop/kmshell/main/Keyman.System.UpdateCheckStorage.pas @@ -70,18 +70,13 @@ end; class function TUpdateCheckStorage.HasKeymanInstallFile(const data: TUpdateCheckResponse): Boolean; var - i : Integer; - fileName : string; - f: TSearchRec; + fileExtension: string; begin - Result := False; - for i := 0 to High(data.Packages) do - begin - fileName := data.Packages[i].FileName; - if FindFirst(fileName + '*.exe', 0, f) = 0 then - Result := True; - System.SysUtils.FindClose(f); - end; + fileExtension := LowerCase(ExtractFileExt(data.FileName)); + if fileExtension = '.exe' then + Result := True + else + Result := False end; end. diff --git a/windows/src/desktop/kmshell/main/UfrmMain.pas b/windows/src/desktop/kmshell/main/UfrmMain.pas index cb206e0291..bd341e70dc 100644 --- a/windows/src/desktop/kmshell/main/UfrmMain.pas +++ b/windows/src/desktop/kmshell/main/UfrmMain.pas @@ -825,6 +825,9 @@ begin end; procedure TfrmMain.Update_CheckNow; +// TODO: epic-windows-update +// Get an instance to the state machine and call handle check so the state can change to update +// available. var UpdateCheck : TRemoteUpdateCheck; begin UpdateCheck := TRemoteUpdateCheck.Create(True); diff --git a/windows/src/desktop/kmshell/xml/config.css b/windows/src/desktop/kmshell/xml/config.css index 4a433082a1..8a8ebf7ed2 100644 --- a/windows/src/desktop/kmshell/xml/config.css +++ b/windows/src/desktop/kmshell/xml/config.css @@ -499,6 +499,20 @@ table tr padding: 1px 0 1px 10px; } +.grid_container_update { + display: grid; + position: relative; + grid-template-columns: 50px 1fr 1fr 1fr; + margin: 10px 50px 10px 64px; + /* From https://geary.co/internal-borders-css-grid/ */ + overflow: hidden; + gap: var(--gap); + --gap: 2em; + --line-offset: calc(var(--gap) / 2); + --line-thickness: 1px; + --line-color: black; +} + .grid_container.grid_disabled { opacity: 0.5; @@ -508,11 +522,36 @@ table tr { position: relative; font-size: 12px; - margin: 0px; padding: 1px; margin: 0 0 0 5px; } +.grid_item::before, +.grid_item::after +{ + content: ''; + position: absolute; + background-color: var(--line-color); + z-index: 1; +} + +/* row borders */ +.grid_item::after +{ + inline-size: 100vw; + block-size: var(--line-thickness); + inset-inline-start: 0; + inset-block-start: calc(var(--line-offset) * -1); +} + +/* column borders */ +.grid_item::before +{ + inline-size: var(--line-thickness); + block-size: 100vh; + inset-inline-start: calc(var(--line-offset) * -1); +} + .grid_item_title{ font-weight: bold; } @@ -1093,9 +1132,42 @@ th height: 16px; } +.update_title +{ + background: url('keyman-title.png') 96px 13px no-repeat; + height: 60px; +} + +.update_title img +{ + margin: 13px 0 0 10px; +} + +.update_edition +{ + float: left; + font-size: 16px; + margin-left: 64px; +} + +#update_status +{ + font-size: 13px; + margin-left: 64px; + margin-top: 30px; +} + #update_content { height: 100%; overflow: hidden; + display: flex; + flex-direction: column; + padding: 5px 10px 5px 10px; +} + +.update_controls +{ + margin-left: 64px; } /* QRCodes */ diff --git a/windows/src/desktop/kmshell/xml/keyman_update.xsl b/windows/src/desktop/kmshell/xml/keyman_update.xsl index 074e78d4ed..0daa6ace3b 100644 --- a/windows/src/desktop/kmshell/xml/keyman_update.xsl +++ b/windows/src/desktop/kmshell/xml/keyman_update.xsl @@ -2,6 +2,8 @@ + +
@@ -16,31 +18,47 @@
-  
+  
-
Updates are available which will be applied when Windows is next restarted:
+
+ + Updates are available which will be applied when Windows is next restarted: + + + No updates are available. + +
-
+
+
Select
+
+
+
- - - - - - - -
-
- - - keyman:update_applynow - 220px - +
+ + + + + + keyman:update_applynow + 220px + + + + + + + 220px + 1 + + + @@ -56,49 +74,49 @@ - - - - javascript:updateTick(""); - Update_ - checked - Update_ - - - Update__RequiresAdmin - - + +
+ + javascript:updateTick(""); + Update_ + checked + Update_ + + + Update__RequiresAdmin + +
- +
- - +
+
- - +
+
- +
- +
- - +
+
- - +
+
- +
- +
@@ -107,13 +125,12 @@
- - +
+
- +
- diff --git a/windows/src/desktop/kmshell/xml/menuframe_update.jpg b/windows/src/desktop/kmshell/xml/menuframe_update.jpg deleted file mode 100644 index 6eeb76bfd6..0000000000 Binary files a/windows/src/desktop/kmshell/xml/menuframe_update.jpg and /dev/null differ diff --git a/windows/src/desktop/kmshell/xml/menuframe_update.png b/windows/src/desktop/kmshell/xml/menuframe_update.png new file mode 100644 index 0000000000..5a7bc9d47b Binary files /dev/null and b/windows/src/desktop/kmshell/xml/menuframe_update.png differ