Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Possibility to refer to URL instead of IP address #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@
autologin = 1

# BASE_URL is variant use to save the format of host and port
BASE_URL = 'http://' + HOST + ':'+ PORT + '/'
if PORT == '80':
BASE_URL = 'http://' + HOST + '/'
else:
BASE_URL = 'http://' + HOST + ':'+ PORT + '/'

def __reflash_url__():
global BASE_URL
BASE_URL = 'http://' + HOST + ':'+ PORT + '/'
if PORT == '80':
BASE_URL = 'http://' + HOST + '/'
else:
BASE_URL = 'http://' + HOST + ':'+ PORT + '/'


def __read_auto_inf__():
Expand Down Expand Up @@ -138,7 +144,7 @@ def on_pBtn_login_clicked(self):
"""
global HOST,PORT
# check whether the length of input host and port is allowable
if 7<len(self.lEd_host.text())<16 :
if 7<len(self.lEd_host.text())<50 :
HOST = self.lEd_host.text()
PORT = self.lEd_port.text()
__reflash_url__()
Expand Down
2 changes: 1 addition & 1 deletion client/login_screen.ui
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ padding:2px 4px;
color: rgb(80, 76, 77);</string>
</property>
<property name="maxLength">
<number>15</number>
<number>50</number>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down