Skip to content

Commit 6410b4a

Browse files
authored
Merge pull request #21 from dumbasPL/linux-support
Linux support
2 parents a98d3b4 + f570d9b commit 6410b4a

File tree

8 files changed

+1017
-1032
lines changed

8 files changed

+1017
-1032
lines changed

build/icon.png

9.63 KB
Loading

build/icons/256x256.png

9.63 KB
Loading

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.4.0
2+
- added linux support
3+
14
# 1.3.1
25
- fixed danger zone rank names (thanks @TheEnderOfficial)
36

html/js/front.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,21 +508,21 @@ async function updateAccounts(force = false) {
508508
let row = FindOrCreateRow(login, tr => {
509509
tr.querySelector('.copy-code').addEventListener('click', e => {
510510
e.preventDefault();
511-
clipboard.writeText(friendCode.encode(account_cache[login].steamid), 'selection');
511+
clipboard.writeText(friendCode.encode(account_cache[login].steamid), 'clipboard');
512512
showToast('Code copied to clipboard', 'success');
513513
});
514514

515515
tr.querySelector('.copy-passwd').addEventListener('click', e => {
516516
e.preventDefault();
517-
clipboard.writeText(account_cache[login].password, 'selection');
517+
clipboard.writeText(account_cache[login].password, 'clipboard');
518518
showToast('Password copied to clipboard', 'success');
519519
});
520520

521521
tr.querySelector('.copy-steamguard').addEventListener('click', async e => {
522522
e.preventDefault();
523523
try {
524524
let code = await ipcRenderer.invoke('steamtotp', { secret: account_cache[login].sharedSecret });
525-
clipboard.writeText(code, 'selection');
525+
clipboard.writeText(code, 'clipboard');
526526
showToast('SteamGuard Code copied to clipboard', 'success');
527527
}
528528
catch (e) {

icons/icon.png

9.63 KB
Loading

main.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ const Protos = require('./helpers/protos.js')([{
1919
]
2020
}]);
2121

22+
const browserWindowOptions = {};
23+
24+
if (process.platform === "linux") {
25+
browserWindowOptions.icon = path.join(`${__dirname}/icons/icon.png`);
26+
}
27+
2228
const IS_PORTABLE = process.env.PORTABLE_EXECUTABLE_DIR != null;
2329
const USER_DATA = IS_PORTABLE ? path.join(process.env.PORTABLE_EXECUTABLE_DIR, process.env.PORTABLE_EXECUTABLE_APP_FILENAME + '-data') : app.getPath('userData');
2430
const SETTINGS_PATH = path.join(USER_DATA, 'settings.json');
@@ -72,6 +78,7 @@ async function openDB() {
7278
let pass = await new Promise((resolve, reject) => {
7379
passwordPromptResponse = null;
7480
let promptWindow = new BrowserWindow({
81+
...browserWindowOptions,
7582
webPreferences: {
7683
preload: path.join(__dirname, 'preload.js'),
7784
contextIsolation: true,
@@ -162,6 +169,7 @@ var mainWindowCreated = false;
162169
function createWindow () {
163170

164171
win = new BrowserWindow({
172+
...browserWindowOptions,
165173
webPreferences: {
166174
preload: path.join(__dirname, 'preload.js'),
167175
contextIsolation: true,
@@ -225,6 +233,7 @@ ipcMain.handle('encryption:setup', async () => {
225233
let pass = await new Promise((resolve, reject) => {
226234
passwordPromptResponse = null;
227235
let promptWindow = new BrowserWindow({
236+
...browserWindowOptions,
228237
parent: win,
229238
modal: true,
230239
webPreferences: {
@@ -290,6 +299,7 @@ ipcMain.handle('encryption:remove', async () => {
290299
let pass = await new Promise((resolve, reject) => {
291300
passwordPromptResponse = null;
292301
let promptWindow = new BrowserWindow({
302+
...browserWindowOptions,
293303
parent: win,
294304
modal: true,
295305
webPreferences: {

0 commit comments

Comments
 (0)