@myun/gimi-chat 0.9.39 → 0.9.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,6 +64,9 @@ var VideoPlayer = function VideoPlayer(_ref2) {
64
64
  apiService = _useContext.apiService;
65
65
  var _ref3 = apiService,
66
66
  getVideoType = _ref3.getVideoType;
67
+ var baseUrl = useAppSelector(function (state) {
68
+ return state.gimiMenu.baseUrl;
69
+ });
67
70
 
68
71
  // 初始化高顿播放器
69
72
  var initGdVideo = /*#__PURE__*/function () {
@@ -91,7 +94,7 @@ var VideoPlayer = function VideoPlayer(_ref2) {
91
94
  container: document.getElementById('player-box1'),
92
95
  protype: 'b',
93
96
  video: {},
94
- env: 't-',
97
+ env: (baseUrl === null || baseUrl === void 0 ? void 0 : baseUrl.split('mgateway')[0]) || '',
95
98
  accessToken: ' ',
96
99
  // 为了兼容g2内部报错,必传空格字符串
97
100
  resourceId: item.fileToken,
@@ -156,7 +159,14 @@ var DocumentPlayer = function DocumentPlayer(_ref5) {
156
159
  // Office 文档与 Web 可预览类型(pdf/svg/图片)支持试看
157
160
  // const canPreview = SUPPORT_PREVIEW_FILE_TYPE.includes(item.suffix) || SUPPORT_WEB_PREVIEW.includes(item.suffix);
158
161
  var canPreview = SUPPORT_WEB_PREVIEW.includes(item.suffix);
159
-
162
+ if (!item.url) {
163
+ return /*#__PURE__*/React.createElement(UnsupportedView, {
164
+ tipKey: "trace.document.unDownloadTips",
165
+ downloadUrl: item.url,
166
+ showDownload: false,
167
+ onViewFull: onViewFull
168
+ });
169
+ }
160
170
  // 不支持预览的类型:直接提示并下载
161
171
  if (!canPreview) {
162
172
  return /*#__PURE__*/React.createElement(UnsupportedView, {
@@ -44,6 +44,7 @@ declare const enUS: {
44
44
  'trace.document.total': string;
45
45
  'trace.document.unsupported': string;
46
46
  'trace.document.unsupportedTips': string;
47
+ 'trace.document.unDownloadTips': string;
47
48
  'trace.video.unsupportedTips': string;
48
49
  'trace.information.unsupportedTips': string;
49
50
  'trace.notPermission': string;
@@ -44,6 +44,7 @@ var enUS = {
44
44
  'trace.document.total': '{{count}} documents in this conversation',
45
45
  'trace.document.unsupported': 'This file type cannot be previewed',
46
46
  'trace.document.unsupportedTips': 'This file format does not support trial preview. You can download it and view it with other software.\nTo view the full document, click the "View" button.',
47
+ 'trace.document.unDownloadTips': 'This file format does not support trial preview. \nTo view the full document, click the "View" button.',
47
48
  'trace.video.unsupportedTips': 'This video does not support trial preview.\nTo view the full video, click the "View" button.',
48
49
  'trace.information.unsupportedTips': 'The following content is not available for trial preview',
49
50
  'trace.notPermission': 'No access rights',
@@ -44,6 +44,7 @@ declare const zhCN: {
44
44
  'trace.document.total': string;
45
45
  'trace.document.unsupported': string;
46
46
  'trace.document.unsupportedTips': string;
47
+ 'trace.document.unDownloadTips': string;
47
48
  'trace.video.unsupportedTips': string;
48
49
  'trace.information.unsupportedTips': string;
49
50
  'trace.notPermission': string;
@@ -44,6 +44,7 @@ var zhCN = {
44
44
  'trace.document.total': '本对话共{{count}}个文档',
45
45
  'trace.document.unsupported': '当前文件不支持预览',
46
46
  'trace.document.unsupportedTips': '文件格式不支持在线试看,您可以下载后用其他软件查看。\n如需查看完整文档,请点击“去查看”按钮。',
47
+ 'trace.document.unDownloadTips': '文件格式不支持试看。\n如需查看完整文档,请点击“去查看”按钮。',
47
48
  'trace.video.unsupportedTips': '该视频暂不支持试看,\n如需查看完整视频,请点击“去查看”按钮。',
48
49
  'trace.information.unsupportedTips': '以下内容暂不可试看',
49
50
  'trace.notPermission': '暂无权益',