Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | color palette code adaption |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
10c6ced4ffe03a5c4a2edce211af95c0 |
User & Date: | bernd 2018-12-17 21:13:31.638 |
Context
2018-12-20
| ||
12:44 | Bump version number check-in: b13dfe3b17 user: bernd tags: trunk, 0.8.5-20181220 | |
2018-12-17
| ||
21:13 | color palette code adaption check-in: 10c6ced4ff user: bernd tags: trunk | |
2018-12-13
| ||
14:40 | Bump version number check-in: 547cd9a51e user: bernd tags: trunk, 0.8.4-20181213 | |
Changes
Changes to doc/ef2018-presentation.fs.
1 2 3 4 | \ Presentation on ΜΙΝΩΣ2 made in ΜΙΝΩΣ2 \ Copyright (C) 2018 Bernd Paysan | < | 1 2 3 4 5 6 7 8 9 10 11 | \ Presentation on ΜΙΝΩΣ2 made in ΜΙΝΩΣ2 \ Copyright (C) 2018 Bernd Paysan \ This program is free software: you can redistribute it and/or modify \ it under the terms of the GNU Affero General Public License as published by \ the Free Software Foundation, either version 3 of the License, or \ (at your option) any later version. \ This program is distributed in the hope that it will be useful, \ but WITHOUT ANY WARRANTY; without even the implied warranty of |
︙ | ︙ | |||
53 54 55 56 57 58 59 | glue ' new static-a with-allocater Constant glue-left glue ' new static-a with-allocater Constant glue-right : glue0 ( -- ) 0e fdup [ glue-left .hglue-c ]L df! [ glue-right .hglue-c ]L df! ; : trans-frame ( o -- ) | | | | | > | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | glue ' new static-a with-allocater Constant glue-left glue ' new static-a with-allocater Constant glue-right : glue0 ( -- ) 0e fdup [ glue-left .hglue-c ]L df! [ glue-right .hglue-c ]L df! ; : trans-frame ( o -- ) >o transp# to frame-color o> ; : solid-frame ( o -- ) >o white# to frame-color o> ; : !slides ( nprev n -- ) over >r n2-img m2-img $q-img r@ m/$-switch u>= IF swap THEN r> n/m-switch u>= IF rot THEN rot dup .parent-w .parent-w /flop drop rot dup .parent-w .parent-w /flop drop rot dup .parent-w .parent-w /flip drop trans-frame trans-frame solid-frame update-size# update-glue over slide# ! slides[] $[] @ /flip drop slides[] $[] @ /flop drop glue0 ; : fade-img ( r0..1 img1 img2 -- ) >r >r [ whitish x-color 1e f+ ] Fliteral fover f- r> >o to frame-color parent-w .parent-w /flop drop o> [ whitish x-color ] Fliteral f+ r> >o to frame-color parent-w .parent-w /flop drop o> ; : fade!slides ( r0..1 n -- r0..1 n ) dup m/$-switch = IF fdup $q-img m2-img fade-img THEN dup n/m-switch = IF fdup m2-img n2-img fade-img |
︙ | ︙ | |||
189 190 191 192 193 194 195 | glue-left >o 1glue vglue-c glue! 1glue dglue-c glue! o> glue-right >o 1glue vglue-c glue! 1glue dglue-c glue! o> tex: net2o-logo tex: minos2 tex: $quid | | | | | > > | | | < | | | < | | > | | | | | | | | | | | | | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | glue-left >o 1glue vglue-c glue! 1glue dglue-c glue! o> glue-right >o 1glue vglue-c glue! 1glue dglue-c glue! o> tex: net2o-logo tex: minos2 tex: $quid ' net2o-logo "net2o-200.png" 0.666e }}image-file Constant net2o-glue drop ' minos2 "net2o-minos2.png" 0.666e }}image-file Constant minos2-glue drop ' $quid "squid-logo-200.png" 0.5e }}image-file Constant $quid-glue drop : logo-img ( xt xt -- o o-img ) 2>r baseline# 0e to baseline# {{ 2r> }}image-tex dup >r /right glue*l }}glue }}v >o font-size# f2/ to border o o> to baseline# r> ; : pres-frame ( color -- o1 o2 ) \ drop $FFFFFFFF color, glue*wh slide-frame dup .button1 simple[] ; ' }}i18n-text is }}text' {{ {{ glue-left }}glue \ page 0 {{ $FFFFFFFF pres-frame {{ glue*l }}glue \ ) $CCDDDD3F color, 4e }}frame dup .button1 l" net2o: ΜΙΝΩΣ2 GUI, $quid “crypto”" /title l" ($quid = ethical micropayment with efficient BlockChain)" /subtitle {{ {{ glue*l }}glue \ ) $CCDDDD3F color, 4e }}frame dup .button1 tex: edinburgh-coa ' edinburgh-coa "edinburgh-coa.jpg" 0.5e }}image-file Constant coa-glue /center 0e to x-baseline glue*l }}glue \ ) $CCDDDD3F color, 4e }}frame dup .button1 }}v glue*2 }}glue }}z l" Bernd Paysan" /author l" EuroForth 2018, Edinburgh" /location glue*l }}glue \ ) $CCDDDD3F color, 4e }}frame dup .button1 }}v box[] >o font-size# to border o Value title-page o o> }}z box[] dup >slides \ page 1 {{ $FFFFFFFF pres-frame {{ l" Motivation" /title glue*l }}glue \ ) $CCDDDD3F color, 4e }}frame dup .button1 tex: bad-gateway ' bad-gateway "bad-gateway.png" 0.666e }}image-file Constant bgw-glue /center glue*l }}glue \ ) $CCDDDD3F color, 4e }}frame dup .button1 }}v box[] >bdr }}z box[] /flip dup >slides \ page 2 {{ $FF7F7FFF pres-frame {{ |
︙ | ︙ | |||
262 263 264 265 266 267 268 | l" EU parliament wants filtering “terrorist contents”" "🤦🤦🤦" e\\ l" Germany wants a Cyberadministration like CAC (Medienstaatsvertrag)" "🤦🤦🤦🤦" e\\ l" Backdoors still wanted (“reasonable encryption”)" "🤦🤦🤦🤦🤦" e\\ l" Legalize it (dragnet surveillance)" "🤦🤦🤦🤦🤦🤦" e\\ l" You can't reasonably expect privacy on your own PC" "🤦🤦🤦🤦🤦🤦🤦" e\\ l" “Crypto” now means BitCoin" "🤦🤦🤦🤦🤦🤦🤦🤦" e\\ tex: vp-eu glue*l ' vp-eu }}vp vp[] | | | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | l" EU parliament wants filtering “terrorist contents”" "🤦🤦🤦" e\\ l" Germany wants a Cyberadministration like CAC (Medienstaatsvertrag)" "🤦🤦🤦🤦" e\\ l" Backdoors still wanted (“reasonable encryption”)" "🤦🤦🤦🤦🤦" e\\ l" Legalize it (dragnet surveillance)" "🤦🤦🤦🤦🤦🤦" e\\ l" You can't reasonably expect privacy on your own PC" "🤦🤦🤦🤦🤦🤦🤦" e\\ l" “Crypto” now means BitCoin" "🤦🤦🤦🤦🤦🤦🤦🤦" e\\ tex: vp-eu glue*l ' vp-eu }}vp vp[] $FFBFFFFF color, fdup to slider-color to slider-fgcolor font-size# f2/ f2/ to slider-border dup font-size# f2/ fdup vslider }}h box[] \skip l" Competition" /subsection l" Cambridge Analytica scandal (Facebook)" \\ l" Security fuckups: Passwords pawned, chat log saved unprotected in the cloud, etc." \\ |
︙ | ︙ | |||
390 391 392 393 394 395 396 | }}vt glue*l }}glue }}v box[] >bdr {{ glue*l }}glue tex: $quid-logo-large ' $quid-logo-large "squid-logo.png" 0.666e }}image-file | | | 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | }}vt glue*l }}glue }}v box[] >bdr {{ glue*l }}glue tex: $quid-logo-large ' $quid-logo-large "squid-logo.png" 0.666e }}image-file drop >o $FFFFFFC0 color, to frame-color o o> /right }}v box[] >bdr }}z box[] /flip dup >slides \ page 11 {{ $e4cF77FF pres-frame |
︙ | ︙ | |||
620 621 622 623 624 625 626 | }}z }}z slide[] to top-widget also opengl : !widgets ( -- ) | < | 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | }}z }}z slide[] to top-widget also opengl : !widgets ( -- ) top-widget .htop-resize 1e ambient% sf! set-uniforms ; [IFDEF] writeout-en lsids ' .lsids s" ef2018/en" r/w create-file throw dup >r outfile-execute r> close-file throw [THEN] |
︙ | ︙ |
Changes to dvcs.fs.
︙ | ︙ | |||
181 182 183 184 185 186 187 188 189 | : enchash>filename ( hash1 u1 -- filename u2 ) keyed-hash-out hash#128 smove enchash hash>filename ; Variable patch-in$ : read-enc-hashed ( hash1 u1 -- ) 2dup enchash>filename patch-in$ $slurp-file patch-in$ $@ c:decrypt | > | > > > > > > > > > | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | : enchash>filename ( hash1 u1 -- filename u2 ) keyed-hash-out hash#128 smove enchash hash>filename ; Variable patch-in$ : read-enc-hashed ( hash1 u1 -- ) \ 2dup 85type space 2dup enchash>filename patch-in$ $slurp-file patch-in$ $@ c:decrypt patch-in$ $@ >file-hash \ 2dup 85type cr str= 0= !!wrong-hash!! ; : ?read-enc-hashed ( hash1 u1 -- ) 2dup dvcs-objects #@ 2dup d0= IF 2drop 2dup read-enc-hashed patch-in$ $@ 2swap dvcs-objects #! ELSE patch-in$ $! 2drop THEN ; \ in-memory file hash+contents database : dvcs-outfile-hash ( baddr u1 fhash u2 -- ) hash#128 umin dvcs-objects #! ; : ?fileentry-hash ( -- ) |
︙ | ︙ | |||
603 604 605 606 607 608 609 | id-check# #offs branches[] $[]off dvcs:commits @ .id>branches-loop id-check# #offs dvcs( ." re:" cr branches[] [: 85type cr ;] $[]map ) ; : branches>dvcs ( -- ) branches[] [: dup IF dvcs( ." read enc hash: " 2dup 85type cr ) | | | | 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | id-check# #offs branches[] $[]off dvcs:commits @ .id>branches-loop id-check# #offs dvcs( ." re:" cr branches[] [: 85type cr ;] $[]map ) ; : branches>dvcs ( -- ) branches[] [: dup IF dvcs( ." read enc hash: " 2dup 85type cr ) ?read-enc-hashed dvcs:clean-delta c-state off patch-in$ $@ do-cmd-loop dvcs:clean-delta ELSE 2drop THEN ;] $[]map ; : branches>dvcs' ( -- ) branches[] [: dup IF dvcs( ." read enc hash: " 2dup 85type cr ) ?read-enc-hashed c-state off patch-in$ $@ do-cmd-loop ELSE 2drop THEN ;] $[]map ; \ push out a revision |
︙ | ︙ |
Changes to gui.fs.
︙ | ︙ | |||
76 77 78 79 80 81 82 | THEN 1+ sin-t anim!slides +sync +resize ; 0.4e FValue slide-time% : prev-slide ( -- ) slide-time% anims[] $@len IF anim-end 50% f* THEN | | | | | | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | THEN 1+ sin-t anim!slides +sync +resize ; 0.4e FValue slide-time% : prev-slide ( -- ) slide-time% anims[] $@len IF anim-end 50% f* THEN slide# @ ['] prev-anim >animate +textures +lang ; : next-slide ( -- ) slide-time% anims[] $@len IF anim-end 50% f* THEN slide# @ ['] next-anim >animate +textures +lang ; \ frames 0 Value pw-frame 0 Value id-frame 0 Value chat-frame \ password screen 0 Value pw-err 0 Value pw-num : err-fade ( r addr -- ) 1e fover [ pi f2* ] Fliteral f* fcos 1e f+ f2/ f- 2 tries# @ lshift s>f f* fdup 1e f> IF fdrop 1e ELSE +sync +resize THEN .fade fdrop ; : shake-lr ( r addr -- ) [ pi 16e f* ] FLiteral f* fsin f2/ 0.5e f+ \ 8 times shake font-size# f2/ f* font-size# f2/ fover f- glue-sleft >o 0g fdup hglue-c glue! o> glue-sright >o 0g fdup hglue-c glue! o> +sync +resize drop ; 0e 0 shake-lr : pres-frame ( color -- o1 o2 ) \ drop $FFFFFFFF glue*wh slide-frame dup .button1 ; : err-fade? ( -- flag ) 0 { flag } anims@ 0 ?DO >o action-of animate ['] err-fade = flag or to flag o anims[] >stack o> LOOP flag ; |
︙ | ︙ | |||
147 148 149 150 151 152 153 | : 40%b ( o -- o ) >o font-size# 40% f* to border o o> ; \ password frame tex: net2o-logo [IFDEF] light-login \ light color sceme | < | > > | | | | < < | > > | | | | < | > | | > | | | | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | : 40%b ( o -- o ) >o font-size# 40% f* to border o o> ; \ password frame tex: net2o-logo [IFDEF] light-login \ light color sceme $FF0040FF text-color, FValue pw-num-col# $AAAAAAFF text-color, FValue pw-text-col# $000000FF text-color, FValue show-sign-color# $FFFFFFFF color, FValue pw-bg-col# $0000BFFF color, FValue dark-blue# $0000FF08 color, FValue chbs-col# $FFFFFFFF color, FValue login-bg-col# [ELSE] $FF0040FF text-color, FValue pw-num-col# $cc6600FF text-color, FValue pw-text-col# $FFFFFFFF text-color, FValue show-sign-color# $550000FF color, FValue pw-bg-col# $88FF00FF color, FValue dark-blue# $00FF0020 color, FValue chbs-col# $000020FF color, FValue login-bg-col# [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> glue new Constant glue*shrink glue*shrink >o 0e 1filll 0e hglue-c glue! 1glue dglue-c glue! 1glue vglue-c glue! o> {{ login-bg-col# pres-frame dark-blue# ' dark-blue >body f! {{ glue*lll± }}glue ' net2o-logo "doc/net2o.png" 0.666e }}image-file Constant net2o-glue /center 1 ms \ dummy wait !i18n l" net2o GUI" /title !lit {{ glue*lll }}glue glue-sleft }}glue {{ \large \sans "🔐" }}text \large pw-num-col# to x-color s" " }}text 25%b dup to pw-num /center }}z {{ glue*l pw-bg-col# font-size# f2/ f2/ }}frame dup .button3 \mono \normal {{ chbs-col# to x-color "Correct Horse Battery Staple" }}text 25%b glue*l }}h {{ glue-sright }}glue glue*l }}glue \bold l" wrong passphrase!" $FF000000 $FF0000FF fade-color, to x-color }}i18n-text \regular 25%b dup to pw-err glue*l }}glue glue-sleft }}glue }}h blackish {{ {{ pw-text-col# to x-color "" }}pw dup Value pw-field 25%b >o config:passmode# @ to pw-mode o o> glue*l }}glue }}h pw-field ' pw-done edit[] {{ \large \sans $FFFFFFFF text-color, to x-color "👁" }}text \normal \bold show-sign-color# to x-color "\" }}text dup value show-pw-sign /center blackish }}z \regular : pw-show/hide ( flag -- ) dup IF 0 text-color, ELSE show-sign-color# THEN show-pw-sign >o to text-color o> 2 config:passmode# @ 1 min rot select pw-field >o to pw-mode o> pw-field engage +sync ; ' pw-show/hide config:passmode# @ 1 > toggle[] \normal }}h box[] }}z box[] glue-sright }}glue glue*lll }}glue }}h box[] \skip >bl !i18n l" Enter passphrase to unlock" /subtitle !lit glue*lll }}glue }}v box[] }}z box[] to pw-frame $0000BFFF text-color, ' dark-blue >body f! \ id frame 0 Value mykey-box 0 Value groups-box 0 Value nicks-box 0 Value msgs-box |
︙ | ︙ | |||
276 277 278 279 280 281 282 | $00FFFFFF , : nick[] ( box o:nick -- box ) [: data >o ." clicked on " ke-nick $. cr o> ;] o click[] ; : show-nick ( o:key -- ) ke-imports @ >im-color# cells { ki } | | | | | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | $00FFFFFF , : nick[] ( box o:nick -- box ) [: data >o ." clicked on " ke-nick $. cr o> ;] o click[] ; : show-nick ( o:key -- ) ke-imports @ >im-color# cells { ki } {{ glue*l imports#rgb-bg ki + @ color, slide-frame dup .button1 {{ {{ \large imports#rgb-fg ki + @ color, to x-color ke-sk sec@ nip IF \bold ELSE \regular THEN \sans ['] .nick-base $tmp }}text 25%b ke-pets[] $[]# IF {{ glue*l $00FF0020 color, slide-frame dup .button3 ['] .pet-base $tmp }}text 25%b }}z THEN glue*l }}glue }}h name-tab {{ {{ \sans \script ke-selfsig $@ ['] .sigdates $tmp }}text glue*l }}glue }}h {{ \mono \script ke-pk $@ key| ['] 85type $tmp }}text 20%bt glue*l }}glue }}h swap |
︙ | ︙ | |||
330 331 332 333 334 335 336 | [: chat-keys $+[]! ;] $[]map gui-msgs <event :>chat-connects ?query-task event> next-slide ;] swap click[] ; : show-group ( last# -- ) dup { g -- } cell+ $@ drop cell+ >o | | | 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | [: chat-keys $+[]! ;] $[]map gui-msgs <event :>chat-connects ?query-task event> next-slide ;] swap click[] ; : show-group ( last# -- ) dup { g -- } cell+ $@ drop cell+ >o {{ glue*l $CCAA44FF color, slide-frame dup .button1 {{ {{ \large blackish \regular \sans g $@ }}text 25%b glue*l }}glue }}h name-tab {{ {{ \mono \bold \script groups:id$ |
︙ | ︙ | |||
354 355 356 357 358 359 360 | groups>sort[] group-list[] $@ bounds ?DO I @ show-group cell +LOOP ; : }}button-lit { d: text color -- o } {{ | | | | | | | | | | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 | groups>sort[] group-list[] $@ bounds ?DO I @ show-group cell +LOOP ; : }}button-lit { d: text color -- o } {{ glue*l color color, font-size# 40% f* }}frame dup .button2 text }}text 25%b /center }}z box[] ; also [ifdef] android android [then] tex: vp-title : nicks-title ( -- ) {{ glue*l $000000FF color, slide-frame dup .button1 {{ {{ {{ {{ \large \bold \sans whitish l" Nick+Pet" }}i18n-text 25%b glue*l }}glue }}h name-tab {{ {{ \script \mono \bold l" Pubkey" }}i18n-text 20%bt glue*l }}glue }}h {{ \script \sans \bold l" Key date" }}i18n-text glue*l }}glue }}h }}v pk-tab glue*lll± }}glue }}h box[] vp-title glue*lll ['] vp-title }}vp vp[] dup to title-vp \large s" ❌" $444444FF }}button-lit [: -1 data +! ;] level# click[] }}h box[] }}z box[] ; previous {{ $FFFF80FF color, pres-frame {{ {{ nicks-title glue*shrink }}glue }}h box[] {{ {{ {{ glue*l $303000FF color, bar-frame {{ \script l" My key" }}i18n-text 25%b glue*l }}glue }}h }}z {{ }}v box[] dup to mykey-box {{ glue*l $300030FF color, bar-frame {{ \script l" My groups" }}i18n-text 25%b glue*l }}glue }}h }}z {{ }}v box[] dup to groups-box /vflip {{ glue*l $003030FF color, bar-frame {{ \script l" My peers" }}i18n-text 25%b glue*l }}glue }}h }}z {{ }}v box[] dup to nicks-box /vflip glue*lll }}glue tex: vp-nicks vp-nicks glue*lll ' vp-nicks }}vp vp[] dup value peers-box $444444FF color, to slider-color $CCCCCCFF color, to slider-fgcolor font-size# 33% f* to slider-border dup font-size# 66% f* fdup vslider }}h box[] }}v box[] }}z box[] to id-frame : show-nicks ( -- ) fill-nicks fill-groups next-slide |
︙ | ︙ | |||
449 450 451 452 453 454 455 | fdup f2* to border 0e to borderl fnegate f2* to bordert 0e to borderv THEN o o> ; : add-dtms ( ticks -- ) \small blackish 1n fm* >day { day } day last-day <> IF {{ | | | | 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 | fdup f2* to border 0e to borderl fnegate f2* to bordert 0e to borderv THEN o o> ; : add-dtms ( ticks -- ) \small blackish 1n fm* >day { day } day last-day <> IF {{ glue*l day-color# color, slide-frame dup .button1 \bold day ['] .day $tmp }}text 25%b \regular }}z /center msgs-box .child+ THEN day to last-day 24 fm* fsplit { hour } hour last-hour <> 60 fm* fsplit { minute } minute 10 / last-minute 10 / <> or IF {{ glue*l hour-color# color, slide-frame dup .button1 60 fm* fsplit minute hour [: .## ':' emit .## ':' emit .## 'Z' emit ;] $tmp }}text 25%b }}z /center msgs-box .child+ THEN hour to last-hour minute to last-minute fdrop \normal ; : otr? ( tick -- flag ) |
︙ | ︙ | |||
511 512 513 514 515 516 517 | pk key| last-bubble-pk $! otr to last-otr? text-color! {{ {{ glue*l }}glue {{ \sans \normal {{ glue*l }}glue \bold pk ['] .key-id $tmp }}text 25%b | | > | | | 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | pk key| last-bubble-pk $! otr to last-otr? text-color! {{ {{ glue*l }}glue {{ \sans \normal {{ glue*l }}glue \bold pk ['] .key-id $tmp }}text 25%b >o imports#rgb-fg last-ki >im-color# cells + @ color, to text-color o o> me? IF swap THEN \regular }}h glue*l imports#rgb-bg last-ki >im-color# cells + @ color, slide-frame dup .button2 swap }}z me? 0= IF chatname-tab THEN }}v {{ glue*l $000000FF $FFFFFFFF last-otr? select color, slide-frame dup me? IF .rbubble ELSE .lbubble THEN "bubble" name! {{ new-msg-par }}v box[] dup to msg-vbox "msg-vbox" name! me? >bubble-border }}z box[] "msg-zbox" name! glue*ll }}glue |
︙ | ︙ | |||
562 563 564 565 566 567 568 | [: data >o text$ o> open-url ;] over click[] click( ." url: " dup ..parents cr ) "url" name! msg-box .child+ ; wmsg-class to msg:url :noname { d: string -- o } {{ | | | | | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 | [: data >o text$ o> open-url ;] over click[] click( ." url: " dup ..parents cr ) "url" name! msg-box .child+ ; wmsg-class to msg:url :noname { d: string -- o } {{ glue*l $FFCCCCFF color, slide-frame dup .button1 string [: ." GPS: " .coords ;] $tmp }}text 25%b }}z "gps" name! msg-box .child+ ; wmsg-class to msg:coord :noname { d: pk -- o } {{ pk key| 2dup 0 .pk@ key| str= last-otr? IF my-signal-otr# other-signal-otr# ELSE my-signal# other-signal# THEN rot select color, glue*l slide-frame dup .button1 40%b >r [: '@' emit .key-id ;] $tmp ['] utf8-sanitize $tmp }}text 25%b r> swap }}z msg-box .child+ ; wmsg-class to msg:signal :noname ( addr u -- ) re-green [: ." [" 85type ." ]→" ;] $tmp }}text msg-box .child+ text-color! ; msg-class to msg:re |
︙ | ︙ | |||
665 666 667 668 669 670 671 | : chat-edit-enter ( o:edit-w -- ) text$ dup IF do-chat-cmd? 0= IF avalanche-text THEN ELSE 2drop THEN 64#-1 line-date 64! $lastline $free ; \ +db click( \ ) | | | | | | 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 | : chat-edit-enter ( o:edit-w -- ) text$ dup IF do-chat-cmd? 0= IF avalanche-text THEN ELSE 2drop THEN 64#-1 line-date 64! $lastline $free ; \ +db click( \ ) {{ $80FFFFFF color, pres-frame {{ {{ glue*l $000000FF color, slide-frame dup .button1 {{ \large whitish "⬅" }}text 40%b [: leave-chats prev-slide ;] over click[] !i18n l" Chat Log" }}text' !lit 40%b "" }}text 40%b dup to group-name {{ }}h box[] dup to group-members glue*l }}glue }}h box[] }}z box[] {{ {{ {{ tex: vp-chats vp-chats glue*lll ' vp-chats }}vp vp[] dup to msgs-box dup font-size# 66% f* fdup vslider over >r }}h box[] r> font-size# 66% f* fdup hslider }}v box[] {{ {{ glue*lll $FFFFFFFF color, font-size# 40% f* }}frame dup .button3 {{ \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[] >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> {{ glue*l $80FF80FF color, font-size# 40% f* }}frame dup .button2 !i18n l" Send" }}text' !lit 40%b [: data >o chat-edit-enter "" to text$ o> chat-edit engage ;] chat-edit click[] }}z box[] }}h box[] }}v box[] }}z box[] to chat-frame |
︙ | ︙ | |||
763 764 765 766 767 768 769 | lang:en include-locale lang/en : ??lang ( addr u -- ) ['] lang >body find-name-in ?dup-IF execute THEN ; s" LANG" getenv '_' $split 2swap ??lang '.' $split ??lang ??lang | | | 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 | lang:en include-locale lang/en : ??lang ( addr u -- ) ['] lang >body find-name-in ?dup-IF execute THEN ; s" LANG" getenv '_' $split 2swap ??lang '.' $split ??lang ??lang lsids .lsids [IFDEF] load-cov load-cov [THEN] 0 [IF] Local Variables: forth-local-words: ( |
︙ | ︙ |
Changes to json/g+-import.fs.
︙ | ︙ | |||
119 120 121 122 123 124 125 | also net2o-base 2Variable post-ref : add-message ( xt -- ) project:project$ $@ ?msg-log [: sign[ msg-start execute post-ref 2@ chain, ]pksign ;] gen-cmd$ | | | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | also net2o-base 2Variable post-ref : add-message ( xt -- ) project:project$ $@ ?msg-log [: sign[ msg-start execute post-ref 2@ chain, ]pksign ;] gen-cmd$ +last-signed last-signed 2@ >msg-log 2drop ; : add-plusones { dvcs -- } comments:plusOnes[] $@ bounds U+DO I @ .plusOnes:plusOner{} .author:mapped-key dvcs >o to my-key [: '👍' ulit, msg-like ;] add-message o> cell +LOOP ; |
︙ | ︙ | |||
168 169 170 171 172 173 174 | ".n2o/files" touch comments:url$ basename dvcsp >o project:project$ $! "master" project:branch$ $! save-project o> dvcsp add-post dvcsp add-album comments:media{} ?dup-IF >o dvcsp add-media o> THEN create>never | | | 168 169 170 171 172 173 174 175 176 177 178 179 180 | ".n2o/files" touch comments:url$ basename dvcsp >o project:project$ $! "master" project:branch$ $! save-project o> dvcsp add-post dvcsp add-album comments:media{} ?dup-IF >o dvcsp add-media o> THEN create>never "post" dvcsp .(dvcs-ci) last-msg 2@ ~~ post-ref 2! dvcsp add-plusones dvcsp add-reshares dvcsp add-comments dvcsp .dvcs:dispose-dvcs dir> redate-mode off ; |
Changes to lang/en.
1 2 3 4 5 6 | Gforth 🔵 ⚪ net2o GUI Wrong passphrase! Enter passphrase to unlock | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Gforth 🔵 ⚪ net2o GUI Wrong passphrase! Enter passphrase to unlock Nick+Pet Public key Key signature date My keys My groups My peers chat log send |
Changes to msg.fs.
︙ | ︙ | |||
138 139 140 141 142 143 144 | : ?msg-log ( addr u -- ) msg-logs ?hash ; 0 Value log# 2Variable last-msg : +msg-log ( addr u -- addr' u' / 0 0 ) last# $@ ?msg-log | | | > | | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | : ?msg-log ( addr u -- ) msg-logs ?hash ; 0 Value log# 2Variable last-msg : +msg-log ( addr u -- addr' u' / 0 0 ) last# $@ ?msg-log [: last# cell+ $ins[]date dup dup 0< xor to log# log# last# cell+ $[]@ last-msg 2! 0< IF #0. ELSE last-msg 2@ THEN ;] msglog-sema c-section ; : ?save-msg ( addr u -- ) ?msg-log last# otr-mode @ replay-mode @ or 0= and IF save-msgs& THEN ; Sema queue-sema |
︙ | ︙ |
Changes to tools.fs.
︙ | ︙ | |||
682 683 684 685 686 687 688 | : $ins[]date ( addr u $array -- pos ) \G insert O(log(n)) into pre-sorted array \G @var{pos} is the insertion offset or -1 if not inserted { a[] } 0 a[] $[]# BEGIN 2dup u< WHILE 2dup + 2/ { left right $# } 2dup startdate@ $# a[] $[]@ startdate@ 64over 64over 64= IF 64drop 64drop | | > | 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 | : $ins[]date ( addr u $array -- pos ) \G insert O(log(n)) into pre-sorted array \G @var{pos} is the insertion offset or -1 if not inserted { a[] } 0 a[] $[]# BEGIN 2dup u< WHILE 2dup + 2/ { left right $# } 2dup startdate@ $# a[] $[]@ startdate@ 64over 64over 64= IF 64drop 64drop 2dup $# a[] $[]@ compare dup 0= IF drop 2drop $# invert EXIT THEN 0< ELSE 64u< THEN IF left $# ELSE $# 1+ right THEN REPEAT drop >r { | w^ ins$0 } ins$0 cell a[] r@ cells $ins r@ a[] $[]! r> ; : $search[]date ( ticks $array -- pos ) \G search O(log(n)) in pre-sorted array \G @var{pos} is the first location of the item >= the requested date |
︙ | ︙ |