Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
malnvenshorn committed Jan 18, 2018
2 parents b4fe916 + 87afd38 commit abe91bd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 46 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OctoPrint-WebcamTab

This OctoPrint plugin relocates the webcam stream into a separate tab.
This OctoPrint plugin moves the webcam stream from the controls into its own tab. Keyboard control is still possible and it is compatible with the [FullScreen Plugin](https://github.com/BillyBlaze/OctoPrint-FullScreen).

## Setup

Expand Down
2 changes: 1 addition & 1 deletion octoprint_webcamtab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_assets(self):

def get_template_configs(self):
return [
dict(type="tab", name="Webcam")
dict(type="tab", name="Webcam", template=None)
]

# Softwareupdate hook
Expand Down
15 changes: 8 additions & 7 deletions octoprint_webcamtab/static/js/webcamtab.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ $(function() {
}
};

self.onStartup = function() {
var container = $("#control #webcam_container");
if (container.length) {
var hint = container.next();
if (hint.attr("data-bind") === "visible: keycontrolPossible") {
hint.remove();
self.onAfterBinding = function() {
var tab = $("#tab_plugin_webcamtab");
var webcam = $("#webcam_container");
if (webcam) {
var hint = webcam.next();
tab.append(webcam.detach());
if (hint && hint.attr("data-bind") === "visible: keycontrolPossible") {
tab.append(hint.detach());
}
container.remove();
}
};
};
Expand Down
36 changes: 0 additions & 36 deletions octoprint_webcamtab/templates/webcamtab_tab.jinja2

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
plugin_identifier = "webcamtab"
plugin_package = "octoprint_webcamtab"
plugin_name = "OctoPrint-WebcamTab"
plugin_version = "0.1.1"
plugin_version = "0.1.2"
plugin_description = """Show webcam stream in separate tab"""
plugin_author = "Sven Lohrmann"
plugin_author_email = "[email protected]"
Expand Down

0 comments on commit abe91bd

Please sign in to comment.