mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-18 12:05:53 +00:00
feat(nodes): blur address column with eye-toggle, mirroring IndexPage IP card
Some checks are pending
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
Some checks are pending
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
This commit is contained in:
parent
f570b991e7
commit
07bc74a521
1 changed files with 42 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import {
|
import {
|
||||||
EditOutlined,
|
EditOutlined,
|
||||||
|
|
@ -7,6 +7,8 @@ import {
|
||||||
PlusOutlined,
|
PlusOutlined,
|
||||||
ThunderboltOutlined,
|
ThunderboltOutlined,
|
||||||
ExclamationCircleOutlined,
|
ExclamationCircleOutlined,
|
||||||
|
EyeOutlined,
|
||||||
|
EyeInvisibleOutlined,
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import NodeHistoryPanel from './NodeHistoryPanel.vue';
|
import NodeHistoryPanel from './NodeHistoryPanel.vue';
|
||||||
|
|
||||||
|
|
@ -26,8 +28,6 @@ const emit = defineEmits([
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
// Render the address column as a clickable URL so admins can jump to
|
|
||||||
// the remote panel directly from the list.
|
|
||||||
const dataSource = computed(() =>
|
const dataSource = computed(() =>
|
||||||
props.nodes.map((n) => ({
|
props.nodes.map((n) => ({
|
||||||
...n,
|
...n,
|
||||||
|
|
@ -36,6 +36,8 @@ const dataSource = computed(() =>
|
||||||
})),
|
})),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const showAddress = ref(false);
|
||||||
|
|
||||||
function statusColor(status) {
|
function statusColor(status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 'online': return 'green';
|
case 'online': return 'green';
|
||||||
|
|
@ -97,9 +99,19 @@ function formatPct(p) {
|
||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
|
|
||||||
<a-table-column :title="t('pages.nodes.address')" data-index="url" :ellipsis="true">
|
<a-table-column data-index="url" :ellipsis="true">
|
||||||
|
<template #title>
|
||||||
|
<span class="address-header">
|
||||||
|
{{ t('pages.nodes.address') }}
|
||||||
|
<a-tooltip :title="t('pages.index.toggleIpVisibility')">
|
||||||
|
<component :is="showAddress ? EyeOutlined : EyeInvisibleOutlined" class="ip-toggle-icon"
|
||||||
|
@click="showAddress = !showAddress" />
|
||||||
|
</a-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<template #default="{ record }">
|
<template #default="{ record }">
|
||||||
<a :href="record.url" target="_blank" rel="noopener noreferrer">{{ record.url }}</a>
|
<a :href="record.url" target="_blank" rel="noopener noreferrer"
|
||||||
|
:class="showAddress ? 'address-visible' : 'address-hidden'">{{ record.url }}</a>
|
||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
|
|
||||||
|
|
@ -203,4 +215,29 @@ function formatPct(p) {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
opacity: 0.65;
|
opacity: 0.65;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.address-header {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ip-toggle-icon {
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ip-toggle-icon:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.address-hidden {
|
||||||
|
filter: blur(5px);
|
||||||
|
transition: filter 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.address-visible {
|
||||||
|
filter: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue