From 234a9b906076657be1bc83ac48e1eeba5301a9ef Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Fri, 25 Jun 2021 00:13:43 +0800 Subject: [PATCH] Add one tooltip. --- web/src/ApplicationEditPage.js | 2 +- web/src/Setting.js | 14 +++++++++++++- web/src/locales/en.json | 1 + web/src/locales/zh.json | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/web/src/ApplicationEditPage.js b/web/src/ApplicationEditPage.js index 73842cb9..4269abad 100644 --- a/web/src/ApplicationEditPage.js +++ b/web/src/ApplicationEditPage.js @@ -101,7 +101,7 @@ class ApplicationEditPage extends React.Component { } style={{marginLeft: '5px'}} type="inner"> - {i18next.t("general:Name")}: + {Setting.getLabel(i18next.t("general:Name"), i18next.t("general:Name - Tooltip"))} : { diff --git a/web/src/Setting.js b/web/src/Setting.js index e89cdeb9..f96a6ba7 100644 --- a/web/src/Setting.js +++ b/web/src/Setting.js @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {message} from "antd"; +import {message, Tooltip} from "antd"; +import {QuestionCircleTwoTone} from "@ant-design/icons"; import React from "react"; import {isMobile as isMobileDevice} from "react-device-detect"; import "./i18n"; @@ -408,3 +409,14 @@ export function renderHelmet(application) { ) } + +export function getLabel(text, tooltip) { + return ( + + {text} + + + + + ); +} diff --git a/web/src/locales/en.json b/web/src/locales/en.json index 5f18dc35..262cedd6 100644 --- a/web/src/locales/en.json +++ b/web/src/locales/en.json @@ -18,6 +18,7 @@ "Organization": "Organization", "Created time": "Created time", "Name": "Name", + "Name - Tooltip": "Unique string-style identifier", "Display name": "Display name", "Personal name": "Personal name", "Avatar": "Avatar", diff --git a/web/src/locales/zh.json b/web/src/locales/zh.json index dc606881..b6610c7f 100644 --- a/web/src/locales/zh.json +++ b/web/src/locales/zh.json @@ -18,6 +18,7 @@ "Organization": "组织", "Created time": "创建时间", "Name": "名称", + "Name - Tooltip": "唯一的、字符串式的ID", "Display name": "显示名称", "Personal name": "姓名", "Avatar": "头像",