mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-11 12:10:45 +08:00
style: Limit the display length of the node (#8627)
This commit is contained in:
parent
404e551f7b
commit
9d198f7dfe
2 changed files with 9 additions and 1 deletions
|
|
@ -118,7 +118,13 @@ const openChangeNode = () => {
|
||||||
|
|
||||||
const loadCurrentName = () => {
|
const loadCurrentName = () => {
|
||||||
if (globalStore.currentNode) {
|
if (globalStore.currentNode) {
|
||||||
return globalStore.currentNode === 'local' ? i18n.global.t('xpack.node.master') : globalStore.currentNode;
|
if (globalStore.currentNode === 'local') {
|
||||||
|
return i18n.global.t('xpack.node.master');
|
||||||
|
}
|
||||||
|
if (globalStore.currentNode.length <= 15) {
|
||||||
|
return globalStore.currentNode;
|
||||||
|
}
|
||||||
|
return globalStore.currentNode.substring(0, 12) + '...';
|
||||||
}
|
}
|
||||||
return i18n.global.t('xpack.node.master');
|
return i18n.global.t('xpack.node.master');
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -651,6 +651,8 @@ function load18n(label: string) {
|
||||||
return i18n.global.t('container.compose');
|
return i18n.global.t('container.compose');
|
||||||
case 'CustomAppstore':
|
case 'CustomAppstore':
|
||||||
return i18n.global.t('xpack.customApp.name');
|
return i18n.global.t('xpack.customApp.name');
|
||||||
|
case 'NodeFile':
|
||||||
|
return i18n.global.t('xpack.exchange.exchange');
|
||||||
case 'RuntimeExtension':
|
case 'RuntimeExtension':
|
||||||
return i18n.global.t('website.runtime');
|
return i18n.global.t('website.runtime');
|
||||||
case 'Image':
|
case 'Image':
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue