Skip to content

Commit 05a1a99

Browse files
committed
add evue example resources
1 parent d1d4210 commit 05a1a99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+81
-37
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,12 @@ dmypy.json
131131
.vscode/
132132
.idea/
133133
.pdm.toml
134+
135+
examples/*.evue.json
136+
examples/*.evue.q.json
137+
examples/__init__.py
138+
examples/*/*.evue.json
139+
examples/*/__init__.py
140+
examples/*/*.evue.q.json
141+
examples/*/*/__init__.py
142+
examples/*/*/*.evue.q.json

examples/evue_login/app.py

+12-16
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
11
# -*- coding: utf-8 -*-
22
from evue import EvueApp, globalThis
33
import os
4-
from loguru import logger
4+
5+
def registerComponents(appDir):
6+
pass
57

68
def onCreate(config):
7-
logger.info("app onCreate")
9+
registerComponents(config['appDir'])
810

911
def onDestroy():
10-
logger.info("app onDestroy")
12+
pass
1113

12-
globalThis.project = {
13-
"assets_dir": os.path.dirname(__file__),
14-
"host": None,
15-
"port": None,
16-
"view": "desktop",
17-
"web_renderer": "canvas",
18-
"dir": os.path.dirname(__file__),
19-
"entry": "evue_login",
20-
}
14+
globalThis.project = {'assets_dir': './', 'host': None, 'port': None, 'view': 'desktop', 'web_renderer': 'canvas', 'dir': './evue_login', 'entry': 'evue_login', 'width': 1240, 'height': 900}
15+
globalThis.project['assets_dir'] = os.path.dirname(__file__)
16+
globalThis.project['root_dir'] = os.path.dirname(os.path.dirname(__file__))
17+
globalThis.project['dir'] = os.path.dirname(__file__)
18+
globalThis.project['projectJson'] = "%s/project.json" % os.path.dirname(__file__)
2119

2220
EvueApp({
23-
'title': 'Evue',
24-
'theme_mode': 'light',
2521
'appDir': os.path.dirname(__file__),
26-
'paths': [os.path.dirname(__file__)],
2722
'onCreate': onCreate,
2823
'onDestroy': onDestroy,
24+
'paths': [os.path.dirname(__file__)],
2925
'uri': globalThis.project['entry'],
30-
})
26+
})

examples/evue_login/evue_login.evue

-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ class UserComponent(object):
161161
border-color: transparent;
162162
border-radius: 0px;
163163
}
164-
165164
.switch{
166165
top: 10px;
167166
right: 10px;
110 KB
Loading
853 Bytes
Loading
1.51 KB
Loading
1.46 KB
Loading
Loading
Loading
3.06 KB
Loading
Loading
3.3 KB
Loading
Loading
1.91 KB
Loading
4.11 KB
Loading
1.66 KB
Loading
2.96 KB
Loading
2.45 KB
Loading
6.6 KB
Loading
2.3 KB
Loading
10.2 KB
Loading
2.95 KB
Loading
Loading
2.09 KB
Loading
763 Bytes
Loading

examples/evue_login/project.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
"port": null,
55
"view": "desktop",
66
"web_renderer": "canvas",
7-
"dir": "./evue_login"
7+
"dir": "./evue_login",
8+
"entry": "evue_login",
9+
"width": 1240,
10+
"height": 900
811
}

examples/evue_website/app.py

+14-18
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
11
# -*- coding: utf-8 -*-
2-
from evue import EvueApp, globalThis, Router
2+
from evue import EvueApp, globalThis
33
import os
4-
from loguru import logger
4+
5+
def registerComponents(appDir):
6+
pass
57

68
def onCreate(config):
7-
logger.info("app onCreate")
9+
registerComponents(config['appDir'])
810

911
def onDestroy():
10-
logger.info("app onDestroy")
12+
pass
1113

12-
globalThis.project = {
13-
"assets_dir": os.path.dirname(__file__),
14-
"host": None,
15-
"port": None,
16-
"view": "desktop",
17-
"web_renderer": "canvas",
18-
"dir": os.path.dirname(__file__),
19-
"entry": "evue_website",
20-
}
14+
globalThis.project = {'assets_dir': './', 'host': None, 'port': None, 'view': 'desktop', 'web_renderer': 'canvas', 'dir': './evue_website', 'entry': 'evue_website'}
15+
globalThis.project['assets_dir'] = os.path.dirname(__file__)
16+
globalThis.project['root_dir'] = os.path.dirname(os.path.dirname(__file__))
17+
globalThis.project['dir'] = os.path.dirname(__file__)
18+
globalThis.project['projectJson'] = "%s/project.json" % os.path.dirname(__file__)
2119

2220
EvueApp({
23-
'title': 'Evue',
24-
'theme_mode': 'light',
2521
'appDir': os.path.dirname(__file__),
26-
'paths': [os.path.dirname(__file__)],
2722
'onCreate': onCreate,
2823
'onDestroy': onDestroy,
29-
'uri': "evue_website",
30-
})
24+
'paths': [os.path.dirname(__file__)],
25+
'uri': globalThis.project['entry'],
26+
})
110 KB
Loading
853 Bytes
Loading
1.51 KB
Loading
Loading
Loading
Loading
3.06 KB
Loading

0 commit comments

Comments
 (0)