Skip to content

Commit

Permalink
fix: remove broken github link and useless log refresh button (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
inhumantsar committed May 11, 2024
1 parent e06b9ac commit 1a76bb4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
25 changes: 3 additions & 22 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ export class SlurpSettingsTab extends PluginSettingTab {
// TODO: make a component for everything below
new Setting(containerEl)
.setName("Report an Issue")
.setHeading();
.setHeading()
.setDesc("Visit github.com/inhumantsar/slurp/issues/new to report a bug or request a feature.");

new Setting(containerEl)
.setName("Debug mode")
Expand All @@ -155,7 +156,6 @@ export class SlurpSettingsTab extends PluginSettingTab {
);

let recentLogsText: HTMLTextAreaElement;
const updateLogsText = () => recentLogsText.setText(logger().dump(false, 25).content);

new Setting(containerEl)
.setName("Recent Logs")
Expand All @@ -164,11 +164,6 @@ export class SlurpSettingsTab extends PluginSettingTab {
"Attach the most recent log file to the GitHub issue instead."
)
.setDisabled(this.plugin.settings.logs.debug)
.addButton((btn) => btn
.setButtonText("Refresh")
.setCta()
.onClick(updateLogsText)
.setDisabled(this.plugin.settings.logs.debug));

if (!this.plugin.settings.logs.debug) {
const recentLogs = containerEl.createDiv();
Expand All @@ -181,23 +176,9 @@ export class SlurpSettingsTab extends PluginSettingTab {
logsTextAreaStyles.width = "100%";
logsTextAreaStyles.height = "20em";
recentLogsText.setCssProps(logsTextAreaStyles);
updateLogsText();
recentLogsText.setText(logger().dump(false, 25).content);
recentLogs.appendChild(recentLogsText);
containerEl.appendChild(recentLogs);
}

// const githubOuter = containerEl.createDiv();
// const githubPara = containerEl.createEl("p");
// const githubParaStyles: Record<string, string> = {};
// githubParaStyles["font-size"] = "normal";
// githubParaStyles["text-align"] = "center";
// githubPara.setCssProps(githubParaStyles);

// const gitHubLink = containerEl.createDiv();
// // gitHubLink.addClass("external-link");
// gitHubLink.setText('https://github.com/inhumantsar/slurp/issues/new?labels=bug');
// githubPara.appendChild(gitHubLink);
// githubOuter.appendChild(githubPara);
// containerEl.appendChild(githubOuter);
}
}
15 changes: 9 additions & 6 deletions test-resources/vault/.obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"state": {
"type": "markdown",
"state": {
"file": "_slurplogs/slurp-2024-05-11.md",
"file": "Inbox/Slurped/Apple releases iOS 11.2 with Apple Pay Cash, fast wireless charging, and iPhone crash fix.md",
"mode": "source",
"backlinks": false,
"source": false
Expand Down Expand Up @@ -86,7 +86,7 @@
"state": {
"type": "backlink",
"state": {
"file": "_slurplogs/slurp-2024-05-11.md",
"file": "Inbox/Slurped/Apple releases iOS 11.2 with Apple Pay Cash, fast wireless charging, and iPhone crash fix.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
Expand All @@ -103,7 +103,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "_slurplogs/slurp-2024-05-11.md",
"file": "Inbox/Slurped/Apple releases iOS 11.2 with Apple Pay Cash, fast wireless charging, and iPhone crash fix.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
Expand All @@ -126,7 +126,7 @@
"state": {
"type": "outline",
"state": {
"file": "_slurplogs/slurp-2024-05-11.md"
"file": "Inbox/Slurped/Apple releases iOS 11.2 with Apple Pay Cash, fast wireless charging, and iPhone crash fix.md"
}
}
}
Expand All @@ -147,10 +147,13 @@
"command-palette:Open command palette": false
}
},
"active": "50580fd4fc0dea57",
"active": "5bc75bc3168bc2c6",
"lastOpenFiles": [
"Inbox/Slurped/Apple releases iOS 11.2 with Apple Pay Cash, fast wireless charging, and iPhone crash fix (6).md",
"Slurped Pages/Apple releases iOS 11.2 with Apple Pay Cash, fast wireless charging, and iPhone crash fix.md",
"Inbox/Apple releases iOS 11.2 with Apple Pay Cash, fast wireless charging, and iPhone crash fix.md",
"Inbox/Slurped/Apple releases iOS 11.2 with Apple Pay Cash, fast wireless charging, and iPhone crash fix (7).md",
"_slurplogs/slurp-2024-05-11.md",
"Inbox/Slurped/Apple releases iOS 11.2 with Apple Pay Cash, fast wireless charging, and iPhone crash fix (6).md",
"_slurplogs/slurp-2024-05-09.md",
"Inbox/Slurped/Apple releases iOS 11.2 with Apple Pay Cash, fast wireless charging, and iPhone crash fix (5).md",
"Inbox/Slurped/Apple releases iOS 11.2 with Apple Pay Cash, fast wireless charging, and iPhone crash fix (4).md",
Expand Down

0 comments on commit 1a76bb4

Please sign in to comment.