Skip to content

Commit f18d206

Browse files
committed
Up to v2.4.0
* Up to v2.4.0 (Only Windows DLL for now)
1 parent 9709e0c commit f18d206

File tree

8 files changed

+15
-23
lines changed

8 files changed

+15
-23
lines changed

PyPI/Package/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "webui2"
7-
version = "2.3.0.0"
7+
version = "2.4.0.0"
88
authors = [
99
{ name="Hassan Draga" },
1010
]
37 KB
Binary file not shown.

PyPI/Package/src/webui/webui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# webui_lib Library 2.3.0
2+
# webui_lib Library 2.4.0
33
#
44
# http://webui.me
55
# https://github.com/webui-dev/python-webui

PyPI/test_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<script>
4444
function MyJS() {
4545
const number = document.getElementById('MyInput').value;
46-
webui_fn('JS2P', number).then((response) => {
46+
webui.call('JS2P', number).then((response) => {
4747
document.getElementById('MyInput').value = response;
4848
});
4949
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# WebUI Python v2.3.0
1+
# WebUI Python v2.4.0
22

33
[![Website](https://img.shields.io/circleci/project/github/badges/shields/master?style=for-the-badge)](https://github.com/webui-dev/python-webui) [![Website](https://img.shields.io/github/issues/webui-dev/python-webui.svg?branch=master&style=for-the-badge&url=https://google.com)](https://github.com/webui-dev/python-webui/issues) [![Website](https://img.shields.io/website?label=webui.me&style=for-the-badge&url=https://google.com)](https://webui.me/)
44

examples/andershell3000/ui/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
prompt: function() {
7979
return "$ "
8080
},
81-
banner: "\ndP dP dP dP dP dP dP \n88 88 88 88 88 88 88 \n88 .8P .8P .d8888b. 88d888b. 88 88 88 \n88 d8' d8' 88ooood8 88' `88 88 88 88 \n88.d8P8.d8P 88. ... 88. .88 Y8. .8P 88 \n8888' Y88' `88888P' 88Y8888' `Y88888P' dP\n\nAnderShell 3000 (Python)\n\nWebUI v2.3.0 | webui.me\n\n"
81+
banner: "\ndP dP dP dP dP dP dP \n88 88 88 88 88 88 88 \n88 .8P .8P .d8888b. 88d888b. 88 88 88 \n88 d8' d8' 88ooood8 88' `88 88 88 88 \n88.d8P8.d8P 88. ... 88. .88 Y8. .8P 88 \n8888' Y88' `88888P' 88Y8888' `Y88888P' dP\n\nAnderShell 3000 (Python)\n\nWebUI v2.4.0 | webui.me\n\n"
8282
})
8383
})
8484
}, function(n, t) {
@@ -163,7 +163,7 @@
163163
for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), o = 1; o < e; o++) r[o - 1] = arguments[o];
164164
return function(e) {
165165
try {
166-
webui_fn('Run', _cmd).then((response) => {
166+
webui.call('Run', _cmd).then((response) => {
167167
n[t] ? e(n[t].apply(n, r) + "\n") : e(response)
168168
});
169169
} catch (n) {

examples/serve_folder.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
from webui import webui
88

99
def switch_to_second_page(e : webui.event):
10-
# This function get called every time
11-
# the user click on "SwitchToSecondPage" button
12-
e.window.open("second.html", webui.browser.any)
10+
# This function get called when the user
11+
# click on "SwitchToSecondPage" button
12+
e.window.show("second.html")
1313

1414
def close_the_application(e : webui.event):
1515
webui.exit()
@@ -23,24 +23,16 @@ def main():
2323
MyWindow.bind('SwitchToSecondPage', switch_to_second_page)
2424
MyWindow.bind('Exit', close_the_application)
2525

26-
# The root path. Leave it empty to let the WebUI
27-
# automatically select the current working folder
28-
root_path = ""
29-
30-
# Create a new web server using WebUI
31-
url = MyWindow.new_server(root_path)
26+
# Note
27+
# Add this script to all your .html files:
28+
# <script src="webui.js"></script>
3229

33-
# Show a window using the generated URL
34-
MyWindow.open(url, webui.browser.chrome)
30+
# Show a window using the local file
31+
MyWindow.show("serve_folder.html", webui.browser.chrome)
3532

3633
# Wait until all windows are closed
3734
webui.wait()
3835

39-
# --[ Note ]-----------------
40-
# Add this script to all your .html files:
41-
# <script src="webui.js"></script>
42-
# ---------------------------
43-
4436
print('Thank you.')
4537

4638
if __name__ == "__main__":

examples/text-editor/ui/js/ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function addText(text) {
7575
// Save the file
7676
function SaveFile() {
7777
const content = codeMirrorInstance.getValue();
78-
webui_fn('Save', content);
78+
webui.call('Save', content);
7979
}
8080

8181
window.addEventListener("DOMContentLoaded", (event) => {

0 commit comments

Comments
 (0)