mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:50:19 +08:00
Increase Detail field size
This commit is contained in:
@ -160,10 +160,10 @@ class ProductBuyPage extends React.Component {
|
||||
<Descriptions title={i18next.t("product:Buy Product")} bordered>
|
||||
<Descriptions.Item label={i18next.t("general:Name")} span={3}>
|
||||
<span style={{fontSize: 28}}>
|
||||
{product?.displayName}
|
||||
{Setting.getLanguageText(product?.displayName)}
|
||||
</span>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={i18next.t("product:Detail")}><span style={{fontSize: 16}}>{product?.detail}</span></Descriptions.Item>
|
||||
<Descriptions.Item label={i18next.t("product:Detail")}><span style={{fontSize: 16}}>{Setting.getLanguageText(product?.detail)}</span></Descriptions.Item>
|
||||
<Descriptions.Item label={i18next.t("product:Tag")}><span style={{fontSize: 16}}>{product?.tag}</span></Descriptions.Item>
|
||||
<Descriptions.Item label={i18next.t("product:SKU")}><span style={{fontSize: 16}}>{product?.name}</span></Descriptions.Item>
|
||||
<Descriptions.Item label={i18next.t("product:Image")} span={3}>
|
||||
|
@ -544,6 +544,21 @@ export function getAvatarColor(s) {
|
||||
return colorList[hash % 4];
|
||||
}
|
||||
|
||||
export function getLanguageText(text) {
|
||||
if (!text.includes("|")) {
|
||||
return text;
|
||||
}
|
||||
|
||||
let res;
|
||||
const tokens = text.split("|");
|
||||
if (getLanguage() !== "zh") {
|
||||
res = trim(tokens[0], "");
|
||||
} else {
|
||||
res = trim(tokens[1], "");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
export function getLanguage() {
|
||||
return i18next.language;
|
||||
}
|
||||
|
Reference in New Issue
Block a user