chore: simplify export action labels

This commit is contained in:
2026-05-19 17:39:57 +08:00
parent 303efcdc8f
commit 75294ca8c7
10 changed files with 106 additions and 140 deletions
@@ -25,7 +25,7 @@ export function promptForAudienceProfileFields(
applyTitleStyles(title);
const hint = document.createElement("p");
hint.textContent = "基础字段会固定保留。取消勾选后,本次及后续画像CSV将不包含对应列。";
hint.textContent = "基础字段会固定保留。取消勾选后,本次及后续CSV将不包含对应列。";
applyHintStyles(hint);
const toolbar = document.createElement("div");
+2 -2
View File
@@ -8,7 +8,7 @@ export function promptForAuthorIds(document: Document): Promise<string | null> {
applyDialogStyles(dialog);
const title = document.createElement("h2");
title.textContent = "按星图ID导出画像CSV";
title.textContent = "按星图ID导出";
applyTitleStyles(title);
const textarea = document.createElement("textarea");
@@ -17,7 +17,7 @@ export function promptForAuthorIds(document: Document): Promise<string | null> {
applyTextareaStyles(textarea);
const hint = document.createElement("p");
hint.textContent = "粘贴客户提供的达人星图ID,确认后将批量导出画像和商业能力数据。";
hint.textContent = "粘贴客户提供的达人星图ID,确认后将批量导出达人数据。";
applyHintStyles(hint);
const actions = document.createElement("div");
+2 -2
View File
@@ -228,7 +228,7 @@ export function createMarketController(options: CreateMarketControllerOptions) {
onExportAudienceProfile: async () => {
syncSelectionStateFromDom();
if (selectedAuthorIds.size === 0) {
setToolbarExportStatus(toolbar, "请先勾选需要导出画像的达人");
setToolbarExportStatus(toolbar, "请先勾选需要导出数据的达人");
return;
}
@@ -359,7 +359,7 @@ export function createMarketController(options: CreateMarketControllerOptions) {
saveAudienceProfileSelectedHeaders(nextHeaders);
setToolbarExportStatus(
toolbar,
`画像字段已保存(已选 ${nextHeaders.length}/${readAudienceProfileSelectableHeaders().length} 个字段)`
`字段已保存(已选 ${nextHeaders.length}/${readAudienceProfileSelectableHeaders().length} 个字段)`
);
},
onSubmitBatch: async () => {
+8 -14
View File
@@ -79,29 +79,29 @@ export function ensurePluginToolbar(
const exportButton = document.createElement("button");
exportButton.type = "button";
exportButton.dataset.pluginExport = "button";
exportButton.textContent = "导出列表CSV";
exportButton.title = "导出当前达人列表中的基础字段和秒思指标";
exportButton.hidden = true;
exportButton.tabIndex = -1;
const audienceProfileExportButton = document.createElement("button");
audienceProfileExportButton.type = "button";
audienceProfileExportButton.dataset.pluginExportAudienceProfile = "button";
audienceProfileExportButton.textContent = "导出选中达人画像";
audienceProfileExportButton.textContent = "导出选中达人数据";
audienceProfileExportButton.title =
"仅导出已勾选达人,包含画像、内容数据、效果预估等字段";
"仅导出已勾选达人,包含内容数据、效果预估、画像等维度";
const audienceProfileByIdExportButton = document.createElement("button");
audienceProfileByIdExportButton.type = "button";
audienceProfileByIdExportButton.dataset.pluginExportAudienceProfileById = "button";
audienceProfileByIdExportButton.textContent = "按星图ID导出画像";
audienceProfileByIdExportButton.textContent = "按星图ID导出";
audienceProfileByIdExportButton.title =
"粘贴达人星图ID后批量导出画像数据,不依赖当前列表勾选";
"粘贴达人星图ID后批量导出达人数据,不依赖当前列表勾选";
const audienceProfileFieldButton = document.createElement("button");
audienceProfileFieldButton.type = "button";
audienceProfileFieldButton.dataset.pluginAudienceProfileFields = "button";
audienceProfileFieldButton.textContent = "选择画像字段";
audienceProfileFieldButton.textContent = "选择字段";
audienceProfileFieldButton.title =
"勾选本次画像CSV需要导出的字段,设置会自动保存";
"勾选本次CSV需要导出的字段,设置会自动保存";
const batchSubmitButton = document.createElement("button");
batchSubmitButton.type = "button";
@@ -502,7 +502,6 @@ function applyNativeControlStyles(
findNativeActionButton(document, "导出");
if (nativeButton) {
controls.exportButton.className = nativeButton.className;
controls.audienceProfileExportButton.className = nativeButton.className;
controls.audienceProfileByIdExportButton.className = nativeButton.className;
controls.audienceProfileFieldButton.className = nativeButton.className;
@@ -510,7 +509,6 @@ function applyNativeControlStyles(
}
[
controls.exportButton,
controls.audienceProfileExportButton,
controls.audienceProfileByIdExportButton,
controls.audienceProfileFieldButton,
@@ -565,7 +563,6 @@ function ensurePluginActionButtonTheme(document: Document): void {
const style = document.createElement("style");
style.id = PLUGIN_ACTION_BUTTON_STYLE_ID;
style.textContent = `
[data-plugin-export="button"]:hover:not(:disabled),
[data-plugin-export-audience-profile="button"]:hover:not(:disabled),
[data-plugin-export-audience-profile-by-id="button"]:hover:not(:disabled),
[data-plugin-audience-profile-fields="button"]:hover:not(:disabled),
@@ -574,7 +571,6 @@ function ensurePluginActionButtonTheme(document: Document): void {
border-color: #6d1627 !important;
}
[data-plugin-export="button"]:active:not(:disabled),
[data-plugin-export-audience-profile="button"]:active:not(:disabled),
[data-plugin-export-audience-profile-by-id="button"]:active:not(:disabled),
[data-plugin-audience-profile-fields="button"]:active:not(:disabled),
@@ -584,7 +580,6 @@ function ensurePluginActionButtonTheme(document: Document): void {
transform: translateY(1px);
}
[data-plugin-export="button"]:focus-visible,
[data-plugin-export-audience-profile="button"]:focus-visible,
[data-plugin-export-audience-profile-by-id="button"]:focus-visible,
[data-plugin-audience-profile-fields="button"]:focus-visible,
@@ -593,7 +588,6 @@ function ensurePluginActionButtonTheme(document: Document): void {
box-shadow: 0 0 0 3px rgba(127, 29, 45, 0.2) !important;
}
[data-plugin-export="button"]:disabled,
[data-plugin-export-audience-profile="button"]:disabled,
[data-plugin-export-audience-profile-by-id="button"]:disabled,
[data-plugin-audience-profile-fields="button"]:disabled,