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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> | |
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'"> | |
<link href="./styles.css" rel="stylesheet"> | |
<title>Hello World!</title> | |
</head> | |
<body> |
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
const {app, BrowserView, BrowserWindow} = require('electron') | |
app.whenReady().then(function createWindow () { | |
const mainWindow = new BrowserWindow({ width: 1080, height: 720 }); | |
const browserView = new BrowserView(); | |
browserView.webContents.loadURL('https://electronjs.org') | |
mainWindow.addBrowserView(browserView); |
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
<!DOCTYPE html> | |
<html> | |
<style> | |
.memory-indicator { | |
background: orange; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
height: 100%; | |
position: absolute; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> | |
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'"> | |
<link href="./styles.css" rel="stylesheet"> | |
<title>Hello World!</title> | |
</head> | |
<body> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> | |
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'"> | |
<link href="./styles.css" rel="stylesheet"> | |
<title>Hello World!</title> | |
</head> | |
<body> |
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
<script> | |
export default { | |
name: 'permission-control', | |
props: ['permission-name'], | |
render() { | |
// EDITABLE case. Don't change anything and just render control as is. | |
if (userHasPermission(this.permissionName, EDITABLE)) { | |
return this.$slots.default[0]; | |
} |
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
<template> | |
<div> | |
<permission-control permission-name="team.trainingTime"> | |
<my-time-input label="Next Training Time" :disabled="!hasNextTraining" /> | |
</permission-control> | |
</div> | |
</template> | |
<script> | |
export default { |
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
<template> | |
<div> | |
<permission-control permission-name="team.internalNotes"> | |
<my-text-input label="Team Internal Notes" /> | |
</permission-control> | |
<permission-control permission-name="team.budget"> | |
<my-text-input label="Total Team Budget" /> | |
</permission-control> | |
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
<template> | |
<div> | |
<my-time-input v-if="userHasPermission('team.trainingTime', VISIBLE)" | |
label="Next Training Time" | |
:disabled="isNextTimeDisabled" /> | |
</div> | |
</template> | |
<script> | |
export default { |
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
<template> | |
<div> | |
<my-text-input v-if="userHasPermission('team.internalNotes', VISIBLE)" | |
label="Team Internal Notes" | |
:disabled="!userHasPermission('team.internalNotes', EDITABLE)" /> | |
<my-text-input v-if="userHasPermission('team.budget', VISIBLE)" | |
label="Total Team Budget" | |
:disabled="!userHasPermission('team.budget', EDITABLE)" /> | |
NewerOlder