Mobile view and wording (#151)

* feat(ui): simplified titles and adjusted some wording

* style(ui): simplified some views for mobile

* style(ui): make job table responsive for mobile

* style(ui): login button gap

* style(ui): dont hide mobile columns

* fix: method return type
This commit is contained in:
Alexander Roidl
2025-08-01 09:51:42 +02:00
committed by GitHub
parent 2b36f868e7
commit ae4b6d1f40
11 changed files with 67 additions and 59 deletions

View File

@@ -71,28 +71,20 @@ const GeneralSettings = function GeneralSettings() {
const nullOrEmpty = (val) => val == null || val.length === 0;
const throwMessage = (message, type) => {
if (type === 'error') {
Toast.error(message);
} else {
Toast.success(message);
}
};
const onStore = async () => {
if (nullOrEmpty(interval)) {
throwMessage('Interval may not be empty.', 'error');
Toast.error('Interval may not be empty.');
return;
}
if (nullOrEmpty(port)) {
throwMessage('Port may not be empty.', 'error');
Toast.error('Port may not be empty.');
return;
}
if (
(!nullOrEmpty(workingHourFrom) && nullOrEmpty(workingHourTo)) ||
(nullOrEmpty(workingHourFrom) && !nullOrEmpty(workingHourTo))
) {
throwMessage('Working hours to and from must be set if either to or from has been set before.', 'error');
Toast.error('Working hours to and from must be set if either to or from has been set before.');
return;
}
try {
@@ -109,13 +101,13 @@ const GeneralSettings = function GeneralSettings() {
} catch (exception) {
console.error(exception);
if (exception?.json?.message != null) {
throwMessage(exception.json.message, 'error');
Toast.error(exception.json.message);
} else {
throwMessage('Error while trying to store settings.', 'error');
Toast.error('Error while trying to store settings.');
}
return;
}
throwMessage('Settings stored successfully. We will reload your browser in 3 seconds.', 'success');
Toast.success('Settings stored successfully. We will reload your browser in 3 seconds.');
setTimeout(() => {
location.reload();
}, 3000);