mirror of
https://github.com/eyebluecn/tank-front
synced 2026-10-19 16:16:18 +00:00
Fix the display for url.
This commit is contained in:
@@ -25,9 +25,6 @@ export default class PreviewEngine extends Base {
|
||||
*/
|
||||
previewInSite: boolean = true;
|
||||
|
||||
// 前端辅助字段,展示给用户看的url
|
||||
urlUI: string = "";
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
@@ -55,7 +52,6 @@ export default class PreviewEngine extends Base {
|
||||
//添加全局预览引擎,使用浏览器预览能力。
|
||||
let globalEngine: PreviewEngine = new PreviewEngine();
|
||||
globalEngine.url = "{originUrl}";
|
||||
globalEngine.urlUI = "{url}";
|
||||
globalEngine.extensions = "*";
|
||||
globalEngine.previewInSite = true;
|
||||
defaultEngines.push(globalEngine);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import "./PreviewEngineCell.less";
|
||||
import React from "react";
|
||||
import PreviewEngine from "../../../common/model/preference/model/PreviewEngine";
|
||||
import { Tag, Tooltip } from "antd";
|
||||
import {Tag, Tooltip} from "antd";
|
||||
import Lang from "../../../common/model/global/Lang";
|
||||
import InfoCell from "../../widget/InfoCell";
|
||||
|
||||
@@ -11,7 +11,7 @@ interface IProps {
|
||||
}
|
||||
|
||||
export default function PreviewEngineCell(props: IProps) {
|
||||
const { engine, order } = props;
|
||||
const {engine, order} = props;
|
||||
|
||||
return (
|
||||
<div className="preview-engine-cell">
|
||||
@@ -19,14 +19,16 @@ export default function PreviewEngineCell(props: IProps) {
|
||||
<p className="title">
|
||||
{order ? Lang.t("preference.previewEngine", order) : Lang.t("preference.defaultPreview")}
|
||||
</p>
|
||||
<InfoCell name={Lang.t("preference.engineReg")}>{engine.urlUI || engine.url}</InfoCell>
|
||||
<InfoCell name={Lang.t("preference.engineReg")}>
|
||||
{engine.url === '{originUrl}' ? '{url}' : engine.url}
|
||||
</InfoCell>
|
||||
<InfoCell name={Lang.t("preference.engineSuffix")}>
|
||||
{engine.extensions}
|
||||
</InfoCell>
|
||||
</div>
|
||||
<div className="tip-box">
|
||||
{
|
||||
order ? null: (
|
||||
order ? null : (
|
||||
<Tooltip title={Lang.t("preference.defaultPreviewDesc")}>
|
||||
<Tag className="tip mr10" color="success">
|
||||
{Lang.t("preference.defaultPreview")}
|
||||
|
||||
Reference in New Issue
Block a user