commit
d23b09dbcb
4 changed files with 785 additions and 485 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Version 0.1.5 (2017-02-nn)
|
||||||
|
- UI improvements
|
||||||
|
- Added git init
|
||||||
|
- Added check_config API for HASS
|
||||||
|
|
||||||
Version 0.1.4 (2017-02-20)
|
Version 0.1.4 (2017-02-20)
|
||||||
- UI improvements
|
- UI improvements
|
||||||
- Switch and create git branches
|
- Switch and create git branches
|
||||||
|
|
|
@ -21,7 +21,7 @@ from urllib.parse import urlparse, parse_qs, unquote
|
||||||
### Some options for you to change
|
### Some options for you to change
|
||||||
LISTENIP = "0.0.0.0"
|
LISTENIP = "0.0.0.0"
|
||||||
LISTENPORT = 3218
|
LISTENPORT = 3218
|
||||||
# Set BASEPATH to something like "/home/hass/.homeasssitant" if you're not running the configurator from that path
|
# Set BASEPATH to something like "/home/hass/.homeassistant/" if you're not running the configurator from that path
|
||||||
BASEPATH = None
|
BASEPATH = None
|
||||||
# Set the paths to a certificate and the key if you're using SSL, e.g "/etc/ssl/certs/mycert.pem"
|
# Set the paths to a certificate and the key if you're using SSL, e.g "/etc/ssl/certs/mycert.pem"
|
||||||
SSL_CERTIFICATE = None
|
SSL_CERTIFICATE = None
|
||||||
|
@ -2541,6 +2541,26 @@ class RequestHandler(BaseHTTPRequestHandler):
|
||||||
res['restart'] = str(err)
|
res['restart'] = str(err)
|
||||||
self.wfile.write(bytes(json.dumps(res), "utf8"))
|
self.wfile.write(bytes(json.dumps(res), "utf8"))
|
||||||
return
|
return
|
||||||
|
elif req.path == '/api/check_config':
|
||||||
|
print("/api/check_config")
|
||||||
|
self.send_header('Content-type', 'text/json')
|
||||||
|
self.end_headers()
|
||||||
|
res = {"check_config": False}
|
||||||
|
try:
|
||||||
|
headers = {
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
if HASS_API_PASSWORD:
|
||||||
|
headers["x-ha-access"] = HASS_API_PASSWORD
|
||||||
|
req = urllib.request.Request("%sservices/homeassistant/check_config" % HASS_API, headers=headers, method='POST')
|
||||||
|
with urllib.request.urlopen(req) as response:
|
||||||
|
res = json.loads(response.read().decode('utf-8'))
|
||||||
|
print(res)
|
||||||
|
except Exception as err:
|
||||||
|
print(err)
|
||||||
|
res['restart'] = str(err)
|
||||||
|
self.wfile.write(bytes(json.dumps(res), "utf8"))
|
||||||
|
return
|
||||||
elif req.path == '/':
|
elif req.path == '/':
|
||||||
self.send_header('Content-type', 'text/html')
|
self.send_header('Content-type', 'text/html')
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
|
@ -2815,6 +2835,37 @@ class RequestHandler(BaseHTTPRequestHandler):
|
||||||
print("Exception (no repo): %s" % str(err))
|
print("Exception (no repo): %s" % str(err))
|
||||||
else:
|
else:
|
||||||
response['message'] = "Missing path or branch"
|
response['message'] = "Missing path or branch"
|
||||||
|
elif req.path == '/api/init':
|
||||||
|
try:
|
||||||
|
postvars = parse_qs(self.rfile.read(length).decode('utf-8'), keep_blank_values=1)
|
||||||
|
except Exception as err:
|
||||||
|
print(err)
|
||||||
|
response['message'] = "%s" % (str(err))
|
||||||
|
postvars = {}
|
||||||
|
if 'path' in postvars.keys():
|
||||||
|
if postvars['path']:
|
||||||
|
try:
|
||||||
|
repopath = unquote(postvars['path'][0])
|
||||||
|
response['path'] = repopath
|
||||||
|
try:
|
||||||
|
repo = REPO.init(repopath)
|
||||||
|
response['error'] = False
|
||||||
|
response['message'] = "Initialized repository in %s" % repopath
|
||||||
|
self.send_response(200)
|
||||||
|
self.send_header('Content-type', 'text/json')
|
||||||
|
self.end_headers()
|
||||||
|
self.wfile.write(bytes(json.dumps(response), "utf8"))
|
||||||
|
return
|
||||||
|
except Exception as err:
|
||||||
|
response['error'] = True
|
||||||
|
response['message'] = str(err)
|
||||||
|
print(response)
|
||||||
|
|
||||||
|
except Exception as err:
|
||||||
|
response['message'] = "Not a git repository: %s" % (str(err))
|
||||||
|
print("Exception (no repo): %s" % str(err))
|
||||||
|
else:
|
||||||
|
response['message'] = "Missing path or branch"
|
||||||
elif req.path == '/api/newfolder':
|
elif req.path == '/api/newfolder':
|
||||||
try:
|
try:
|
||||||
postvars = parse_qs(self.rfile.read(length).decode('utf-8'), keep_blank_values=1)
|
postvars = parse_qs(self.rfile.read(length).decode('utf-8'), keep_blank_values=1)
|
||||||
|
|
474
dev.html
474
dev.html
|
@ -31,6 +31,9 @@
|
||||||
#editor {
|
#editor {
|
||||||
top: 125px;
|
top: 125px;
|
||||||
}
|
}
|
||||||
|
.toolbar_mobile {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.leftellipsis {
|
.leftellipsis {
|
||||||
|
@ -52,14 +55,27 @@
|
||||||
display: block;
|
display: block;
|
||||||
cursor: initial;
|
cursor: initial;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
color: #616161 !important;
|
color: #424242 !important;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: .9em;
|
font-size: .9em;
|
||||||
|
min-height: 64px;
|
||||||
|
padding-top: 8px;
|
||||||
|
margin-left: -5px;
|
||||||
|
max-width: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#fbheaderbranch {
|
#fbheaderbranch {
|
||||||
padding: 5px 18px !important;
|
padding: 5px 10px !important;
|
||||||
display: none;
|
display: none;
|
||||||
|
color: #757575 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#branchselector {
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.branch_select.active {
|
||||||
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#fbelements {
|
#fbelements {
|
||||||
|
@ -85,15 +101,6 @@
|
||||||
padding-left: 20px !important;
|
padding-left: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#newbranchbutton {
|
|
||||||
color: #616161 !important;
|
|
||||||
display: none;
|
|
||||||
float: right;
|
|
||||||
min-height: 48px;
|
|
||||||
padding-top: 0 !important;
|
|
||||||
padding-left: 15px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.filename {
|
.filename {
|
||||||
color: #616161 !important;
|
color: #616161 !important;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -132,9 +139,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
input.currentfile_input {
|
input.currentfile_input {
|
||||||
margin-bottom: -1px;
|
margin-bottom: 0;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
|
border-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side_tools {
|
.side_tools {
|
||||||
|
@ -177,7 +185,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#dropdown_menu, #dropdown_menu_mobile {
|
#dropdown_menu, #dropdown_menu_mobile {
|
||||||
min-width: 180px;
|
min-width: 235px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dropdown_gitmenu {
|
#dropdown_gitmenu {
|
||||||
|
@ -252,7 +260,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.shadow {
|
.shadow {
|
||||||
height: 36px;
|
height: 25px;
|
||||||
|
margin: -26px;
|
||||||
|
min-width: 320px;
|
||||||
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_optionsMenuEntry input {
|
.ace_optionsMenuEntry input {
|
||||||
|
@ -375,6 +386,8 @@
|
||||||
.fbmenuicon_pad {
|
.fbmenuicon_pad {
|
||||||
min-height: 64px;
|
min-height: 64px;
|
||||||
margin-top: 8px !important;
|
margin-top: 8px !important;
|
||||||
|
margin-right: 18px !important;
|
||||||
|
color: #616161 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-padding {
|
.no-padding {
|
||||||
|
@ -382,7 +395,38 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.branch_select {
|
.branch_select {
|
||||||
min-width: 320px !important;
|
min-width: 300px !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
font-weight: 400 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.branch_hover:hover {
|
||||||
|
background-color: #e0e0e0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidesave {
|
||||||
|
opacity: 0;
|
||||||
|
-webkit-transition: all 0.5s ease-in-out;
|
||||||
|
-moz-transition: all 0.5s ease-in-out;
|
||||||
|
-ms-transition: all 0.5s ease-in-out;
|
||||||
|
-o-transition: all 0.5s ease-in-out;
|
||||||
|
transition: all 0.5s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pathtip_color {
|
||||||
|
-webkit-animation: fadeinout 1.75s linear 1 forwards;
|
||||||
|
animation: fadeinout 1.75s linear 1 forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes fadeinout {
|
||||||
|
0% { background-color: #f5f5f5; }
|
||||||
|
50% { background-color: #ff8a80; }
|
||||||
|
100% { background-color: #f5f5f5; }
|
||||||
|
}
|
||||||
|
@keyframes fadeinout {
|
||||||
|
0% { background-color: #f5f5f5; }
|
||||||
|
50% { background-color: #ff8a80; }
|
||||||
|
100% { background-color: #f5f5f5; }
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -444,15 +488,15 @@
|
||||||
<nav class="light-blue">
|
<nav class="light-blue">
|
||||||
<div class="nav-wrapper">
|
<div class="nav-wrapper">
|
||||||
<ul class="left">
|
<ul class="left">
|
||||||
<li><a class="waves-effect waves-light tooltipped files-collapse hide-on-small-only" data-activates="slide-out" data-position="bottom" data-delay="500" data-tooltip="Browse Filesystem"><i class="material-icons">folder</i></a></li>
|
<li><a class="waves-effect waves-light tooltipped files-collapse hide-on-small-only" data-activates="slide-out" data-position="bottom" data-delay="500" data-tooltip="Browse Filesystem" style="padding-left: 25px; padding-right: 25px;"><i class="material-icons">folder</i></a></li>
|
||||||
<li><a class="waves-effect waves-light files-collapse hide-on-med-and-up" data-activates="slide-out"><i class="material-icons">folder</i></a></li>
|
<li><a class="waves-effect waves-light files-collapse hide-on-med-and-up" data-activates="slide-out" style="padding-left: 25px; padding-right: 25px;"><i class="material-icons">folder</i></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="right">
|
<ul class="right">
|
||||||
<li><a class="waves-effect waves-light tooltipped hide-on-small-only" data-position="bottom" data-delay="500" data-tooltip="Save" href="#modal_save"><i class="material-icons">save</i></a></li>
|
<li><a class="waves-effect waves-light tooltipped hide-on-small-only markdirty hidesave" data-position="bottom" data-delay="500" data-tooltip="Save" onclick="save_check()"><i class="material-icons">save</i></a></li>
|
||||||
<li><a class="waves-effect waves-light tooltipped hide-on-small-only" data-position="bottom" data-delay="500" data-tooltip="Close" href="#modal_close"><i class="material-icons">close</i></a></li>
|
<li><a class="waves-effect waves-light tooltipped hide-on-small-only" data-position="bottom" data-delay="500" data-tooltip="Close" href="#modal_close"><i class="material-icons">close</i></a></li>
|
||||||
<li><a class="waves-effect waves-light tooltipped hide-on-small-only" data-position="bottom" data-delay="500" data-tooltip="Search" onclick="editor.execCommand('replace')"><i class="material-icons">search</i></a></li>
|
<li><a class="waves-effect waves-light tooltipped hide-on-small-only" data-position="bottom" data-delay="500" data-tooltip="Search" onclick="editor.execCommand('replace')"><i class="material-icons">search</i></a></li>
|
||||||
<li><a class="waves-effect waves-light dropdown-button hide-on-small-only" data-activates="dropdown_menu" data-beloworigin="true"><i class="material-icons right">more_vert</i></a></li>
|
<li><a class="waves-effect waves-light dropdown-button hide-on-small-only" data-activates="dropdown_menu" data-beloworigin="true"><i class="material-icons right">more_vert</i></a></li>
|
||||||
<li><a class="waves-effect waves-light hide-on-med-and-up" href="#modal_save"><i class="material-icons">save</i></a></li>
|
<li><a class="waves-effect waves-light hide-on-med-and-up markdirty hidesave" onclick="save_check()"><i class="material-icons">save</i></a></li>
|
||||||
<li><a class="waves-effect waves-light hide-on-med-and-up" href="#modal_close"><i class="material-icons">close</i></a></li>
|
<li><a class="waves-effect waves-light hide-on-med-and-up" href="#modal_close"><i class="material-icons">close</i></a></li>
|
||||||
<li><a class="waves-effect waves-light hide-on-med-and-up" onclick="editor.execCommand('replace')"><i class="material-icons">search</i></a></li>
|
<li><a class="waves-effect waves-light hide-on-med-and-up" onclick="editor.execCommand('replace')"><i class="material-icons">search</i></a></li>
|
||||||
<li><a class="waves-effect waves-light dropdown-button hide-on-med-and-up" data-activates="dropdown_menu_mobile" data-beloworigin="true"><i class="material-icons right">more_vert</i></a></li>
|
<li><a class="waves-effect waves-light dropdown-button hide-on-med-and-up" data-activates="dropdown_menu_mobile" data-beloworigin="true"><i class="material-icons right">more_vert</i></a></li>
|
||||||
|
@ -467,6 +511,7 @@
|
||||||
<li><a href="#" data-activates="ace_settings" class="ace_settings-collapse">Editor Settings</a></li>
|
<li><a href="#" data-activates="ace_settings" class="ace_settings-collapse">Editor Settings</a></li>
|
||||||
<li><a href="#modal_about">About PoC</a></li>
|
<li><a href="#modal_about">About PoC</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
|
<li><a href="#modal_check_config">Check HASS Configuration</a></li>
|
||||||
<li><a href="#modal_restart">Restart HASS</a></li>
|
<li><a href="#modal_restart">Restart HASS</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul id="dropdown_menu_mobile" class="dropdown-content z-depth-4">
|
<ul id="dropdown_menu_mobile" class="dropdown-content z-depth-4">
|
||||||
|
@ -475,12 +520,15 @@
|
||||||
<li><a href="#" data-activates="ace_settings" class="ace_settings-collapse">Editor Settings</a></li>
|
<li><a href="#" data-activates="ace_settings" class="ace_settings-collapse">Editor Settings</a></li>
|
||||||
<li><a href="#modal_about">About PoC</a></li>
|
<li><a href="#modal_about">About PoC</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
|
<li><a href="#modal_check_config">Check HASS Configuration</a></li>
|
||||||
<li><a href="#modal_restart">Restart HASS</a></li>
|
<li><a href="#modal_restart">Restart HASS</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul id="dropdown_gitmenu" class="dropdown-content z-depth-4">
|
<ul id="dropdown_gitmenu" class="dropdown-content z-depth-4">
|
||||||
|
<li><a href="#modal_init" class="nowrap waves-effect">git init</a></li>
|
||||||
<li><a href="#modal_commit" class="nowrap waves-effect">git commit</a></li>
|
<li><a href="#modal_commit" class="nowrap waves-effect">git commit</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul id="dropdown_gitmenu_mobile" class="dropdown-content z-depth-4">
|
<ul id="dropdown_gitmenu_mobile" class="dropdown-content z-depth-4">
|
||||||
|
<li><a href="#modal_init" class="nowrap waves-effect">git init</a></li>
|
||||||
<li><a href="#modal_commit" class="nowrap waves-effect">git commit</a></li>
|
<li><a href="#modal_commit" class="nowrap waves-effect">git commit</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div id="modal_components" class="modal bottom-sheet modal-fixed-footer">
|
<div id="modal_components" class="modal bottom-sheet modal-fixed-footer">
|
||||||
|
@ -489,7 +537,7 @@
|
||||||
<a target="_blank" href="https://home-assistant.io/components/" class="hide-on-med-and-down modal_btn waves-effect btn-large btn-flat left"><i class="material-icons">launch</i></a>
|
<a target="_blank" href="https://home-assistant.io/components/" class="hide-on-med-and-down modal_btn waves-effect btn-large btn-flat left"><i class="material-icons">launch</i></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a class="modal-action modal-close waves-effect btn-flat Right">Close</a>
|
<a class="modal-action modal-close waves-effect btn-flat Right light-blue-text">Close</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_acekeyboard" class="modal bottom-sheet modal-fixed-footer">
|
<div id="modal_acekeyboard" class="modal bottom-sheet modal-fixed-footer">
|
||||||
|
@ -498,7 +546,7 @@
|
||||||
<br>
|
<br>
|
||||||
<ul class="collapsible popout" data-collapsible="expandable">
|
<ul class="collapsible popout" data-collapsible="expandable">
|
||||||
<li>
|
<li>
|
||||||
<div class="collapsible-header hoverable"><i class="material-icons">view_headline</i>Line Operations</div>
|
<div class="collapsible-header"><i class="material-icons">view_headline</i>Line Operations</div>
|
||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
<table class="bordered highlight centered">
|
<table class="bordered highlight centered">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -564,7 +612,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="collapsible-header hoverable"><i class="material-icons">photo_size_select_small</i>Selection</div>
|
<div class="collapsible-header"><i class="material-icons">photo_size_select_small</i>Selection</div>
|
||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
<table class="bordered highlight centered">
|
<table class="bordered highlight centered">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -665,7 +713,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="collapsible-header hoverable"><i class="material-icons">multiline_chart</i>Multicursor</div>
|
<div class="collapsible-header"><i class="material-icons">multiline_chart</i>Multicursor</div>
|
||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
<table class="bordered highlight centered">
|
<table class="bordered highlight centered">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -726,7 +774,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="collapsible-header hoverable"><i class="material-icons">call_missed_outgoing</i>Go To</div>
|
<div class="collapsible-header"><i class="material-icons">call_missed_outgoing</i>Go To</div>
|
||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
<table class="bordered highlight centered">
|
<table class="bordered highlight centered">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -832,7 +880,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="collapsible-header hoverable"><i class="material-icons">find_replace</i>Find/Replace</div>
|
<div class="collapsible-header"><i class="material-icons">find_replace</i>Find/Replace</div>
|
||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
<table class="bordered highlight centered">
|
<table class="bordered highlight centered">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -868,7 +916,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="collapsible-header hoverable"><i class="material-icons">all_out</i>Folding</div>
|
<div class="collapsible-header"><i class="material-icons">all_out</i>Folding</div>
|
||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
<table class="bordered highlight centered">
|
<table class="bordered highlight centered">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -904,7 +952,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="collapsible-header hoverable"><i class="material-icons">devices_other</i>Other</div>
|
<div class="collapsible-header"><i class="material-icons">devices_other</i>Other</div>
|
||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
<table class="bordered highlight centered">
|
<table class="bordered highlight centered">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -997,7 +1045,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a class="modal-action modal-close waves-effect btn-flat ">Close</a>
|
<a class="modal-action modal-close waves-effect btn-flat light-blue-text">Close</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_save" class="modal">
|
<div id="modal_save" class="modal">
|
||||||
|
@ -1005,7 +1053,10 @@
|
||||||
<h4>Save</h4>
|
<h4>Save</h4>
|
||||||
<p>Do you really want to save?</p>
|
<p>Do you really want to save?</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"> <a class=" modal-action modal-close waves-effect waves-red btn-flat">No</a> <a onclick="save()" class=" modal-action modal-close waves-effect waves-green btn-flat">Yes</a> </div>
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">No</a>
|
||||||
|
<a onclick="save()" class=" modal-action modal-close waves-effect waves-green btn-flat light-blue-text">Yes</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_upload" class="modal">
|
<div id="modal_upload" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -1023,12 +1074,38 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"> <a class=" modal-action modal-close waves-effect waves-red btn-flat">Cancel</a> <a onclick="upload()" class="modal-action modal-close waves-effect waves-green btn-flat">OK</a> </div>
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">Cancel</a>
|
||||||
|
<a onclick="upload()" class="modal-action modal-close waves-effect waves-green btn-flat light-blue-text">OK</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="modal_init" class="modal">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="row no-padding">
|
||||||
|
<div class="col s11 no-padding">
|
||||||
|
<h4>git init</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col s1">
|
||||||
|
<img src="https://image.flaticon.com/icons/svg/52/52234.svg" style="max-width: 40px;" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>Are you sure you want to initialize a repository at the current path?</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">Cancel</a>
|
||||||
|
<a onclick="gitinit()" class=" modal-action modal-close waves-effect waves-green btn-flat light-blue-text">OK</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_commit" class="modal">
|
<div id="modal_commit" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
<div class="row no-padding">
|
||||||
|
<div class="col s11 no-padding">
|
||||||
<h4>git commit</h4>
|
<h4>git commit</h4>
|
||||||
<br>
|
</div>
|
||||||
|
<div class="col s1">
|
||||||
|
<img src="https://image.flaticon.com/icons/svg/52/52234.svg" style="max-width: 40px;" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12">
|
||||||
<input type="text" id="commitmessage">
|
<input type="text" id="commitmessage">
|
||||||
|
@ -1036,35 +1113,78 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"> <a class=" modal-action modal-close waves-effect waves-red btn-flat">Cancel</a> <a onclick="commit(document.getElementById('commitmessage').value)" class=" modal-action modal-close waves-effect waves-green btn-flat">OK</a> </div>
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">Cancel</a>
|
||||||
|
<a onclick="commit(document.getElementById('commitmessage').value)" class=" modal-action modal-close waves-effect waves-green btn-flat light-blue-text">OK</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_close" class="modal">
|
<div id="modal_close" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h4>Close File</h4>
|
<h4>Close File</h4>
|
||||||
<p>Are you sure you want to close the current file? Unsaved changes will be lost.</p>
|
<p>Are you sure you want to close the current file? Unsaved changes will be lost.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"> <a class=" modal-action modal-close waves-effect waves-red btn-flat">No</a> <a onclick="document.getElementById('currentfile').value='';editor.setValue('');" class="modal-action modal-close waves-effect waves-green btn-flat">Yes</a> </div>
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">No</a>
|
||||||
|
<a onclick="document.getElementById('currentfile').value='';editor.getSession().setValue('');$('.markdirty').each(function(i, o){o.classList.remove('red');});" class="modal-action modal-close waves-effect waves-green btn-flat light-blue-text">Yes</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_delete" class="modal">
|
<div id="modal_delete" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h4>Delete</h4>
|
<h4>Delete</h4>
|
||||||
<p>Are you sure you want to delete <span class="fb_currentfile"></span>?</p>
|
<p>Are you sure you want to delete <span class="fb_currentfile"></span>?</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"> <a class=" modal-action modal-close waves-effect waves-red btn-flat">No</a> <a onclick="delete_element()" class="modal-action modal-close waves-effect waves-green btn-flat">Yes</a> </div>
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">No</a>
|
||||||
|
<a onclick="delete_element()" class="modal-action modal-close waves-effect waves-green btn-flat light-blue-text">Yes</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_gitadd" class="modal">
|
<div id="modal_gitadd" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
<div class="row no-padding">
|
||||||
|
<div class="col s11 no-padding">
|
||||||
<h4>git add</h4>
|
<h4>git add</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col s1">
|
||||||
|
<img src="https://image.flaticon.com/icons/svg/52/52234.svg" style="max-width: 40px;" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<p>Are you sure you want to add <span class="fb_currentfile"></span> to the index?</p>
|
<p>Are you sure you want to add <span class="fb_currentfile"></span> to the index?</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"> <a class=" modal-action modal-close waves-effect waves-red btn-flat">No</a> <a onclick="gitadd()" class="modal-action modal-close waves-effect waves-green btn-flat">Yes</a> </div>
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">No</a>
|
||||||
|
<a onclick="gitadd()" class="modal-action modal-close waves-effect waves-green btn-flat light-blue-text">Yes</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="modal_check_config" class="modal">
|
||||||
|
<div class="modal-content">
|
||||||
|
<h4>Check configuration</h4>
|
||||||
|
<p>Do you really want to check the configuration?</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">No</a>
|
||||||
|
<a onclick="check_config()" class=" modal-action modal-close waves-effect waves-green btn-flat light-blue-text">Yes</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_restart" class="modal">
|
<div id="modal_restart" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h4>Restart</h4>
|
<h4>Restart</h4>
|
||||||
<p>Do you really want to restart Home Assistant?</p>
|
<p>Do you really want to restart Home Assistant?</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"> <a class=" modal-action modal-close waves-effect waves-red btn-flat">No</a> <a onclick="restart()" class=" modal-action modal-close waves-effect waves-green btn-flat">Yes</a> </div>
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">No</a>
|
||||||
|
<a onclick="restart()" class=" modal-action modal-close waves-effect waves-green btn-flat light-blue-text">Yes</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="modal_markdirty" class="modal">
|
||||||
|
<div class="modal-content">
|
||||||
|
<h4>Unsaved Changes</h4>
|
||||||
|
<p>You have unsaved changes in the current file. Please save the changes or close the file before opening a new one.</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a class="modal-action modal-close waves-effect waves-red btn-flat light-blue-text">Abort</a>
|
||||||
|
<a onclick="document.getElementById('currentfile').value='';editor.getSession().setValue('');$('.markdirty').each(function(i, o){o.classList.remove('red');});" class="modal-action modal-close waves-effect waves-green btn-flat light-blue-text">Close file</a>
|
||||||
|
<a onclick="save()" class="modal-action modal-close waves-effect waves-green btn-flat light-blue-text">Save changes</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_newfolder" class="modal">
|
<div id="modal_newfolder" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -1077,7 +1197,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"> <a class=" modal-action modal-close waves-effect waves-red btn-flat">Cancel</a> <a onclick="newfolder(document.getElementById('newfoldername').value)" class=" modal-action modal-close waves-effect waves-green btn-flat">OK</a> </div>
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">Cancel</a>
|
||||||
|
<a onclick="newfolder(document.getElementById('newfoldername').value)" class=" modal-action modal-close waves-effect waves-green btn-flat light-blue-text">OK</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_newfile" class="modal">
|
<div id="modal_newfile" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -1090,12 +1213,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"> <a class=" modal-action modal-close waves-effect waves-red btn-flat">Cancel</a> <a onclick="newfile(document.getElementById('newfilename').value)" class=" modal-action modal-close waves-effect waves-green btn-flat">OK</a> </div>
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">Cancel</a>
|
||||||
|
<a onclick="newfile(document.getElementById('newfilename').value)" class=" modal-action modal-close waves-effect waves-green btn-flat light-blue-text">OK</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_newbranch" class="modal">
|
<div id="modal_newbranch" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
<div class="row no-padding">
|
||||||
|
<div class="col s11 no-padding">
|
||||||
<h4>New Branch</h4>
|
<h4>New Branch</h4>
|
||||||
<br>
|
</div>
|
||||||
|
<div class="col s1">
|
||||||
|
<img src="https://image.flaticon.com/icons/svg/52/52234.svg" style="max-width: 40px;" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12">
|
||||||
<input type="text" id="newbranch">
|
<input type="text" id="newbranch">
|
||||||
|
@ -1103,7 +1235,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"> <a class=" modal-action modal-close waves-effect waves-red btn-flat">Cancel</a> <a onclick="newbranch(document.getElementById('newbranch').value)" class=" modal-action modal-close waves-effect waves-green btn-flat">OK</a> </div>
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect waves-red btn-flat light-blue-text">Cancel</a>
|
||||||
|
<a onclick="newbranch(document.getElementById('newbranch').value)" class=" modal-action modal-close waves-effect waves-green btn-flat light-blue-text">OK</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_about" class="modal modal-fixed-footer">
|
<div id="modal_about" class="modal modal-fixed-footer">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -1121,15 +1256,62 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Libraries used:</p>
|
<p>Libraries used:</p>
|
||||||
<ul>
|
<div class="row">
|
||||||
<li><a class="light-blue-text" href="https://ace.c9.io/" target="_blank">Ace</a></li>
|
<div class="col s6 m3 l3">
|
||||||
<li><a class="light-blue-text" href="http://materializecss.com/" target="_blank">MaterializeCSS</a></li>
|
<a href="https://ace.c9.io/" target="_blank">
|
||||||
<li><a class="light-blue-text" href="https://jquery.com/" target="_blank">jQuery</a></li>
|
<div class="card grey lighten-3 hoverable waves-effect">
|
||||||
<li><a class="light-blue-text" href="https://gitpython.readthedocs.io" target="_blank">GitPython</a></li>
|
<div class="card-image">
|
||||||
</ul>
|
<img src="https://drive.google.com/uc?export=view&id=0B6wTGzSOtvNBeld4U09LQkV0c2M">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"> <a class=" modal-action modal-close waves-effect btn-flat">OK</a> </div>
|
<div class="card-content">
|
||||||
|
<p class="grey-text text-darken-2">Ace Editor</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col s6 m3 l3">
|
||||||
|
<a class="light-blue-text" href="http://materializecss.com/" target="_blank">
|
||||||
|
<div class="card grey lighten-3 hoverable">
|
||||||
|
<div class="card-image">
|
||||||
|
<img src="https://evwilkin.github.io/images/materializecss.png">
|
||||||
|
</div>
|
||||||
|
<div class="card-content">
|
||||||
|
<p class="grey-text text-darken-2">Materialize CSS</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col s6 m3 l3">
|
||||||
|
<a class="light-blue-text" href="https://jquery.com/" target="_blank">
|
||||||
|
<div class="card grey lighten-3 hoverable">
|
||||||
|
<div class="card-image">
|
||||||
|
<img src="https://drive.google.com/uc?export=view&id=0B6wTGzSOtvNBdFI0ZXRGb01xNzQ">
|
||||||
|
</div>
|
||||||
|
<div class="card-content">
|
||||||
|
<p class="grey-text text-darken-2">JQuery</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col s6 m3 l3">
|
||||||
|
<a class="light-blue-text" href="https://gitpython.readthedocs.io" target="_blank">
|
||||||
|
<div class="card grey lighten-3 hoverable">
|
||||||
|
<div class="card-image">
|
||||||
|
<img src="https://drive.google.com/uc?export=view&id=0B6wTGzSOtvNBakk4ek1uRGxqYVE">
|
||||||
|
</div>
|
||||||
|
<div class="card-content">
|
||||||
|
<p class="grey-text text-darken-2">GitPython</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a class=" modal-action modal-close waves-effect btn-flat light-blue-text">OK</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Main Editor Area -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col m4 l3 hide-on-small-only">
|
<div class="col m4 l3 hide-on-small-only">
|
||||||
<br>
|
<br>
|
||||||
|
@ -1173,54 +1355,65 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 m8 l9">
|
<div class="col s12 m8 l9">
|
||||||
<div class="card input-field col s12 grey lighten-4 hoverable">
|
<div class="card input-field col s12 grey lighten-4 hoverable pathtip">
|
||||||
<input class="currentfile_input" value="" id="currentfile" type="text">
|
<input class="currentfile_input" value="" id="currentfile" type="text">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 m8 l9 z-depth-2" id="editor"></div>
|
<div class="col s12 m8 l9 z-depth-2" id="editor"></div>
|
||||||
<div>
|
<div id="edit_float" class="fixed-action-btn vertical click-to-toggle">
|
||||||
<div id="slide-out" class="fb_side-nav side-nav grey lighten-4">
|
<a class="btn-floating btn-large red accent-2 hoverable">
|
||||||
<div class="side_tools center hide-on-small-only">
|
<i class="material-icons">edit</i>
|
||||||
<a class="col s3 waves-effect fbtoolbarbutton tooltipped grey lighten-4" href="#modal_newfile" data-position="bottom" data-delay="500" data-tooltip="New File"><i class="material-icons fbtoolbarbutton_icon">note_add</i></a>
|
</a>
|
||||||
<a class="col s3 waves-effect fbtoolbarbutton tooltipped grey lighten-4" href="#modal_newfolder" data-position="bottom" data-delay="500" data-tooltip="New Folder"><i class="material-icons fbtoolbarbutton_icon">create_new_folder</i></a>
|
<ul>
|
||||||
<a class="col s3 waves-effect fbtoolbarbutton tooltipped grey lighten-4" href="#modal_upload" data-position="bottom" data-delay="500" data-tooltip="Upload File"><i class="material-icons fbtoolbarbutton_icon">file_upload</i></a>
|
<li><a class="btn-floating yellow tooltipped" data-position="left" data-delay="50" data-tooltip="Undo" onclick="editor.execCommand('undo')"><i class="material-icons">undo</i></a></li>
|
||||||
<a class="col s3 waves-effect fbtoolbarbutton tooltipped grey lighten-4 dropdown-button" data-activates="dropdown_gitmenu" data-alignment='right' data-beloworigin='true' data-delay='500' data-position="bottom" data-tooltip="Git"><i class="material-icons fbtoolbarbutton_icon">call_split</i></a>
|
<li><a class="btn-floating green tooltipped" data-position="left" data-delay="50" data-tooltip="Redo" onclick="editor.execCommand('redo')"><i class="material-icons">redo</i></a></li>
|
||||||
|
<li><a class="btn-floating blue tooltipped" data-position="left" data-delay="50" data-tooltip="Indent" onclick="editor.execCommand('indent')"><i class="material-icons">format_indent_increase</i></a></li>
|
||||||
|
<li><a class="btn-floating orange tooltipped" data-position="left" data-delay="50" data-tooltip="Outdent" onclick="editor.execCommand('outdent')"><i class="material-icons">format_indent_decrease</i></a></li>
|
||||||
|
<li><a class="btn-floating brown tooltipped" data-position="left" data-delay="50" data-tooltip="Fold" onclick="toggle_fold()"><i class="material-icons">all_out</i></a></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="side_tools center hide-on-med-and-up z-depth-1">
|
|
||||||
<a class="col s3 waves-effect fbtoolbarbutton grey lighten-4" href="#modal_newfile"><i class="material-icons fbtoolbarbutton_icon">note_add</i></a>
|
|
||||||
<a class="col s3 waves-effect fbtoolbarbutton grey lighten-4" href="#modal_newfolder"><i class="material-icons fbtoolbarbutton_icon">create_new_folder</i></a>
|
|
||||||
<a class="col s3 waves-effect fbtoolbarbutton grey lighten-4" href="#modal_upload"><i class="material-icons fbtoolbarbutton_icon">file_upload</i></a>
|
|
||||||
<a class="col s3 waves-effect fbtoolbarbutton grey lighten-4 dropdown-button" data-activates="dropdown_gitmenu_mobile" data-alignment='right' data-beloworigin='true'><i class="material-icons fbtoolbarbutton_icon">call_split</i></a>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="filebrowser">
|
<!-- Left filebrowser sidenav -->
|
||||||
<ul class="collection with-header">
|
<div class="row">
|
||||||
|
<ul id="slide-out" class="side-nav grey lighten-4">
|
||||||
<li class="no-padding">
|
<li class="no-padding">
|
||||||
|
<ul class="row no-padding center hide-on-small-only grey lighten-4" style="margin-bottom: 0;">
|
||||||
|
<a class="col s3 waves-effect fbtoolbarbutton tooltipped" href="#modal_newfile" data-position="bottom" data-delay="500" data-tooltip="New File"><i class="grey-text text-darken-2 material-icons fbtoolbarbutton_icon">note_add</i></a>
|
||||||
|
<a class="col s3 waves-effect fbtoolbarbutton tooltipped" href="#modal_newfolder" data-position="bottom" data-delay="500" data-tooltip="New Folder"><i class="grey-text text-darken-2 material-icons fbtoolbarbutton_icon">create_new_folder</i></a>
|
||||||
|
<a class="col s3 waves-effect fbtoolbarbutton tooltipped" href="#modal_upload" data-position="bottom" data-delay="500" data-tooltip="Upload File"><i class="grey-text text-darken-2 material-icons fbtoolbarbutton_icon">file_upload</i></a>
|
||||||
|
<a class="col s3 waves-effect fbtoolbarbutton tooltipped dropdown-button" data-activates="dropdown_gitmenu" data-alignment='right' data-beloworigin='true' data-delay='500' data-position="bottom" data-tooltip="Git"><i class="grey-text text-darken-2 material-icons fbtoolbarbutton_icon">call_split</i></a>
|
||||||
|
</ul>
|
||||||
|
<ul class="row center toolbar_mobile hide-on-med-and-up grey lighten-4" style="margin-bottom: 0;">
|
||||||
|
<a class="col s3 waves-effect fbtoolbarbutton" href="#modal_newfile"><i class="grey-text text-darken-2 material-icons fbtoolbarbutton_icon">note_add</i></a>
|
||||||
|
<a class="col s3 waves-effect fbtoolbarbutton" href="#modal_newfolder"><i class="grey-text text-darken-2 material-icons fbtoolbarbutton_icon">create_new_folder</i></a>
|
||||||
|
<a class="col s3 waves-effect fbtoolbarbutton" href="#modal_upload"><i class="grey-text text-darken-2 material-icons fbtoolbarbutton_icon">file_upload</i></a>
|
||||||
|
<a class="col s3 waves-effect fbtoolbarbutton dropdown-button" data-activates="dropdown_gitmenu_mobile" data-alignment='right' data-beloworigin='true'><i class="grey-text text-darken-2 material-icons fbtoolbarbutton_icon">call_split</i></a>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
<div class="col s2 no-padding" style="min-height: 64px">
|
<div class="col s2 no-padding" style="min-height: 64px">
|
||||||
<a id="uplink" class="col s12 waves-effect" style="min-height: 64px; padding-top: 15px; cursor: pointer;"><i class="grey-text text-darken-2 material-icons no-padding">arrow_back</i></a>
|
<a id="uplink" class="col s12 waves-effect" style="min-height: 64px; padding-top: 15px; cursor: pointer;"><i class="arrow grey-text text-darken-2 material-icons">arrow_back</i></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col s10" style="white-space: nowrap; overflow: auto; max-width: 250px; min-height: 64px">
|
<div class="col s10 " style="white-space: nowrap; overflow: auto; min-height: 64px">
|
||||||
<div id="fbheader" class="collection-header2 leftellipsis" style="min-height: 64px; padding-top: 15px; margin-left: -5px;"></div>
|
<div id="fbheader" class="leftellipsis"></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<ul id='branches' class="dropdown-content branch_select z-depth-2 grey lighten-4">
|
||||||
|
<ul id="branchlist"></ul>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="no-padding col s12">
|
<li>
|
||||||
<ul class="collapsible" data-collapsible="accordion">
|
<ul class="row no-padding" style="margin-bottom: 0;">
|
||||||
<li class="col s12">
|
<a id="branchselector" class="col s10 dropdown-button waves-effect truncate grey-text text-darken-2" data-beloworigin="true" data-activates='branches'><i class="grey-text text-darken-2 left material-icons" style="margin-left: 0; margin-right: 0; padding-top: 12px; padding-right: 8px;">arrow_drop_down</i>Branch:<span id="fbheaderbranch"></span></a>
|
||||||
<div id="branchselector" class="col s10 grey lighten-3 grey-text text-darken-2 collapsible-header truncate" style="min-height:48px; padding-top: 6px"><i class="grey-text text-darken-2 left material-icons" style="margin-left: -10px; margin-right: 2px;">arrow_drop_down</i>Branch:<span id="fbheaderbranch"></span></div>
|
<a id="newbranchbutton" class="waves-effect col s2 center" href="#modal_newbranch"><i class="grey-text text-darken-2 center material-icons" style="padding-top: 12px;">add</i></a>
|
||||||
<a href="#modal_newbranch" id="newbranchbutton" class="waves-effect col s2 material-icons grey lighten-3"><i class="grey-text text-darken-2 material-icons">add</i></a>
|
</ul>
|
||||||
<div id="branchdropdown" class="collapsible-body">
|
<div class="divider" style="margin-top: 0;"></div>
|
||||||
<div class="grey lighten-4 no-padding" id="branches">
|
|
||||||
<ul class="center" id="branchlist"></ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
<li>
|
||||||
</div>
|
|
||||||
<ul id="fbelements"></ul>
|
<ul id="fbelements"></ul>
|
||||||
</div>
|
</li>
|
||||||
<div class="row hide-on-med-and-up">
|
<div class="row col s12 shadow"></div>
|
||||||
<br />
|
<div class="z-depth-3 hide-on-med-and-up">
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12" style="margin-top: 30px;">
|
||||||
<select onchange="insert(this.value)">
|
<select onchange="insert(this.value)">
|
||||||
<option value="" disabled selected>Select trigger platform</option>
|
<option value="" disabled selected>Select trigger platform</option>
|
||||||
<option value="event">Event</option>
|
<option value="event">Event</option>
|
||||||
|
@ -1234,20 +1427,14 @@
|
||||||
</select>
|
</select>
|
||||||
<label>Trigger Platforms</label>
|
<label>Trigger Platforms</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row hide-on-med-and-up">
|
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12">
|
||||||
<select id="events_side" onchange="insert(this.value)"></select>
|
<select id="events_side" onchange="insert(this.value)"></select>
|
||||||
<label>Events</label>
|
<label>Events</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row hide-on-med-and-up">
|
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12">
|
||||||
<select id="entities_side" onchange="insert(this.value)"></select>
|
<select id="entities_side" onchange="insert(this.value)"></select>
|
||||||
<label>Entities</label>
|
<label>Entities</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row hide-on-med-and-up">
|
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12">
|
||||||
<select onchange="insert(this.value)">
|
<select onchange="insert(this.value)">
|
||||||
<option value="" disabled selected>Select condition</option>
|
<option value="" disabled selected>Select condition</option>
|
||||||
|
@ -1260,30 +1447,17 @@
|
||||||
</select>
|
</select>
|
||||||
<label>Conditions</label>
|
<label>Conditions</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row hide-on-med-and-up">
|
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12">
|
||||||
<select id="services_side" onchange="insert(this.value)"></select>
|
<select id="services_side" onchange="insert(this.value)"></select>
|
||||||
<label>Services</label>
|
<label>Services</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div id="edit_float" class="fixed-action-btn vertical click-to-toggle">
|
|
||||||
<a class="btn-floating btn-large red hoverable">
|
|
||||||
<i class="material-icons">edit</i>
|
|
||||||
</a>
|
|
||||||
<ul>
|
|
||||||
<li><a class="btn-floating yellow tooltipped" data-position="left" data-delay="50" data-tooltip="Undo" onclick="editor.execCommand('undo')"><i class="material-icons">undo</i></a></li>
|
|
||||||
<li><a class="btn-floating green tooltipped" data-position="left" data-delay="50" data-tooltip="Redo" onclick="editor.execCommand('redo')"><i class="material-icons">redo</i></a></li>
|
|
||||||
<li><a class="btn-floating blue tooltipped" data-position="left" data-delay="50" data-tooltip="Indent" onclick="editor.execCommand('indent')"><i class="material-icons">format_indent_increase</i></a></li>
|
|
||||||
<li><a class="btn-floating orange tooltipped" data-position="left" data-delay="50" data-tooltip="Outdent" onclick="editor.execCommand('outdent')"><i class="material-icons">format_indent_decrease</i></a></li>
|
|
||||||
<li><a class="btn-floating brown tooltipped" data-position="left" data-delay="50" data-tooltip="Fold" onclick="toggle_fold()"><i class="material-icons">all_out</i></a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- Ace Editor SideNav -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<ul id="ace_settings" class="side-nav">
|
<ul id="ace_settings" class="side-nav">
|
||||||
<li><a class="center s12 grey lighten-3 z-depth-1 subheader">Editor Settings</a></li>
|
<li class="center s12 grey lighten-3 z-depth-1 subheader">Editor Settings</li>
|
||||||
<div class="row col s12">
|
<div class="row col s12">
|
||||||
<p class="col s12"> <a class="waves-effect waves-light btn light-blue" href="#modal_acekeyboard">Keyboard Shortcuts</a> </p>
|
<p class="col s12"> <a class="waves-effect waves-light btn light-blue" href="#modal_acekeyboard">Keyboard Shortcuts</a> </p>
|
||||||
<p class="col s12">
|
<p class="col s12">
|
||||||
|
@ -1588,7 +1762,6 @@
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
<input type="hidden" id="fb_currentfile" value="" />
|
<input type="hidden" id="fb_currentfile" value="" />
|
||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
|
@ -1621,10 +1794,10 @@
|
||||||
draggable: true
|
draggable: true
|
||||||
});
|
});
|
||||||
$('.ace_settings-collapse').sideNav({
|
$('.ace_settings-collapse').sideNav({
|
||||||
menuWidth: 300, // Default is 300
|
menuWidth: 300,
|
||||||
edge: 'right', // Choose the horizontal origin
|
edge: 'right',
|
||||||
closeOnClick: true, // Closes side-nav on <a> clicks, useful for Angular/Meteor
|
closeOnClick: true,
|
||||||
draggable: true // Choose whether you can drag to open on touch screens
|
draggable: true
|
||||||
});
|
});
|
||||||
listdir('.');
|
listdir('.');
|
||||||
});
|
});
|
||||||
|
@ -1739,7 +1912,7 @@
|
||||||
|
|
||||||
function renderitem(itemdata, index) {
|
function renderitem(itemdata, index) {
|
||||||
var li = document.createElement('li');
|
var li = document.createElement('li');
|
||||||
li.classList.add("collection-item", "fbicon_pad", "col", "s12", "no-padding");
|
li.classList.add("collection-item", "fbicon_pad", "col", "s12", "no-padding", "white");
|
||||||
var item = document.createElement('a');
|
var item = document.createElement('a');
|
||||||
item.classList.add("waves-effect", "col", "s10", "fbicon_pad");
|
item.classList.add("waves-effect", "col", "s10", "fbicon_pad");
|
||||||
var iicon = document.createElement('i');
|
var iicon = document.createElement('i');
|
||||||
|
@ -1776,7 +1949,7 @@
|
||||||
item.appendChild(iicon);
|
item.appendChild(iicon);
|
||||||
var itext = document.createElement('div');
|
var itext = document.createElement('div');
|
||||||
itext.innerHTML = itemdata.name;
|
itext.innerHTML = itemdata.name;
|
||||||
itext.classList.add('filename');
|
itext.classList.add("filename");
|
||||||
|
|
||||||
var hasgitadd = false;
|
var hasgitadd = false;
|
||||||
if (itemdata.gitstatus) {
|
if (itemdata.gitstatus) {
|
||||||
|
@ -1822,10 +1995,10 @@
|
||||||
dropdown.appendChild(dd_delete);
|
dropdown.appendChild(dd_delete);
|
||||||
|
|
||||||
if (itemdata.gitstatus) {
|
if (itemdata.gitstatus) {
|
||||||
|
if (hasgitadd) {
|
||||||
var divider = document.createElement('li');
|
var divider = document.createElement('li');
|
||||||
divider.classList.add('divider');
|
divider.classList.add('divider');
|
||||||
dropdown.appendChild(divider);
|
dropdown.appendChild(divider);
|
||||||
if (hasgitadd) {
|
|
||||||
// git add button
|
// git add button
|
||||||
var dd_gitadd = document.createElement('li');
|
var dd_gitadd = document.createElement('li');
|
||||||
var dd_gitadd_a = document.createElement('a');
|
var dd_gitadd_a = document.createElement('a');
|
||||||
|
@ -1879,13 +2052,16 @@
|
||||||
for (var i = 0; i < dirdata.branches.length; i++) {
|
for (var i = 0; i < dirdata.branches.length; i++) {
|
||||||
var branch = document.createElement('li');
|
var branch = document.createElement('li');
|
||||||
var link = document.createElement('a');
|
var link = document.createElement('a');
|
||||||
link.classList.add("branch_select", "col", "s12", "no-padding", "truncate");
|
link.classList.add("branch_select", "truncate");
|
||||||
link.innerHTML = dirdata.branches[i];
|
link.innerHTML = dirdata.branches[i];
|
||||||
link.href = '#';
|
link.href = '#';
|
||||||
link.setAttribute('onclick', 'checkout("' + dirdata.branches[i] + '");collapseAll()')
|
link.setAttribute('onclick', 'checkout("' + dirdata.branches[i] + '");collapseAll()')
|
||||||
branch.appendChild(link);
|
branch.appendChild(link);
|
||||||
if (dirdata.branches[i] == dirdata.activebranch) {
|
if (dirdata.branches[i] == dirdata.activebranch) {
|
||||||
branch.classList.add('active');
|
link.classList.add("active", "grey", "darken-1");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
link.classList.add("grey-text", "text-darken-3", "branch_hover", "waves-effect", "grey", "lighten-4");
|
||||||
}
|
}
|
||||||
branchlist.appendChild(branch);
|
branchlist.appendChild(branch);
|
||||||
}
|
}
|
||||||
|
@ -1920,6 +2096,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadfile(filepath) {
|
function loadfile(filepath) {
|
||||||
|
if ($('.markdirty.red').length) {
|
||||||
|
$('#modal_markdirty').modal('open');
|
||||||
|
}
|
||||||
|
else {
|
||||||
$.get("api/file?filename=" + filepath, function(data) {
|
$.get("api/file?filename=" + filepath, function(data) {
|
||||||
fileparts = filepath.split('.');
|
fileparts = filepath.split('.');
|
||||||
extension = fileparts[fileparts.length -1];
|
extension = fileparts[fileparts.length -1];
|
||||||
|
@ -1929,10 +2109,25 @@
|
||||||
else {
|
else {
|
||||||
editor.setOption('mode', "ace/mode/text");
|
editor.setOption('mode', "ace/mode/text");
|
||||||
}
|
}
|
||||||
editor.setValue(data);
|
editor.getSession().setValue(data, -1);
|
||||||
editor.selection.selectFileStart();
|
|
||||||
editor.focus();
|
|
||||||
document.getElementById('currentfile').value = decodeURI(filepath);
|
document.getElementById('currentfile').value = decodeURI(filepath);
|
||||||
|
editor.session.getUndoManager().markClean();
|
||||||
|
$('.markdirty').each(function(i, o){o.classList.remove('red');});
|
||||||
|
$('.hidesave').css('opacity', 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_config() {
|
||||||
|
$.get("api/check_config", function (resp) {
|
||||||
|
if (resp.length == 0) {
|
||||||
|
var $toastContent = $("<div><pre>Configuration seems valid.</pre></div>");
|
||||||
|
Materialize.toast($toastContent, 2000);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var $toastContent = $("<div><pre>" + resp[0].state + "</pre></div>");
|
||||||
|
Materialize.toast($toastContent, 5000);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1964,9 +2159,28 @@
|
||||||
var $toastContent = $("<div><pre>" + resp.message + "</pre></div>");
|
var $toastContent = $("<div><pre>" + resp.message + "</pre></div>");
|
||||||
Materialize.toast($toastContent, 2000);
|
Materialize.toast($toastContent, 2000);
|
||||||
listdir(document.getElementById('fbheader').innerHTML);
|
listdir(document.getElementById('fbheader').innerHTML);
|
||||||
|
$('.markdirty').each(function(i, o){o.classList.remove('red');});
|
||||||
|
$('.hidesave').css('opacity', 0);
|
||||||
|
editor.session.getUndoManager().markClean();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
Materialize.toast('Error: Please provide a filename', 5000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_check() {
|
||||||
|
var filepath = document.getElementById('currentfile').value;
|
||||||
|
if (filepath.length > 0) {
|
||||||
|
$('#modal_save').modal('open');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Materialize.toast('Error: Please provide a filename', 5000);
|
||||||
|
$(".pathtip").bind("animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd", function(){
|
||||||
|
$(this).removeClass("pathtip_color");
|
||||||
|
}).addClass("pathtip_color");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function download_file(filepath) {
|
function download_file(filepath) {
|
||||||
|
@ -2036,6 +2250,25 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function gitinit() {
|
||||||
|
var path = document.getElementById("fbheader").innerHTML;
|
||||||
|
if (path.length > 0) {
|
||||||
|
data = new Object();
|
||||||
|
data.path = path;
|
||||||
|
$.post("api/init", data).done(function(resp) {
|
||||||
|
if (resp.error) {
|
||||||
|
var $toastContent = $("<div><pre>" + resp.message + "\n" + resp.path + "</pre></div>");
|
||||||
|
Materialize.toast($toastContent, 5000);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var $toastContent = $("<div><pre>" + resp.message + "</pre></div>");
|
||||||
|
Materialize.toast($toastContent, 2000);
|
||||||
|
listdir(document.getElementById('fbheader').innerHTML);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function commit(message) {
|
function commit(message) {
|
||||||
var path = document.getElementById("fbheader").innerHTML;
|
var path = document.getElementById("fbheader").innerHTML;
|
||||||
if (path.length > 0) {
|
if (path.length > 0) {
|
||||||
|
@ -2171,6 +2404,17 @@
|
||||||
<script>
|
<script>
|
||||||
ace.require("ace/ext/language_tools");
|
ace.require("ace/ext/language_tools");
|
||||||
var editor = ace.edit("editor");
|
var editor = ace.edit("editor");
|
||||||
|
editor.on("input", function() {
|
||||||
|
if (editor.session.getUndoManager().isClean()) {
|
||||||
|
$('.markdirty').each(function(i, o){o.classList.remove('red');});
|
||||||
|
$('.hidesave').css('opacity', 0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('.markdirty').each(function(i, o){o.classList.add('red');});
|
||||||
|
$('.hidesave').css('opacity', 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (localStorage.hasOwnProperty("pochass")) {
|
if (localStorage.hasOwnProperty("pochass")) {
|
||||||
editor.setOptions(JSON.parse(localStorage.pochass));
|
editor.setOptions(JSON.parse(localStorage.pochass));
|
||||||
editor.setOptions({
|
editor.setOptions({
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
; Modify the paths below to match your setup.
|
; Modify the paths below to match your setup.
|
||||||
[program:hass-configurator]
|
[program:hass-configurator]
|
||||||
directory = /home/hass/.homeassistant/
|
directory = /home/hass/.homeassistant/
|
||||||
command = sudo -u hass /home/hass/.homeassistant/configurator.py /home/hass/.homeassistant/settings.conf
|
command = /usr/bin/python3 -u /home/hass/.homeassistant/configurator.py /home/hass/.homeassistant/settings.conf
|
||||||
user = root
|
user = hass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue