Commit fff8557b authored by nextime's avatar nextime

Update gui and webgui: adjust colors and increase columns number

parent f189822b
...@@ -33,11 +33,7 @@ import subprocess ...@@ -33,11 +33,7 @@ import subprocess
config = configparser.ConfigParser() config = configparser.ConfigParser()
config.read('shmcamstudio.conf') config.read('shmcamstudio.conf')
# Command Mapping
COMMANDS = dict(config['Commands'])
builtins.config = config builtins.config = config
builtins.COMMANDS = COMMANDS
# Setup logging # Setup logging
log_file = config.get('General', 'log_file', fallback='/tmp/streaming_control.log') log_file = config.get('General', 'log_file', fallback='/tmp/streaming_control.log')
......
...@@ -7,19 +7,6 @@ stream_url = https://192.168.42.1/HLS/record/Live.m3u8 ...@@ -7,19 +7,6 @@ stream_url = https://192.168.42.1/HLS/record/Live.m3u8
rtmp_url = rtmp://192.168.42.1/record/Live rtmp_url = rtmp://192.168.42.1/record/Live
port = 5000 port = 5000
[Commands]
private_stefy = smblur_private_stefy
private_leeloo = smblur_private_leeloo
private_jasmin = smblur_private_jasmin
private_other = smblur_private
toggle_stefy = smblur_stefy
toggle_leeloo = smblur_leeloo
toggle_jasmin = smblur_jasmin
toggle_others = smblur_shine
tease = smblur_tease
tease_all = smblur_teaseall
open = smblur_clean
[Tkinter] [Tkinter]
window_title = SHM Cam Studio window_title = SHM Cam Studio
button_width = 20 button_width = 20
...@@ -69,19 +56,25 @@ source_tease = 3 ...@@ -69,19 +56,25 @@ source_tease = 3
[BUTTON:1:private_shine] [BUTTON:1:private_shine]
title = Private Shine title = Private Shine
action = private_shine action = private_shine
color = green color = maroon
[BUTTON:1:private_stefy] [BUTTON:1:private_stefy]
title = Private Stefy title = Private Stefy
action = private_stefy action = private_stefy
color = green color = maroon
[BUTTON:1:private_leelo] [BUTTON:1:private_leelo]
title = Private Leeloo title = Private Leeloo
action = private_leeloo action = private_leeloo
color = maroon
[BUTTON:1:open_all]]
title = Open ALL
action = open_all
color = green color = green
#[BUTTON:1:private_jasmine] #[BUTTON:1:private_jasmine]
#title = Private Jasmine #title = Private Jasmine
#action = private_jasmine #action = private_jasmine
...@@ -107,20 +100,32 @@ color = orange ...@@ -107,20 +100,32 @@ color = orange
#action = jasmine_openclose #action = jasmine_openclose
[BUTTON:3:tease_all] [BUTTON:3:tease_all]
title = Tease ALL title = SCENE Tease ALL
action = tease_all action = tease_all
color = blue color = teal
[BUTTON:3:tease] [BUTTON:3:tease]
title = Tease title = SCENE Tease
action = tease action = tease
color = blue color = teal
[BUTTON:3:open_all] [BUTTON:3:scene_all_open]
title = Open ALL title = SCENE ALL OPEN
action = open_all
color = teal
[BUTTON:3:scene_shile_always_open]
title = SCENE SHINE ALWAYS OPEN
action = open_all
color = teal
[BUTTON:3:scene_manual]
title = SCENE MANUAL
action = open_all action = open_all
color = blue color = blue
[ACTION:private_shine] [ACTION:private_shine]
execute = /usr/local/bin/smblur_private execute = /usr/local/bin/smblur_private
......
...@@ -30,7 +30,7 @@ def index(): ...@@ -30,7 +30,7 @@ def index():
htmlbuttons="" htmlbuttons=""
if numrows > 0: if numrows > 0:
while row <= numrows: while row <= numrows:
bspan = int(12/len(buttons[row].keys())) bspan = int(120/len(buttons[row].keys()))
style_rows=style_rows+"\n.button_row"+str(row)+" {\n grid-column: span "+str(bspan)+";\n}\n" style_rows=style_rows+"\n.button_row"+str(row)+" {\n grid-column: span "+str(bspan)+";\n}\n"
col=0 col=0
...@@ -47,7 +47,7 @@ def index(): ...@@ -47,7 +47,7 @@ def index():
row=row+1 row=row+1
return render_template('index.html', commands=COMMANDS, style_rows=style_rows, htmlbuttons=htmlbuttons) return render_template('index.html', style_rows=style_rows, htmlbuttons=htmlbuttons)
@flask_app.route('/execute', methods=['POST']) @flask_app.route('/execute', methods=['POST'])
def execute(): def execute():
......
...@@ -100,7 +100,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -100,7 +100,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
.buttons-container { .buttons-container {
display: grid; display: grid;
grid-template-columns: repeat(12, 1fr); grid-template-columns: repeat(120, 1fr);
grid-template-rows: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
height: 100%; height: 100%;
width: 100%; width: 100%;
...@@ -110,9 +110,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -110,9 +110,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
.button_row { .button_row {
display: grid; display: grid;
grid-template-columns: repeat(12, 1fr); grid-template-columns: repeat(120, 1fr);
width: 100%; width: 100%;
grid-column: span 12; grid-column: span 120;
} }
{{style_rows|safe}} {{style_rows|safe}}
...@@ -150,11 +150,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -150,11 +150,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
transform: scale(0.95); transform: scale(0.95);
} }
/* Third row buttons */
.buttons-container > .button:nth-child(n+9) {
grid-column: span 4;
}
/* Responsive adjustments */ /* Responsive adjustments */
@media (max-width: 768px) { @media (max-width: 768px) {
.button { .button {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment