component-shipinlv 1.1.20 → 1.1.22
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/VideoPublish/account-manage/home.js +3 -2
- package/dist/VideoPublish/account-manage/list.js +55 -16
- package/dist/VideoPublish/proxy/select.d.ts +1 -1
- package/dist/VideoPublish/proxy/select.js +9 -1
- package/dist/lib/Tool.d.ts +1 -1
- package/dist/typings/VideoPublishVideoAccount.d.ts +1 -0
- package/dist/typings.d.ts +1 -0
- package/dist/window.d.ts +1 -1
- package/package.json +1 -1
@@ -34,7 +34,8 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
|
|
34
34
|
favoritedCount: 0,
|
35
35
|
videoCount: 0,
|
36
36
|
created: 0,
|
37
|
-
updated: 0
|
37
|
+
updated: 0,
|
38
|
+
proxyInfo: {}
|
38
39
|
}),
|
39
40
|
_useState2 = _slicedToArray(_useState, 2),
|
40
41
|
accountDetail = _useState2[0],
|
@@ -89,7 +90,7 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
|
|
89
90
|
setOpenMenuItems = _useState4[1];
|
90
91
|
var onOpen = function onOpen(url) {
|
91
92
|
var _window$getBridge;
|
92
|
-
(_window$getBridge = window.getBridge()) === null || _window$getBridge === void 0 || _window$getBridge.openVideoAccountBrowser(accountDetail.platform, '', accountDetail.accountId, url);
|
93
|
+
(_window$getBridge = window.getBridge()) === null || _window$getBridge === void 0 || _window$getBridge.openVideoAccountBrowser(accountDetail.platform, '', accountDetail.accountId, url, accountDetail.proxyInfo);
|
93
94
|
Tool.toast('正在打开浏览器, 请稍等...', 8);
|
94
95
|
};
|
95
96
|
var onOpenMenuItems = function onOpenMenuItems(platform) {
|
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
6
|
import React, { useEffect, useState, useRef } from 'react';
|
7
7
|
import { Button, Divider, Dropdown, Empty, Input, Space, Tooltip } from 'antd';
|
8
8
|
import "./list.less";
|
9
|
-
import { PlusCircleOutlined, SearchOutlined } from '@ant-design/icons';
|
9
|
+
import { PlusCircleOutlined, SearchOutlined, GlobalOutlined } from '@ant-design/icons';
|
10
10
|
import { useRequest } from "@umijs/hooks";
|
11
11
|
import * as VideoPublishVideoAccountController from "../../service/api/VideoPublishVideoAccountController";
|
12
12
|
import PageContentWarp from "../../UI/PageContentWarp";
|
@@ -22,6 +22,7 @@ import VideoPlatform from "../../component/video-platform/logo";
|
|
22
22
|
import isInstalledChrome from "../../component/is-installed-chrome";
|
23
23
|
import Tool from "../../lib/Tool";
|
24
24
|
import VideoPublishVideoAccountBaseInfo from "../video-account/base-info";
|
25
|
+
import VideoPublishVideoAccountProxySelect from "../proxy/select";
|
25
26
|
import { jsx as _jsx } from "react/jsx-runtime";
|
26
27
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
27
28
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -63,6 +64,16 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
63
64
|
_useState14 = _slicedToArray(_useState13, 2),
|
64
65
|
listData = _useState14[0],
|
65
66
|
setListData = _useState14[1];
|
67
|
+
var _useState15 = useState({
|
68
|
+
id: 0,
|
69
|
+
ip: '',
|
70
|
+
port: 0,
|
71
|
+
username: '',
|
72
|
+
password: ''
|
73
|
+
}),
|
74
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
75
|
+
proxyInfo = _useState16[0],
|
76
|
+
setProxyInfo = _useState16[1];
|
66
77
|
var _useRequest = useRequest(function () {
|
67
78
|
return VideoPublishVideoAccountController.list({
|
68
79
|
current: 1,
|
@@ -124,7 +135,8 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
124
135
|
favoritedCount: 0,
|
125
136
|
videoCount: 0,
|
126
137
|
created: 0,
|
127
|
-
updated: 0
|
138
|
+
updated: 0,
|
139
|
+
proxyInfo: {}
|
128
140
|
});
|
129
141
|
return;
|
130
142
|
}
|
@@ -177,7 +189,7 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
177
189
|
// window.bridge.ipcRenderer.sendMessage( eventName ); // 添加抖音账号
|
178
190
|
settingConfig = AccountManageSettingConfig();
|
179
191
|
_context.next = 9;
|
180
|
-
return (_window$getBridge = (_window = window).getBridge) === null || _window$getBridge === void 0 || (_window$getBridge = _window$getBridge.call(_window)) === null || _window$getBridge === void 0 ? void 0 : _window$getBridge.ipcRenderer.invoke('shipinlv-video-account-add', platform, settingConfig.isChromeOpen).catch(function (err) {
|
192
|
+
return (_window$getBridge = (_window = window).getBridge) === null || _window$getBridge === void 0 || (_window$getBridge = _window$getBridge.call(_window)) === null || _window$getBridge === void 0 ? void 0 : _window$getBridge.ipcRenderer.invoke('shipinlv-video-account-add', platform, proxyInfo, settingConfig.isChromeOpen).catch(function (err) {
|
181
193
|
Notification.notificationError('获取账号信息错误' + ((err === null || err === void 0 ? void 0 : err.message) || JSON.stringify(err)));
|
182
194
|
});
|
183
195
|
case 9:
|
@@ -203,6 +215,21 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
203
215
|
return _ref2.apply(this, arguments);
|
204
216
|
};
|
205
217
|
}();
|
218
|
+
var onProxy = function onProxy() {
|
219
|
+
var dialog = Tool.drawer({
|
220
|
+
title: '编辑代理',
|
221
|
+
content: /*#__PURE__*/_jsx(VideoPublishVideoAccountProxySelect, {
|
222
|
+
env: env,
|
223
|
+
nickname: "[\u5F85\u6DFB\u52A0]",
|
224
|
+
videoAccountProxyId: proxyInfo.id || 0,
|
225
|
+
onSuccess: function onSuccess(newVideoAccountProxyId, info) {
|
226
|
+
setProxyInfo(_objectSpread({}, info));
|
227
|
+
dialog.destroy();
|
228
|
+
}
|
229
|
+
}),
|
230
|
+
width: 680
|
231
|
+
});
|
232
|
+
};
|
206
233
|
useEffect(function () {
|
207
234
|
var platformMenuItems = [];
|
208
235
|
VideoPlatformList.forEach(function (item) {
|
@@ -224,19 +251,31 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
224
251
|
var addButton = function addButton() {
|
225
252
|
return /*#__PURE__*/_jsx("div", {
|
226
253
|
className: "addButton",
|
227
|
-
children: /*#__PURE__*/
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
254
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
255
|
+
children: [/*#__PURE__*/_jsx(Tooltip, {
|
256
|
+
title: "\u8BBE\u7F6E\u4EE3\u7406",
|
257
|
+
children: /*#__PURE__*/_jsx(Button, {
|
258
|
+
type: "primary",
|
259
|
+
ghost: !proxyInfo.ip,
|
260
|
+
onClick: function onClick() {
|
261
|
+
return onProxy();
|
262
|
+
},
|
263
|
+
children: /*#__PURE__*/_jsx(GlobalOutlined, {})
|
264
|
+
})
|
265
|
+
}), /*#__PURE__*/_jsx(Dropdown, {
|
266
|
+
placement: "top",
|
267
|
+
menu: {
|
268
|
+
items: platformMenuItems,
|
269
|
+
onClick: function onClick(e) {
|
270
|
+
return onAdd(e.key);
|
271
|
+
}
|
272
|
+
},
|
273
|
+
children: /*#__PURE__*/_jsx(Button, {
|
274
|
+
icon: /*#__PURE__*/_jsx(PlusCircleOutlined, {}),
|
275
|
+
type: "primary",
|
276
|
+
children: "\u8D26\u53F7"
|
277
|
+
})
|
278
|
+
})]
|
240
279
|
})
|
241
280
|
});
|
242
281
|
};
|
@@ -4,7 +4,7 @@ interface Props {
|
|
4
4
|
env?: Global.Env;
|
5
5
|
nickname: string;
|
6
6
|
videoAccountProxyId: number;
|
7
|
-
onSuccess: (id: number) => void;
|
7
|
+
onSuccess: (id: number, proxyInfo: VideoPublishVideoAccountProxy.List) => void;
|
8
8
|
}
|
9
9
|
declare const VideoPublishVideoAccountProxySelect: React.FC<Props>;
|
10
10
|
export default VideoPublishVideoAccountProxySelect;
|
@@ -39,7 +39,15 @@ var VideoPublishVideoAccountProxySelect = function VideoPublishVideoAccountProxy
|
|
39
39
|
loading = _useRequest.loading,
|
40
40
|
run = _useRequest.run;
|
41
41
|
var onFinish = function onFinish(values) {
|
42
|
-
|
42
|
+
var _listData$filter;
|
43
|
+
var item = ((_listData$filter = listData.filter(function (item) {
|
44
|
+
return item.id === values.id;
|
45
|
+
})) === null || _listData$filter === void 0 ? void 0 : _listData$filter[0]) || {
|
46
|
+
id: 0,
|
47
|
+
domain: '',
|
48
|
+
port: 0
|
49
|
+
};
|
50
|
+
onSuccess(values.id, item);
|
43
51
|
};
|
44
52
|
return /*#__PURE__*/_jsx(PageContentWarp, {
|
45
53
|
loading: loading,
|
package/dist/lib/Tool.d.ts
CHANGED
@@ -161,7 +161,7 @@ declare const Tool: {
|
|
161
161
|
OsPathSeparator(): string;
|
162
162
|
getTitleByPath(path: string): string;
|
163
163
|
h5Pay(query: Pay.H5PayQuery): void;
|
164
|
-
notification(type: "
|
164
|
+
notification(type: "success" | "info" | "warning" | "error", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
|
165
165
|
notificationSuccess(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
|
166
166
|
notificationError(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
|
167
167
|
notificationWarning(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
|
package/dist/typings.d.ts
CHANGED
package/dist/window.d.ts
CHANGED
@@ -19,7 +19,7 @@ declare interface Window{
|
|
19
19
|
getChromiumPath: () => string;
|
20
20
|
getClientUniqueKey: () => string;
|
21
21
|
|
22
|
-
openVideoAccountBrowser: ( platform: string, subPlatform: string, accountId: string, url: string ) => void;
|
22
|
+
openVideoAccountBrowser: ( platform: string, subPlatform: string, accountId: string, url: string , proxyInfo?: Global.ProxyInfo ) => void;
|
23
23
|
};
|
24
24
|
|
25
25
|
getClientIdentity: () => Promise<string>;
|