Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
postbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Wen Wei Li
postbox
Commits
af0fadd2
Commit
af0fadd2
authored
Mar 30, 2020
by
Wen Wei Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify some ui
parent
c15de659
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
26 deletions
+30
-26
app.py
app.py
+4
-5
static/css/main.css
static/css/main.css
+8
-10
templates/index.html
templates/index.html
+10
-4
templates/main_page.html
templates/main_page.html
+6
-6
templates/wifi.html
templates/wifi.html
+2
-1
No files found.
app.py
View file @
af0fadd2
...
...
@@ -64,7 +64,6 @@ def wifi_scan():
return
render_template
(
'wifi.html'
,
data
=
wifi_list
)
@
app
.
route
(
'/wifi_select/<string:ssid>'
,
methods
=
[
'GET'
])
@
app
.
route
(
'/wifi_select/'
,
methods
=
[
'GET'
])
def
wifi_pass
(
ssid
):
global
wifi_list
delete_connection
(
ssid
)
...
...
@@ -79,7 +78,9 @@ def wifi_pass(ssid):
else
:
return
redirect
(
url_for
(
'index'
))
@
app
.
route
(
'/wifi_select/'
,
methods
=
[
'GET'
])
def
pass_without_ssid
():
return
redirect
(
url_for
(
'wifi_scan'
))
@
app
.
route
(
'/wifi_conn'
,
methods
=
[
"POST"
])
def
wifi_conn
():
...
...
@@ -112,7 +113,5 @@ def pin_store():
def
main_page
():
return
render_template
(
"main_page.html"
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
app
.
run
(
host
=
'0.0.0.0'
,
port
=
8080
,
debug
=
True
)
static/css/main.css
View file @
af0fadd2
.inline
{
display
:
inline-grid
;
}
.table-wrapper-scroll-y
{
display
:
block
;
}
.scrollbar
{
position
:
relative
;
height
:
300px
;
overflow
:
auto
;
}
.input
{
width
:
auto
;
height
:
50px
;
}
input
:focus
{
color
:
blue
;
}
td
{
cursor
:
pointer
;
}
input
.input_margin
{
margin-right
:
6%
;
}
button
.left
{
float
:
right
;
}
templates/index.html
View file @
af0fadd2
...
...
@@ -37,19 +37,21 @@
{% block content%}
<body
class=
"bg-light m-5"
>
<div>
<p
style=
"visibility:hidden"
id=
"ssid"
>
{{data}}
</p>
<h2
class=
"text-muted text-center m-5"
>
Wifi Password
</h2>
<center>
{% if isEnc is sameas true%}
<div
class=
"row align-items-center m-5 col-8"
>
<div
class=
"col-10 inline "
>
<input
type=
"password"
class=
"form-control
input
"
id=
"wifi-password"
<input
type=
"password"
class=
"form-control"
id=
"wifi-password"
placeholder=
"Tap on the virtual keyboard to start"
>
</div>
{% endif%}
<div
class=
"col-2 inline"
>
<button
type=
"submit"
class=
"btn btn-primary"
id=
"conn"
style=
"height:50px"
>
Connect
</button>
</div>
</div>
<div
class=
"container m-5"
>
<button
type=
"submit"
class=
"btn btn-primary btn-danger btn-lg pull-left"
id=
"prev"
>
Previous
</button>
<button
type=
"submit"
class=
"btn btn-primary btn-danger btn-lg pull-right"
id=
"conn"
>
Connect
</button>
</div>
<div
class=
"row align-items-center"
>
<div
class=
"col m-5 inline"
>
...
...
@@ -57,6 +59,7 @@
</div>
</div>
</center>
</div>
<script
src=
"{{url_for('static', filename='js/keyboard.min.js')}}"
></script>
<script
src=
"{{url_for('static', filename='js/index.js')}}"
></script>
<script>
...
...
@@ -80,6 +83,9 @@
});
});
$
(
'
#prev
'
).
click
(
function
(){
window
.
location
.
href
=
"
http://localhost:8080/wifi_scan
"
;
});
</script>
<!-- keyboard js-->
</body>
...
...
templates/main_page.html
View file @
af0fadd2
...
...
@@ -5,12 +5,12 @@
<link
rel=
"stylesheet"
href=
"{{url_for('static',filename='css/main.css')}}"
>
{% endblock %}
{% block content %}
<body
>
<div
class=
"
col-2"
>
<
button
type=
"submit"
id=
"pin_setup"
class=
"btn btn-primary"
>
Pincode Setup
</button
>
</div
>
<div
class=
"col-2"
>
<
button
type=
"submit"
id=
"setting"
class=
"btn btn-primary"
>
Preference
</button
>
<body
class=
"m-5"
>
<div
class=
"
row align-items-center mx-auto col-8"
>
<
center
>
<button
type=
"submit"
id=
"pin_setup"
class=
"btn btn-primary btn-lg px-md-5"
>
Pincode Setup
</button
>
<button
type=
"submit"
id=
"setting"
class=
"btn btn-primary btn-lg px-md-5"
>
Preference
</button
>
<
/center
>
</div>
{% block footer %}
...
...
templates/wifi.html
View file @
af0fadd2
...
...
@@ -10,6 +10,7 @@
{% block content %}
<h2
class=
"text-muted text-center m-5"
>
WIFI SSID
</h2>
<div
class=
"container m-5"
>
<div
class=
"table-wrapper-scoll-y scrollbar"
>
<table
class=
"table table-hover"
>
<thead>
<tr>
...
...
@@ -28,7 +29,7 @@
{% endfor %}
</tbody>
</table>
</div>
<button
type=
"button"
id=
"prev"
class=
"btn btn-danger btn-lg pull-left"
>
previous
</button>
<button
type=
"button"
id=
"button"
class=
"btn btn-danger btn-lg pull-right"
>
confirm
</button>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment