修改终端提示.

This commit is contained in:
lijiahangmax
2025-03-09 19:58:10 +08:00
parent 79d9f69ed4
commit 14c4e77445
14 changed files with 48 additions and 31 deletions

View File

@@ -93,7 +93,7 @@
try {
// 加载组内数据
const { data } = await getHostGroupRelList(groupId as number);
const hosts = await cacheStore.loadHosts('');
const hosts = await cacheStore.loadHosts();
selectedGroupHosts.value = data.map(s => hosts.find(h => h.id === s) as HostQueryResponse)
.filter(Boolean);
} catch (e) {
@@ -138,6 +138,8 @@
idList: checkedGroups.value
});
Message.success('授权成功');
// 清空缓存
cacheStore.reset('authorizedHost_ALL', 'authorizedHost_SSH');
} catch (e) {
} finally {
setLoading(false);

View File

@@ -96,6 +96,8 @@
idList: selectedKeys.value
});
Message.success('授权成功');
// 清空缓存
cacheStore.reset('authorizedHostIdentities');
} catch (e) {
} finally {
setLoading(false);

View File

@@ -72,6 +72,8 @@
idList: selectedKeys.value
});
Message.success('授权成功');
// 清空缓存
cacheStore.reset('authorizedHostKeys');
} catch (e) {
} finally {
setLoading(false);

View File

@@ -113,7 +113,7 @@
// 加载主机列表
const loadHosts = () => {
cacheStore.loadHosts('').then(hosts => {
cacheStore.loadHosts().then(hosts => {
data.value = hosts.map(s => {
return {
value: String(s.id),

View File

@@ -339,7 +339,8 @@
// 重新加载数据
fetchCardData();
// 清空缓存
cacheStore.reset('host_', 'host_SSH');
cacheStore.reset('host_ALL', 'host_SSH',
'authorizedHost_ALL', 'authorizedHost_SSH');
};
defineExpose({ reload });

View File

@@ -373,7 +373,8 @@
// 重新加载数据
fetchTableData();
// 清空缓存
cacheStore.reset('host_', 'host_SSH');
cacheStore.reset('host_ALL', 'host_SSH',
'authorizedHost_ALL', 'authorizedHost_SSH');
};
defineExpose({ reload });

View File

@@ -79,7 +79,7 @@
const {
fetchPreference, getCurrentSession, openSession,
layoutState, preference, loadHosts, hosts, tabManager, sessionManager
layoutState, preference, loadHostList, hosts, tabManager, sessionManager
} = useTerminalStore();
const { loading, setLoading } = useLoading(true);
const { enter: enterFull, exit: exitFull } = useFullscreen();
@@ -165,7 +165,7 @@
onMounted(async () => {
try {
// 加载主机
await loadHosts();
await loadHostList();
// 默认连接主机
const connect = route.query.connect as string;
if (connect) {