Merge branch 'develop'

This commit is contained in:
Alice Gaudon 2020-05-26 10:55:13 +02:00
commit 982c970a7a
5 changed files with 16 additions and 6 deletions

View File

@ -16,7 +16,7 @@
</head> </head>
<body> <body>
<form action="javascript: save();"> <form>
<div class="form-header"> <div class="form-header">
<h1>Loading...</h1> <h1>Loading...</h1>
</div> </div>
@ -78,7 +78,7 @@
<div class="form-footer"> <div class="form-footer">
<div class="form-group" id="buttons"> <div class="form-group" id="buttons">
<button id="cancel-button">Cancel</button> <button id="cancel-button" type="button">Cancel</button>
<button type="submit">Save</button> <button type="submit">Save</button>
</div> </div>
</div> </div>

View File

@ -17,7 +17,7 @@
</head> </head>
<body> <body>
<form action="javascript: save();"> <form>
<div class="form-header"> <div class="form-header">
<h1>Settings</h1> <h1>Settings</h1>
</div> </div>

View File

@ -65,6 +65,11 @@ document.addEventListener('DOMContentLoaded', () => {
remote.getCurrentWindow().close(); remote.getCurrentWindow().close();
}); });
document.querySelector('form')?.addEventListener('submit', e => {
e.preventDefault();
save();
});
ipcRenderer.send('sync-settings'); ipcRenderer.send('sync-settings');
document.getElementById('userAgentAutoFill')?.addEventListener('click', () => { document.getElementById('userAgentAutoFill')?.addEventListener('click', () => {
@ -170,7 +175,7 @@ function loadServiceValues() {
} }
} }
(window as any).save = () => { function save() {
let form = document.querySelector('form'); let form = document.querySelector('form');
if (!form) return; if (!form) return;
const formData = new FormData(form); const formData = new FormData(form);

View File

@ -36,7 +36,7 @@ ipcRenderer.on('updateStatus', (e, available, version) => {
} }
}); });
(window as any).save = () => { function save() {
let form = document.querySelector('form'); let form = document.querySelector('form');
if (!form) return; if (!form) return;
const formData = new FormData(form); const formData = new FormData(form);
@ -71,6 +71,11 @@ document.addEventListener('DOMContentLoaded', () => {
remote.getCurrentWindow().close(); remote.getCurrentWindow().close();
}); });
document.querySelector('form')?.addEventListener('submit', e => {
e.preventDefault();
save();
});
ipcRenderer.send('syncSettings'); ipcRenderer.send('syncSettings');
ipcRenderer.send('checkForUpdates'); ipcRenderer.send('checkForUpdates');
}); });

View File

@ -1,6 +1,6 @@
{ {
"name": "tabs", "name": "tabs",
"version": "1.0.0", "version": "1.0.1",
"description": "Persistent and separate browser tabs in one window.", "description": "Persistent and separate browser tabs in one window.",
"author": { "author": {
"name": "Alice Gaudon", "name": "Alice Gaudon",