Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt product selection and handling ofl10n settings with the HTTP/JSON server #1094

Merged
merged 13 commits into from
Mar 15, 2024
Merged
Prev Previous commit
Next Next commit
Display product and locales in the overview
* The localization section is working again.
* The rest of sections are temporarily disabled.
imobachgs committed Mar 15, 2024

Verified

This commit was signed with the committer’s verified signature.
imobachgs Imobach González Sosa
commit f549219cbc93e6f33dbae4349e3e8530eb6a63ba
2 changes: 1 addition & 1 deletion web/src/components/overview/L10nSection.jsx
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ const Content = ({ locales }) => {

return (
<Text>
{msg1}<Em>{`${locale.name} (${locale.territory})`}</Em>{msg2}
{msg1}<Em>{`${locale.id} (${locale.territory})`}</Em>{msg2}
</Text>
);
};
27 changes: 19 additions & 8 deletions web/src/components/overview/OverviewPage.jsx
Original file line number Diff line number Diff line change
@@ -41,6 +41,25 @@ export default function OverviewPage() {
return <Navigate to="/products" />;
}

// return (
// <Page
// icon="list_alt"
// // TRANSLATORS: page title
// title={_("Installation Summary")}
// >
// <ProductSection />
// <L10nSection />
// <NetworkSection />
// <StorageSection showErrors />
// <SoftwareSection showErrors />
// <UsersSection showErrors={showErrors} />

// <Page.Actions>
// <InstallButton onClick={() => setShowErrors(true)} />
// </Page.Actions>
// </Page>
// );

return (
<Page
icon="list_alt"
@@ -49,14 +68,6 @@ export default function OverviewPage() {
>
<ProductSection />
<L10nSection />
<NetworkSection />
<StorageSection showErrors />
<SoftwareSection showErrors />
<UsersSection showErrors={showErrors} />

<Page.Actions>
<InstallButton onClick={() => setShowErrors(true)} />
</Page.Actions>
</Page>
);
}
4 changes: 2 additions & 2 deletions web/src/components/overview/ProductSection.jsx
Original file line number Diff line number Diff line change
@@ -57,8 +57,8 @@ export default function ProductSection() {
const { cancellablePromise } = useCancellablePromise();

useEffect(() => {
cancellablePromise(software.product.getIssues()).then(setIssues);
return software.product.onIssuesChange(setIssues);
// cancellablePromise(software.product.getIssues()).then(setIssues);
// return software.product.onIssuesChange(setIssues);
}, [cancellablePromise, setIssues, software]);

const isLoading = !selectedProduct;
2 changes: 1 addition & 1 deletion web/src/context/product.jsx
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ function ProductProvider({ children }) {
}, [client, setSelectedId]);

useEffect(() => {
if (!client) return;
// if (!client) return;

// return client.product.onRegistrationChange(setRegistration);
}, [client, setRegistration]);