update at 2025-10-10 17:00:09
This commit is contained in:
@@ -88,16 +88,8 @@ export class XiaohongshuPreview {
|
||||
option.text = name;
|
||||
});
|
||||
|
||||
const refreshCard = this.createGridCard(board, 'xhs-area-refresh');
|
||||
const refreshBtn = refreshCard.createEl('button', { text: '🔄 刷新', cls: 'toolbar-button purple-gradient' });
|
||||
refreshBtn.onclick = () => this.onRefresh();
|
||||
|
||||
const publishCard = this.createGridCard(board, 'xhs-area-publish');
|
||||
const publishBtn = publishCard.createEl('button', { text: '📤 发布', cls: 'toolbar-button' });
|
||||
publishBtn.onclick = () => this.onPublish();
|
||||
|
||||
const previewCard = this.createGridCard(board, 'xhs-area-preview');
|
||||
const previewLabel = previewCard.createDiv({ cls: 'xhs-label', text: '预览宽度' });
|
||||
const previewLabel = previewCard.createDiv({ cls: 'xhs-label', text: '宽度' });
|
||||
this.previewWidthSelect = previewCard.createEl('select', { cls: 'xhs-select' });
|
||||
const currentPreviewWidth = this.settings.xhsPreviewWidth || XHS_PREVIEW_DEFAULT_WIDTH;
|
||||
XHS_PREVIEW_WIDTH_OPTIONS.forEach(value => {
|
||||
@@ -121,9 +113,8 @@ export class XiaohongshuPreview {
|
||||
};
|
||||
|
||||
const fontCard = this.createGridCard(board, 'xhs-area-font');
|
||||
fontCard.createDiv({ cls: 'xhs-label', text: '字号' });
|
||||
//fontCard.createDiv({ cls: 'xhs-label', text: '字号' });
|
||||
const fontSizeGroup = fontCard.createDiv({ cls: 'font-size-group' });
|
||||
|
||||
const decreaseBtn = fontSizeGroup.createEl('button', { text: '−', cls: 'font-size-btn' });
|
||||
decreaseBtn.onclick = () => this.changeFontSize(-1);
|
||||
|
||||
@@ -174,10 +165,10 @@ export class XiaohongshuPreview {
|
||||
nextBtn.onclick = () => this.nextPage();
|
||||
|
||||
const sliceCard = this.createGridCard(board, 'xhs-area-slice');
|
||||
const sliceCurrentBtn = sliceCard.createEl('button', { text: '⬇ 当前页切图', cls: 'xhs-slice-btn' });
|
||||
const sliceCurrentBtn = sliceCard.createEl('button', { text: '当前页切图', cls: 'xhs-slice-btn' });
|
||||
sliceCurrentBtn.onclick = () => this.sliceCurrentPage();
|
||||
|
||||
const sliceAllBtn = sliceCard.createEl('button', { text: '⇓ 全部页切图', cls: 'xhs-slice-btn secondary' });
|
||||
const sliceAllBtn = sliceCard.createEl('button', { text: '全部页切图', cls: 'xhs-slice-btn secondary' });
|
||||
sliceAllBtn.onclick = () => this.sliceAllPages();
|
||||
}
|
||||
|
||||
@@ -423,6 +414,14 @@ export class XiaohongshuPreview {
|
||||
await this.onPublishCallback();
|
||||
}
|
||||
}
|
||||
|
||||
async refresh(): Promise<void> {
|
||||
await this.onRefresh();
|
||||
}
|
||||
|
||||
async publish(): Promise<void> {
|
||||
await this.onPublish();
|
||||
}
|
||||
|
||||
/**
|
||||
* 全部页切图
|
||||
|
||||
Reference in New Issue
Block a user