mirror of
https://github.com/onyx-and-iris/q3rcon-tui.git
synced 2026-03-03 04:59:10 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 514dda463a | |||
| cac241a910 |
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install "virtualenv<21" hatch
|
pip install hatch
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: hatch build
|
run: hatch build
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# SPDX-FileCopyrightText: 2026-present onyx-and-iris <code@onyxandiris.online>
|
# SPDX-FileCopyrightText: 2026-present onyx-and-iris <code@onyxandiris.online>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# 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 pydantic import ValidationError
|
||||||
from textual.app import ComposeResult
|
from textual.app import ComposeResult
|
||||||
from textual.containers import Horizontal, Vertical
|
from textual.containers import Horizontal, Vertical
|
||||||
@ -51,15 +53,13 @@ class ConfigScreen(ModalScreen[bool]):
|
|||||||
self._clear_field_errors()
|
self._clear_field_errors()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
new_host = self.query_one('#host-input', Input).value.strip() or 'localhost'
|
new_host: str = (
|
||||||
new_port = self.query_one('#port-input', Input).value
|
self.query_one('#host-input', Input).value.strip() or 'localhost'
|
||||||
new_password = self.query_one('#password-input', Input).value
|
)
|
||||||
|
new_port: int | Literal[28960] = (
|
||||||
try:
|
self.query_one('#port-input', Input).value or 28960
|
||||||
new_port = int(new_port or '28960')
|
)
|
||||||
except ValueError:
|
new_password: str = self.query_one('#password-input', Input).value
|
||||||
self._show_field_error('port-input', 'Port must be a valid number')
|
|
||||||
return
|
|
||||||
|
|
||||||
self._settings.host = new_host
|
self._settings.host = new_host
|
||||||
self._settings.port = new_port
|
self._settings.port = new_port
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user