Compare commits

...

2 Commits
v0.7.0 ... main

Author SHA1 Message Date
514dda463a closes #1 2026-02-26 20:29:50 +00:00
cac241a910 remove new_port validation, leave it to pydantic
patch bump
2026-02-25 23:47:05 +00:00
3 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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'

View File

@ -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