Compare commits

..

No commits in common. "main" and "v0.7.0" have entirely different histories.
main ... v0.7.0

2 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2026-present onyx-and-iris <code@onyxandiris.online>
#
# SPDX-License-Identifier: MIT
__version__ = '0.7.1'
__version__ = '0.7.0'

View File

@ -1,5 +1,3 @@
from typing import Literal
from pydantic import ValidationError
from textual.app import ComposeResult
from textual.containers import Horizontal, Vertical
@ -53,13 +51,15 @@ class ConfigScreen(ModalScreen[bool]):
self._clear_field_errors()
try:
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
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
self._settings.host = new_host
self._settings.port = new_port