Skip to content

Commit

Permalink
s/MOD_APP/MOD_DESKTOP/
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Feb 6, 2024
1 parent 99d9aa2 commit 79f72af
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
}

var CLOUD_TERMS_ACCEPTED = PREFERENCES['cloud-terms-accepted'] === "true";
var USING_MOD_APP = {{using_app}};
var USING_MOD_DEVICE = {{using_mod}} && !{{using_app}};
var USING_MOD_DESKTOP = {{using_desktop}};
var USING_MOD_DEVICE = {{using_mod}} && !{{using_desktop}};

/*
var INFO = {
Expand Down Expand Up @@ -193,7 +193,7 @@
}
desktop.pedalboardBox.pedalboardBox('initViewMode', PREFERENCES['pb-view-mode'])

if ({{using_app}}) {
if ({{using_desktop}}) {
desktop.setupApp()
} else {
if (PREFERENCES['dev-mode'] == "on") {
Expand Down Expand Up @@ -364,11 +364,11 @@
<div id="notifications" class="mod-hidden mod-init-hidden"></div>
<!-- END NOTIFICATIONS -->

{% if using_app == 'true' or using_mod == 'true' %}
{% if using_desktop == 'true' or using_mod == 'true' %}
<!-- CLOUD-TERMS-WINDOW -->
<div id="mod-cloud-terms" class="save-popup mod-hidden">
<div class="mod-box">
{% if using_app == 'true' %}
{% if using_desktop == 'true' %}
<h1>Welcome to MOD Desktop!</h1>
<div>
<p>
Expand Down Expand Up @@ -404,7 +404,7 @@ <h1 class="pull-left">Terms of Service for MOD online components</h1>
</div>
{% end %}
<div class="controls actions">
{% if using_app == 'true' %}
{% if using_desktop == 'true' %}
<button class="js-accept btn btn-success">Agree and Continue</button>
{% else %}
<button class="js-reject btn btn-danger">Disagree</button>
Expand Down
2 changes: 1 addition & 1 deletion mod/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from tornado.ioloop import IOLoop

from mod import TextFileFlusher, safe_json_load
from mod.settings import APP, DATA_DIR
from mod.settings import DATA_DIR

def index_to_filepath(index):
return os.path.join(DATA_DIR, "profile{0}.json".format(index))
Expand Down
4 changes: 2 additions & 2 deletions mod/screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import logging

from tornado.ioloop import IOLoop
from mod.settings import HTML_DIR, DEV_ENVIRONMENT, DEVICE_KEY, CACHE_DIR, APP
from mod.settings import HTML_DIR, DEV_ENVIRONMENT, DEVICE_KEY, CACHE_DIR, DESKTOP


def generate_screenshot(bundle_path, callback):
Expand All @@ -24,7 +24,7 @@ def generate_screenshot(bundle_path, callback):
cwd = os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))

# running packaged through cxfreeze
if APP and os.path.isfile(sys.argv[0]):
if DESKTOP and os.path.isfile(sys.argv[0]):
cmd = [os.path.join(cwd, 'mod-pedalboard'), 'take_screenshot', bundle_path, HTML_DIR, CACHE_DIR]
if sys.platform == 'win32':
cmd[0] += ".exe"
Expand Down
2 changes: 1 addition & 1 deletion mod/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# If on, use dev cloud API environment
DEV_API = bool(int(os.environ.get('MOD_DEV_API', False)))

APP = bool(int(os.environ.get('MOD_APP', False)))
DESKTOP = bool(int(os.environ.get('MOD_DESKTOP', False)))
LOG = int(os.environ.get('MOD_LOG', 0))

API_KEY = os.environ.pop('MOD_API_KEY', None)
Expand Down
6 changes: 3 additions & 3 deletions mod/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
haveSignal = False

from mod.profile import Profile
from mod.settings import (APP, LOG, DEV_API,
from mod.settings import (DESKTOP, LOG, DEV_API,
HTML_DIR, DOWNLOAD_TMP_DIR, DEVICE_KEY, DEVICE_WEBSERVER_PORT,
CLOUD_HTTP_ADDRESS, CLOUD_LABS_HTTP_ADDRESS,
PLUGINS_HTTP_ADDRESS, PEDALBOARDS_HTTP_ADDRESS, CONTROLCHAIN_HTTP_ADDRESS,
Expand Down Expand Up @@ -1811,7 +1811,7 @@ def index(self):
'fulltitle': xhtml_escape(fullpbname),
'titleblend': '' if SESSION.host.pedalboard_name else 'blend',
'dev_api_class': 'dev_api' if DEV_API else '',
'using_app': 'true' if APP else 'false',
'using_desktop': 'true' if DESKTOP else 'false',
'using_mod': 'true' if DEVICE_KEY and hwdesc.get('platform', None) is not None else 'false',
'user_name': mod_squeeze(user_id.get("name", "")),
'user_email': mod_squeeze(user_id.get("email", "")),
Expand Down Expand Up @@ -2468,7 +2468,7 @@ def prepare(isModApp = False):
signal(SIGUSR2, signal_recv)
set_process_name("mod-ui")

application.listen(DEVICE_WEBSERVER_PORT, address=("localhost" if APP else "0.0.0.0"))
application.listen(DEVICE_WEBSERVER_PORT, address=("localhost" if DESKTOP else "0.0.0.0"))

def checkhost():
if SESSION.host.readsock is None or SESSION.host.writesock is None:
Expand Down

0 comments on commit 79f72af

Please sign in to comment.