fix: 修复配额说明重复和undefined问题
- 在editStorageForm中初始化oss_storage_quota_value和oss_quota_unit - 删除重复的旧配额说明块,保留新的当前配额设置显示 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
53
backend/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js
generated
vendored
Normal file
53
backend/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
export { createUserAgentStringParsingProvider } from "./createUserAgentStringParsingProvider";
|
||||
export const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => async (config) => {
|
||||
const navigator = typeof window !== "undefined" ? window.navigator : undefined;
|
||||
const uaString = navigator?.userAgent ?? "";
|
||||
const osName = navigator?.userAgentData?.platform ?? fallback.os(uaString) ?? "other";
|
||||
const osVersion = undefined;
|
||||
const brands = navigator?.userAgentData?.brands ?? [];
|
||||
const brand = brands[brands.length - 1];
|
||||
const browserName = brand?.brand ?? fallback.browser(uaString) ?? "unknown";
|
||||
const browserVersion = brand?.version ?? "unknown";
|
||||
const sections = [
|
||||
["aws-sdk-js", clientVersion],
|
||||
["ua", "2.1"],
|
||||
[`os/${osName}`, osVersion],
|
||||
["lang/js"],
|
||||
["md/browser", `${browserName}_${browserVersion}`],
|
||||
];
|
||||
if (serviceId) {
|
||||
sections.push([`api/${serviceId}`, clientVersion]);
|
||||
}
|
||||
const appId = await config?.userAgentAppId?.();
|
||||
if (appId) {
|
||||
sections.push([`app/${appId}`]);
|
||||
}
|
||||
return sections;
|
||||
};
|
||||
export const fallback = {
|
||||
os(ua) {
|
||||
if (/iPhone|iPad|iPod/.test(ua))
|
||||
return "iOS";
|
||||
if (/Macintosh|Mac OS X/.test(ua))
|
||||
return "macOS";
|
||||
if (/Windows NT/.test(ua))
|
||||
return "Windows";
|
||||
if (/Android/.test(ua))
|
||||
return "Android";
|
||||
if (/Linux/.test(ua))
|
||||
return "Linux";
|
||||
return undefined;
|
||||
},
|
||||
browser(ua) {
|
||||
if (/EdgiOS|EdgA|Edg\//.test(ua))
|
||||
return "Microsoft Edge";
|
||||
if (/Firefox\//.test(ua))
|
||||
return "Firefox";
|
||||
if (/Chrome\//.test(ua))
|
||||
return "Chrome";
|
||||
if (/Safari\//.test(ua))
|
||||
return "Safari";
|
||||
return undefined;
|
||||
},
|
||||
};
|
||||
export const defaultUserAgent = createDefaultUserAgentProvider;
|
||||
Reference in New Issue
Block a user