-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MERGE] Merge branch 'master' into production
- Loading branch information
Showing
8 changed files
with
51 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { MDCTextField } from "@material/textfield"; | ||
|
||
import Time from "@/core/time"; | ||
|
||
declare global | ||
{ | ||
interface Window | ||
{ | ||
$workbox: Promise<ServiceWorker>; | ||
|
||
mdc: { textfield: { MDCTextField: typeof MDCTextField } }; | ||
|
||
Time: Time; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
import { MDCTextField as _MDCTextField } from "@material/textfield"; | ||
|
||
declare global | ||
{ | ||
interface Window | ||
{ | ||
mdc: { textfield: { MDCTextField: typeof _MDCTextField } }; | ||
} | ||
} | ||
|
||
window.mdc = { textfield: { MDCTextField: _MDCTextField } }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
import Time from "@/core/time"; | ||
|
||
declare global | ||
{ | ||
interface Window | ||
{ | ||
Time: Time; | ||
} | ||
} | ||
|
||
window.Time = Time; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Context } from "@nuxt/types"; | ||
|
||
import { WorkboxEvent } from "@/core/types"; | ||
|
||
export default async ({ store }: Context): Promise<void> => | ||
{ | ||
const workbox = await window.$workbox; | ||
|
||
if (workbox) | ||
{ | ||
workbox.addEventListener("installed", (event) => | ||
{ | ||
const workboxEvent = event as WorkboxEvent; | ||
|
||
if (workboxEvent.isUpdate) | ||
{ | ||
store.dispatch("dialog", { | ||
type: "snackbar", | ||
message: { text: "Sono disponibili dei nuovi contenuti!" }, | ||
actions: [{ | ||
text: "Ricarica", | ||
callback: () => window.location.reload() | ||
}] | ||
}); | ||
} | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters