component-shipinlv 1.1.21 → 1.1.23
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.
- package/dist/UI/Time.d.ts +1 -0
- package/dist/UI/Time.js +2 -0
- package/dist/VideoPublish/account-manage/home.js +3 -2
- package/dist/VideoPublish/account-manage/list.js +4 -2
- package/dist/VideoPublish/proxy/create.js +18 -3
- package/dist/VideoPublish/proxy/list.js +25 -6
- package/dist/VideoPublish/proxy/list.less +7 -0
- package/dist/component/is-installed-chrome.js +3 -2
- package/dist/lib/Tool.d.ts +1 -1
- package/dist/types/VideoPublishVideoAccountProxy.d.ts +2 -0
- package/dist/typings/VideoPublishVideoAccount.d.ts +2 -0
- package/dist/window.d.ts +1 -1
- package/package.json +2 -2
package/dist/UI/Time.d.ts
CHANGED
package/dist/UI/Time.js
CHANGED
@@ -5,6 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
var Time = function Time(_ref) {
|
6
6
|
var _ref$time = _ref.time,
|
7
7
|
time = _ref$time === void 0 ? '' : _ref$time,
|
8
|
+
className = _ref.className,
|
8
9
|
_ref$serverTime = _ref.serverTime,
|
9
10
|
serverTime = _ref$serverTime === void 0 ? Date.now() : _ref$serverTime,
|
10
11
|
_ref$titlePre = _ref.titlePre,
|
@@ -12,6 +13,7 @@ var Time = function Time(_ref) {
|
|
12
13
|
return /*#__PURE__*/_jsx(Tooltip, {
|
13
14
|
title: "".concat(titlePre).concat(Tool.formatTime(time, 'YYYY-MM-DD HH:mm')),
|
14
15
|
children: /*#__PURE__*/_jsx("span", {
|
16
|
+
className: className,
|
15
17
|
children: Tool.getFriendlyTime(time, serverTime)
|
16
18
|
})
|
17
19
|
});
|
@@ -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) {
|
@@ -135,7 +135,8 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
135
135
|
favoritedCount: 0,
|
136
136
|
videoCount: 0,
|
137
137
|
created: 0,
|
138
|
-
updated: 0
|
138
|
+
updated: 0,
|
139
|
+
proxyInfo: {}
|
139
140
|
});
|
140
141
|
return;
|
141
142
|
}
|
@@ -201,7 +202,8 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
201
202
|
case 12:
|
202
203
|
console.log('addAccountResult:', addAccountResult, env);
|
203
204
|
postData = {
|
204
|
-
detail: addAccountResult
|
205
|
+
detail: addAccountResult,
|
206
|
+
proxyId: proxyInfo.id || 0
|
205
207
|
};
|
206
208
|
runCreate(postData);
|
207
209
|
case 15:
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
3
3
|
import React, { useState } from 'react';
|
4
|
-
import { Button, Form, Input, InputNumber, Switch } from 'antd';
|
4
|
+
import { Button, DatePicker, Form, Input, InputNumber, Switch } from 'antd';
|
5
5
|
import { useRequest } from "@umijs/hooks";
|
6
6
|
import PageContentWarp from "../../UI/PageContentWarp";
|
7
7
|
import DialogDrawerFooter from "../../UI/DialogDrawerFooter";
|
8
8
|
import * as VideoPublishVideoAccountProxyController from "../../service/api/VideoPublishVideoAccountProxyController";
|
9
9
|
import toast from "../../lib/toast";
|
10
|
+
import dayjs from "dayjs";
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
11
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
12
13
|
var VideoPublishVideoAccountProxyCreate = function VideoPublishVideoAccountProxyCreate(_ref) {
|
@@ -25,6 +26,7 @@ var VideoPublishVideoAccountProxyCreate = function VideoPublishVideoAccountProxy
|
|
25
26
|
enabled: true,
|
26
27
|
username: '',
|
27
28
|
password: '',
|
29
|
+
expired: 0,
|
28
30
|
created: 0,
|
29
31
|
updated: 0
|
30
32
|
}),
|
@@ -41,7 +43,9 @@ var VideoPublishVideoAccountProxyCreate = function VideoPublishVideoAccountProxy
|
|
41
43
|
manual: id <= 0,
|
42
44
|
onSuccess: function onSuccess(result) {
|
43
45
|
setDetailData(result);
|
44
|
-
form.setFieldsValue(_objectSpread({}, result)
|
46
|
+
form.setFieldsValue(_objectSpread(_objectSpread({}, result), {}, {
|
47
|
+
expired: result.expired <= 0 ? null : dayjs(result.expired * 1000)
|
48
|
+
}));
|
45
49
|
}
|
46
50
|
}),
|
47
51
|
loadingDetail = _useRequest.loading,
|
@@ -61,7 +65,8 @@ var VideoPublishVideoAccountProxyCreate = function VideoPublishVideoAccountProxy
|
|
61
65
|
run = _useRequest2.run;
|
62
66
|
var onFinish = function onFinish(values) {
|
63
67
|
run(_objectSpread(_objectSpread({}, values), {}, {
|
64
|
-
id: id
|
68
|
+
id: id,
|
69
|
+
expired: values.expired ? Math.floor(values.expired.valueOf() * 0.001) : 0
|
65
70
|
}));
|
66
71
|
};
|
67
72
|
return /*#__PURE__*/_jsx(PageContentWarp, {
|
@@ -140,6 +145,16 @@ var VideoPublishVideoAccountProxyCreate = function VideoPublishVideoAccountProxy
|
|
140
145
|
children: /*#__PURE__*/_jsx(Input, {
|
141
146
|
placeholder: "\u8F93\u5165IP\u5730\u5740 \u5F52\u5C5E\u5730\uFF0C\u53EA\u662F\u65B9\u4FBF\u7BA1\u7406"
|
142
147
|
})
|
148
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
149
|
+
name: "expired",
|
150
|
+
label: "\u8FC7\u671F\u65F6\u95F4",
|
151
|
+
children: /*#__PURE__*/_jsx(DatePicker, {
|
152
|
+
minDate: dayjs(Date.now() - 86400e3 * 60),
|
153
|
+
maxDate: dayjs(Date.now() + 86400e3 * 365 * 2),
|
154
|
+
disabledDate: function disabledDate(e) {
|
155
|
+
return e.valueOf() < Date.now() - 86400e3 * 2;
|
156
|
+
}
|
157
|
+
})
|
143
158
|
}), /*#__PURE__*/_jsx(Form.Item, {
|
144
159
|
name: "enabled",
|
145
160
|
label: "\u662F\u5426\u542F\u7528",
|
@@ -12,6 +12,8 @@ import LayoutContent from "../../UI/LayoutContent";
|
|
12
12
|
import VideoPublishVideoAccountProxyQuery from "./query";
|
13
13
|
import VideoPublishVideoAccountProxyCreate from "./create";
|
14
14
|
import { PlusCircleOutlined } from "@ant-design/icons";
|
15
|
+
import Money from "../../UI/Money";
|
16
|
+
import Time from "../../UI/Time";
|
15
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
16
18
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
17
19
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -93,6 +95,28 @@ var VideoPublishVideoAccountProxy = function VideoPublishVideoAccountProxy(_ref)
|
|
93
95
|
children: [auth, record === null || record === void 0 ? void 0 : record.ip, port]
|
94
96
|
});
|
95
97
|
}
|
98
|
+
}, {
|
99
|
+
title: '过期时间',
|
100
|
+
dataIndex: 'expired',
|
101
|
+
key: 'expired',
|
102
|
+
render: function render(expired) {
|
103
|
+
return /*#__PURE__*/_jsx(Time, {
|
104
|
+
className: expired > 0 && expired - Date.now() * 0.001 < 86400 * 7 ? 'timeWarn' : '',
|
105
|
+
time: expired
|
106
|
+
});
|
107
|
+
}
|
108
|
+
}, {
|
109
|
+
title: '关联账号数',
|
110
|
+
dataIndex: 'bindAccountCount',
|
111
|
+
key: 'bindAccountCount',
|
112
|
+
render: function render(bindAccountCount) {
|
113
|
+
return /*#__PURE__*/_jsx(Money, {
|
114
|
+
precision: 0,
|
115
|
+
pre: "",
|
116
|
+
end: "\u4E2A",
|
117
|
+
value: bindAccountCount
|
118
|
+
});
|
119
|
+
}
|
96
120
|
}, {
|
97
121
|
title: /*#__PURE__*/_jsx(_Fragment, {
|
98
122
|
children: "\u662F\u5426\u542F\u7528"
|
@@ -172,11 +196,6 @@ var VideoPublishVideoAccountProxy = function VideoPublishVideoAccountProxy(_ref)
|
|
172
196
|
}),
|
173
197
|
loadingDel = _useRequest2.loading,
|
174
198
|
runDel = _useRequest2.run;
|
175
|
-
var onSearch = function onSearch(keyword) {
|
176
|
-
var _keyword$replace;
|
177
|
-
var list = (keyword === null || keyword === void 0 || (_keyword$replace = keyword.replace(/\s+/g, '')) === null || _keyword$replace === void 0 ? void 0 : _keyword$replace.split('')) || [];
|
178
|
-
run();
|
179
|
-
};
|
180
199
|
var onCreate = /*#__PURE__*/function () {
|
181
200
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(id) {
|
182
201
|
var dialog;
|
@@ -184,7 +203,7 @@ var VideoPublishVideoAccountProxy = function VideoPublishVideoAccountProxy(_ref)
|
|
184
203
|
while (1) switch (_context.prev = _context.next) {
|
185
204
|
case 0:
|
186
205
|
dialog = Tool.drawer({
|
187
|
-
title: '
|
206
|
+
title: '编辑网络代理',
|
188
207
|
content: /*#__PURE__*/_jsx(VideoPublishVideoAccountProxyCreate, {
|
189
208
|
id: id,
|
190
209
|
env: env,
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import AccountManageSettingConfig from "../lib/accountManageSettingConfig";
|
1
2
|
var isInstalledChrome = function isInstalledChrome() {
|
2
|
-
var
|
3
|
-
return !!
|
3
|
+
var settingConfig = AccountManageSettingConfig();
|
4
|
+
return !!settingConfig.chromePath;
|
4
5
|
};
|
5
6
|
export default isInstalledChrome;
|
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: "info" | "error" | "success" | "warning", 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;
|
@@ -8,6 +8,7 @@ declare namespace VideoPublishVideoAccountProxy {
|
|
8
8
|
enabled: boolean;
|
9
9
|
username: string;
|
10
10
|
password: string;
|
11
|
+
expired: number;
|
11
12
|
created: number;
|
12
13
|
updated: number;
|
13
14
|
}
|
@@ -27,6 +28,7 @@ declare namespace VideoPublishVideoAccountProxy {
|
|
27
28
|
port: number;
|
28
29
|
enabled: boolean;
|
29
30
|
username: string;
|
31
|
+
expired: number;
|
30
32
|
password: string;
|
31
33
|
}
|
32
34
|
interface CreateProxyQuery {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
declare namespace VideoPublishVideoAccount {
|
2
2
|
interface CreateQuery {
|
3
3
|
detail: CreateQueryDetail;
|
4
|
+
proxyId: number;
|
4
5
|
}
|
5
6
|
interface CreateQueryDetail {
|
6
7
|
avatar: string;
|
@@ -47,6 +48,7 @@ declare namespace VideoPublishVideoAccount {
|
|
47
48
|
videoCount: number;
|
48
49
|
created: number;
|
49
50
|
updated: number;
|
51
|
+
proxyInfo: Global.ProxyInfo;
|
50
52
|
}
|
51
53
|
interface Detail {
|
52
54
|
id: number;
|
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>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "component-shipinlv",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.23",
|
4
4
|
"description": "",
|
5
5
|
"module": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"access": "public"
|
41
41
|
},
|
42
42
|
"peerDependencies": {
|
43
|
-
"antd": "^5.
|
43
|
+
"antd": "^5.20",
|
44
44
|
"react": ">=18.x",
|
45
45
|
"react-dom": ">=18.x"
|
46
46
|
},
|