Releases: ms3056/Tenki
0.7.6 - Small change to refresh code
In addition to the requested changes below I made a slight change to the refresh code.
function debounce(func: (...args: any[]) => void, wait: number) {
The Obsidian API already includes a function of the same name that does the same.
Response: code change implemented in 0.7.5
updateInterval: NodeJS.Timeout | null = null;
Use a regular number here, and use window.setTimeout everywhere.
Response: code change implemented in 0.7.5
const checkLayoutInterval = setInterval(async () => {
Remove this code.
Response: code change implemented in 0.7.5
cls: "recent-files-donation",
Wrong class name.
Also, the donation information is usually at the bottom of the settings.
Response: code change implemented in 0.7.5
0.7.5 - Requested code changes for release
function debounce(func: (...args: any[]) => void, wait: number) {
The Obsidian API already includes a function of the same name that does the same.
Response: code change implemented in 0.7.5
updateInterval: NodeJS.Timeout | null = null;
Use a regular number here, and use window.setTimeout everywhere.
Response: code change implemented in 0.7.5
const checkLayoutInterval = setInterval(async () => {
Remove this code.
Response: code change implemented in 0.7.5
cls: "recent-files-donation",
Wrong class name.
Also, the donation information is usually at the bottom of the settings.
Response: code change implemented in 0.7.5
0.6.3 - Target refresh button not all buttons
Added data-app-id attribute to refresh button - all buttons where being targeted by the styling (whoops)
refreshButton.setAttribute("data-app-id", "tenki");
0.6.2 - Tweak refresh button
A minor release to tweak the refresh button behavior.
0.6.1 - Code review cleanup
"authorUrl": "",
This should always be set, if you don't have a website use your GitHub profile.
completed
--background: #1c2732;
These variable names are too generic, you should make them unique to your plugin.
You should also see if you can find one of the inbuild variables for your case, if a user uses a community theme your plugin has a higher chance of adapting to it's color scheme.
https://docs.obsidian.md/Reference/CSS+variables/CSS+variables
completed, but did not use standard variables - instead made unique variables and then added Style Settings mechanism
font-family: "Roboto", sans-serif;
Same thing with your font here, and many of the paddings & margins.
Completed - removed
const checkLayoutInterval = setInterval(async () => {
This can be simplified to the below, no need to check on an interval:
completed - removed
this.app.workspace.onLayoutReady(async () => {
await this.initView();
});
const response = await axios.get(WEATHER_API_URL);
I would recommend using the requestUrl function from the Obsidian API instead, it will handle some things like CORS automatically.
completed
0.3.0 - Code cleanup
Cleanup coffee code.