mirror of
https://github.com/unclebob/more-speech.git
synced 2024-09-30 10:30:56 +00:00
improve format-time and get the relay panel displayed.
This commit is contained in:
parent
7a887ba0c6
commit
0d7753f0b0
@ -7,7 +7,7 @@
|
||||
(defn format-time [time]
|
||||
(let [time (* time 1000)
|
||||
date (Date. (long time))]
|
||||
(.format (SimpleDateFormat. "dd MMM yy kk:mm:ss z") date))
|
||||
(.format (SimpleDateFormat. "yy MMM dd kk:mm:ss") date))
|
||||
)
|
||||
|
||||
(defn abbreviate [s n]
|
||||
|
@ -3,7 +3,8 @@
|
||||
[more-speech.ui.formatters :as formatters]
|
||||
[more-speech.nostr.events :as events]
|
||||
[more-speech.ui.config :as config]
|
||||
[more-speech.ui.swing.article-tree :as article-tree])
|
||||
[more-speech.ui.swing.article-tree :as article-tree]
|
||||
[more-speech.nostr.protocol :as protocol])
|
||||
(:use [seesaw core font tree])
|
||||
(:import (javax.swing Timer)))
|
||||
|
||||
@ -26,17 +27,21 @@
|
||||
make-article-info-panel
|
||||
make-article-area
|
||||
make-control-panel
|
||||
make-relay-panel
|
||||
timer-action)
|
||||
|
||||
(defn make-main-window [event-agent]
|
||||
(let [main-frame (frame :title "More Speech" :size [1000 :by 1000])
|
||||
article-area (make-article-area)
|
||||
header-tree (article-tree/make-article-tree event-agent main-frame)
|
||||
relay-panel (make-relay-panel)
|
||||
header-panel (left-right-split (scrollable relay-panel)
|
||||
(scrollable header-tree))
|
||||
article-panel (border-panel :north (make-article-info-panel)
|
||||
:center (scrollable article-area)
|
||||
:south (make-control-panel event-agent header-tree))
|
||||
main-panel (top-bottom-split
|
||||
(scrollable header-tree)
|
||||
header-panel
|
||||
article-panel)
|
||||
timer (Timer. 100 nil)]
|
||||
(config! main-frame :content main-panel)
|
||||
@ -57,6 +62,10 @@
|
||||
(defn id-click [e]
|
||||
(article-tree/id-click ui-context (config e :user-data)))
|
||||
|
||||
(defn make-relay-panel []
|
||||
(let [relay-panel (listbox :model protocol/relays)]
|
||||
relay-panel))
|
||||
|
||||
(defn make-article-info-panel []
|
||||
(let [author-id-label (label :id :author-id-label)
|
||||
created-time-label (label :id :created-time-label)
|
||||
|
Loading…
Reference in New Issue
Block a user