Improvement on g+ import, limiter for chat text

parent 3696a24f
......@@ -223,6 +223,10 @@ tex: net2o-logo
prev-text$ erase addr prev-text$ $free
edit-w .text$ passphrase-entropy 1e fmin pw-bg-col# f+
pw-back >o to w-color o> ;
: size-limit ( -- )
edit-w .text$ nip #800 u> IF
prev-text$ edit-w >o to text$ o>
THEN ;
glue new Constant glue*lll±
glue*lll± >o 1Mglue fnip 1000e fswap hglue-c glue! 0glue fnip 1filll fswap dglue-c glue! 1glue vglue-c glue! o>
......@@ -285,8 +289,7 @@ glue*shrink >o 0e 1filll 0e hglue-c glue! 1glue dglue-c glue! 1glue vglue-c glue
25%b >o config:passmode# @ to pw-mode o o>
glue*lll }}glue
}}h
pw-field ' pw-done edit[]
>o act >o ' entropy-colorize is edit-filter o> o o>
pw-field ' pw-done edit[] ' entropy-colorize filter[]
{{
\large \sans whitish "👁" }}text
\normal \bold show-sign-color# to x-color "\" }}text dup value show-pw-sign /center blackish
......@@ -938,7 +941,7 @@ wmsg-o >o msg-table @ token-table ! o>
{{ \normal \regular blackish "" }}edit 40%b dup to chat-edit glue*l }}glue
glue*lll }}glue
}}h box[]
}}z chat-edit [: edit-w .chat-edit-enter drop nip 0 tuck false ;] edit[]
}}z chat-edit [: edit-w .chat-edit-enter drop nip 0 tuck false ;] edit[] ' size-limit filter[]
>o act >o [: connection .chat-next-line ;] is edit-next-line o> o o>
>o act >o [: connection .chat-prev-line ;] is edit-prev-line o> o o>
{{
......
......@@ -261,7 +261,8 @@ $100 buffer: escape-chars
: process-pattern ( addr u -- addr' u' )
2dup "_**_" string-prefix? IF 4 safe/string ." **" EXIT THEN
2dup "**+++ " string-prefix? IF 6 safe/string ." # " EXIT THEN
2dup " +++**\n" string-prefix? IF 7 safe/string ." #" cr
2dup " +++**\n" 2 pick 6 = + string-prefix? IF
." #" dup 6 <> IF cr THEN 7 safe/string
ELSE
dup 2 u>= IF 2dup #lf skip nip over swap - >r
r@ 1 = IF '\' emit THEN
......
......@@ -181,32 +181,32 @@ filter-out bl 1- 1 fill
0 Value img-req-fid
: .mfile { d: fn -- }
fn basedir+name pics# #@ 2dup d0= IF
fn basedir+name ~~ pics# #@ ~~ 2dup d0= IF
2drop fn .url
fn [: .url cr ;] img-req-fid outfile-execute
ELSE
." file:" picbase# #@ type
." file:" picbase# #@ ~~ type
THEN ;
: .csv-link { d: fn -- }
." ![" fn picdesc# #@ .simple-text ." ](file:" fn picbase# #@ type ." )" cr ;
: .media-file ( -- )
media:url$ basename nip $100 > IF
." file:" media:localFilePath$ basename type
ELSE
media:localFilePath$ nip IF ." file:" media:url$ basename type
ELSE media:url$ .mfile THEN
THEN ;
: inline-image ( -- )
." ![" media:description$ .simple-text ." ](" .media-file ')' emit cr ;
: .media ( -- )
comments:media{} ?dup-IF cr >o
." ![" media:description$ .simple-text ." ]("
media:url$ 2dup basename nip $100 > IF
." file:" 2drop media:localFilePath$ basename type
ELSE .mfile THEN ')' emit cr
o> THEN ;
comments:media{} ?dup-IF cr .inline-image THEN ;
: .album ( -- )
comments:album{} ?dup-IF cr
." ::album::" cr cr
.album:media[] $@ over @ .media:url$
basedir+name pics# #@ d0= IF
bounds U+DO
I @ >o
." ![" media:description$ .simple-text ." ]("
media:localFilePath$ nip IF ." file:" media:url$ basename type
ELSE media:url$ .mfile THEN ')' emit cr
o>
I @ .inline-image
cell +LOOP
ELSE
2drop
......
......@@ -485,7 +485,7 @@ msg-class is msg:object
dup u - /string addr u str= IF
." OTRify #" I u.
sig u' I last# cell+ $[]@ replace-sig
\ !!Schedule message saving!!
save-msgs&
ELSE
." [OTRified] #" I u.
THEN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment