mirror of
https://github.com/onyx-and-iris/q3rcon-tui.git
synced 2026-04-09 05:33:31 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 923faa67ec | |||
| 76483a24b9 | |||
| b3a3a4759a | |||
| fc6c2e99a5 | |||
| 97458682ea | |||
| 3181377c18 |
@@ -42,8 +42,10 @@ q3rcon-tui --host=localhost --port=28960 --password=rconpassword
|
||||
|
||||
Additional flags:
|
||||
|
||||
- `--raw`: Boolean flag, if set the RichLog will print raw responses withouth rendering tables.
|
||||
- `--raw`: Boolean flag, if set the RichLog will print raw responses without rendering tables.
|
||||
- `--append`: Boolean flag, if set the RichLog output with append each response continuously.
|
||||
- `--version`: Print the version of the TUI.
|
||||
- `--help`: Print the help message.
|
||||
|
||||
#### Environment Variables
|
||||
|
||||
@@ -61,6 +63,11 @@ Q3RCON_TUI_RAW=false
|
||||
Q3RCON_TUI_APPEND=false
|
||||
```
|
||||
|
||||
## Special Thanks
|
||||
|
||||
- [lapetus-11](https://github.com/Iapetus-11) for writing the [aio-q3-rcon](https://github.com/Iapetus-11/aio-q3-rcon) package.
|
||||
- The developers at [Textualize](https://github.com/Textualize) for writing the [textual](https://github.com/Textualize/textual) package.
|
||||
|
||||
## License
|
||||
|
||||
`q3rcon-tui` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2026-present onyx-and-iris <code@onyxandiris.online>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
__version__ = '0.4.0'
|
||||
__version__ = '0.4.2'
|
||||
|
||||
@@ -44,35 +44,63 @@
|
||||
|
||||
Button {
|
||||
width: 100%;
|
||||
height: 3;
|
||||
height: 4;
|
||||
margin: 0 1;
|
||||
background: #5e81ac;
|
||||
color: #eceff4;
|
||||
border: none;
|
||||
text-style: bold;
|
||||
border: solid #5e81ac;
|
||||
}
|
||||
|
||||
Button:hover {
|
||||
background: #81a1c1;
|
||||
color: #2e3440;
|
||||
text-style: bold;
|
||||
border: solid #81a1c1;
|
||||
}
|
||||
|
||||
Button:focus {
|
||||
background: #88c0d0;
|
||||
color: #2e3440;
|
||||
text-style: bold;
|
||||
border: solid #88c0d0;
|
||||
}
|
||||
|
||||
Button.success {
|
||||
background: #a3be8c;
|
||||
border: solid #a3be8c;
|
||||
}
|
||||
|
||||
Button.success:hover {
|
||||
background: #8fbcbb;
|
||||
color: #2e3440;
|
||||
text-style: bold;
|
||||
border: solid #8fbcbb;
|
||||
}
|
||||
|
||||
Button.success:focus {
|
||||
background: #88c0d0;
|
||||
color: #2e3440;
|
||||
text-style: bold;
|
||||
}
|
||||
|
||||
Button.warning {
|
||||
background: #ebcb8b;
|
||||
color: #2e3440;
|
||||
border: solid #ebcb8b;
|
||||
}
|
||||
|
||||
Button.warning:hover {
|
||||
background: #d08770;
|
||||
color: #eceff4;
|
||||
text-style: bold;
|
||||
border: solid #d08770;
|
||||
}
|
||||
|
||||
Button.warning:focus {
|
||||
background: #88c0d0;
|
||||
color: #2e3440;
|
||||
text-style: bold;
|
||||
}
|
||||
|
||||
Button.error {
|
||||
@@ -81,6 +109,14 @@ Button.error {
|
||||
|
||||
Button.error:hover {
|
||||
background: #d08770;
|
||||
color: #eceff4;
|
||||
text-style: bold;
|
||||
}
|
||||
|
||||
Button.error:focus {
|
||||
background: #88c0d0;
|
||||
color: #2e3440;
|
||||
text-style: bold;
|
||||
}
|
||||
|
||||
#quit {
|
||||
@@ -90,25 +126,55 @@ Button.error:hover {
|
||||
|
||||
#quit:hover {
|
||||
background: #d08770;
|
||||
border: solid #ebcb8b;
|
||||
color: #eceff4;
|
||||
text-style: bold;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#quit:focus {
|
||||
background: #d08770;
|
||||
color: #eceff4;
|
||||
text-style: bold;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#send {
|
||||
background: #a3be8c;
|
||||
border: solid #a3be8c;
|
||||
}
|
||||
|
||||
#send:focus {
|
||||
background: #88c0d0;
|
||||
color: #2e3440;
|
||||
text-style: bold;
|
||||
border: solid #88c0d0;
|
||||
}
|
||||
|
||||
#config {
|
||||
background: #ebcb8b;
|
||||
color: #2e3440;
|
||||
border: solid #ebcb8b;
|
||||
}
|
||||
|
||||
#config:hover {
|
||||
background: #d08770;
|
||||
color: #eceff4;
|
||||
text-style: bold;
|
||||
border: solid #d08770;
|
||||
}
|
||||
|
||||
#config:focus {
|
||||
background: #88c0d0;
|
||||
color: #2e3440;
|
||||
text-style: bold;
|
||||
border: solid #88c0d0;
|
||||
}
|
||||
|
||||
#send:hover {
|
||||
background: #8fbcbb;
|
||||
color: #2e3440;
|
||||
text-style: bold;
|
||||
border: solid #8fbcbb;
|
||||
}
|
||||
|
||||
/* Configuration Dialog Styles */
|
||||
|
||||
@@ -51,14 +51,15 @@ class RconApp(App):
|
||||
if not settings.append:
|
||||
self.query_one('#response', RichLog).clear()
|
||||
|
||||
try:
|
||||
async with Client(
|
||||
settings.host, settings.port, settings.password
|
||||
) as client:
|
||||
cmd = self.query_one('#command', Input).value.strip()
|
||||
if not cmd:
|
||||
self.app.bell()
|
||||
return
|
||||
|
||||
try:
|
||||
async with Client(
|
||||
settings.host, settings.port, settings.password
|
||||
) as client:
|
||||
response = await client.send_command(cmd)
|
||||
self.query_one('#response', RichLog).write(
|
||||
self.writable.parse(cmd, response)
|
||||
|
||||
Reference in New Issue
Block a user