Strict mode
This commit is contained in:
parent
28046e103c
commit
d5092e4ac0
2 changed files with 30 additions and 1 deletions
28
src/frontend/popup/Popup.svelte
Normal file
28
src/frontend/popup/Popup.svelte
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import { Communicator } from "../../communication";
|
||||||
|
|
||||||
|
let isON = false;
|
||||||
|
|
||||||
|
const con = new Communicator();
|
||||||
|
con.setEnabledCallback = (v) => (isON = v);
|
||||||
|
Communicator.getEnabled().then((v) => (isON = v));
|
||||||
|
|
||||||
|
const handleClick = () => {
|
||||||
|
isON = !isON;
|
||||||
|
Communicator.setEnabled(isON);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
#container {
|
||||||
|
display: flex;
|
||||||
|
min-width: 320px;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="container">
|
||||||
|
<button on:click={handleClick}>{isON ? 'ON' : 'OFF'}</button>
|
||||||
|
</div>
|
|
@ -3,7 +3,8 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./dist/",
|
"outDir": "./dist/",
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"target": "ES6"
|
"target": "ES6",
|
||||||
|
"strict": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*", "src/node_modules"],
|
"include": ["src/**/*", "src/node_modules"],
|
||||||
"exclude": ["node_modules/*"]
|
"exclude": ["node_modules/*"]
|
||||||
|
|
Loading…
Reference in a new issue