Skip to content

Commit

Permalink
Merge pull request #825 from openSUSE/fix-installation-finished
Browse files Browse the repository at this point in the history
Display the "InstallationFinished" again
  • Loading branch information
imobachgs committed Oct 27, 2023
2 parents ff4fc26 + 98de4af commit eec3080
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
6 changes: 6 additions & 0 deletions web/package/cockpit-agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Oct 27 10:25:46 UTC 2023 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Display the "Congratulations" message at the end of the
installation again (gh#openSUSE/agama#825).

-------------------------------------------------------------------
Thu Oct 26 16:07:02 UTC 2023 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion web/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function App() {
}

if (phase === INSTALL) {
return <Installation />;
return <Installation status={status} />;
}

return <Outlet />;
Expand Down
12 changes: 2 additions & 10 deletions web/src/components/core/Installation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,11 @@
* find current contact information at www.suse.com.
*/

import React, { useEffect, useState } from "react";
import { useInstallerClient } from "~/context/installer";
import React from "react";
import { InstallationProgress, InstallationFinished } from "~/components/core";
import { IDLE } from "~/client/status";

function Installation() {
const client = useInstallerClient();
const [status, setStatus] = useState(undefined);

useEffect(() =>
client.manager.onStatusChange(setStatus), [client.manager]
);

function Installation({ status }) {
return (status === IDLE) ? <InstallationFinished /> : <InstallationProgress />;
}

Expand Down

0 comments on commit eec3080

Please sign in to comment.