mirror of
https://github.com/gosticks/complai.git
synced 2025-10-16 11:45:36 +00:00
feat: improve layout
This commit is contained in:
parent
0977bc9ca6
commit
4f5b361acb
@ -40,7 +40,7 @@
|
||||
.loading-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 25%;
|
||||
left: 17%;
|
||||
bottom: 0;
|
||||
|
||||
display: flex;
|
||||
|
||||
@ -18,12 +18,36 @@
|
||||
return;
|
||||
}
|
||||
const payload = {};
|
||||
notifyMe();
|
||||
// TODO: adjust URL
|
||||
const resp = await fetch('/api/interpretLaw');
|
||||
|
||||
updateFinished = true;
|
||||
};
|
||||
|
||||
const notifyMe = () => {
|
||||
if (!('Notification' in window)) {
|
||||
// Check if the browser supports notifications
|
||||
alert('This browser does not support desktop notification');
|
||||
} else if (Notification.permission === 'granted') {
|
||||
// Check whether notification permissions have already been granted;
|
||||
// if so, create a notification
|
||||
const notification = new Notification('Hi there!');
|
||||
// …
|
||||
} else if (Notification.permission !== 'denied') {
|
||||
// We need to ask the user for permission
|
||||
Notification.requestPermission().then((permission) => {
|
||||
// If the user accepts, let's create a notification
|
||||
if (permission === 'granted') {
|
||||
const notification = new Notification('Hi there!');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// At last, if the user has denied notifications, and you
|
||||
// want to be respectful there is no need to bother them anymore.
|
||||
};
|
||||
|
||||
onMount(() => {
|
||||
updateCompanyData().finally(() => {
|
||||
updateFinished = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user