Add the ability to join rooms
This commit is contained in:
1 parent
0578e6fafc
commit
187d8e750d
4 files changed
+73
-42
No files matched your search
@@ -0,0 +1,12 @@
|
|||||||
|
// auto-generated
|
||||||
|
// Code generated by '$ fyne bundle'. DO NOT EDIT.
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "fyne.io/fyne/v2"
|
||||||
|
|
||||||
|
var resourceNotoColorEmojiRegularTtf = &fyne.StaticResource{
|
||||||
|
StaticName: "NotoColorEmoji-Regular.ttf",
|
||||||
|
StaticContent: []byte(
|
||||||
|
"\x00\x01\x00\x00\x00\x10\x01\x00\x00\x04\x00\x00COLR@\xf0\xedy\x00\a\a,\x00\x10\x8d\xc6CPAL\xbc\xa1\xf0\x97\x00\x00((\x00\x00\\\x92GSUB\xa4\n$*\x00\x00\x84\xbc\x00\x00p\xe6OS/2C\xfa\xf8{\x00\x00\x01\xcc\x00\x00\x00`SVG \xb7\x94\xadr\x00I{ \x01(\xdc\xcfcmap+\xc1`\x19\x00\x00\a\xb8\x00\x00 pglyf\xe1<q\xaf\x00\x17\x94\xf4\x001\xe6,head,\xf8\xbf\xac\x00\x00\x01\x94\x00\x00\x006hhea\b\xb5\xa3g\x00\x00\x01L\x00\x00\x00$hmtx\x16\f\x83{\x00\x02,d\x00\x02mHlocaj\x18\xe8G\x00\x04\x99\xac\x00\x02m\x80maxp\x9eQ5d\x00\x00\x01\f\x00\x00\x00 name\x9b쪱\x00\x00\x02,\x00\x00\x05\x8apost\xff\xb6\x003\x00\x00\x01,\x00\x00\x00 vhea\a0\x02\x97\x00\x00\x01p\x00\x00\x00$vmtx\x04\xe2\x00\x00\x00\x00\xf5\xa4\x00\x016\xc0\x00\x01\x00\x00\x9b_5c\x02\xf1\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xb3\x003\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x03\xb6\xff\x06\x00\x00\x04\xfb\x00#\x00!\x04\xda\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9bE\x00\x01\x00\x00\x02~\xfd\x82\x00\x00\x04\xe2\x00\x00\x002\x04\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x02\fJI\x87h\xc3_\x0f<\xf5\x00\x03\x04\x00\x00\x00\x00\x00\xe4qq\xe5\x00\x00\x00\x00\xe4q\xfd\xc5\x00#\xff\x06\x04\xda\x03\xb6\x00\x00\x00\x06\x00\x02\x00\x01\x00\x00\x00\x00\x00\x04\x04\xfb\x01\x90\x00\x05\x00\x00\x02\x9a\x02f\x00\x00\x00M\x02\x9a\x02f\x00\x00\x01f\x003\x013\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x03\x02A\xe4\xac\x14\x00\x00\x00\x04\x00\x00\x00NONE\x00\xc0\x00 \xff\xff\x03\xb6\xff\x06\x00\x00\x03\xb6\x00\xfa\x00\x00\x00\x01\x00\x00\x00\x00\x02\x00\x02\xcd\x00\x00\x00 \x00\t\x00\x00\x00\x0f\x00\xba\x00\x03\x00\x01\x04\t\x00\x00\x004\x04\x9c\x00\x03\x00\x01\x04\t\x00\x01\x00 \x04|\x00\x03\x00\x01\x04\t\x00\x02\x00\x0e\x04n\x00\x03\x00\x01\x04\t\x00\x03\x00 \x04|\x00\x03\x00\x01\x04\t\x00\x04\x00 \x04|\x00\x03\x00\x01\x04\t\x00\x05\x00\x9e\x03\xd0\x00\x03\x00\x01\x04\t\x00\x06\x00\x1c\x03\xb4\x00\x03\x00\x01\x04\t\x00\a\x00D\x03p\x00\x03\x00\x01\x04\t\x00\b\x00\x18\x03X\x00\x03\x00\x01\x04\t\x00\t\x00\x18\x03X\x00\x03\x00\x01\x04\t\x00\n\x00<\x03\x1c\x00\x03\x00\x01\x04\t\x00\v\x00R\x02\xca\x00\x03\x00\x01\x04\t\x00\f\x00R\x02\xca\x00\x03\x00\x01\x04\t\x00\r\x02\x96\x004\x00\x03\x00\x01\x04\t\x00\x0e\x004\x00\x00\x00h\x00t\x00t\x00p\x00:\x00/\x00/\x00s\x00c\x00r\x00i\x00p\x00t\x00s\x00.\x00s\x00i\x00l\x00.\x00o\x00r\x00g\x00/\x00O\x00F\x00L\x00T\x00h\x00i\x00s\x00 \x00F\x00o\x00n\x00t\x00 \x00S\x00o\x00f\x00t\x00w\x00a\x00r\x00e\x00 \x00i\x00s\x00 \x00l\x00i\x00c\x00e\x00n\x00s\x00e\x00d\x00 \x00u\x00n\x00d\x00e\x00r\x00 \x00t\x00h\x00e\x00 \x00S\x00I\x00L\x00 \x00O\x00p\x00e\x00n\x00 \x00F\x00o\x00n\x00t\x00 \x00L\x00i\x00c\x00e\x00n\x00s\x00e\x00,\x00 \x00V\x00e\x00r\x00s\x00i\x00o\x00n\x00 \x001\x00.\x001\x00.\x00 \x00T\x00h\x00i\x00s\x00 \x00F\x00o\x00n\x00t\x00 \x00S\x00o\x00f\x00t\x00w\x00a\x00r\x00e\x00 \x00i\x00s\x00 \x00d\x00i\x00s\x00t\x00r\x00i\x00b\x00u\x00t\x00e\x00d\x00 \x00o\x00n\x00 \x00a\x00n\x00 \x00\"\x00A\x00S\x00 \x00I\x00S\x00\"\x00 \x00B\x00A\x00S\x00I\x00S\x00,\x00 \x00W\x00I\x00T\x00H\x00O\x00U\x00T\x00 \x00W\x00A\x00R\x00R\x00A\x00N\x00T\x00I\x00E\x00S\x00 \x00O\x00R\x00 \x00C\x00O\x00N\x00D\x00I\x00T\x00I\x00O\x00N\x00S\x00 \x00O\x00F\x00 \x00A\x00N\x00Y\x00 \x00K\x00I\x00N\x00D\x00,\x00 \x00e\x00i\x00t\x00h\x00e\x00r\x00 \x00e\x00x\x00p\x00r\x00e\x00s\x00s\x00 \x00o\x00r\x00 \x00i\x00m\x00p\x00l\x00i\x00e\x00d\x00.\x00 \x00S\x00e\x00e\x00 \x00t\x00h\x00e\x00 \x00S\x00I\x00L\x00 \x00O\x00p\x00e\x00n\x00 \x00F\x00o\x00n\x00t\x00 \x00L\x00i\x00c\x00e\x00n\x00s\x00e\x00 \x00f\x00o\x00r\x00 \x00t\x00h\x00e\x00 \x00s\x00p\x00e\x00c\x00i\x00f\x00i\x00c\x00 \x00l\x00a\x00n\x00g\x00u\x00a\x00g\x00e\x00,\x00 \x00p\x00e\x00r\x00m\x00i\x00s\x00s\x00i\x00o\x00n\x00s\x00 \x00a\x00n\x00d\x00 \x00l\x00i\x00m\x00i\x00t\x00a\x00t\x00i\x00o\x00n\x00s\x00 \x00g\x00o\x00v\x00e\x00r\x00n\x00i\x00n\x00g\x00 \x00y\x00o\x00u\x00r\x00 \x00u\x00s\x00e\x00 \x00o\x00f\x00 \x00t\x00h\x00i\x00s\x00 \x00F\x00o\x00n\x00t\x00 \x00S\x00o\x00f\x00t\x00w\x00a\x00r\x00e\x00.\x00h\x00t\x00t\x00p\x00s\x00:\x00/\x00/\x00g\x00i\x00t\x00h\x00u\x00b\x00.\x00c\x00o\x00m\x00/\x00g\x00o\x00o\x00g\x00l\x00e\x00f\x00o\x00n\x00t\x00s\x00/\x00n\x00o\x00t\x00o\x00-\x00e\x00m\x00o\x00j\x00i\x00C\x00o\x00l\x00o\x00r\x00 \x00e\x00m\x00o\x00j\x00i\x00 \x00f\x00o\x00n\x00t\x00 \x00u\x00s\x00i\x00n\x00g\x00 \x00C\x00O\x00L\x00R\x00v\x001\x00.\x00G\x00o\x00o\x00g\x00l\x00e\x00,\x00 \x00I\x00n\x00c\x00.\x00N\x00o\x00t\x00o\x00 \x00i\x00s\x00 \x00a\x00 \x00t\x00r\x00a\x00d\x00e\x00m\x00a\x00r\x00k\x00 \x00o\x00f\x00 \x00G\x00o\x00o\x00g\x00l\x00e\x00 \x00I\x00n\x00c\x00.\x00N\x00o\x00t\x00o\x00C\x00o\x00l\x00o\x00r\x00E\x00m\x00o\x00j\x00i\x00V\x00e\x00r\x00s\x00i\x00o\x00n\x00 \x002\x00.\x000\x004\x008\x00;\x00G\x00O\x00O\x00G\x00;\x00n\x00o\x00t\x00o\x00-\x00e\x00m\x00o\x00j\x00Line truncated
|
||||||
|
}
|
||||||
@@ -4,17 +4,16 @@ go 1.24.5
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
fyne.io/fyne/v2 v2.6.2
|
fyne.io/fyne/v2 v2.6.2
|
||||||
fyne.io/x/fyne v0.0.0-20250418202416-58a230ad1acb
|
|
||||||
github.com/rrivera/identicon v0.0.0-20240116195454-d5ba35832c0d
|
github.com/rrivera/identicon v0.0.0-20240116195454-d5ba35832c0d
|
||||||
mellium.im/xmpp v0.22.0
|
mellium.im/xmpp v0.22.0
|
||||||
pain.agency/oasis-sdk v0.0.0-20250808203123-f4b5bab7b040
|
pain.agency/oasis-sdk v0.0.0-20250809192709-a3e5dff1aa61
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
fyne.io/systray v1.11.0 // indirect
|
fyne.io/systray v1.11.0 // indirect
|
||||||
github.com/BurntSushi/toml v1.5.0 // indirect
|
github.com/BurntSushi/toml v1.5.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/fredbi/uri v1.1.0 // indirect
|
github.com/fredbi/uri v1.1.1 // indirect
|
||||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||||
github.com/fyne-io/gl-js v0.2.0 // indirect
|
github.com/fyne-io/gl-js v0.2.0 // indirect
|
||||||
github.com/fyne-io/glfw-js v0.3.0 // indirect
|
github.com/fyne-io/glfw-js v0.3.0 // indirect
|
||||||
@@ -29,6 +28,7 @@ require (
|
|||||||
github.com/hack-pad/safejs v0.1.1 // indirect
|
github.com/hack-pad/safejs v0.1.1 // indirect
|
||||||
github.com/jeandeaual/go-locale v0.0.0-20250612000132-0ef82f21eade // indirect
|
github.com/jeandeaual/go-locale v0.0.0-20250612000132-0ef82f21eade // indirect
|
||||||
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 // indirect
|
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 // indirect
|
||||||
|
github.com/kr/text v0.2.0 // indirect
|
||||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
|
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
|
||||||
github.com/nicksnyder/go-i18n/v2 v2.6.0 // indirect
|
github.com/nicksnyder/go-i18n/v2 v2.6.0 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
|
|||||||
@@ -2,16 +2,15 @@ fyne.io/fyne/v2 v2.6.2 h1:RPgwmXWn+EuP/TKwO7w5p73ILVC26qHD9j3CZUZNwgM=
|
|||||||
fyne.io/fyne/v2 v2.6.2/go.mod h1:9IJ8uWgzfcMossFoUkLiOrUIEtaDvF4nML114WiCtXU=
|
fyne.io/fyne/v2 v2.6.2/go.mod h1:9IJ8uWgzfcMossFoUkLiOrUIEtaDvF4nML114WiCtXU=
|
||||||
fyne.io/systray v1.11.0 h1:D9HISlxSkx+jHSniMBR6fCFOUjk1x/OOOJLa9lJYAKg=
|
fyne.io/systray v1.11.0 h1:D9HISlxSkx+jHSniMBR6fCFOUjk1x/OOOJLa9lJYAKg=
|
||||||
fyne.io/systray v1.11.0/go.mod h1:RVwqP9nYMo7h5zViCBHri2FgjXF7H2cub7MAq4NSoLs=
|
fyne.io/systray v1.11.0/go.mod h1:RVwqP9nYMo7h5zViCBHri2FgjXF7H2cub7MAq4NSoLs=
|
||||||
fyne.io/x/fyne v0.0.0-20250418202416-58a230ad1acb h1:2BazNmb/kwgqRdvE9L+NgW8sfoWGn3iy1Ox8R4+CSmc=
|
|
||||||
fyne.io/x/fyne v0.0.0-20250418202416-58a230ad1acb/go.mod h1:u3LF1EkElytjOT8OHxft16trctGndF9qpsoH6YIDOUU=
|
|
||||||
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
|
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
|
||||||
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||||
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g=
|
github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g=
|
||||||
github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw=
|
github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw=
|
||||||
github.com/fredbi/uri v1.1.0 h1:OqLpTXtyRg9ABReqvDGdJPqZUxs8cyBDOMXBbskCaB8=
|
github.com/fredbi/uri v1.1.1 h1:xZHJC08GZNIUhbP5ImTHnt5Ya0T8FI2VAwI/37kh2Ko=
|
||||||
github.com/fredbi/uri v1.1.0/go.mod h1:aYTUoAXBOq7BLfVJ8GnKmfcuURosB1xyHDIfWeC/iW4=
|
github.com/fredbi/uri v1.1.1/go.mod h1:4+DZQ5zBjEwQCDmXW5JdIjz0PUA+yJbvtBv+u+adr5o=
|
||||||
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
|
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
|
||||||
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
||||||
github.com/fyne-io/gl-js v0.2.0 h1:+EXMLVEa18EfkXBVKhifYB6OGs3HwKO3lUElA0LlAjs=
|
github.com/fyne-io/gl-js v0.2.0 h1:+EXMLVEa18EfkXBVKhifYB6OGs3HwKO3lUElA0LlAjs=
|
||||||
@@ -99,5 +98,5 @@ mellium.im/xmlstream v0.15.4 h1:gLKxcWl4rLMUpKgtzrTBvr4OexPeO/edYus+uK3F6ZI=
|
|||||||
mellium.im/xmlstream v0.15.4/go.mod h1:yXaCW2++fmVO4L9piKVkyLDqnCmictVYF7FDQW8prb4=
|
mellium.im/xmlstream v0.15.4/go.mod h1:yXaCW2++fmVO4L9piKVkyLDqnCmictVYF7FDQW8prb4=
|
||||||
mellium.im/xmpp v0.22.0 h1:UthQVSwEAr7SNrmyc90c2ykGpVHxjn/3yw8Ey4+Im8s=
|
mellium.im/xmpp v0.22.0 h1:UthQVSwEAr7SNrmyc90c2ykGpVHxjn/3yw8Ey4+Im8s=
|
||||||
mellium.im/xmpp v0.22.0/go.mod h1:WSjq12nhREFD88Vy/0WD6Q8inE8t6a8w7QjzwivWitw=
|
mellium.im/xmpp v0.22.0/go.mod h1:WSjq12nhREFD88Vy/0WD6Q8inE8t6a8w7QjzwivWitw=
|
||||||
pain.agency/oasis-sdk v0.0.0-20250808203123-f4b5bab7b040 h1:NcLVvJf5LwygyA7sXqc2dnJKWl9KJ2uChR3Wvr0kelM=
|
pain.agency/oasis-sdk v0.0.0-20250809192709-a3e5dff1aa61 h1:7zb69SAfLAJhXoqXZaS0pq/p1Y9W19Pm4FjcwWjTVoE=
|
||||||
pain.agency/oasis-sdk v0.0.0-20250808203123-f4b5bab7b040/go.mod h1:eyvDgfpHo+9bdB/AkMEMZ3ETeoSONTULVx9X4w9kGAU=
|
pain.agency/oasis-sdk v0.0.0-20250809192709-a3e5dff1aa61/go.mod h1:eyvDgfpHo+9bdB/AkMEMZ3ETeoSONTULVx9X4w9kGAU=
|
||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
//core - required
|
//core - required
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"fmt"
|
"fmt"
|
||||||
"image/color"
|
_ "image/color"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"math/rand/v2"
|
"math/rand/v2"
|
||||||
@@ -29,10 +29,8 @@ import (
|
|||||||
"mellium.im/xmpp/jid"
|
"mellium.im/xmpp/jid"
|
||||||
"mellium.im/xmpp/muc"
|
"mellium.im/xmpp/muc"
|
||||||
oasisSdk "pain.agency/oasis-sdk"
|
oasisSdk "pain.agency/oasis-sdk"
|
||||||
|
|
||||||
// gui - optional
|
// gui - optional
|
||||||
// catppuccin "github.com/mbaklor/fyne-catppuccin"
|
// catppuccin "github.com/mbaklor/fyne-catppuccin"
|
||||||
adwaita "fyne.io/x/fyne/theme"
|
|
||||||
// TODO: integrated theme switcher
|
// TODO: integrated theme switcher
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -73,35 +71,35 @@ type ChatTabUI struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CustomMultiLineEntry struct {
|
type CustomMultiLineEntry struct {
|
||||||
widget.Entry
|
widget.Entry
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewCustomMultiLineEntry() *CustomMultiLineEntry {
|
func NewCustomMultiLineEntry() *CustomMultiLineEntry {
|
||||||
entry := &CustomMultiLineEntry{}
|
entry := &CustomMultiLineEntry{}
|
||||||
entry.ExtendBaseWidget(entry)
|
entry.ExtendBaseWidget(entry)
|
||||||
entry.MultiLine = true
|
entry.MultiLine = true
|
||||||
return entry
|
return entry
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *CustomMultiLineEntry) TypedShortcut(sc fyne.Shortcut) {
|
func (e *CustomMultiLineEntry) TypedShortcut(sc fyne.Shortcut) {
|
||||||
|
|
||||||
// Custom shortcut: Ctrl+Enter for newline
|
// Custom shortcut: Ctrl+Enter for newline
|
||||||
if sc.ShortcutName() == "CustomDesktop:Control+Return" {
|
if sc.ShortcutName() == "CustomDesktop:Control+Return" {
|
||||||
e.Entry.TypedRune('\n')
|
e.Entry.TypedRune('\n')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
e.Entry.TypedShortcut(sc)
|
e.Entry.TypedShortcut(sc)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *CustomMultiLineEntry) TypedKey(ev *fyne.KeyEvent) {
|
func (e *CustomMultiLineEntry) TypedKey(ev *fyne.KeyEvent) {
|
||||||
if ev.Name == fyne.KeyReturn || ev.Name == fyne.KeyEnter {
|
if ev.Name == fyne.KeyReturn || ev.Name == fyne.KeyEnter {
|
||||||
// Normal Enter (no modifier) = submit
|
// Normal Enter (no modifier) = submit
|
||||||
if e.OnSubmitted != nil {
|
if e.OnSubmitted != nil {
|
||||||
e.OnSubmitted(e.Text)
|
e.OnSubmitted(e.Text)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
e.Entry.TypedKey(ev)
|
e.Entry.TypedKey(ev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type piConfig struct {
|
type piConfig struct {
|
||||||
@@ -123,7 +121,10 @@ var replying bool = false
|
|||||||
var notifications bool
|
var notifications bool
|
||||||
var connection bool = true
|
var connection bool = true
|
||||||
|
|
||||||
type myTheme struct{}
|
/*
|
||||||
|
func (m myTheme) Font(style fyne.TextStyle) fyne.Resource {
|
||||||
|
return resourceAppleColorEmojiTtf
|
||||||
|
}
|
||||||
|
|
||||||
func (m myTheme) Color(name fyne.ThemeColorName, variant fyne.ThemeVariant) color.Color {
|
func (m myTheme) Color(name fyne.ThemeColorName, variant fyne.ThemeVariant) color.Color {
|
||||||
return adwaita.AdwaitaTheme().Color(name, fyne.CurrentApp().Settings().ThemeVariant())
|
return adwaita.AdwaitaTheme().Color(name, fyne.CurrentApp().Settings().ThemeVariant())
|
||||||
@@ -133,16 +134,11 @@ func (m myTheme) Icon(name fyne.ThemeIconName) fyne.Resource {
|
|||||||
return theme.DefaultTheme().Icon(name)
|
return theme.DefaultTheme().Icon(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
func (m myTheme) Font(style fyne.TextStyle) fyne.Resource {
|
func (m myTheme) Font(style fyne.TextStyle) fyne.Resource {
|
||||||
return theme.DefaultTheme().Font(style)
|
return theme.DefaultTheme().Font(style)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
func (m myTheme) Size(name fyne.ThemeSizeName) float32 {
|
|
||||||
if name == theme.SizeNameHeadingText {
|
|
||||||
return 18
|
|
||||||
}
|
|
||||||
return theme.DefaultTheme().Size(name)
|
|
||||||
}
|
|
||||||
|
|
||||||
var scrollDownOnNewMessage bool = true
|
var scrollDownOnNewMessage bool = true
|
||||||
var w fyne.Window
|
var w fyne.Window
|
||||||
@@ -244,7 +240,7 @@ func CreateUITab(chatJidStr string) ChatTabUI {
|
|||||||
|
|
||||||
sl := strings.Split(msgContent, " ")
|
sl := strings.Split(msgContent, " ")
|
||||||
if sl[0] == "/me" {
|
if sl[0] == "/me" {
|
||||||
author.SetText(author.Text + strings.Join(sl[1:], " "))
|
author.SetText(author.Text + " " + strings.Join(sl[1:], " "))
|
||||||
content.SetText(" ")
|
content.SetText(" ")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -599,7 +595,7 @@ func main() {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
a = app.New()
|
a = app.New()
|
||||||
a.Settings().SetTheme(myTheme{})
|
//a.Settings().SetTheme(myTheme{})
|
||||||
w = a.NewWindow("pi")
|
w = a.NewWindow("pi")
|
||||||
w.Resize(fyne.NewSize(500, 500))
|
w.Resize(fyne.NewSize(500, 500))
|
||||||
|
|
||||||
@@ -835,6 +831,30 @@ func main() {
|
|||||||
}, w)
|
}, w)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
joinARoom := fyne.NewMenuItem("Join a room", func() {
|
||||||
|
dialog.ShowEntryDialog("Join a room", "JID:", func(s string) {
|
||||||
|
go func() {
|
||||||
|
myjid, err := jid.Parse(s)
|
||||||
|
if err != nil {
|
||||||
|
dialog.ShowError(err, w)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
joinjid, err := myjid.WithResource(login.DisplayName)
|
||||||
|
if err != nil {
|
||||||
|
dialog.ShowError(err, w)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ch, err := client.MucClient.Join(client.Ctx, joinjid, client.Session)
|
||||||
|
if err != nil {
|
||||||
|
dialog.ShowError(err, w)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
client.MucChannels[s] = ch
|
||||||
|
addChatTab(true, myjid, login.DisplayName)
|
||||||
|
}()
|
||||||
|
}, w)
|
||||||
|
})
|
||||||
|
|
||||||
servDisc := fyne.NewMenuItem("Disco features", func() {
|
servDisc := fyne.NewMenuItem("Disco features", func() {
|
||||||
var search jid.JID
|
var search jid.JID
|
||||||
dialog.ShowEntryDialog("Disco features", "JID: ", func(s string) { // TODO: replace with undeprecated widget
|
dialog.ShowEntryDialog("Disco features", "JID: ", func(s string) { // TODO: replace with undeprecated widget
|
||||||
@@ -876,7 +896,7 @@ func main() {
|
|||||||
})
|
})
|
||||||
menu_help := fyne.NewMenu("π", mit, reconnect, savedata)
|
menu_help := fyne.NewMenu("π", mit, reconnect, savedata)
|
||||||
|
|
||||||
menu_changeroom := fyne.NewMenu("Α", mic, servDisc)
|
menu_changeroom := fyne.NewMenu("Α", mic, servDisc, joinARoom)
|
||||||
menu_configureview := fyne.NewMenu("Β", mia, mis, jtt, jtb)
|
menu_configureview := fyne.NewMenu("Β", mia, mis, jtt, jtb)
|
||||||
hafjag := fyne.NewMenuItem("Hafjag", func() {
|
hafjag := fyne.NewMenuItem("Hafjag", func() {
|
||||||
entry.Text = "Hafjag"
|
entry.Text = "Hafjag"
|
||||||
|
|||||||
Reference in new issue
Block a user