tokenshift / obsidian-progress-clocks

Progress clocks and other useful widgets for https://obsidian.md/.
MIT License
2 stars 2 forks source link

Add Toggles to Hide Buttons/Disable Interaction for Inline Clocks #10

Open timothy-s-dev opened 2 months ago

timothy-s-dev commented 2 months ago

The changes here are relatively straightforward. There's a new ProgressClocksSettingsTab.ts file that specifies what options should be shown in the plugin's settings page, and some boilerplate in ProgressClocksPlugin.ts to set it up, save the settings, and pass them to the Clock object in the handleMarkdownPostProcessor function.

The ClockWidget and InlinePlugin were adjusted to pass the settings values through to Clock.svelte, which has a few changes to conditionally disable click interactions or hide the buttons, depending on the settings.

Closes #9