Skip to content

Commit

Permalink
Add version & copyright note
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrisan committed Mar 30, 2020
1 parent 95bfdb4 commit 8ffeb6e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tcfrontend/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

VERSION = '1.0.1'
10 changes: 10 additions & 0 deletions tcfrontend/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,22 @@ div.bottom-bar {
border-top: 1px solid #555;
font-size: 0.75em;
padding: 0.5em;
grid-template-columns: 1fr 1fr 1fr;
align-items: center;
}

div.home-link > * {
vertical-align: bottom;
}

div.name-version {
text-align: center;
}

div.copyright {
text-align: right;
}


/* Disclaimer */

Expand Down
6 changes: 6 additions & 0 deletions tcfrontend/templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@
<img src="{{ static_url('github.png') }}"/> visit us on
<a href="https://github.com/qtoggle/tuya-convert-os">GitHub</a>
</div>
<div class="name-version">
Tuya Convert OS {{ version }}
</div>
<div class="copyright">
copyright &copy; the qToggle Team
</div>
</div>
</div>
</body>
Expand Down
6 changes: 4 additions & 2 deletions tcfrontend/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@

from tcfrontend import states
from tcfrontend import tccontrol
from tcfrontend import VERSION


logger = logging.getLogger(__name__)


class MainPageHandler(RequestHandler):
def get(self) -> None:
self.render('main.html')
self.render('main.html', version=VERSION)


class JSONRequestHandlerMixin:
Expand Down Expand Up @@ -107,5 +108,6 @@ def make_app() -> Application:
handlers=make_handlers(),
template_path=os.path.join(os.path.dirname(__file__), 'templates'),
static_path=os.path.join(os.path.dirname(__file__), 'static'),
debug=False
debug=False,
compiled_template_cache=False
)

0 comments on commit 8ffeb6e

Please sign in to comment.