mirror of
https://github.com/onyx-and-iris/q3rcon-tui.git
synced 2026-04-19 18:23:31 +00:00
Compare commits
4 Commits
v0.7.0
...
d273ca57ca
| Author | SHA1 | Date | |
|---|---|---|---|
| d273ca57ca | |||
| ce660fb6c8 | |||
| 514dda463a | |||
| cac241a910 |
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install "virtualenv<21" hatch
|
||||
pip install hatch
|
||||
|
||||
- name: Build package
|
||||
run: hatch build
|
||||
|
||||
7
.pre-commit-config.yaml
Normal file
7
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v2.3.0
|
||||
hooks:
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
@@ -66,6 +66,12 @@ Q3RCON_TUI_RAW=false
|
||||
Q3RCON_TUI_APPEND=false
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
Type in your Rcon command and press ENTER.
|
||||
|
||||
Press `Ctrl+q` to exit from the application.
|
||||
|
||||
## Special Thanks
|
||||
|
||||
- [lapetus-11](https://github.com/Iapetus-11) for writing the [aio-q3-rcon](https://github.com/Iapetus-11/aio-q3-rcon) package.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2026-present onyx-and-iris <code@onyxandiris.online>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
__version__ = '0.7.0'
|
||||
__version__ = '0.7.1'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from typing import Literal
|
||||
|
||||
from pydantic import ValidationError
|
||||
from textual.app import ComposeResult
|
||||
from textual.containers import Horizontal, Vertical
|
||||
@@ -51,15 +53,13 @@ class ConfigScreen(ModalScreen[bool]):
|
||||
self._clear_field_errors()
|
||||
|
||||
try:
|
||||
new_host = self.query_one('#host-input', Input).value.strip() or 'localhost'
|
||||
new_port = self.query_one('#port-input', Input).value
|
||||
new_password = self.query_one('#password-input', Input).value
|
||||
|
||||
try:
|
||||
new_port = int(new_port or '28960')
|
||||
except ValueError:
|
||||
self._show_field_error('port-input', 'Port must be a valid number')
|
||||
return
|
||||
new_host: str = (
|
||||
self.query_one('#host-input', Input).value.strip() or 'localhost'
|
||||
)
|
||||
new_port: int | Literal[28960] = (
|
||||
self.query_one('#port-input', Input).value or 28960
|
||||
)
|
||||
new_password: str = self.query_one('#password-input', Input).value
|
||||
|
||||
self._settings.host = new_host
|
||||
self._settings.port = new_port
|
||||
|
||||
Reference in New Issue
Block a user