feat: basic electron
This commit is contained in:
parent
a995985bb8
commit
ab9d9aa96e
|
@ -44,6 +44,13 @@
|
||||||
'@flecks/db/server':
|
'@flecks/db/server':
|
||||||
port: 32362
|
port: 32362
|
||||||
'@flecks/docker': {}
|
'@flecks/docker': {}
|
||||||
|
'@flecks/electron/server':
|
||||||
|
browserWindowOptions:
|
||||||
|
backgroundColor: '#212121'
|
||||||
|
show: false
|
||||||
|
window:
|
||||||
|
- '@persea/core'
|
||||||
|
- '...'
|
||||||
'@flecks/governor': {}
|
'@flecks/governor': {}
|
||||||
'@flecks/web': {}
|
'@flecks/web': {}
|
||||||
'@flecks/web/client':
|
'@flecks/web/client':
|
||||||
|
@ -115,6 +122,7 @@
|
||||||
- '...'
|
- '...'
|
||||||
- '@persea/bootstrap'
|
- '@persea/bootstrap'
|
||||||
- '@flecks/web'
|
- '@flecks/web'
|
||||||
|
- '@flecks/electron'
|
||||||
- '@flecks/repl'
|
- '@flecks/repl'
|
||||||
'@flecks/socket': {}
|
'@flecks/socket': {}
|
||||||
'@flecks/socket/server':
|
'@flecks/socket/server':
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<base href="/" />
|
<base href="/" />
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, user-scalable=no" />
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title>Persea</title>
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
background-color: #212121;
|
background-color: #212121;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.hq.cha0s.io/cha0s/persea.git"
|
"url": "https://git.hq.cha0s.io/cha0s/persea.git"
|
||||||
},
|
},
|
||||||
|
"main": "index.js",
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -37,6 +38,7 @@
|
||||||
"@flecks/core": "^1.4.1",
|
"@flecks/core": "^1.4.1",
|
||||||
"@flecks/create-app": "^1.4.1",
|
"@flecks/create-app": "^1.4.1",
|
||||||
"@flecks/db": "^1.4.1",
|
"@flecks/db": "^1.4.1",
|
||||||
|
"@flecks/electron": "^1.4.1",
|
||||||
"@flecks/governor": "^1.4.1",
|
"@flecks/governor": "^1.4.1",
|
||||||
"@flecks/react": "^1.4.1",
|
"@flecks/react": "^1.4.1",
|
||||||
"@flecks/redis": "^1.4.1",
|
"@flecks/redis": "^1.4.1",
|
||||||
|
|
|
@ -14,12 +14,26 @@ export default {
|
||||||
flecks.set('$persea/core.replacements', []);
|
flecks.set('$persea/core.replacements', []);
|
||||||
startFlush(flecks);
|
startFlush(flecks);
|
||||||
},
|
},
|
||||||
|
'@flecks/core.webpack': (target, config) => {
|
||||||
|
if ('web' === target) {
|
||||||
|
// eslint-disable-next-line no-param-reassign
|
||||||
|
config.devServer.writeToDisk = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
'@flecks/db/server.models': Flecks.provide(require.context('./models', false, /\.js$/)),
|
'@flecks/db/server.models': Flecks.provide(require.context('./models', false, /\.js$/)),
|
||||||
'@flecks/db/server.models.decorate': (
|
'@flecks/db/server.models.decorate': (
|
||||||
Flecks.decorate(require.context('./models/decorators', false, /\.js$/))
|
Flecks.decorate(require.context('./models/decorators', false, /\.js$/))
|
||||||
),
|
),
|
||||||
|
'@flecks/electron/server.window': async (win) => {
|
||||||
|
win.removeMenu();
|
||||||
|
win.maximize();
|
||||||
|
win.once('ready-to-show', () => {
|
||||||
|
win.show();
|
||||||
|
});
|
||||||
|
},
|
||||||
'@flecks/web/server.request.socket': () => (req, res, next) => {
|
'@flecks/web/server.request.socket': () => (req, res, next) => {
|
||||||
if (req.url.startsWith('/projects')) {
|
if (req.url.startsWith('/projects')) {
|
||||||
|
req.url = req.url.slice(9);
|
||||||
resources(req, res, next);
|
resources(req, res, next);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ const Organization = ({
|
||||||
label={label}
|
label={label}
|
||||||
nodes={nodesFromResourcePaths(label, uuid, resourcePaths)}
|
nodes={nodesFromResourcePaths(label, uuid, resourcePaths)}
|
||||||
renderLabel={({label, nodes, value}) => {
|
renderLabel={({label, nodes, value}) => {
|
||||||
const {displayName} = flecks
|
const {displayName = 'Binary'} = flecks
|
||||||
.get('$avocado/resource/persea.controllers')
|
.get('$avocado/resource/persea.controllers')
|
||||||
.find(({matcher}) => value.match(matcher))
|
.find(({matcher}) => value.match(matcher))
|
||||||
.Component;
|
.Component;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user