mirror of
https://github.com/bucknatt/mitsu-plugin.git
synced 2026-07-22 07:05:32 +00:00
Fix community review for 1.0.4
Rename the settings heading to avoid banned words, use activeDocument for theme hooks, tighten ASCII preset typing, and attest release binaries in CI.
This commit is contained in:
parent
17a4b50e88
commit
5b8b2b3b13
9 changed files with 28 additions and 15 deletions
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
|
|
@ -10,6 +10,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
attestations: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
@ -26,6 +28,13 @@ jobs:
|
|||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Attest release binaries
|
||||
uses: actions/attest-build-provenance@v2
|
||||
with:
|
||||
subject-path: |
|
||||
obsidian-miku-plugin/main.js
|
||||
obsidian-miku-plugin/styles.css
|
||||
|
||||
- name: Create release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "miku-plugin-hybrid",
|
||||
"name": "Miku Hybrid",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"minAppVersion": "1.5.0",
|
||||
"description": "Switch Miku-inspired theme modes and optional dashboard widgets with built-in hybrid styling.",
|
||||
"author": "Nattaya Buck",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "miku-plugin-hybrid",
|
||||
"name": "Miku Hybrid",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"minAppVersion": "1.5.0",
|
||||
"description": "Switch Miku-inspired theme modes and optional dashboard widgets with built-in hybrid styling.",
|
||||
"author": "Nattaya Buck",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "obsidian-miku-plugin",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"description": "Hatsune Miku inspired Obsidian plugin with widgets and theme switching.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ export function normalizeAsciiArtPreset(preset: string): MikuAsciiArtPreset {
|
|||
: "panel";
|
||||
}
|
||||
|
||||
export function getDashboardAsciiArt(preset: MikuAsciiArtPreset | string): string | null {
|
||||
export function getDashboardAsciiArt(preset: MikuAsciiArtPreset): string | null {
|
||||
const normalized = normalizeAsciiArtPreset(preset);
|
||||
if (normalized === "off") {
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export class MikuSettingTab extends PluginSettingTab {
|
|||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
|
||||
new Setting(containerEl).setName("Miku Hybrid Settings").setHeading();
|
||||
new Setting(containerEl).setName("General").setHeading();
|
||||
|
||||
new Setting(containerEl).setDesc("No audio features are included by design.");
|
||||
|
||||
|
|
|
|||
|
|
@ -4,16 +4,18 @@ const ROOT_CLASS = "miku-plugin-enabled";
|
|||
|
||||
export class ThemeManager {
|
||||
apply(settings: MikuPluginSettings): void {
|
||||
document.body.classList.add(ROOT_CLASS);
|
||||
document.body.dataset.mikuTheme = settings.themeMode;
|
||||
document.body.dataset.mikuReducedMotion = settings.reducedMotion ? "true" : "false";
|
||||
document.body.style.setProperty("--miku-glow-intensity", String(settings.glowIntensity));
|
||||
const body = activeDocument.body;
|
||||
body.classList.add(ROOT_CLASS);
|
||||
body.dataset.mikuTheme = settings.themeMode;
|
||||
body.dataset.mikuReducedMotion = settings.reducedMotion ? "true" : "false";
|
||||
body.style.setProperty("--miku-glow-intensity", String(settings.glowIntensity));
|
||||
}
|
||||
|
||||
cleanup(): void {
|
||||
document.body.classList.remove(ROOT_CLASS);
|
||||
delete document.body.dataset.mikuTheme;
|
||||
delete document.body.dataset.mikuReducedMotion;
|
||||
document.body.style.removeProperty("--miku-glow-intensity");
|
||||
const body = activeDocument.body;
|
||||
body.classList.remove(ROOT_CLASS);
|
||||
delete body.dataset.mikuTheme;
|
||||
delete body.dataset.mikuReducedMotion;
|
||||
body.style.removeProperty("--miku-glow-intensity");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,5 +3,6 @@
|
|||
"1.0.0": "1.5.0",
|
||||
"1.0.1": "1.5.0",
|
||||
"1.0.2": "1.5.0",
|
||||
"1.0.3": "1.5.0"
|
||||
"1.0.3": "1.5.0",
|
||||
"1.0.4": "1.5.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,5 +3,6 @@
|
|||
"1.0.0": "1.5.0",
|
||||
"1.0.1": "1.5.0",
|
||||
"1.0.2": "1.5.0",
|
||||
"1.0.3": "1.5.0"
|
||||
"1.0.3": "1.5.0",
|
||||
"1.0.4": "1.5.0"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue