Always include timelapse view model in bundled js files
Even if the webcam URLs and the FFMPEG path is not yet configured. Otherwise
setting those URLs and the path will require a restart of OctoPrint to enable properly -
that's overkill.
(cherry picked from commit 1425b20)
This commit is contained in:
parent
0705a7054c
commit
8c1a79558b
2 changed files with 2 additions and 5 deletions
|
|
@ -806,12 +806,10 @@ class Server():
|
|||
assets.updater = UpdaterType
|
||||
|
||||
enable_gcodeviewer = settings().getBoolean(["gcodeViewer", "enabled"])
|
||||
enable_timelapse = (settings().get(["webcam", "snapshot"]) and settings().get(["webcam", "ffmpeg"]))
|
||||
preferred_stylesheet = settings().get(["devel", "stylesheet"])
|
||||
|
||||
dynamic_assets = util.flask.collect_plugin_assets(
|
||||
enable_gcodeviewer=enable_gcodeviewer,
|
||||
enable_timelapse=enable_timelapse,
|
||||
preferred_stylesheet=preferred_stylesheet
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -600,7 +600,7 @@ class SettingsCheckUpdater(webassets.updater.BaseUpdater):
|
|||
|
||||
##~~ plugin assets collector
|
||||
|
||||
def collect_plugin_assets(enable_gcodeviewer=True, enable_timelapse=True, preferred_stylesheet="css"):
|
||||
def collect_plugin_assets(enable_gcodeviewer=True, preferred_stylesheet="css"):
|
||||
logger = logging.getLogger(__name__ + ".collect_plugin_assets")
|
||||
|
||||
supported_stylesheets = ("css", "less")
|
||||
|
|
@ -623,6 +623,7 @@ def collect_plugin_assets(enable_gcodeviewer=True, enable_timelapse=True, prefer
|
|||
'js/app/viewmodels/slicing.js',
|
||||
'js/app/viewmodels/temperature.js',
|
||||
'js/app/viewmodels/terminal.js',
|
||||
'js/app/viewmodels/timelapse.js',
|
||||
'js/app/viewmodels/users.js',
|
||||
'js/app/viewmodels/log.js',
|
||||
'js/app/viewmodels/usersettings.js'
|
||||
|
|
@ -634,8 +635,6 @@ def collect_plugin_assets(enable_gcodeviewer=True, enable_timelapse=True, prefer
|
|||
'gcodeviewer/js/gCodeReader.js',
|
||||
'gcodeviewer/js/renderer.js'
|
||||
]
|
||||
if enable_timelapse:
|
||||
assets["js"].append('js/app/viewmodels/timelapse.js')
|
||||
|
||||
if preferred_stylesheet == "less":
|
||||
assets["less"].append('less/octoprint.less')
|
||||
|
|
|
|||
Loading…
Reference in a new issue