Skip to content

Commit c84405c

Browse files
fix: resolve issue with quick navigation failure in applications
1 parent 63d5d70 commit c84405c

File tree

3 files changed

+7
-36
lines changed

3 files changed

+7
-36
lines changed

frontend/src/views/app-store/installed/app/card.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
<AppInfo
2929
:installed="installed"
3030
:defaultLink="defaultLink"
31-
@open-link="$emit('openLink')"
32-
@to-link="$emit('toLink')"
3331
@jump-to-path="$emit('jumpToPath', '/settings/panel')"
3432
></AppInfo>
3533
<div class="app-divider" />
@@ -65,8 +63,6 @@ defineEmits([
6563
'openTerminal',
6664
'openOperate',
6765
'favoriteInstall',
68-
'openLink',
69-
'toLink',
7066
'jumpToPath',
7167
'ignoreApp',
7268
'toContainer',

frontend/src/views/app-store/installed/app/info.vue

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313

1414
<el-popover placement="right" trigger="hover" v-if="hasLinkButton(installed)" :width="400">
1515
<template #reference>
16-
<el-button plain icon="Promotion" size="small" @click="$emit('openLink')">
17-
{{ $t('app.toLink') }}
18-
</el-button>
16+
<el-button plain icon="Promotion" size="small">{{ $t('app.toLink') }}</el-button>
1917
</template>
2018
<table>
2119
<tbody>
@@ -24,7 +22,7 @@
2422
<el-button
2523
type="primary"
2624
link
27-
@click="$emit('toLink', 'http://' + defaultLink + ':' + installed.httpPort)"
25+
@click="toLink('http://' + defaultLink + ':' + installed.httpPort)"
2826
>
2927
{{ 'http://' + defaultLink + ':' + installed.httpPort }}
3028
</el-button>
@@ -35,15 +33,15 @@
3533
<el-button
3634
type="primary"
3735
link
38-
@click="$emit('toLink', 'https://' + defaultLink + ':' + installed.httpsPort)"
36+
@click="toLink('https://' + defaultLink + ':' + installed.httpsPort)"
3937
>
4038
{{ 'https://' + defaultLink + ':' + installed.httpsPort }}
4139
</el-button>
4240
</td>
4341
</tr>
4442
<tr v-if="installed.webUI != ''">
4543
<td>
46-
<el-button type="primary" link @click="$emit('toLink')">
44+
<el-button type="primary" link @click="toLink(installed.webUI)">
4745
{{ installed.webUI }}
4846
</el-button>
4947
</td>
@@ -69,15 +67,15 @@
6967

7068
<script lang="ts" setup>
7169
import { App } from '@/api/interface/app';
72-
import { getAge } from '@/utils/util';
70+
import { getAge, toLink } from '@/utils/util';
7371
7472
interface Props {
7573
installed: App.AppInstalled;
7674
defaultLink: string;
7775
}
7876
defineProps<Props>();
7977
80-
defineEmits(['openLink', 'toLink', 'jumpToPath']);
78+
defineEmits(['jumpToPath']);
8179
8280
const hasLinkButton = (installed: any) => {
8381
return (

frontend/src/views/app-store/installed/index.vue

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@
6161
@favorite-install="favoriteInstall(installed)"
6262
@to-folder="routerToFileWithPath(installed.path)"
6363
@open-uploads="openUploads(installed.appKey, installed.name)"
64-
@open-link="openLink(defaultLink, installed)"
65-
@to-link="toLink(installed.webUI)"
6664
@jump-to-path="jumpToPath(router, '/settings/panel')"
6765
@to-container="toContainer(installed)"
6866
@ignore-app="ignoreApp(installed)"
@@ -139,7 +137,7 @@ import { onMounted, onUnmounted, reactive, ref } from 'vue';
139137
import i18n from '@/lang';
140138
import { ElMessageBox } from 'element-plus';
141139
import { App } from '@/api/interface/app';
142-
import { jumpToPath, toLink } from '@/utils/util';
140+
import { jumpToPath } from '@/utils/util';
143141
import { useRouter } from 'vue-router';
144142
import { MsgSuccess } from '@/utils/message';
145143
import { getAgentSettingByKey } from '@/api/modules/setting';
@@ -444,27 +442,6 @@ const getConfig = async () => {
444442
} catch (error) {}
445443
};
446444
447-
const openLink = (defaultLink: string, installed: App.AppInstalled) => {
448-
if (defaultLink != '' && installed.webUI != '') {
449-
return;
450-
}
451-
if (defaultLink == '' && installed.webUI == '') {
452-
return;
453-
}
454-
if (installed.webUI != '') {
455-
toLink(installed.webUI);
456-
return;
457-
}
458-
if (installed.httpsPort > 0) {
459-
toLink('https://' + defaultLink + ':' + installed.httpsPort);
460-
return;
461-
}
462-
if (installed.httpPort > 0) {
463-
toLink('http://' + defaultLink + ':' + installed.httpPort);
464-
return;
465-
}
466-
};
467-
468445
onMounted(() => {
469446
getConfig();
470447
const path = router.currentRoute.value.path;

0 commit comments

Comments
 (0)