Code improvement
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
This commit is contained in:
parent
d9445f72e3
commit
365d4d31e1
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, inject, onBeforeUnmount } from 'vue';
|
import { ref, onMounted, inject, onBeforeUnmount, h } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
@ -103,6 +103,13 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => clearInterval(intervalId.value));
|
onBeforeUnmount(() => clearInterval(intervalId.value));
|
||||||
|
|
||||||
|
const renderAgentDetails = connection => {
|
||||||
|
const agent = connection.visitAgent;
|
||||||
|
return agent?.platform && agent?.browser && agent?.version
|
||||||
|
? h('span', `${agent.platform} - ${agent.browser} - ${agent.version}`)
|
||||||
|
: null;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -152,17 +159,7 @@ onBeforeUnmount(() => clearInterval(intervalId.value));
|
||||||
)
|
)
|
||||||
}}</span
|
}}</span
|
||||||
>
|
>
|
||||||
<span
|
<component :is="renderAgentDetails(connection)" />
|
||||||
v-if="
|
|
||||||
connection.visitAgent?.platform &&
|
|
||||||
connection.visitAgent?.browser &&
|
|
||||||
connection.visitAgent?.version
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ connection.visitAgent?.platform }} -
|
|
||||||
{{ connection.visitAgent?.browser }} -
|
|
||||||
{{ connection.visitAgent?.version }}
|
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<QBtn
|
<QBtn
|
||||||
|
|
Loading…
Reference in New Issue