diff --git a/apps/updatenotification/src/components/UpdateNotification.vue b/apps/updatenotification/src/components/UpdateNotification.vue
index be1b4f97e37..d69590e0430 100644
--- a/apps/updatenotification/src/components/UpdateNotification.vue
+++ b/apps/updatenotification/src/components/UpdateNotification.vue
@@ -112,18 +112,16 @@
-
-
+ @update:modelValue="changeReleaseChannel">
{{ channel.longtext }}
@@ -274,41 +272,34 @@ export default {
icon: 'icon-star',
active: this.currentChannel === 'enterprise',
disabled: !this.hasValidSubscription,
- action: this.changeReleaseChannelToEnterprise,
+ value: 'enterprise',
})
channelList.push({
text: t('updatenotification', 'Stable'),
longtext: t('updatenotification', 'The most recent stable version. It is suited for regular use and will always update to the latest major version.'),
icon: 'icon-checkmark',
- active: this.currentChannel === 'stable',
- action: this.changeReleaseChannelToStable,
+ value: 'stable',
})
channelList.push({
text: t('updatenotification', 'Beta'),
longtext: t('updatenotification', 'A pre-release version only for testing new features, not for production environments.'),
icon: 'icon-category-customization',
- active: this.currentChannel === 'beta',
- action: this.changeReleaseChannelToBeta,
+ value: 'beta',
})
- if (this.isNonDefaultChannel) {
+ if (this.isNonDefaultChannel(this.currentChannel)) {
channelList.push({
text: this.currentChannel,
icon: 'icon-rename',
- active: true,
- action: () => {},
+ value: this.currentChannel,
})
}
return channelList
},
- isNonDefaultChannel() {
- return this.currentChannel !== 'enterprise' && this.currentChannel !== 'stable' && this.currentChannel !== 'beta'
- },
-
localizedChannelName() {
switch (this.currentChannel) {
case 'enterprise':
@@ -433,16 +424,16 @@ export default {
form.submit()
})
},
- changeReleaseChannelToEnterprise() {
- this.changeReleaseChannel('enterprise')
- },
- changeReleaseChannelToStable() {
- this.changeReleaseChannel('stable')
- },
- changeReleaseChannelToBeta() {
- this.changeReleaseChannel('beta')
+
+ isNonDefaultChannel(channel) {
+ return !['enterprise', 'stable', 'beta'].includes(channel)
},
+
changeReleaseChannel(channel) {
+ if (this.isNonDefaultChannel(channel)) {
+ return
+ }
+
this.currentChannel = channel
axios.post(generateUrl('/apps/updatenotification/channel'), {
@@ -503,46 +494,9 @@ export default {
.applist {
margin-bottom: 25px;
}
-
- .update-menu {
- position: relative;
- cursor: pointer;
- margin-left: 3px;
- display: inline-block;
- padding: 10px;
- border-radius: 10px;
- border: 2px solid var(--color-border-dark);
- .icon-update-menu {
- cursor: inherit;
- .icon-triangle-s {
- display: inline-block;
- vertical-align: middle;
- cursor: inherit;
- opacity: 1;
- }
- }
- }
}