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:
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/index.d.ts
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./supportsWebCrypto";
|
||||
5
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/index.js
generated
vendored
Normal file
5
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/index.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./supportsWebCrypto"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/index.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC"}
|
||||
4
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/supportsWebCrypto.d.ts
generated
vendored
Normal file
4
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/supportsWebCrypto.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare function supportsWebCrypto(window: Window): boolean;
|
||||
export declare function supportsSecureRandom(window: Window): boolean;
|
||||
export declare function supportsSubtleCrypto(subtle: SubtleCrypto): boolean;
|
||||
export declare function supportsZeroByteGCM(subtle: SubtleCrypto): Promise<boolean>;
|
||||
69
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/supportsWebCrypto.js
generated
vendored
Normal file
69
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/supportsWebCrypto.js
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.supportsZeroByteGCM = exports.supportsSubtleCrypto = exports.supportsSecureRandom = exports.supportsWebCrypto = void 0;
|
||||
var tslib_1 = require("tslib");
|
||||
var subtleCryptoMethods = [
|
||||
"decrypt",
|
||||
"digest",
|
||||
"encrypt",
|
||||
"exportKey",
|
||||
"generateKey",
|
||||
"importKey",
|
||||
"sign",
|
||||
"verify"
|
||||
];
|
||||
function supportsWebCrypto(window) {
|
||||
if (supportsSecureRandom(window) &&
|
||||
typeof window.crypto.subtle === "object") {
|
||||
var subtle = window.crypto.subtle;
|
||||
return supportsSubtleCrypto(subtle);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
exports.supportsWebCrypto = supportsWebCrypto;
|
||||
function supportsSecureRandom(window) {
|
||||
if (typeof window === "object" && typeof window.crypto === "object") {
|
||||
var getRandomValues = window.crypto.getRandomValues;
|
||||
return typeof getRandomValues === "function";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
exports.supportsSecureRandom = supportsSecureRandom;
|
||||
function supportsSubtleCrypto(subtle) {
|
||||
return (subtle &&
|
||||
subtleCryptoMethods.every(function (methodName) { return typeof subtle[methodName] === "function"; }));
|
||||
}
|
||||
exports.supportsSubtleCrypto = supportsSubtleCrypto;
|
||||
function supportsZeroByteGCM(subtle) {
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var key, zeroByteAuthTag, _a;
|
||||
return tslib_1.__generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
if (!supportsSubtleCrypto(subtle))
|
||||
return [2 /*return*/, false];
|
||||
_b.label = 1;
|
||||
case 1:
|
||||
_b.trys.push([1, 4, , 5]);
|
||||
return [4 /*yield*/, subtle.generateKey({ name: "AES-GCM", length: 128 }, false, ["encrypt"])];
|
||||
case 2:
|
||||
key = _b.sent();
|
||||
return [4 /*yield*/, subtle.encrypt({
|
||||
name: "AES-GCM",
|
||||
iv: new Uint8Array(Array(12)),
|
||||
additionalData: new Uint8Array(Array(16)),
|
||||
tagLength: 128
|
||||
}, key, new Uint8Array(0))];
|
||||
case 3:
|
||||
zeroByteAuthTag = _b.sent();
|
||||
return [2 /*return*/, zeroByteAuthTag.byteLength === 16];
|
||||
case 4:
|
||||
_a = _b.sent();
|
||||
return [2 /*return*/, false];
|
||||
case 5: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
exports.supportsZeroByteGCM = supportsZeroByteGCM;
|
||||
//# sourceMappingURL=supportsWebCrypto.js.map
|
||||
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/supportsWebCrypto.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/main/supportsWebCrypto.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"supportsWebCrypto.js","sourceRoot":"","sources":["../../src/supportsWebCrypto.ts"],"names":[],"mappings":";;;;AAUA,IAAM,mBAAmB,GAA8B;IACrD,SAAS;IACT,QAAQ;IACR,SAAS;IACT,WAAW;IACX,aAAa;IACb,WAAW;IACX,MAAM;IACN,QAAQ;CACT,CAAC;AAEF,SAAgB,iBAAiB,CAAC,MAAc;IAC9C,IACE,oBAAoB,CAAC,MAAM,CAAC;QAC5B,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,QAAQ,EACxC;QACQ,IAAA,MAAM,GAAK,MAAM,CAAC,MAAM,OAAlB,CAAmB;QAEjC,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;KACrC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAXD,8CAWC;AAED,SAAgB,oBAAoB,CAAC,MAAc;IACjD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE;QAC3D,IAAA,eAAe,GAAK,MAAM,CAAC,MAAM,gBAAlB,CAAmB;QAE1C,OAAO,OAAO,eAAe,KAAK,UAAU,CAAC;KAC9C;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AARD,oDAQC;AAED,SAAgB,oBAAoB,CAAC,MAAoB;IACvD,OAAO,CACL,MAAM;QACN,mBAAmB,CAAC,KAAK,CACvB,UAAA,UAAU,IAAI,OAAA,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,UAAU,EAAxC,CAAwC,CACvD,CACF,CAAC;AACJ,CAAC;AAPD,oDAOC;AAED,SAAsB,mBAAmB,CAAC,MAAoB;;;;;;oBAC5D,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC;wBAAE,sBAAO,KAAK,EAAC;;;;oBAElC,qBAAM,MAAM,CAAC,WAAW,CAClC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,EAChC,KAAK,EACL,CAAC,SAAS,CAAC,CACZ,EAAA;;oBAJK,GAAG,GAAG,SAIX;oBACuB,qBAAM,MAAM,CAAC,OAAO,CAC1C;4BACE,IAAI,EAAE,SAAS;4BACf,EAAE,EAAE,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;4BAC7B,cAAc,EAAE,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;4BACzC,SAAS,EAAE,GAAG;yBACf,EACD,GAAG,EACH,IAAI,UAAU,CAAC,CAAC,CAAC,CAClB,EAAA;;oBATK,eAAe,GAAG,SASvB;oBACD,sBAAO,eAAe,CAAC,UAAU,KAAK,EAAE,EAAC;;;oBAEzC,sBAAO,KAAK,EAAC;;;;;CAEhB;AAtBD,kDAsBC"}
|
||||
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/index.d.ts
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./supportsWebCrypto";
|
||||
2
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/index.js
generated
vendored
Normal file
2
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./supportsWebCrypto";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/index.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
||||
4
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.d.ts
generated
vendored
Normal file
4
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare function supportsWebCrypto(window: Window): boolean;
|
||||
export declare function supportsSecureRandom(window: Window): boolean;
|
||||
export declare function supportsSubtleCrypto(subtle: SubtleCrypto): boolean;
|
||||
export declare function supportsZeroByteGCM(subtle: SubtleCrypto): Promise<boolean>;
|
||||
62
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js
generated
vendored
Normal file
62
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import { __awaiter, __generator } from "tslib";
|
||||
var subtleCryptoMethods = [
|
||||
"decrypt",
|
||||
"digest",
|
||||
"encrypt",
|
||||
"exportKey",
|
||||
"generateKey",
|
||||
"importKey",
|
||||
"sign",
|
||||
"verify"
|
||||
];
|
||||
export function supportsWebCrypto(window) {
|
||||
if (supportsSecureRandom(window) &&
|
||||
typeof window.crypto.subtle === "object") {
|
||||
var subtle = window.crypto.subtle;
|
||||
return supportsSubtleCrypto(subtle);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
export function supportsSecureRandom(window) {
|
||||
if (typeof window === "object" && typeof window.crypto === "object") {
|
||||
var getRandomValues = window.crypto.getRandomValues;
|
||||
return typeof getRandomValues === "function";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
export function supportsSubtleCrypto(subtle) {
|
||||
return (subtle &&
|
||||
subtleCryptoMethods.every(function (methodName) { return typeof subtle[methodName] === "function"; }));
|
||||
}
|
||||
export function supportsZeroByteGCM(subtle) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var key, zeroByteAuthTag, _a;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
if (!supportsSubtleCrypto(subtle))
|
||||
return [2 /*return*/, false];
|
||||
_b.label = 1;
|
||||
case 1:
|
||||
_b.trys.push([1, 4, , 5]);
|
||||
return [4 /*yield*/, subtle.generateKey({ name: "AES-GCM", length: 128 }, false, ["encrypt"])];
|
||||
case 2:
|
||||
key = _b.sent();
|
||||
return [4 /*yield*/, subtle.encrypt({
|
||||
name: "AES-GCM",
|
||||
iv: new Uint8Array(Array(12)),
|
||||
additionalData: new Uint8Array(Array(16)),
|
||||
tagLength: 128
|
||||
}, key, new Uint8Array(0))];
|
||||
case 3:
|
||||
zeroByteAuthTag = _b.sent();
|
||||
return [2 /*return*/, zeroByteAuthTag.byteLength === 16];
|
||||
case 4:
|
||||
_a = _b.sent();
|
||||
return [2 /*return*/, false];
|
||||
case 5: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=supportsWebCrypto.js.map
|
||||
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"supportsWebCrypto.js","sourceRoot":"","sources":["../../src/supportsWebCrypto.ts"],"names":[],"mappings":";AAUA,IAAM,mBAA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