fix: address plugin review errors (await revealLeaf, replace inline styles with CSS class)

This commit is contained in:
liyachen 2026-07-18 21:31:16 -04:00
parent 5f98c8dcc3
commit d1ddf50f94
3 changed files with 7 additions and 4 deletions

View file

@ -29,7 +29,7 @@ export default class VaultAutopilotPlugin extends Plugin {
async activateGallery(): Promise<void> {
const existing = this.app.workspace.getLeavesOfType(GALLERY_VIEW_TYPE)[0];
if (existing) { this.app.workspace.revealLeaf(existing); return; }
if (existing) { await this.app.workspace.revealLeaf(existing); return; }
const leaf = this.app.workspace.getLeaf(true);
await leaf.setViewState({ type: GALLERY_VIEW_TYPE, active: true });
}

View file

@ -281,9 +281,7 @@ export class VaultAutopilotSettingTab extends PluginSettingTab {
this.display();
}));
}
const stateEl = setting.infoEl.createDiv();
stateEl.style.fontSize = '12px';
stateEl.style.marginTop = '4px';
const stateEl = setting.infoEl.createDiv({ cls: 'vault-autopilot-sop-state' });
sopStateEls[row.mode] = stateEl;
}
refreshSopStates();

View file

@ -78,3 +78,8 @@
aspect-ratio: 16 / 9 !important;
height: auto !important;
}
.vault-autopilot-sop-state {
font-size: 12px;
margin-top: 4px;
}