From a466196a44439fe78a79b969b653cba2ffef5cc7 Mon Sep 17 00:00:00 2001
From: HFO4 <912394456@qq.com>
Date: Fri, 16 Dec 2022 17:20:45 +0800
Subject: [PATCH] feat(doc preview): add magic variable for file name
---
public/locales/en-US/dashboard.json | 1 +
public/locales/zh-CN/dashboard.json | 1 +
src/component/Admin/Setting/Image.js | 3 +++
3 files changed, 5 insertions(+)
diff --git a/public/locales/en-US/dashboard.json b/public/locales/en-US/dashboard.json
index eb7a5e5..1c525b6 100644
--- a/public/locales/en-US/dashboard.json
+++ b/public/locales/en-US/dashboard.json
@@ -211,6 +211,7 @@
"officePreviewServiceDes": "You can use following magic variables:",
"officePreviewServiceSrcDes": "File URL",
"officePreviewServiceSrcB64Des": " Base64 encoded file URL",
+ "officePreviewServiceName": "File name",
"thumbnails": "Thumbnails",
"localOnlyInfo": "The following settings only apply to local storage policies.",
"thumbWidth": "Width",
diff --git a/public/locales/zh-CN/dashboard.json b/public/locales/zh-CN/dashboard.json
index 87e921a..b9d6b7b 100644
--- a/public/locales/zh-CN/dashboard.json
+++ b/public/locales/zh-CN/dashboard.json
@@ -211,6 +211,7 @@
"officePreviewServiceDes": "可使用以下替换变量:",
"officePreviewServiceSrcDes": "文件 URL",
"officePreviewServiceSrcB64Des": " Base64 编码后的文件 URL",
+ "officePreviewServiceName": "文件名",
"thumbnails": "缩略图",
"localOnlyInfo": "以下设置只针对本机存储策略有效。",
"thumbWidth": "缩略图宽度",
diff --git a/src/component/Admin/Setting/Image.js b/src/component/Admin/Setting/Image.js
index ebe4e2a..140d9cf 100644
--- a/src/component/Admin/Setting/Image.js
+++ b/src/component/Admin/Setting/Image.js
@@ -255,6 +255,9 @@ export default function ImageSetting() {
{"{$srcB64}"} -{" "}
{t("officePreviewServiceSrcB64Des")}
+
+ {"{$name}"} -{" "}
+ {t("officePreviewServiceName")}