Skip to content

Commit

Permalink
Fix the issue that the new tab cannot be removed after clicking. (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrykuku authored Nov 26, 2024
1 parent 35e6e23 commit 56bf976
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
16 changes: 14 additions & 2 deletions src/components/Apps/AppCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ import commonI18n, { ice_i18n } from "@/mixins/base/common-i18n";
import FileSaver from "file-saver";
import { MIRCO_APP_ACTION_ENUM } from "@/const";
import { vOnClickOutside } from "@vueuse/components";
import { set } from "vue/types/umd";
export default {
name: "app-card",
Expand Down Expand Up @@ -347,6 +348,11 @@ export default {
},
methods: {
hasNewTagLabel(name) {
return this.appIds.includes(name) >= 0;
},
/**
* @description: Open app in new windows
* @param {String} status App status
Expand All @@ -355,6 +361,8 @@ export default {
* @return {*} void
*/
openApp(item) {
if (this.isContainerApp) {
this.$emit("importApp", item, false);
return false;
Expand All @@ -374,10 +382,10 @@ export default {
});
}
} else if (this.isLinkApp) {
this.hasNewTag(item.name) && this.removeIdFromNewAppIds(item.name);
// this.hasNewTagLabel(item.name) && this.removeIdFromNewAppIds(item.name);
window.open(item.hostname, "_blank");
} else if (item.requireGPU) {
this.hasNewTag(item.name) && this.removeIdFromNewAppIds(item.name);
console.log("enable GPU ::", item);
let routeUrl = this.$router.resolve({
name: "AppDetection",
Expand All @@ -395,6 +403,10 @@ export default {
this.checkAndOpenThirdApp(item);
}
}
this.hasNewTagLabel(item.name) && this.removeIdFromNewAppIds(item.name);
setTimeout(() => {
this.$emit("updateAppIds");
}, 200);
},
openSystemApps(item) {
Expand Down
1 change: 1 addition & 0 deletions src/components/Apps/AppSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
@configApp="showConfigPanel"
@importApp="showContainerPanel"
@updateState="getList"
@updateAppIds="getNewAppIdsFromCustomStorage"
></app-card>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ Vue.use(Vue2TouchEvents)
Vue.use(VueSocketIOExt, socket);
Vue.use(VueSocialSharing);


Vue.config.productionTip = false
Vue.prototype.$api = api;
Vue.prototype.$openAPI = openAPI;
Expand All @@ -109,7 +110,6 @@ Vue.prototype.$wsProtocol = wsProtocol;
Vue.prototype.$EventBus = new Vue();
Vue.prototype.$messageBus = messageBus;


new Vue({
router,
// @ts-ignore
Expand Down

0 comments on commit 56bf976

Please sign in to comment.