-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
206 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
major: 3 | ||
minor: 11 | ||
patch: 0 | ||
patch: 1 | ||
entry: runtimepy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
console.log("env.js"); | ||
|
||
/* | ||
tab.container.querySelector("button").onclick = async event => { | ||
/**/ | ||
// | ||
tab.send_message({kind : "button.pressed"}); | ||
/**/ | ||
// | ||
}; | ||
tab.message_handlers.push((data) => { | ||
console.log("-----" + tab.name + "-----"); | ||
console.log(data); | ||
console.log("---------------------------"); | ||
}); | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
""" | ||
A module implementing a channel-environment tab HTML interface. | ||
""" | ||
|
||
# third-party | ||
from svgen.element import Element | ||
|
||
# internal | ||
from runtimepy.channel.environment.command.processor import ( | ||
ChannelCommandProcessor, | ||
) | ||
from runtimepy.net.arbiter.info import AppInfo | ||
from runtimepy.net.server.app.bootstrap import icon_str | ||
from runtimepy.net.server.app.bootstrap.tabs import TabbedContent | ||
from runtimepy.net.server.app.elements import div | ||
from runtimepy.net.server.app.tab import Tab | ||
|
||
|
||
class ChannelEnvironmentTab(Tab): | ||
"""A channel-environment tab interface.""" | ||
|
||
def __init__( | ||
self, | ||
name: str, | ||
command: ChannelCommandProcessor, | ||
app: AppInfo, | ||
tabs: TabbedContent, | ||
icon: str = "alarm", | ||
) -> None: | ||
"""Initialize this instance.""" | ||
|
||
self.command = command | ||
super().__init__(name, app, tabs, source="env") | ||
|
||
# Use an icon as the start of the button. | ||
self.button.text = icon_str(icon) + " " + self.name | ||
|
||
def compose(self, parent: Element) -> None: | ||
"""Compose the tab's HTML elements.""" | ||
|
||
for name in self.command.env.names: | ||
div(text=name, parent=parent) |
Oops, something went wrong.