1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-07 14:55:27 +02:00

fix(upgrade): remove yellow upgrade banner EE-5141 (#8640)

This commit is contained in:
matias-portainer 2023-03-13 09:01:27 -03:00 committed by GitHub
parent 37f382d286
commit 621a01ba3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 6 additions and 52 deletions

View file

@ -13,7 +13,6 @@ export default class ThemeSettingsController {
this.UserService = UserService;
this.setThemeColor = this.setThemeColor.bind(this);
this.setSubtleUpgradeButton = this.setSubtleUpgradeButton.bind(this);
}
async setThemeColor(color) {
@ -29,13 +28,6 @@ export default class ThemeSettingsController {
});
}
async setSubtleUpgradeButton(value) {
return this.$async(async () => {
this.state.subtleUpgradeButton = value;
this.updateThemeSettings({ subtleUpgradeButton: value });
});
}
async updateThemeSettings(theme) {
try {
if (!this.state.isDemo) {
@ -57,7 +49,6 @@ export default class ThemeSettingsController {
userId: null,
themeColor: 'auto',
isDemo: state.application.demoEnvironment.enabled,
subtleUpgradeButton: false,
};
this.state.availableThemes = options;
@ -67,7 +58,6 @@ export default class ThemeSettingsController {
const user = await this.UserService.user(this.state.userId);
this.state.themeColor = user.ThemeSettings.color || this.state.themeColor;
this.state.subtleUpgradeButton = !!user.ThemeSettings.subtleUpgradeButton;
} catch (err) {
notifyError('Failure', err, 'Unable to get user details');
}

View file

@ -9,16 +9,6 @@
<pr-icon icon="'alert-circle'" class-name="'icon-primary'"></pr-icon>
<span class="small">Dark and High-contrast theme are experimental. Some UI components might not display properly.</span>
</p>
<div class="mt-3">
<por-switch-field
tooltip="'This setting toggles a more subtle UI for the upgrade button located at the top of the sidebar'"
label-class="'col-sm-2'"
label="'Subtle upgrade button'"
checked="$ctrl.state.subtleUpgradeButton"
on-change="($ctrl.setSubtleUpgradeButton)"
></por-switch-field>
</div>
</form>
</rd-widget-body>
</rd-widget>

View file

@ -22,6 +22,5 @@ export type User = {
};
ThemeSettings: {
color: 'dark' | 'light' | 'highcontrast' | 'auto';
subtleUpgradeButton: boolean;
};
};