Skip to content

Commit 488ac99

Browse files
committed
storaged: Add 'anaconda' class to document.body in Anaconda mode
Modals are rendered outside the Page component, so they don’t inherit its classes. Adding the 'anaconda' class directly to <body> ensures consistent styling across the UI.
1 parent 98c5474 commit 488ac99

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/storaged/storaged.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ class Application extends React.Component {
4949
componentDidMount() {
5050
client.addEventListener("changed", this.on_client_changed);
5151
cockpit.addEventListener("locationchanged", this.on_navigate);
52-
client.init(() => { this.setState({ inited: true }) });
52+
client.init(() => {
53+
if (client.in_anaconda_mode()) {
54+
document.body.classList.add("anaconda");
55+
}
56+
this.setState({ inited: true });
57+
});
5358
window.setTimeout(() => { if (!this.state.inited) this.setState({ slow_init: true }); }, 1000);
5459
}
5560

0 commit comments

Comments
 (0)