Skip to content

Commit 5f97bc5

Browse files
committed
improve settings panel
1 parent eb9326a commit 5f97bc5

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

main.ts

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {App, Notice, Plugin, PluginSettingTab, Setting, TFile} from 'obsidian';
22
import {requestUrl, RequestUrlParam} from 'obsidian';
3-
import { DirSuggest } from 'suggest';
3+
import {DirSuggest} from 'suggest';
44

55

66
interface GitHubPluginSettings {
@@ -556,13 +556,13 @@ class GitHubSettingTab extends PluginSettingTab {
556556
try {
557557
new DirSuggest(this.app, cb.inputEl);
558558
} catch (e) {
559-
new Notice(e.toString(), 3000);
559+
new Notice(e.toString(), 3000);
560560
}
561561
cb.setPlaceholder('Example: dir1/dir2')
562562
.setValue(this.plugin.settings.targetDirectory)
563563
.onChange(async (dir) => {
564564
this.plugin.settings.targetDirectory = dir;
565-
await this.plugin.saveSettings();
565+
await this.plugin.saveSettings();
566566
});
567567
});
568568

@@ -571,13 +571,9 @@ class GitHubSettingTab extends PluginSettingTab {
571571
lastFetchDate = new Date(this.plugin.settings.lastFetchDate).toLocaleString();
572572
}
573573

574-
new Setting(containerEl)
575-
.setName('Last star fetch')
576-
.setDesc(`Stars were last fetched on: ${lastFetchDate}`);
577-
578574
new Setting(containerEl)
579575
.setName('Force fetch stars')
580-
.setDesc('Manually trigger re-fetching starred repositories')
576+
.setDesc(`Re-fetch all starred repos. Last fetched on: ${lastFetchDate}`)
581577
.addButton(button => button
582578
.setButtonText('Fetch stars')
583579
.setCta()
@@ -620,13 +616,10 @@ class GitHubSettingTab extends PluginSettingTab {
620616
if (this.plugin.settings.lastPRFetchDate) {
621617
lastPRFetchDate = new Date(this.plugin.settings.lastPRFetchDate).toLocaleString();
622618
}
623-
new Setting(containerEl)
624-
.setName('Last PR fetch')
625-
.setDesc(`Pull requests were last fetched on: ${lastPRFetchDate}`);
626619

627620
new Setting(containerEl)
628621
.setName('Force fetch pull requests')
629-
.setDesc('Manually trigger re-fetching all pull requests')
622+
.setDesc(`Re-fetch all Pull Requests. Last fetched on: ${lastPRFetchDate}`)
630623
.addButton(button => button
631624
.setButtonText('Fetch PRs')
632625
.setCta()

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "github",
33
"name": "GitHub Integration",
4-
"version": "1.8.1",
4+
"version": "1.8.2",
55
"minAppVersion": "1.8.0",
66
"description": "Import your starred GitHub repositories and pull requests into notes with metadata",
77
"author": "Kirill Zhuravlev",

0 commit comments

Comments
 (0)