Skip to content

Commit

Permalink
Add support button
Browse files Browse the repository at this point in the history
  • Loading branch information
JovannMC committed Aug 21, 2024
1 parent 92bba12 commit 1705ffd
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 20 deletions.
3 changes: 2 additions & 1 deletion src/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@
"extra": "Extra data",
"all": "All data (!!!)"
},
"openLogsFolder": "Open logs folder"
"openLogsFolder": "Open logs folder",
"openSupportPage": "Open support page"
},
"onboarding": {
"title": "Welcome to SlimeTora!",
Expand Down
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,10 @@ ipcMain.on("set-wired-tracker", (_event, arg) => {
log(`Wired tracker enabled set to: ${arg}`, "settings");
});

ipcMain.on("open-support-page", async () => {
await shell.openExternal("https://github.com/OCSYT/SlimeTora/wiki/FAQ#i-found-an-issuebug");
});

ipcMain.on("open-logs-folder", async () => {
const logDir = path.resolve(mainPath, "logs");
try {
Expand Down
1 change: 1 addition & 0 deletions src/preload.mts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ declare global {
stopConnection: () => void;
showOnboarding: () => void;
openLogsFolder: () => void;
openSupport: () => void;
saveSettings: () => void;
openTrackerSettings: (deviceID: string) => void;

Expand Down
8 changes: 0 additions & 8 deletions src/static/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -21880,14 +21880,6 @@ br {
background-color: red;
}

/*
* Debugging
*/
.logs-folder-container {
display: flex;
justify-content: center;
}

/*
* Settings
*/
Expand Down
2 changes: 1 addition & 1 deletion src/static/css/index.css.map

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions src/static/css/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,6 @@ br {
background-color: red;
}

/*
* Debugging
*/

.logs-folder-container {
display: flex;
justify-content: center;
}

/*
* Settings
*/
Expand Down
5 changes: 4 additions & 1 deletion src/static/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,10 @@ <h2 class="subtitle has-text-centered" data-i18n="debugging.text">
</div>
</div>
<br />
<div class="logs-folder-container">
<div class="buttons is-centered">
<button class="button is-primary" onclick="openSupport()" data-i18n="debugging.openSupportPage">
Open support page
</button>
<button class="button is-info" onclick="openLogsFolder()" data-i18n="debugging.openLogsFolder">
Open logs folder
</button>
Expand Down
5 changes: 5 additions & 0 deletions src/static/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1494,4 +1494,9 @@ window.openLogsFolder = () => {
window.ipc.send("open-logs-folder", null);
};

window.openSupport = () => {
window.log("Opening support page...");
window.ipc.send("open-support-page", null);
};

export {};

0 comments on commit 1705ffd

Please sign in to comment.