Prepare internal extension distribution
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 777 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,13 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 128 128" fill="none">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="16" y1="12" x2="114" y2="116" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#9F1239"/>
|
||||
<stop offset="1" stop-color="#4C0519"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="8" y="8" width="112" height="112" rx="28" fill="url(#bg)"/>
|
||||
<path d="M34 80L50 62L64 70L83 46" stroke="#FFF7ED" stroke-linecap="round" stroke-linejoin="round" stroke-width="10"/>
|
||||
<circle cx="86" cy="44" r="8" fill="#FFF7ED"/>
|
||||
<path d="M79 80C79 71.7157 85.7157 65 94 65C102.284 65 109 71.7157 109 80C109 88.2843 102.284 95 94 95C85.7157 95 79 88.2843 79 80Z" stroke="#FFF7ED" stroke-width="8"/>
|
||||
<path d="M104 91L114 101" stroke="#FFF7ED" stroke-linecap="round" stroke-width="8"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 822 B |
@@ -6,7 +6,6 @@ export interface BatchPayload {
|
||||
authorId: string;
|
||||
authorName: string;
|
||||
}>;
|
||||
batchId: string;
|
||||
batchName: string;
|
||||
createdAt: string;
|
||||
creatorName: string;
|
||||
@@ -40,7 +39,6 @@ export function createBatchPayload(options: {
|
||||
authorId: record.authorId,
|
||||
authorName: record.authorName
|
||||
})),
|
||||
batchId: `${logtoUserId}-${options.createdAt}`,
|
||||
batchName,
|
||||
createdAt: options.createdAt,
|
||||
creatorName:
|
||||
|
||||
+30
-14
@@ -79,15 +79,12 @@ export function createMarketController(options: CreateMarketControllerOptions) {
|
||||
options.submitBatch ??
|
||||
((payload: BatchPayload) =>
|
||||
readBatchSubmitAck(sendRuntimeMessage, payload));
|
||||
let activeProgressLabel = "导出中";
|
||||
let shouldShowDetailedProgress = true;
|
||||
const exportRangeController = createExportRangeController({
|
||||
document: options.document,
|
||||
onProgress: ({ currentPage, totalPages }) => {
|
||||
setToolbarExportStatus(
|
||||
toolbar,
|
||||
totalPages
|
||||
? `导出中 ${currentPage}/${totalPages} 页...`
|
||||
: `导出中 第${currentPage}页...`
|
||||
);
|
||||
updateToolbarProgress(currentPage, totalPages);
|
||||
},
|
||||
prepareCurrentPageForExport: prepareCurrentPageForExport,
|
||||
readCurrentPageRecords: () => getVisibleOrderedRecords(),
|
||||
@@ -97,12 +94,7 @@ export function createMarketController(options: CreateMarketControllerOptions) {
|
||||
const silentExportController = createSilentExportController({
|
||||
document: options.document,
|
||||
onProgress: ({ currentPage, totalPages }) => {
|
||||
setToolbarExportStatus(
|
||||
toolbar,
|
||||
totalPages
|
||||
? `导出中 ${currentPage}/${totalPages} 页...`
|
||||
: `导出中 第${currentPage}页...`
|
||||
);
|
||||
updateToolbarProgress(currentPage, totalPages);
|
||||
}
|
||||
});
|
||||
let activeSort: MarketSortState | undefined;
|
||||
@@ -155,7 +147,9 @@ export function createMarketController(options: CreateMarketControllerOptions) {
|
||||
setToolbarBusyState(toolbar, true);
|
||||
try {
|
||||
const records = filterRecordsBySelection(
|
||||
await exportRecords(exportTarget.target)
|
||||
await exportRecords(exportTarget.target, "导出中", {
|
||||
showDetailedProgress: selectedAuthorIds.size === 0
|
||||
})
|
||||
);
|
||||
options.onCsvReady?.(buildCsv(records));
|
||||
setToolbarExportStatus(toolbar, "");
|
||||
@@ -477,8 +471,13 @@ export function createMarketController(options: CreateMarketControllerOptions) {
|
||||
|
||||
async function exportRecords(
|
||||
target: MarketExportTarget,
|
||||
inProgressLabel = "导出中"
|
||||
inProgressLabel = "导出中",
|
||||
progressOptions: {
|
||||
showDetailedProgress?: boolean;
|
||||
} = {}
|
||||
): Promise<MarketRecord[]> {
|
||||
activeProgressLabel = inProgressLabel;
|
||||
shouldShowDetailedProgress = progressOptions.showDetailedProgress ?? true;
|
||||
setToolbarExportStatus(toolbar, `${inProgressLabel}...`);
|
||||
|
||||
if (target.mode === "count" && target.pageCount <= 1) {
|
||||
@@ -499,6 +498,23 @@ export function createMarketController(options: CreateMarketControllerOptions) {
|
||||
return exportRangeController.exportRecords(target);
|
||||
}
|
||||
|
||||
function updateToolbarProgress(
|
||||
currentPage: number,
|
||||
totalPages: number | undefined
|
||||
): void {
|
||||
if (!shouldShowDetailedProgress) {
|
||||
setToolbarExportStatus(toolbar, `${activeProgressLabel}...`);
|
||||
return;
|
||||
}
|
||||
|
||||
setToolbarExportStatus(
|
||||
toolbar,
|
||||
totalPages
|
||||
? `${activeProgressLabel} ${currentPage}/${totalPages} 页...`
|
||||
: `${activeProgressLabel} 第${currentPage}页...`
|
||||
);
|
||||
}
|
||||
|
||||
function filterRecordsBySelection(records: MarketRecord[]): MarketRecord[] {
|
||||
if (selectedAuthorIds.size === 0) {
|
||||
return records;
|
||||
|
||||
@@ -3,7 +3,14 @@
|
||||
"name": "Star Chart Search Enhancer",
|
||||
"version": "0.2.0421.2",
|
||||
"description": "Bootstraps the Xingtu creator market content script.",
|
||||
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0CaZJxcX97TbRXCR08L10t9EZFV31+wPnUgDf21j2f0qYaWdblzWXfVkeU9jGb2Hr2Etpp7F/XuBa6pcipUXkzMMBkJ42KOkciAwbuzTBoAtGB8o9aoWigtax+gGfSz+T3BjqxKBJtXqeqbIAKCDIlxRKIrY+KcY1Z+mD5BKcBHKsUDQPlHsrjc1g0wIBD5doz9LoOk1Wso6gK5cSeOp9lw5YHcu4TImR4yqxGiL6pZwnpciuX/g7qjWBZXn5gf0YBlDsBDDTt5upbP3NguUKgO2qA9M77LyeUwXl3aqbIxYi/VwsQ2t5w9PGWtnOUQQDWUcEg/9dfTb89esZXKATwIDAQAB",
|
||||
"permissions": ["downloads", "identity", "storage"],
|
||||
"icons": {
|
||||
"16": "assets/icons/icon-16.png",
|
||||
"32": "assets/icons/icon-32.png",
|
||||
"48": "assets/icons/icon-48.png",
|
||||
"128": "assets/icons/icon-128.png"
|
||||
},
|
||||
"host_permissions": [
|
||||
"http://*/*",
|
||||
"https://login-api.intelligrow.cn/*",
|
||||
@@ -11,6 +18,10 @@
|
||||
"https://*/*"
|
||||
],
|
||||
"action": {
|
||||
"default_icon": {
|
||||
"16": "assets/icons/icon-16.png",
|
||||
"32": "assets/icons/icon-32.png"
|
||||
},
|
||||
"default_popup": "popup/index.html"
|
||||
},
|
||||
"background": {
|
||||
|
||||
@@ -9,7 +9,7 @@ export interface AuthConfig {
|
||||
const defaultAuthConfig: AuthConfig = {
|
||||
apiResource: "https://talent-search.intelligrow.cn",
|
||||
appId: "i4jkllbvih0554r4n0fd3",
|
||||
enableDevAuthPanel: true,
|
||||
enableDevAuthPanel: false,
|
||||
logtoEndpoint: "https://login-api.intelligrow.cn",
|
||||
scopes: ["openid", "profile", "offline_access", "talent-search:read"]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user