From 52c1bbf350679ceecbe71db7eb378ef6adcdb103 Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Thu, 14 Aug 2025 21:24:58 +0200 Subject: [PATCH] add auth info to feeds --- .../kotlin/de/unixwork/rssreader/Database.kt | 3 +++ .../de/unixwork/rssreader/MainWindow.kt | 25 ++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/rss-application/src/main/kotlin/de/unixwork/rssreader/Database.kt b/rss-application/src/main/kotlin/de/unixwork/rssreader/Database.kt index 2c580ca..9927d65 100644 --- a/rss-application/src/main/kotlin/de/unixwork/rssreader/Database.kt +++ b/rss-application/src/main/kotlin/de/unixwork/rssreader/Database.kt @@ -51,6 +51,9 @@ object Database { feed_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, feedcollection_id INT NOT NULL REFERENCES feedcollections(feedcollection_id) ON DELETE CASCADE, url VARCHAR NOT NULL, + user VARCHAR, + password VARCHAR, + certpath VARCHAR, last_update TIMESTAMP ) """.trimIndent()) diff --git a/rss-application/src/main/kotlin/de/unixwork/rssreader/MainWindow.kt b/rss-application/src/main/kotlin/de/unixwork/rssreader/MainWindow.kt index dc933d9..f41f3fe 100644 --- a/rss-application/src/main/kotlin/de/unixwork/rssreader/MainWindow.kt +++ b/rss-application/src/main/kotlin/de/unixwork/rssreader/MainWindow.kt @@ -53,6 +53,9 @@ class MainWindow { var groups: UiList? = null var name: UiString? = null var urls: UiText? = null + var user: UiString? = null + var password: UiString? = null + var cert: UiString? = null val w = dialogWindow( parent = window.ui, @@ -90,17 +93,33 @@ class MainWindow { { row { rlabel("Category") - dropdown(value = groups, hexpand = true) { elm, column -> + dropdown(value = groups, hexpand = true, colspan = 2) { elm, column -> elm.name } } row { rlabel("Name") - textfield(value = name, hexpand = true) + textfield(value = name, hexpand = true, colspan = 2) } row { rlabel("URLs", overrideDefaults = true, hfill = true) // overrideDefaults for disabling default vfill - textarea(value = urls, hexpand = true, vexpand = true, vfill = true) + textarea(value = urls, hexpand = true, vexpand = true, vfill = true, colspan = 2) + } + + row { + rlabel("User") + textfield(value = user, hexpand = true, colspan = 2) + } + row { + rlabel("Password") + passwordField(value = password, hexpand = true, colspan = 2) + } + row { + rlabel("Client Certificate") + textfield(value = cert, hexpand = true) + button(icon = "document-open") { + // TODO + } } } } -- 2.47.3