Skip to content

Commit 84e48b2

Browse files
authored
Fix: Can't close 'Found a new drive' message. (#249)
This PR fixes an event binding issue where `noticeBlock.vue` emitted `deleteNotice` but `CoreService.vue` used `@delete-notice`, which Vue 2 doesn't auto-convert; also corrects the output path in `message_bus.build.js` (was `../build/sysroot/...`), which caused event metadata to be placed outside the expected build directory, leading to missing frontend event registration after packaging. resolved IceWhaleTech/CasaOS#2069
1 parent 98964af commit 84e48b2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

message_bus.build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ const events = require('./src/events/message_bus.js');
1111
const fs = require('fs');
1212
const path = require('path');
1313

14-
const outPath = '../build/sysroot/var/lib/casaos/';
14+
const outPath = './build/sysroot/var/lib/casaos/';
1515
const outName = 'ui-message-bus.json';
16-
const registerShellPath = '../build/sysroot/etc/casaos/start.d/';
16+
const registerShellPath = './build/sysroot/etc/casaos/start.d/';
1717
const array = [];
1818

1919
// Parse the event to array

src/components/noticBlock/noticeBlock.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ export default {
120120
this.$messageBus('youshouldknow_cardclose');
121121
122122
if (this.noticeData.contentType === 'progress') {
123-
this.$emit('deleteNotice', this.noticeData, this.noticeType);
123+
this.$emit('delete-notice', this.noticeData, this.noticeType);
124124
return
125125
}
126126
let promises = [];
127127
for (const contentKey in this.noticeData.content) {
128128
promises.push(this.$api.users.delLetter(this.noticeData.content[contentKey].messageUUID));
129129
}
130130
Promise.all(promises).then(() => {
131-
this.$emit('deleteNotice', this.noticeData, this.noticeType);
131+
this.$emit('delete-notice', this.noticeData, this.noticeType);
132132
});
133133
},
134134
eventBus() {

0 commit comments

Comments
 (0)