diff --git a/2.vim b/2.vim index 99566b0b..bd9b1711 100644 --- a/2.vim +++ b/2.vim @@ -12,10 +12,8 @@ inoremap coc#pum#visible() ? coc#pum#next(0) : coc#inline inoremap coc#pum#visible() ? coc#pum#prev(1) : coc#inline#visible() ? coc#inline#prev() : "\" inoremap coc#pum#visible() ? coc#pum#next(1) : coc#inline#visible() ? coc#inline#next() : "\" nnoremap  :NERDTreeFind -snoremap  c nnoremap  :NERDTree nmap  (ctrlp) -snoremap  "_c nnoremap  :NERDTreeToggle xmap \T (table-mode-tableize-delimiter) xmap \tt (table-mode-tableize) @@ -28,10 +26,6 @@ nnoremap \1 :call SN("1") nmap \rn (coc-rename) xmap gx NetrwBrowseXVis nmap gx NetrwBrowseX -snoremap "_c -snoremap c -snoremap c -snoremap c nnoremap GitGutterPreviewHunk :call gitgutter#utility#warn('Please change your map GitGutterPreviewHunk to (GitGutterPreviewHunk)') nnoremap (GitGutterPreviewHunk) :GitGutterPreviewHunk nnoremap GitGutterUndoHunk :call gitgutter#utility#warn('Please change your map GitGutterUndoHunk to (GitGutterUndoHunk)') @@ -144,7 +138,7 @@ let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=- let v:this_session=expand(":p") silent only silent tabonly -cd ~/storage/VDMDI/Comms +cd ~/storage/VDMDI/CT if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' let s:wipebuf = bufnr('%') endif @@ -153,43 +147,19 @@ if &shortmess =~ 'A' else set shortmess=aoO endif -badd +21 build/styles.css -badd +27 src/base.css -badd +16 package.json -badd +1 build/version.txt -badd +12 src/ViewModel/Global/coreViewModel.ts -badd +181 src/View/Modals/settingsModal.tsx -badd +8 dist/sw.js badd +1 build/sw.js -badd +80 src/index.tsx -badd +25 src/react.ts -badd +302 src/Model/Utility/utility.ts -badd +6 src/View/translations.ts -badd +133 src/View/homePage.tsx -badd +18 build/index.html -badd +178 src/Model/Global/storageModel.ts -badd +25 src/Model/Global/settingsModel.ts -badd +14 src/ViewModel/Global/storageViewModel.ts -badd +1 src/View/Components/replyLink.tsx -badd +22 src/View/Components/usageBar.tsx -badd +1 src/View/Components/messageReactionButtonRow.tsx -badd +1 src/View/Components/messageReactionButton.tsx -badd +1 src/View/Components/messageReactionEntry.tsx -badd +1 src/View/Components/messageReactionFilterButton.tsx -badd +15 src/View/homePage.css -badd +133 dist/styles.css -badd +24 src/View/Modals/storageModal.tsx -badd +237 src/View/ChatPages/boardStatusGridPage.tsx -badd +9 src/colors.ts -badd +207 src/ViewModel/Global/settingsViewModel.ts -badd +0 src/colors.css +badd +1 build/version.txt +badd +135 src/Model/Chat/chatModel.ts +badd +211 src/ViewModel/Chat/chatViewModel.ts +badd +205 src/ViewModel/Chat/chatMessageViewModel.ts +badd +1 src/Model/Chat/chatListModel.ts +badd +1 src/ViewModel/Pages/settingsPageViewModel.ts argglobal %argdel +$argadd src/ViewModel/Pages/settingsPageViewModel.ts set stal=2 tabnew +setlocal\ bufhidden=wipe tabnew +setlocal\ bufhidden=wipe -tabnew +setlocal\ bufhidden=wipe -tabnew +setlocal\ bufhidden=wipe tabrewind edit build/sw.js let s:save_splitbelow = &splitbelow @@ -211,12 +181,13 @@ set winminheight=0 set winheight=1 set winminwidth=0 set winwidth=1 -exe 'vert 1resize ' . ((&columns * 31 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 90 + 106) / 213) -exe 'vert 3resize ' . ((&columns * 90 + 106) / 213) +exe 'vert 1resize ' . ((&columns * 31 + 103) / 207) +exe 'vert 2resize ' . ((&columns * 95 + 103) / 207) +exe 'vert 3resize ' . ((&columns * 95 + 103) / 207) argglobal enew -file NERD_tree_tab_2 +file NERD_tree_tab_1 +balt build/sw.js let s:cpo_save=&cpo set cpo&vim nnoremap :call nerdtree#ui_glue#invokeKeyMap("") @@ -406,7 +377,6 @@ setlocal nowrap setlocal wrapmargin=0 wincmd w argglobal -balt dist/sw.js let s:cpo_save=&cpo set cpo&vim nmap [c (GitGutterPrevHunk) @@ -554,12 +524,12 @@ setlocal wrap setlocal wrapmargin=0 silent! normal! zE let &fdl = &fdl -let s:l = 1 - ((0 * winheight(0) + 18) / 37) +let s:l = 1 - ((0 * winheight(0) + 16) / 33) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt keepjumps 1 -normal! 031| +normal! 032| wincmd w argglobal if bufexists(fnamemodify("build/version.txt", ":p")) | buffer build/version.txt | else | edit build/version.txt | endif @@ -711,726 +681,223 @@ setlocal wrap setlocal wrapmargin=0 silent! normal! zE let &fdl = &fdl -let s:l = 1 - ((0 * winheight(0) + 18) / 37) +let s:l = 1 - ((0 * winheight(0) + 16) / 33) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt keepjumps 1 -normal! 013| -wincmd w -exe 'vert 1resize ' . ((&columns * 31 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 90 + 106) / 213) -exe 'vert 3resize ' . ((&columns * 90 + 106) / 213) -tabnext -edit build/styles.css -let s:save_splitbelow = &splitbelow -let s:save_splitright = &splitright -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -let &splitbelow = s:save_splitbelow -let &splitright = s:save_splitright -wincmd t -let s:save_winminheight = &winminheight -let s:save_winminwidth = &winminwidth -set winminheight=0 -set winheight=1 -set winminwidth=0 -set winwidth=1 -exe 'vert 1resize ' . ((&columns * 106 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 106 + 106) / 213) -argglobal -balt src/Model/Utility/utility.ts -let s:cpo_save=&cpo -set cpo&vim -nmap [c (GitGutterPrevHunk) -nmap \hp (GitGutterPreviewHunk) -nmap \hu (GitGutterUndoHunk) -nmap \hs (GitGutterStageHunk) -xmap \hs (GitGutterStageHunk) -nmap ]c (GitGutterNextHunk) -xmap ac (GitGutterTextObjectOuterVisual) -omap ac (GitGutterTextObjectOuterPending) -xmap ic (GitGutterTextObjectInnerVisual) -omap ic (GitGutterTextObjectInnerPending) -let &cpo=s:cpo_save -unlet s:cpo_save -setlocal keymap= -setlocal noarabic -setlocal noautoindent -setlocal backupcopy= -setlocal balloonexpr= -setlocal nobinary -setlocal nobreakindent -setlocal breakindentopt= -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinscopedecls=public,protected,private -setlocal cinwords=if,else,while,do,for,switch -setlocal colorcolumn= -setlocal comments=s1:/*,mb:*,ex:*/ -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal concealcursor= -setlocal conceallevel=0 -setlocal completefunc= -setlocal nocopyindent -setlocal cryptmethod= -setlocal nocursorbind -setlocal nocursorcolumn -setlocal nocursorline -setlocal cursorlineopt=both -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'css' -setlocal filetype=css -endif -setlocal fillchars= -setlocal fixendofline -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal formatprg= -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=-1 -setlocal include=^\\s*@import\\s\\+\\%(url(\\)\\= -setlocal includeexpr= -setlocal indentexpr=GetCSSIndent() -setlocal indentkeys=0{,0},!^F,o,O -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255,- -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal lispoptions= -setlocal lispwords= -setlocal nolist -setlocal listchars= -setlocal makeencoding= -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=bin,octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=csscomplete#CompleteCSS -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norelativenumber -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal scrolloff=-1 -setlocal shiftwidth=4 -setlocal noshortname -setlocal showbreak= -setlocal sidescrolloff=-1 -set signcolumn=yes -setlocal signcolumn=yes -setlocal nosmartindent -setlocal nosmoothscroll -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal spelloptions= -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'css' -setlocal syntax=css -endif -setlocal tabstop=8 -setlocal tagcase= -setlocal tagfunc= -setlocal tags= -setlocal termwinkey= -setlocal termwinscroll=10000 -setlocal termwinsize= -setlocal textwidth=0 -setlocal thesaurus= -setlocal thesaurusfunc= -setlocal noundofile -setlocal undolevels=-123456 -setlocal varsofttabstop= -setlocal vartabstop= -setlocal virtualedit= -setlocal wincolor= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let &fdl = &fdl -let s:l = 1023 - ((16 * winheight(0) + 18) / 37) -if s:l < 1 | let s:l = 1 | endif -keepjumps exe s:l -normal! zt -keepjumps 1023 -normal! $ -wincmd w -argglobal -if bufexists(fnamemodify("src/base.css", ":p")) | buffer src/base.css | else | edit src/base.css | endif -balt build/styles.css -let s:cpo_save=&cpo -set cpo&vim -nmap [c (GitGutterPrevHunk) -nmap \hp (GitGutterPreviewHunk) -nmap \hu (GitGutterUndoHunk) -nmap \hs (GitGutterStageHunk) -xmap \hs (GitGutterStageHunk) -nmap ]c (GitGutterNextHunk) -xmap ac (GitGutterTextObjectOuterVisual) -omap ac (GitGutterTextObjectOuterPending) -xmap ic (GitGutterTextObjectInnerVisual) -omap ic (GitGutterTextObjectInnerPending) -let &cpo=s:cpo_save -unlet s:cpo_save -setlocal keymap= -setlocal noarabic -setlocal noautoindent -setlocal backupcopy= -setlocal balloonexpr= -setlocal nobinary -setlocal nobreakindent -setlocal breakindentopt= -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinscopedecls=public,protected,private -setlocal cinwords=if,else,while,do,for,switch -setlocal colorcolumn= -setlocal comments=s1:/*,mb:*,ex:*/ -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal concealcursor= -setlocal conceallevel=0 -setlocal completefunc= -setlocal nocopyindent -setlocal cryptmethod= -setlocal nocursorbind -setlocal nocursorcolumn -setlocal nocursorline -setlocal cursorlineopt=both -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'css' -setlocal filetype=css -endif -setlocal fillchars= -setlocal fixendofline -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal formatprg= -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=-1 -setlocal include=^\\s*@import\\s\\+\\%(url(\\)\\= -setlocal includeexpr= -setlocal indentexpr=GetCSSIndent() -setlocal indentkeys=0{,0},!^F,o,O -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255,- -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal lispoptions= -setlocal lispwords= -setlocal nolist -setlocal listchars= -setlocal makeencoding= -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=bin,octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=csscomplete#CompleteCSS -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norelativenumber -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal scrolloff=-1 -setlocal shiftwidth=4 -setlocal noshortname -setlocal showbreak= -setlocal sidescrolloff=-1 -set signcolumn=yes -setlocal signcolumn=yes -setlocal nosmartindent -setlocal nosmoothscroll -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal spelloptions= -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'css' -setlocal syntax=css -endif -setlocal tabstop=8 -setlocal tagcase= -setlocal tagfunc= -setlocal tags= -setlocal termwinkey= -setlocal termwinscroll=10000 -setlocal termwinsize= -setlocal textwidth=0 -setlocal thesaurus= -setlocal thesaurusfunc= -setlocal noundofile -setlocal undolevels=-123456 -setlocal varsofttabstop= -setlocal vartabstop= -setlocal virtualedit= -setlocal wincolor= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let &fdl = &fdl -let s:l = 16 - ((7 * winheight(0) + 18) / 37) -if s:l < 1 | let s:l = 1 | endif -keepjumps exe s:l -normal! zt -keepjumps 16 -normal! 0 -wincmd w -exe 'vert 1resize ' . ((&columns * 106 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 106 + 106) / 213) -tabnext -edit src/ViewModel/Global/settingsViewModel.ts -let s:save_splitbelow = &splitbelow -let s:save_splitright = &splitright -set splitbelow splitright -wincmd _ | wincmd | -vsplit -wincmd _ | wincmd | -vsplit -2wincmd h -wincmd w -wincmd w -let &splitbelow = s:save_splitbelow -let &splitright = s:save_splitright -wincmd t -let s:save_winminheight = &winminheight -let s:save_winminwidth = &winminwidth -set winminheight=0 -set winheight=1 -set winminwidth=0 -set winwidth=1 -exe 'vert 1resize ' . ((&columns * 31 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 90 + 106) / 213) -exe 'vert 3resize ' . ((&columns * 90 + 106) / 213) -argglobal -enew -file NERD_tree_tab_3 -balt src/colors.ts -let s:cpo_save=&cpo -set cpo&vim -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap  :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap  :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap ? :call nerdtree#ui_glue#invokeKeyMap("?") -nnoremap A :call nerdtree#ui_glue#invokeKeyMap("A") -nnoremap B :call nerdtree#ui_glue#invokeKeyMap("B") -nnoremap C :call nerdtree#ui_glue#invokeKeyMap("C") -nnoremap CD :call nerdtree#ui_glue#invokeKeyMap("CD") -nnoremap D :call nerdtree#ui_glue#invokeKeyMap("D") -nnoremap FL :call nerdtree#ui_glue#invokeKeyMap("FL") -nnoremap F :call nerdtree#ui_glue#invokeKeyMap("F") -nnoremap I :call nerdtree#ui_glue#invokeKeyMap("I") -nnoremap J :call nerdtree#ui_glue#invokeKeyMap("J") -nnoremap K :call nerdtree#ui_glue#invokeKeyMap("K") -nnoremap O :call nerdtree#ui_glue#invokeKeyMap("O") -nnoremap P :call nerdtree#ui_glue#invokeKeyMap("P") -nnoremap R :call nerdtree#ui_glue#invokeKeyMap("R") -nnoremap T :call nerdtree#ui_glue#invokeKeyMap("T") -nnoremap U :call nerdtree#ui_glue#invokeKeyMap("U") -nnoremap X :call nerdtree#ui_glue#invokeKeyMap("X") -nmap [c (GitGutterPrevHunk) -nmap \hp (GitGutterPreviewHunk) -nmap \hu (GitGutterUndoHunk) -nmap \hs (GitGutterStageHunk) -xmap \hs (GitGutterStageHunk) -nmap ]c (GitGutterNextHunk) -xmap ac (GitGutterTextObjectOuterVisual) -omap ac (GitGutterTextObjectOuterPending) -nnoremap cd :call nerdtree#ui_glue#invokeKeyMap("cd") -nnoremap e :call nerdtree#ui_glue#invokeKeyMap("e") -nnoremap f :call nerdtree#ui_glue#invokeKeyMap("f") -nnoremap go :call nerdtree#ui_glue#invokeKeyMap("go") -nnoremap gb :call nerdtree#ui_glue#invokeKeyMap("gb") -nnoremap gi :call nerdtree#ui_glue#invokeKeyMap("gi") -nnoremap gs :call nerdtree#ui_glue#invokeKeyMap("gs") -nnoremap i :call nerdtree#ui_glue#invokeKeyMap("i") -xmap ic (GitGutterTextObjectInnerVisual) -omap ic (GitGutterTextObjectInnerPending) -nnoremap m :call nerdtree#ui_glue#invokeKeyMap("m") -nnoremap o :call nerdtree#ui_glue#invokeKeyMap("o") -nnoremap p :call nerdtree#ui_glue#invokeKeyMap("p") -nnoremap q :call nerdtree#ui_glue#invokeKeyMap("q") -nnoremap r :call nerdtree#ui_glue#invokeKeyMap("r") -nnoremap s :call nerdtree#ui_glue#invokeKeyMap("s") -nnoremap t :call nerdtree#ui_glue#invokeKeyMap("t") -nnoremap u :call nerdtree#ui_glue#invokeKeyMap("u") -nnoremap x :call nerdtree#ui_glue#invokeKeyMap("x") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap <2-LeftMouse> :call nerdtree#ui_glue#invokeKeyMap("<2-LeftMouse>") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -let &cpo=s:cpo_save -unlet s:cpo_save -setlocal keymap= -setlocal noarabic -setlocal noautoindent -setlocal backupcopy= -setlocal balloonexpr= -setlocal nobinary -setlocal nobreakindent -setlocal breakindentopt= -setlocal bufhidden=hide -setlocal nobuflisted -setlocal buftype=nofile -setlocal nocindent -setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinscopedecls=public,protected,private -setlocal cinwords=if,else,while,do,for,switch -setlocal colorcolumn= -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal concealcursor=nvic -setlocal conceallevel=2 -setlocal completefunc= -setlocal nocopyindent -setlocal cryptmethod= -setlocal nocursorbind -setlocal nocursorcolumn -setlocal cursorline -setlocal cursorlineopt=both -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'nerdtree' -setlocal filetype=nerdtree -endif -setlocal fillchars= -setlocal fixendofline -setlocal foldcolumn=0 -setlocal nofoldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal formatprg= -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=-1 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal lispoptions= -setlocal lispwords= -setlocal nolist -setlocal listchars= -setlocal makeencoding= -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal nomodifiable -setlocal nrformats=bin,octal,hex -set number -setlocal nonumber -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal readonly -setlocal norelativenumber -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal scrolloff=-1 -setlocal shiftwidth=4 -setlocal noshortname -setlocal showbreak= -setlocal sidescrolloff=-1 -set signcolumn=yes -setlocal signcolumn=yes -setlocal nosmartindent -setlocal nosmoothscroll -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal spelloptions= -setlocal statusline=%{exists('b:NERDTree')?b:NERDTree.root.path.str():''} -setlocal suffixesadd= -setlocal noswapfile -setlocal synmaxcol=3000 -if &syntax != 'nerdtree' -setlocal syntax=nerdtree -endif -setlocal tabstop=8 -setlocal tagcase= -setlocal tagfunc= -setlocal tags= -setlocal termwinkey= -setlocal termwinscroll=10000 -setlocal termwinsize= -setlocal textwidth=0 -setlocal thesaurus= -setlocal thesaurusfunc= -setlocal noundofile -setlocal undolevels=-123456 -setlocal varsofttabstop= -setlocal vartabstop= -setlocal virtualedit= -setlocal wincolor= -setlocal nowinfixheight -setlocal winfixwidth -setlocal nowrap -setlocal wrapmargin=0 -wincmd w -argglobal -balt src/ViewModel/Global/coreViewModel.ts -let s:cpo_save=&cpo -set cpo&vim -nmap [c (GitGutterPrevHunk) -nmap \hp (GitGutterPreviewHunk) -nmap \hu (GitGutterUndoHunk) -nmap \hs (GitGutterStageHunk) -xmap \hs (GitGutterStageHunk) -nmap ]c (GitGutterNextHunk) -xmap ac (GitGutterTextObjectOuterVisual) -omap ac (GitGutterTextObjectOuterPending) -xmap ic (GitGutterTextObjectInnerVisual) -omap ic (GitGutterTextObjectInnerPending) -let &cpo=s:cpo_save -unlet s:cpo_save -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal backupcopy= -setlocal balloonexpr= -setlocal nobinary -setlocal nobreakindent -setlocal breakindentopt= -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinscopedecls=public,protected,private -setlocal cinwords=if,else,while,do,for,switch -setlocal colorcolumn= -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=//\ %s -setlocal complete=.,w,b,u,t,i -setlocal concealcursor= -setlocal conceallevel=0 -setlocal completefunc= -setlocal nocopyindent -setlocal cryptmethod= -setlocal nocursorbind -setlocal nocursorcolumn -setlocal nocursorline -setlocal cursorlineopt=both -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat=%+A\ %#%f\ %#(%l\\,%c):\ %m,%C%m -setlocal noexpandtab -if &filetype != 'typescript' -setlocal filetype=typescript -endif -setlocal fillchars= -setlocal fixendofline -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal formatprg= -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=-1 -setlocal include= -setlocal includeexpr= -setlocal indentexpr=GetTypescriptIndent() -setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e,0],0) -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255,$ -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal lispoptions= -setlocal lispwords= -setlocal nolist -setlocal listchars= -setlocal makeencoding= -setlocal makeprg=tsc\ \ $*\ % -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=bin,octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norelativenumber -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal scrolloff=-1 -setlocal shiftwidth=4 -setlocal noshortname -setlocal showbreak= -setlocal sidescrolloff=-1 -set signcolumn=yes -setlocal signcolumn=yes -setlocal nosmartindent -setlocal nosmoothscroll -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal spelloptions= -setlocal statusline= -setlocal suffixesadd=.ts,.tsx -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'typescript' -setlocal syntax=typescript -endif -setlocal tabstop=8 -setlocal tagcase= -setlocal tagfunc= -setlocal tags= -setlocal termwinkey= -setlocal termwinscroll=10000 -setlocal termwinsize= -setlocal textwidth=0 -setlocal thesaurus= -setlocal thesaurusfunc= -setlocal noundofile -setlocal undolevels=-123456 -setlocal varsofttabstop= -setlocal vartabstop= -setlocal virtualedit= -setlocal wincolor= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let &fdl = &fdl -let s:l = 243 - ((33 * winheight(0) + 18) / 37) -if s:l < 1 | let s:l = 1 | endif -keepjumps exe s:l -normal! zt -keepjumps 243 normal! 014| wincmd w +exe 'vert 1resize ' . ((&columns * 31 + 103) / 207) +exe 'vert 2resize ' . ((&columns * 95 + 103) / 207) +exe 'vert 3resize ' . ((&columns * 95 + 103) / 207) +tabnext +edit src/Model/Chat/chatListModel.ts +let s:save_splitbelow = &splitbelow +let s:save_splitright = &splitright +set splitbelow splitright +wincmd _ | wincmd | +vsplit +wincmd _ | wincmd | +vsplit +2wincmd h +wincmd w +wincmd w +let &splitbelow = s:save_splitbelow +let &splitright = s:save_splitright +wincmd t +let s:save_winminheight = &winminheight +let s:save_winminwidth = &winminwidth +set winminheight=0 +set winheight=1 +set winminwidth=0 +set winwidth=1 +exe 'vert 1resize ' . ((&columns * 31 + 103) / 207) +exe 'vert 2resize ' . ((&columns * 87 + 103) / 207) +exe 'vert 3resize ' . ((&columns * 87 + 103) / 207) argglobal -if bufexists(fnamemodify("src/Model/Global/settingsModel.ts", ":p")) | buffer src/Model/Global/settingsModel.ts | else | edit src/Model/Global/settingsModel.ts | endif -balt src/ViewModel/Global/settingsViewModel.ts +enew +file NERD_tree_tab_2 +let s:cpo_save=&cpo +set cpo&vim +nnoremap :call nerdtree#ui_glue#invokeKeyMap("") +nnoremap  :call nerdtree#ui_glue#invokeKeyMap("") +nnoremap  :call nerdtree#ui_glue#invokeKeyMap("") +nnoremap ? :call nerdtree#ui_glue#invokeKeyMap("?") +nnoremap A :call nerdtree#ui_glue#invokeKeyMap("A") +nnoremap B :call nerdtree#ui_glue#invokeKeyMap("B") +nnoremap C :call nerdtree#ui_glue#invokeKeyMap("C") +nnoremap CD :call nerdtree#ui_glue#invokeKeyMap("CD") +nnoremap D :call nerdtree#ui_glue#invokeKeyMap("D") +nnoremap FL :call nerdtree#ui_glue#invokeKeyMap("FL") +nnoremap F :call nerdtree#ui_glue#invokeKeyMap("F") +nnoremap I :call nerdtree#ui_glue#invokeKeyMap("I") +nnoremap J :call nerdtree#ui_glue#invokeKeyMap("J") +nnoremap K :call nerdtree#ui_glue#invokeKeyMap("K") +nnoremap O :call nerdtree#ui_glue#invokeKeyMap("O") +nnoremap P :call nerdtree#ui_glue#invokeKeyMap("P") +nnoremap R :call nerdtree#ui_glue#invokeKeyMap("R") +nnoremap T :call nerdtree#ui_glue#invokeKeyMap("T") +nnoremap U :call nerdtree#ui_glue#invokeKeyMap("U") +nnoremap X :call nerdtree#ui_glue#invokeKeyMap("X") +nnoremap cd :call nerdtree#ui_glue#invokeKeyMap("cd") +nnoremap e :call nerdtree#ui_glue#invokeKeyMap("e") +nnoremap f :call nerdtree#ui_glue#invokeKeyMap("f") +nnoremap go :call nerdtree#ui_glue#invokeKeyMap("go") +nnoremap gb :call nerdtree#ui_glue#invokeKeyMap("gb") +nnoremap gi :call nerdtree#ui_glue#invokeKeyMap("gi") +nnoremap gs :call nerdtree#ui_glue#invokeKeyMap("gs") +nnoremap i :call nerdtree#ui_glue#invokeKeyMap("i") +nnoremap m :call nerdtree#ui_glue#invokeKeyMap("m") +nnoremap o :call nerdtree#ui_glue#invokeKeyMap("o") +nnoremap p :call nerdtree#ui_glue#invokeKeyMap("p") +nnoremap q :call nerdtree#ui_glue#invokeKeyMap("q") +nnoremap r :call nerdtree#ui_glue#invokeKeyMap("r") +nnoremap s :call nerdtree#ui_glue#invokeKeyMap("s") +nnoremap t :call nerdtree#ui_glue#invokeKeyMap("t") +nnoremap u :call nerdtree#ui_glue#invokeKeyMap("u") +nnoremap x :call nerdtree#ui_glue#invokeKeyMap("x") +nnoremap :call nerdtree#ui_glue#invokeKeyMap("") +nnoremap <2-LeftMouse> :call nerdtree#ui_glue#invokeKeyMap("<2-LeftMouse>") +nnoremap :call nerdtree#ui_glue#invokeKeyMap("") +nnoremap :call nerdtree#ui_glue#invokeKeyMap("") +nnoremap :call nerdtree#ui_glue#invokeKeyMap("") +let &cpo=s:cpo_save +unlet s:cpo_save +setlocal keymap= +setlocal noarabic +setlocal noautoindent +setlocal backupcopy= +setlocal balloonexpr= +setlocal nobinary +setlocal nobreakindent +setlocal breakindentopt= +setlocal bufhidden=hide +setlocal nobuflisted +setlocal buftype=nofile +setlocal nocindent +setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e +setlocal cinoptions= +setlocal cinscopedecls=public,protected,private +setlocal cinwords=if,else,while,do,for,switch +setlocal colorcolumn= +setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- +setlocal commentstring=/*%s*/ +setlocal complete=.,w,b,u,t,i +setlocal concealcursor=nvic +setlocal conceallevel=2 +setlocal completefunc= +setlocal nocopyindent +setlocal cryptmethod= +setlocal nocursorbind +setlocal nocursorcolumn +setlocal cursorline +setlocal cursorlineopt=both +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal noexpandtab +if &filetype != 'nerdtree' +setlocal filetype=nerdtree +endif +setlocal fillchars= +setlocal fixendofline +setlocal foldcolumn=0 +setlocal nofoldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=0 +setlocal foldmarker={{{,}}} +setlocal foldmethod=manual +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal foldtext=foldtext() +setlocal formatexpr= +setlocal formatoptions=tcq +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal formatprg= +setlocal grepprg= +setlocal iminsert=0 +setlocal imsearch=-1 +setlocal include= +setlocal includeexpr= +setlocal indentexpr= +setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg= +setlocal nolinebreak +setlocal nolisp +setlocal lispoptions= +setlocal lispwords= +setlocal nolist +setlocal listchars= +setlocal makeencoding= +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal nomodeline +setlocal nomodifiable +setlocal nrformats=bin,octal,hex +set number +setlocal nonumber +setlocal numberwidth=4 +setlocal omnifunc= +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal readonly +setlocal norelativenumber +setlocal norightleft +setlocal rightleftcmd=search +setlocal noscrollbind +setlocal scrolloff=-1 +setlocal shiftwidth=4 +setlocal noshortname +setlocal showbreak= +setlocal sidescrolloff=-1 +set signcolumn=yes +setlocal signcolumn=yes +setlocal nosmartindent +setlocal nosmoothscroll +setlocal softtabstop=0 +setlocal nospell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=en +setlocal spelloptions= +setlocal statusline=%{exists('b:NERDTree')?b:NERDTree.root.path.str():''} +setlocal suffixesadd= +setlocal noswapfile +setlocal synmaxcol=3000 +if &syntax != 'nerdtree' +setlocal syntax=nerdtree +endif +setlocal tabstop=8 +setlocal tagcase= +setlocal tagfunc= +setlocal tags= +setlocal termwinkey= +setlocal termwinscroll=10000 +setlocal termwinsize= +setlocal textwidth=0 +setlocal thesaurus= +setlocal thesaurusfunc= +setlocal noundofile +setlocal undolevels=-123456 +setlocal varsofttabstop= +setlocal vartabstop= +setlocal virtualedit= +setlocal wincolor= +setlocal nowinfixheight +setlocal winfixwidth +setlocal nowrap +setlocal wrapmargin=0 +wincmd w +argglobal +balt src/ViewModel/Chat/chatMessageViewModel.ts let s:cpo_save=&cpo set cpo&vim nmap [c (GitGutterPrevHunk) @@ -1578,229 +1045,16 @@ setlocal wrap setlocal wrapmargin=0 silent! normal! zE let &fdl = &fdl -let s:l = 14 - ((13 * winheight(0) + 18) / 37) +let s:l = 105 - ((0 * winheight(0) + 16) / 33) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt -keepjumps 14 +keepjumps 105 normal! $ wincmd w -exe 'vert 1resize ' . ((&columns * 31 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 90 + 106) / 213) -exe 'vert 3resize ' . ((&columns * 90 + 106) / 213) -tabnext -edit src/index.tsx -let s:save_splitbelow = &splitbelow -let s:save_splitright = &splitright -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -let &splitbelow = s:save_splitbelow -let &splitright = s:save_splitright -wincmd t -let s:save_winminheight = &winminheight -let s:save_winminwidth = &winminwidth -set winminheight=0 -set winheight=1 -set winminwidth=0 -set winwidth=1 -exe 'vert 1resize ' . ((&columns * 31 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 181 + 106) / 213) -argglobal -enew -file NERD_tree_tab_4 -balt src/index.tsx -let s:cpo_save=&cpo -set cpo&vim -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap  :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap  :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap ? :call nerdtree#ui_glue#invokeKeyMap("?") -nnoremap A :call nerdtree#ui_glue#invokeKeyMap("A") -nnoremap B :call nerdtree#ui_glue#invokeKeyMap("B") -nnoremap C :call nerdtree#ui_glue#invokeKeyMap("C") -nnoremap CD :call nerdtree#ui_glue#invokeKeyMap("CD") -nnoremap D :call nerdtree#ui_glue#invokeKeyMap("D") -nnoremap FL :call nerdtree#ui_glue#invokeKeyMap("FL") -nnoremap F :call nerdtree#ui_glue#invokeKeyMap("F") -nnoremap I :call nerdtree#ui_glue#invokeKeyMap("I") -nnoremap J :call nerdtree#ui_glue#invokeKeyMap("J") -nnoremap K :call nerdtree#ui_glue#invokeKeyMap("K") -nnoremap O :call nerdtree#ui_glue#invokeKeyMap("O") -nnoremap P :call nerdtree#ui_glue#invokeKeyMap("P") -nnoremap R :call nerdtree#ui_glue#invokeKeyMap("R") -nnoremap T :call nerdtree#ui_glue#invokeKeyMap("T") -nnoremap U :call nerdtree#ui_glue#invokeKeyMap("U") -nnoremap X :call nerdtree#ui_glue#invokeKeyMap("X") -nmap [c (GitGutterPrevHunk) -nmap \hp (GitGutterPreviewHunk) -nmap \hu (GitGutterUndoHunk) -nmap \hs (GitGutterStageHunk) -xmap \hs (GitGutterStageHunk) -nmap ]c (GitGutterNextHunk) -xmap ac (GitGutterTextObjectOuterVisual) -omap ac (GitGutterTextObjectOuterPending) -nnoremap cd :call nerdtree#ui_glue#invokeKeyMap("cd") -nnoremap e :call nerdtree#ui_glue#invokeKeyMap("e") -nnoremap f :call nerdtree#ui_glue#invokeKeyMap("f") -nnoremap go :call nerdtree#ui_glue#invokeKeyMap("go") -nnoremap gb :call nerdtree#ui_glue#invokeKeyMap("gb") -nnoremap gi :call nerdtree#ui_glue#invokeKeyMap("gi") -nnoremap gs :call nerdtree#ui_glue#invokeKeyMap("gs") -nnoremap i :call nerdtree#ui_glue#invokeKeyMap("i") -xmap ic (GitGutterTextObjectInnerVisual) -omap ic (GitGutterTextObjectInnerPending) -nnoremap m :call nerdtree#ui_glue#invokeKeyMap("m") -nnoremap o :call nerdtree#ui_glue#invokeKeyMap("o") -nnoremap p :call nerdtree#ui_glue#invokeKeyMap("p") -nnoremap q :call nerdtree#ui_glue#invokeKeyMap("q") -nnoremap r :call nerdtree#ui_glue#invokeKeyMap("r") -nnoremap s :call nerdtree#ui_glue#invokeKeyMap("s") -nnoremap t :call nerdtree#ui_glue#invokeKeyMap("t") -nnoremap u :call nerdtree#ui_glue#invokeKeyMap("u") -nnoremap x :call nerdtree#ui_glue#invokeKeyMap("x") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap <2-LeftMouse> :call nerdtree#ui_glue#invokeKeyMap("<2-LeftMouse>") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -let &cpo=s:cpo_save -unlet s:cpo_save -setlocal keymap= -setlocal noarabic -setlocal noautoindent -setlocal backupcopy= -setlocal balloonexpr= -setlocal nobinary -setlocal nobreakindent -setlocal breakindentopt= -setlocal bufhidden=hide -setlocal nobuflisted -setlocal buftype=nofile -setlocal nocindent -setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinscopedecls=public,protected,private -setlocal cinwords=if,else,while,do,for,switch -setlocal colorcolumn= -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal concealcursor=nvic -setlocal conceallevel=2 -setlocal completefunc= -setlocal nocopyindent -setlocal cryptmethod= -setlocal nocursorbind -setlocal nocursorcolumn -setlocal cursorline -setlocal cursorlineopt=both -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'nerdtree' -setlocal filetype=nerdtree -endif -setlocal fillchars= -setlocal fixendofline -setlocal foldcolumn=0 -setlocal nofoldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal formatprg= -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=-1 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal lispoptions= -setlocal lispwords= -setlocal nolist -setlocal listchars= -setlocal makeencoding= -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal nomodifiable -setlocal nrformats=bin,octal,hex -set number -setlocal nonumber -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal readonly -setlocal norelativenumber -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal scrolloff=-1 -setlocal shiftwidth=4 -setlocal noshortname -setlocal showbreak= -setlocal sidescrolloff=-1 -set signcolumn=yes -setlocal signcolumn=yes -setlocal nosmartindent -setlocal nosmoothscroll -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal spelloptions= -setlocal statusline=%{exists('b:NERDTree')?b:NERDTree.root.path.str():''} -setlocal suffixesadd= -setlocal noswapfile -setlocal synmaxcol=3000 -if &syntax != 'nerdtree' -setlocal syntax=nerdtree -endif -setlocal tabstop=8 -setlocal tagcase= -setlocal tagfunc= -setlocal tags= -setlocal termwinkey= -setlocal termwinscroll=10000 -setlocal termwinsize= -setlocal textwidth=0 -setlocal thesaurus= -setlocal thesaurusfunc= -setlocal noundofile -setlocal undolevels=-123456 -setlocal varsofttabstop= -setlocal vartabstop= -setlocal virtualedit= -setlocal wincolor= -setlocal nowinfixheight -setlocal winfixwidth -setlocal nowrap -setlocal wrapmargin=0 -wincmd w argglobal +if bufexists(fnamemodify("src/Model/Chat/chatModel.ts", ":p")) | buffer src/Model/Chat/chatModel.ts | else | edit src/Model/Chat/chatModel.ts | endif +balt src/Model/Chat/chatListModel.ts let s:cpo_save=&cpo set cpo&vim nmap [c (GitGutterPrevHunk) @@ -1850,8 +1104,8 @@ setlocal nodiff setlocal equalprg= setlocal errorformat=%+A\ %#%f\ %#(%l\\,%c):\ %m,%C%m setlocal noexpandtab -if &filetype != 'typescriptreact' -setlocal filetype=typescriptreact +if &filetype != 'typescript' +setlocal filetype=typescript endif setlocal fillchars= setlocal fixendofline @@ -1874,8 +1128,8 @@ setlocal iminsert=0 setlocal imsearch=-1 setlocal include= setlocal includeexpr= -setlocal indentexpr=GetTsxIndent() -setlocal indentkeys=0{,0},0),0],0,,!^F,o,O,e,*,<>>,<<>,/ +setlocal indentexpr=GetTypescriptIndent() +setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e,0],0) setlocal noinfercase setlocal iskeyword=@,48-57,_,192-255,$ setlocal keywordprg= @@ -1923,8 +1177,8 @@ setlocal statusline= setlocal suffixesadd=.ts,.tsx setlocal swapfile setlocal synmaxcol=3000 -if &syntax != 'typescriptreact' -setlocal syntax=typescriptreact +if &syntax != 'typescript' +setlocal syntax=typescript endif setlocal tabstop=8 setlocal tagcase= @@ -1948,65 +1202,23 @@ setlocal wrap setlocal wrapmargin=0 silent! normal! zE let &fdl = &fdl -let s:l = 37 - ((36 * winheight(0) + 18) / 37) +let s:l = 56 - ((20 * winheight(0) + 16) / 33) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt -keepjumps 37 +keepjumps 56 normal! $ wincmd w -exe 'vert 1resize ' . ((&columns * 31 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 181 + 106) / 213) +3wincmd w +exe 'vert 1resize ' . ((&columns * 31 + 103) / 207) +exe 'vert 2resize ' . ((&columns * 87 + 103) / 207) +exe 'vert 3resize ' . ((&columns * 87 + 103) / 207) tabnext -edit src/colors.css -let s:save_splitbelow = &splitbelow -let s:save_splitright = &splitright -set splitbelow splitright -wincmd _ | wincmd | -vsplit -wincmd _ | wincmd | -vsplit -2wincmd h -wincmd w -wincmd w -let &splitbelow = s:save_splitbelow -let &splitright = s:save_splitright -wincmd t -let s:save_winminheight = &winminheight -let s:save_winminwidth = &winminwidth -set winminheight=0 -set winheight=1 -set winminwidth=0 -set winwidth=1 -exe 'vert 1resize ' . ((&columns * 31 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 90 + 106) / 213) -exe 'vert 3resize ' . ((&columns * 90 + 106) / 213) +edit src/ViewModel/Pages/settingsPageViewModel.ts argglobal -enew -file NERD_tree_tab_5 -balt src/colors.css +balt src/Model/Chat/chatModel.ts let s:cpo_save=&cpo set cpo&vim -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap  :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap  :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap ? :call nerdtree#ui_glue#invokeKeyMap("?") -nnoremap A :call nerdtree#ui_glue#invokeKeyMap("A") -nnoremap B :call nerdtree#ui_glue#invokeKeyMap("B") -nnoremap C :call nerdtree#ui_glue#invokeKeyMap("C") -nnoremap CD :call nerdtree#ui_glue#invokeKeyMap("CD") -nnoremap D :call nerdtree#ui_glue#invokeKeyMap("D") -nnoremap FL :call nerdtree#ui_glue#invokeKeyMap("FL") -nnoremap F :call nerdtree#ui_glue#invokeKeyMap("F") -nnoremap I :call nerdtree#ui_glue#invokeKeyMap("I") -nnoremap J :call nerdtree#ui_glue#invokeKeyMap("J") -nnoremap K :call nerdtree#ui_glue#invokeKeyMap("K") -nnoremap O :call nerdtree#ui_glue#invokeKeyMap("O") -nnoremap P :call nerdtree#ui_glue#invokeKeyMap("P") -nnoremap R :call nerdtree#ui_glue#invokeKeyMap("R") -nnoremap T :call nerdtree#ui_glue#invokeKeyMap("T") -nnoremap U :call nerdtree#ui_glue#invokeKeyMap("U") -nnoremap X :call nerdtree#ui_glue#invokeKeyMap("X") nmap [c (GitGutterPrevHunk) nmap \hp (GitGutterPreviewHunk) nmap \hu (GitGutterUndoHunk) @@ -2015,43 +1227,21 @@ xmap \hs (GitGutterStageHunk) nmap ]c (GitGutterNextHunk) xmap ac (GitGutterTextObjectOuterVisual) omap ac (GitGutterTextObjectOuterPending) -nnoremap cd :call nerdtree#ui_glue#invokeKeyMap("cd") -nnoremap e :call nerdtree#ui_glue#invokeKeyMap("e") -nnoremap f :call nerdtree#ui_glue#invokeKeyMap("f") -nnoremap go :call nerdtree#ui_glue#invokeKeyMap("go") -nnoremap gb :call nerdtree#ui_glue#invokeKeyMap("gb") -nnoremap gi :call nerdtree#ui_glue#invokeKeyMap("gi") -nnoremap gs :call nerdtree#ui_glue#invokeKeyMap("gs") -nnoremap i :call nerdtree#ui_glue#invokeKeyMap("i") xmap ic (GitGutterTextObjectInnerVisual) omap ic (GitGutterTextObjectInnerPending) -nnoremap m :call nerdtree#ui_glue#invokeKeyMap("m") -nnoremap o :call nerdtree#ui_glue#invokeKeyMap("o") -nnoremap p :call nerdtree#ui_glue#invokeKeyMap("p") -nnoremap q :call nerdtree#ui_glue#invokeKeyMap("q") -nnoremap r :call nerdtree#ui_glue#invokeKeyMap("r") -nnoremap s :call nerdtree#ui_glue#invokeKeyMap("s") -nnoremap t :call nerdtree#ui_glue#invokeKeyMap("t") -nnoremap u :call nerdtree#ui_glue#invokeKeyMap("u") -nnoremap x :call nerdtree#ui_glue#invokeKeyMap("x") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap <2-LeftMouse> :call nerdtree#ui_glue#invokeKeyMap("<2-LeftMouse>") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") -nnoremap :call nerdtree#ui_glue#invokeKeyMap("") let &cpo=s:cpo_save unlet s:cpo_save setlocal keymap= setlocal noarabic -setlocal noautoindent +setlocal autoindent setlocal backupcopy= setlocal balloonexpr= setlocal nobinary setlocal nobreakindent setlocal breakindentopt= -setlocal bufhidden=hide -setlocal nobuflisted -setlocal buftype=nofile +setlocal bufhidden= +setlocal buflisted +setlocal buftype= setlocal nocindent setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e setlocal cinoptions= @@ -2059,30 +1249,30 @@ setlocal cinscopedecls=public,protected,private setlocal cinwords=if,else,while,do,for,switch setlocal colorcolumn= setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ +setlocal commentstring=//\ %s setlocal complete=.,w,b,u,t,i -setlocal concealcursor=nvic -setlocal conceallevel=2 +setlocal concealcursor= +setlocal conceallevel=0 setlocal completefunc= setlocal nocopyindent setlocal cryptmethod= setlocal nocursorbind setlocal nocursorcolumn -setlocal cursorline +setlocal nocursorline setlocal cursorlineopt=both setlocal define= setlocal dictionary= setlocal nodiff setlocal equalprg= -setlocal errorformat= +setlocal errorformat=%+A\ %#%f\ %#(%l\\,%c):\ %m,%C%m setlocal noexpandtab -if &filetype != 'nerdtree' -setlocal filetype=nerdtree +if &filetype != 'typescript' +setlocal filetype=typescript endif setlocal fillchars= setlocal fixendofline setlocal foldcolumn=0 -setlocal nofoldenable +setlocal foldenable setlocal foldexpr=0 setlocal foldignore=# setlocal foldlevel=0 @@ -2092,7 +1282,7 @@ setlocal foldminlines=1 setlocal foldnestmax=20 setlocal foldtext=foldtext() setlocal formatexpr= -setlocal formatoptions=tcq +setlocal formatoptions=croql setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* setlocal formatprg= setlocal grepprg= @@ -2100,10 +1290,10 @@ setlocal iminsert=0 setlocal imsearch=-1 setlocal include= setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e +setlocal indentexpr=GetTypescriptIndent() +setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e,0],0) setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 +setlocal iskeyword=@,48-57,_,192-255,$ setlocal keywordprg= setlocal nolinebreak setlocal nolisp @@ -2112,167 +1302,19 @@ setlocal lispwords= setlocal nolist setlocal listchars= setlocal makeencoding= -setlocal makeprg= +setlocal makeprg=tsc\ \ $*\ % setlocal matchpairs=(:),{:},[:] setlocal nomodeline -setlocal nomodifiable +setlocal modifiable setlocal nrformats=bin,octal,hex set number -setlocal nonumber +setlocal number setlocal numberwidth=4 setlocal omnifunc= setlocal path= setlocal nopreserveindent setlocal nopreviewwindow setlocal quoteescape=\\ -setlocal readonly -setlocal norelativenumber -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal scrolloff=-1 -setlocal shiftwidth=4 -setlocal noshortname -setlocal showbreak= -setlocal sidescrolloff=-1 -set signcolumn=yes -setlocal signcolumn=yes -setlocal nosmartindent -setlocal nosmoothscroll -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal spelloptions= -setlocal statusline=%{exists('b:NERDTree')?b:NERDTree.root.path.str():''} -setlocal suffixesadd= -setlocal noswapfile -setlocal synmaxcol=3000 -if &syntax != 'nerdtree' -setlocal syntax=nerdtree -endif -setlocal tabstop=8 -setlocal tagcase= -setlocal tagfunc= -setlocal tags= -setlocal termwinkey= -setlocal termwinscroll=10000 -setlocal termwinsize= -setlocal textwidth=0 -setlocal thesaurus= -setlocal thesaurusfunc= -setlocal noundofile -setlocal undolevels=-123456 -setlocal varsofttabstop= -setlocal vartabstop= -setlocal virtualedit= -setlocal wincolor= -setlocal nowinfixheight -setlocal winfixwidth -setlocal nowrap -setlocal wrapmargin=0 -wincmd w -argglobal -balt src/View/Modals/settingsModal.tsx -let s:cpo_save=&cpo -set cpo&vim -nmap [c (GitGutterPrevHunk) -nmap \hp (GitGutterPreviewHunk) -nmap \hu (GitGutterUndoHunk) -nmap \hs (GitGutterStageHunk) -xmap \hs (GitGutterStageHunk) -nmap ]c (GitGutterNextHunk) -xmap ac (GitGutterTextObjectOuterVisual) -omap ac (GitGutterTextObjectOuterPending) -xmap ic (GitGutterTextObjectInnerVisual) -omap ic (GitGutterTextObjectInnerPending) -let &cpo=s:cpo_save -unlet s:cpo_save -setlocal keymap= -setlocal noarabic -setlocal noautoindent -setlocal backupcopy= -setlocal balloonexpr= -setlocal nobinary -setlocal nobreakindent -setlocal breakindentopt= -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinscopedecls=public,protected,private -setlocal cinwords=if,else,while,do,for,switch -setlocal colorcolumn= -setlocal comments=s1:/*,mb:*,ex:*/ -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal concealcursor= -setlocal conceallevel=0 -setlocal completefunc= -setlocal nocopyindent -setlocal cryptmethod= -setlocal nocursorbind -setlocal nocursorcolumn -setlocal nocursorline -setlocal cursorlineopt=both -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'css' -setlocal filetype=css -endif -setlocal fillchars= -setlocal fixendofline -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal formatprg= -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=-1 -setlocal include=^\\s*@import\\s\\+\\%(url(\\)\\= -setlocal includeexpr= -setlocal indentexpr=GetCSSIndent() -setlocal indentkeys=0{,0},!^F,o,O -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255,- -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal lispoptions= -setlocal lispwords= -setlocal nolist -setlocal listchars= -setlocal makeencoding= -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=bin,octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=csscomplete#CompleteCSS -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ setlocal noreadonly setlocal norelativenumber setlocal norightleft @@ -2294,11 +1336,11 @@ setlocal spellfile= setlocal spelllang=en setlocal spelloptions= setlocal statusline= -setlocal suffixesadd= +setlocal suffixesadd=.ts,.tsx setlocal swapfile setlocal synmaxcol=3000 -if &syntax != 'css' -setlocal syntax=css +if &syntax != 'typescript' +setlocal syntax=typescript endif setlocal tabstop=8 setlocal tagcase= @@ -2322,175 +1364,13 @@ setlocal wrap setlocal wrapmargin=0 silent! normal! zE let &fdl = &fdl -let s:l = 88 - ((12 * winheight(0) + 18) / 37) +let s:l = 1 - ((0 * winheight(0) + 17) / 34) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt -keepjumps 88 -normal! $ -wincmd w -argglobal -if bufexists(fnamemodify("src/colors.css", ":p")) | buffer src/colors.css | else | edit src/colors.css | endif -balt src/View/Modals/settingsModal.tsx -let s:cpo_save=&cpo -set cpo&vim -nmap [c (GitGutterPrevHunk) -nmap \hp (GitGutterPreviewHunk) -nmap \hu (GitGutterUndoHunk) -nmap \hs (GitGutterStageHunk) -xmap \hs (GitGutterStageHunk) -nmap ]c (GitGutterNextHunk) -xmap ac (GitGutterTextObjectOuterVisual) -omap ac (GitGutterTextObjectOuterPending) -xmap ic (GitGutterTextObjectInnerVisual) -omap ic (GitGutterTextObjectInnerPending) -let &cpo=s:cpo_save -unlet s:cpo_save -setlocal keymap= -setlocal noarabic -setlocal noautoindent -setlocal backupcopy= -setlocal balloonexpr= -setlocal nobinary -setlocal nobreakindent -setlocal breakindentopt= -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinscopedecls=public,protected,private -setlocal cinwords=if,else,while,do,for,switch -setlocal colorcolumn= -setlocal comments=s1:/*,mb:*,ex:*/ -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal concealcursor= -setlocal conceallevel=0 -setlocal completefunc= -setlocal nocopyindent -setlocal cryptmethod= -setlocal nocursorbind -setlocal nocursorcolumn -setlocal nocursorline -setlocal cursorlineopt=both -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal noexpandtab -if &filetype != 'css' -setlocal filetype=css -endif -setlocal fillchars= -setlocal fixendofline -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=croql -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal formatprg= -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=-1 -setlocal include=^\\s*@import\\s\\+\\%(url(\\)\\= -setlocal includeexpr= -setlocal indentexpr=GetCSSIndent() -setlocal indentkeys=0{,0},!^F,o,O -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255,- -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal lispoptions= -setlocal lispwords= -setlocal nolist -setlocal listchars= -setlocal makeencoding= -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=bin,octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc=csscomplete#CompleteCSS -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norelativenumber -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal scrolloff=-1 -setlocal shiftwidth=4 -setlocal noshortname -setlocal showbreak= -setlocal sidescrolloff=-1 -set signcolumn=yes -setlocal signcolumn=yes -setlocal nosmartindent -setlocal nosmoothscroll -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal spelloptions= -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'css' -setlocal syntax=css -endif -setlocal tabstop=8 -setlocal tagcase= -setlocal tagfunc= -setlocal tags= -setlocal termwinkey= -setlocal termwinscroll=10000 -setlocal termwinsize= -setlocal textwidth=0 -setlocal thesaurus= -setlocal thesaurusfunc= -setlocal noundofile -setlocal undolevels=-123456 -setlocal varsofttabstop= -setlocal vartabstop= -setlocal virtualedit= -setlocal wincolor= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let &fdl = &fdl -let s:l = 93 - ((17 * winheight(0) + 18) / 37) -if s:l < 1 | let s:l = 1 | endif -keepjumps exe s:l -normal! zt -keepjumps 93 -normal! 012| -wincmd w -3wincmd w -exe 'vert 1resize ' . ((&columns * 31 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 90 + 106) / 213) -exe 'vert 3resize ' . ((&columns * 90 + 106) / 213) -tabnext 5 +keepjumps 1 +normal! 0 +tabnext 2 set stal=1 if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 silent exe 'bwipe ' . s:wipebuf @@ -2505,6 +1385,7 @@ if filereadable(s:sx) exe "source " . fnameescape(s:sx) endif let &g:so = s:so_save | let &g:siso = s:siso_save +nohlsearch doautoall SessionLoadPost unlet SessionLoad " vim: set ft=vim : diff --git a/dist/version.txt b/dist/version.txt index 5368987d..5ec6ac5f 100644 --- a/dist/version.txt +++ b/dist/version.txt @@ -1 +1 @@ -2610 Beta 10.8 +2610 Beta 10 diff --git a/src/Model/Chat/chatListModel.ts b/src/Model/Chat/chatListModel.ts index 05227821..340dd1be 100644 --- a/src/Model/Chat/chatListModel.ts +++ b/src/Model/Chat/chatListModel.ts @@ -34,7 +34,7 @@ export default class ChatListModel { this, id, ); - chatModel.setPrimaryChannel(primaryChannel); + chatModel.setName(primaryChannel); this.addChatModel(chatModel); return chatModel; @@ -73,7 +73,7 @@ export default class ChatListModel { for (const chatModel of this.chatModels) { for (const channel of allChannels) { - if (channel != chatModel.unwrappedPrimaryChannel) continue; + if (channel != chatModel.id) continue; fn(chatModel); break; } diff --git a/src/Model/Chat/chatModel.ts b/src/Model/Chat/chatModel.ts index 4850b360..775b018a 100644 --- a/src/Model/Chat/chatModel.ts +++ b/src/Model/Chat/chatModel.ts @@ -37,10 +37,6 @@ export default class ChatModel { info: ChatInfo; /* load function called in constructor */ color: Colors = Colors.Standard; - get unwrappedPrimaryChannel(): string { - return this.info.namespace + this.info.primaryChannel; - } - get secondaryChannels(): string[] { return this.info.secondaryChannels.sort(localeCompare); } @@ -136,14 +132,8 @@ export default class ChatModel { }; // settings - readonly setPrimaryChannel = (primaryChannel: string): void => { - this.info.primaryChannel = primaryChannel; - this.storeInfo(); - this.subscribe(); - }; - - readonly setNamespace = (namespace: string): void => { - this.info.namespace = namespace; + readonly setName = (name: string): void => { + this.info.name = name; this.storeInfo(); this.subscribe(); }; @@ -184,7 +174,7 @@ export default class ChatModel { const senderName: string = this.settingsModel.username; if (senderName == "") return false; - const allChannels: string[] = [this.unwrappedPrimaryChannel]; + const allChannels: string[] = [this.id]; for (const secondaryChannel of this.info.secondaryChannels) { allChannels.push(secondaryChannel); } @@ -252,7 +242,7 @@ export default class ChatModel { }; readonly subscribe = (): void => { - this.connectionModel.addChannel(this.unwrappedPrimaryChannel); + this.connectionModel.addChannel(this.id); }; readonly setReadStatus = (hasUnreadMessages: boolean): void => { @@ -273,211 +263,209 @@ export default class ChatModel { this.storageModel.write(this.getPreviousFilterPath(), filter); } - readonly getFilter = (): string => { - return this.storageModel.read(this.getPreviousFilterPath()); + readonly getFilter = (): string=> { + return this.storageModel.read(this.getPreviousFilterPath()) || ""; } readonly delete = () => { - // untrack - this.chatListModel.untrackChat(this); + // untrack + this.chatListModel.untrackChat(this); - // delete - const dirPath: string[] = this.getBasePath(); - this.storageModel.removeRecursively(dirPath); + // delete + const dirPath: string[] = this.getBasePath(); + this.storageModel.removeRecursively(dirPath); }; // load readonly loadInfo = (): void => { - const info: ChatInfo | null = this.storageModel.readStringifiable( - this.getInfoPath(), - ChatInfoReference, - ); - if (info != null) { - this.info = info; - } else { - this.info = ChatModel.generateChatInfo("0"); - } + const info: ChatInfo | null = this.storageModel.readStringifiable( + this.getInfoPath(), + ChatInfoReference, + ); + if (info != null) { + this.info = info; + } else { + this.info = ChatModel.generateChatInfo("0", "0"); + } }; readonly loadColor = (): void => { - const path: string[] = this.getColorPath(); - const color: string | null = this.storageModel.read(path); - if (!color) { - this.color = Colors.Standard; - } else { - this.color = color as any; - } + const path: string[] = this.getColorPath(); + const color: string | null = this.storageModel.read(path); + if (!color) { + this.color = Colors.Standard; + } else { + this.color = color as any; + } }; get messages(): ChatMessage[] { - const messageIds: string[] = this.storageModel.list( - this.getMessageDirPath(), - ); - if (!Array.isArray(messageIds)) return []; + const messageIds: string[] = this.storageModel.list( + this.getMessageDirPath(), + ); + if (!Array.isArray(messageIds)) return []; - const chatMessages: ChatMessage[] = []; - for (const messageId of messageIds) { - const messagePath: string[] = this.getMessagePath(messageId); - const chatMessage: ChatMessage | null = - this.storageModel.readStringifiable( - messagePath, - ChatMessageReference, - ); - if (chatMessage == null) continue; - chatMessages.push(chatMessage); - } + const chatMessages: ChatMessage[] = []; + for (const messageId of messageIds) { + const messagePath: string[] = this.getMessagePath(messageId); + const chatMessage: ChatMessage | null = + this.storageModel.readStringifiable( + messagePath, + ChatMessageReference, + ); + if (chatMessage == null) continue; + chatMessages.push(chatMessage); + } - const sorted = chatMessages.sort((a, b) => - a.dateSent.localeCompare(b.dateSent), - ); - return sorted; + const sorted = chatMessages.sort((a, b) => + a.dateSent.localeCompare(b.dateSent), + ); + return sorted; } get reactions(): ChatMessageReaction[] { - const reactionIds: string[] = this.storageModel.list( - this.getReactionDirPath(), - ); - if (!Array.isArray(reactionIds)) return []; + const reactionIds: string[] = this.storageModel.list( + this.getReactionDirPath(), + ); + if (!Array.isArray(reactionIds)) return []; - const reactions: ChatMessageReaction[] = []; - for (const reactionId of reactionIds) { - const reactionPath: string[] = this.getReactionPath(reactionId); - const reaction: ChatMessageReaction | null = - this.storageModel.readStringifiable( - reactionPath, - ChatMessageReactionReference, - ); - if (reaction == null) continue; - reactions.push(reaction); - } + const reactions: ChatMessageReaction[] = []; + for (const reactionId of reactionIds) { + const reactionPath: string[] = this.getReactionPath(reactionId); + const reaction: ChatMessageReaction | null = + this.storageModel.readStringifiable( + reactionPath, + ChatMessageReactionReference, + ); + if (reaction == null) continue; + reactions.push(reaction); + } - return reactions; + return reactions; } // init constructor( - storageModel: StorageModel, - connectionModel: ConnectionModel, - settingsModel: SettingsModel, - chatListModel: ChatListModel, - chatId: string, + storageModel: StorageModel, + connectionModel: ConnectionModel, + settingsModel: SettingsModel, + chatListModel: ChatListModel, + chatId: string, ) { - this.id = chatId; - this.connectionModel = connectionModel; - this.settingsModel = settingsModel; - this.storageModel = storageModel; - this.chatListModel = chatListModel; + this.id = chatId; + this.connectionModel = connectionModel; + this.settingsModel = settingsModel; + this.storageModel = storageModel; + this.chatListModel = chatListModel; - this.loadInfo(); - this.loadColor(); - this.subscribe(); + this.loadInfo(); + this.loadColor(); + this.subscribe(); - this.fileModel = new FileModel( - this.storageModel, - this.settingsModel, - this, - ); + this.fileModel = new FileModel( + this.storageModel, + this.settingsModel, + this, + ); } // utility static splitChannel(channelString: string): string[] { - return channelString.split("/"); + return channelString.split("/"); } - static generateChatInfo = (primaryChannel: string): ChatInfo => { - return { - dataVersion: DATA_VERSION, + static generateChatInfo = (name: string, id: string): ChatInfo => { + return { + dataVersion: DATA_VERSION, - primaryChannel, - namespace: "", - secondaryChannels: [], - encryptionKey: "", - hasUnreadMessages: false, - }; + name, + secondaryChannels: [], + encryptionKey: "", + hasUnreadMessages: false, + }; }; static createChatMessage = async ( - channel: string, - sender: string, - encryptionKey: string, - body: string, - inlineReplyId?: string, - fileContent?: FileContent, + channel: string, + sender: string, + encryptionKey: string, + body: string, + inlineReplyId?: string, + fileContent?: FileContent, ): Promise => { - const chatMessage: ChatMessage = { - dataVersion: DATA_VERSION, + const chatMessage: ChatMessage = { + dataVersion: DATA_VERSION, - id: v4(), + id: v4(), - channel, - sender, - body, - dateSent: createTimestamp(), - inlineReplyId, + channel, + sender, + body, + dateSent: createTimestamp(), + inlineReplyId, - status: ChatMessageStatuses.Outbox, - stringifiedFile: "", - }; - if (fileContent != undefined) { - const stringifiedFile: string = stringify(fileContent); - chatMessage.stringifiedFile = stringifiedFile; - } + status: ChatMessageStatuses.Outbox, + stringifiedFile: "", + }; + if (fileContent != undefined) { + const stringifiedFile: string = stringify(fileContent); + chatMessage.stringifiedFile = stringifiedFile; + } - if (encryptionKey != "") { - chatMessage.body = await encryptString( - chatMessage.body, - encryptionKey, - ); - chatMessage.stringifiedFile = await encryptString( - chatMessage.stringifiedFile, - encryptionKey, - ); - } + if (encryptionKey != "") { + chatMessage.body = await encryptString( + chatMessage.body, + encryptionKey, + ); + chatMessage.stringifiedFile = await encryptString( + chatMessage.stringifiedFile, + encryptionKey, + ); + } - return chatMessage; + return chatMessage; }; static createMessageReaction = ( - messageId: string, - sender: string, - content: ReactionSymbols, - isDeleting: boolean, + messageId: string, + sender: string, + content: ReactionSymbols, + isDeleting: boolean, ): ChatMessageReaction => { - const fileContent: FileContent<"reaction"> = - FileModel.createFileContent(v4(), "reaction"); - const reaction: ChatMessageReaction = { - ...fileContent, - fileId: ChatModel.createMessageReactionId(messageId, sender), + const fileContent: FileContent<"reaction"> = + FileModel.createFileContent(v4(), "reaction"); + const reaction: ChatMessageReaction = { + ...fileContent, + fileId: ChatModel.createMessageReactionId(messageId, sender), - messageId, - sender, - content, - isDeleting, - }; - return reaction; + messageId, + sender, + content, + isDeleting, + }; + return reaction; }; static createMessageReactionId = ( - messageId: string, - sender: string, + messageId: string, + sender: string, ): string => { - return messageId + sender; + return messageId + sender; }; } // types export enum ReactionSymbols { ThumbsUp = "👍", - Check = "✅", - Stop = "🛑", - Attention = "❗️", - DoubleAttention = "‼️", - Question = "❓", + Check = "✅", + Stop = "🛑", + Attention = "❗️", + DoubleAttention = "‼️", + Question = "❓", } export interface ChatInfo extends ValidObject { - primaryChannel: string; - namespace: string; + name: string; secondaryChannels: string[]; encryptionKey: string; @@ -486,9 +474,9 @@ export interface ChatInfo extends ValidObject { export enum ChatMessageStatuses { Outbox = "outbox", - Sent = "sent", - Received = "received", - Other = "other", + Sent = "sent", + Received = "received", + Other = "other", } export interface ChatMessage extends ValidObject { @@ -506,7 +494,7 @@ export interface ChatMessage extends ValidObject { } export interface ChatMessageReaction - extends ValidObject, FileContent<"reaction"> { +extends ValidObject, FileContent<"reaction"> { readonly messageId: string; readonly sender: string; readonly content: ReactionSymbols | string; @@ -517,8 +505,7 @@ export interface ChatMessageReaction export const ChatInfoReference: ChatInfo = { dataVersion: DATA_VERSION, - primaryChannel: "", - namespace: "", + name: "", secondaryChannels: [""], encryptionKey: "", diff --git a/src/View/ChatPages/messagePage.tsx b/src/View/ChatPages/messagePage.tsx index 52d69939..bba6c7ab 100644 --- a/src/View/ChatPages/messagePage.tsx +++ b/src/View/ChatPages/messagePage.tsx @@ -78,7 +78,7 @@ messagePageViewModel.focusSetter.subscribeSilent(() => { const isInReplyView = React.createProxyState([messagePageViewModel.replyViewSelectedMessage], ()=>messagePageViewModel.replyViewSelectedMessage.value != undefined); -const title = React.createProxyState([messagePageViewModel.isReplyViewActive], ()=>messagePageViewModel.isReplyViewActive.value ? coreViewModel.translations.chatPage.message.replyHeaderLabel(messagePageViewModel.replyViewSelectedMessage.value.body.value) : coreViewModel.translations.chatPage.message.messagesHeadline); +const title = React.createProxyState([messagePageViewModel.isReplyViewActive], ()=>messagePageViewModel.isReplyViewActive.value ? coreViewModel.translations.chatPage.message.replyHeaderLabel((messagePageViewModel.replyViewSelectedMessage.value!).body.value) : coreViewModel.translations.chatPage.message.messagesHeadline); return (
diff --git a/src/View/ChatPages/settingsPage.tsx b/src/View/ChatPages/settingsPage.tsx index 25955203..0f8eff3d 100644 --- a/src/View/ChatPages/settingsPage.tsx +++ b/src/View/ChatPages/settingsPage.tsx @@ -48,10 +48,10 @@ export function SettingsPage(
@@ -64,7 +64,7 @@ export function SettingsPage( .setPrimaryChannelButtonAudioLabel } on:click={ - settingsPageViewModel.setPrimaryChannel + settingsPageViewModel.setName } toggle:disabled={ settingsPageViewModel.cannotSetPrimaryChannel @@ -77,44 +77,6 @@ export function SettingsPage(
- -
- -
- -
-

diff --git a/src/ViewModel/Chat/chatListViewModel.ts b/src/ViewModel/Chat/chatListViewModel.ts index 4bfe7e07..1ed53705 100644 --- a/src/ViewModel/Chat/chatListViewModel.ts +++ b/src/ViewModel/Chat/chatListViewModel.ts @@ -13,7 +13,7 @@ export default class ChatListViewModel { // data readonly chatIndexManager = new IndexManager( (chatViewModel: ChatViewModel) => - chatViewModel.settingsPageViewModel.primaryChannel.value, + chatViewModel.settingsPageViewModel.name.value, ); // state @@ -104,10 +104,10 @@ export default class ChatListViewModel { } // utility - stripNamespace = (fullChannel: string): string => { + getDisplayName = (fullChannel: string): string => { for (const vm of this.chatViewModels.value) { - const fullReference = vm.chatModel.unwrappedPrimaryChannel; - if (fullReference == fullChannel) return vm.chatModel.info.primaryChannel; + const fullReference = vm.chatModel.id; + if (fullReference == fullChannel) return vm.chatModel.info.name; } return fullChannel; diff --git a/src/ViewModel/Chat/chatMessageViewModel.ts b/src/ViewModel/Chat/chatMessageViewModel.ts index 52cdb1a9..f90b794c 100644 --- a/src/ViewModel/Chat/chatMessageViewModel.ts +++ b/src/ViewModel/Chat/chatMessageViewModel.ts @@ -184,7 +184,7 @@ export default class ChatMessageViewModel { this.messagePageViewModel.chatMessageViewModels.value.get( this.chatMessage.inlineReplyId, ); - this.inlineReply.replies.set(this.chatMessage.id, this); + this.inlineReply?.replies.set(this.chatMessage.id, this); } }; diff --git a/src/ViewModel/Global/fileTransferViewModel.ts b/src/ViewModel/Global/fileTransferViewModel.ts index 644b92ff..8d883412 100644 --- a/src/ViewModel/Global/fileTransferViewModel.ts +++ b/src/ViewModel/Global/fileTransferViewModel.ts @@ -128,7 +128,7 @@ export default class FileTransferViewModel extends Context { this.coreViewModel.chatListModel.chatModels; for (const chatModel of chatModels) { this.chatFileOptions.add({ - label: chatModel.unwrappedPrimaryChannel, + label: chatModel.info.name, path: chatModel.getBasePath(), }); } diff --git a/src/ViewModel/Global/notificationViewModel.ts b/src/ViewModel/Global/notificationViewModel.ts index 8312bdf5..b08f3a2d 100644 --- a/src/ViewModel/Global/notificationViewModel.ts +++ b/src/ViewModel/Global/notificationViewModel.ts @@ -20,7 +20,7 @@ export default class NotificationViewModel { this.createNotification(message); const currentChat = this.chatListViewModel.selectedChat.value.chatModel - .unwrappedPrimaryChannel; + .id; const currentPage = this.chatListViewModel.selectedChat.value.selectedPage.value; if ( @@ -41,7 +41,7 @@ export default class NotificationViewModel { ...this.chatListViewModel.chatViewModels.value.values(), ].find( (chat) => - chat.chatModel.unwrappedPrimaryChannel == notification.fullChannel, + chat.chatModel.id == notification.fullChannel, ); if (!chat) return; chat.open(); @@ -87,7 +87,7 @@ export default class NotificationViewModel { // util createNotification(message: ChatMessage): Notification { const fullChannel = ChatModel.splitChannel(message.channel)[0]; - const chat = this.chatListViewModel.stripNamespace(fullChannel); + const chat = this.chatListViewModel.getDisplayName(fullChannel); return { messageId: message.id, chat, diff --git a/src/ViewModel/Pages/calendarPageViewModel.ts b/src/ViewModel/Pages/calendarPageViewModel.ts index ab224262..01cca075 100644 --- a/src/ViewModel/Pages/calendarPageViewModel.ts +++ b/src/ViewModel/Pages/calendarPageViewModel.ts @@ -40,7 +40,7 @@ export default class CalendarPageViewModel extends TaskContainingPageViewModel { MonthGrid> | undefined > = new React.State(undefined); - nextTask: React.State = new React.State(undefined); + nextTask = new React.State(undefined); // methods createEvent = (): void => { diff --git a/src/ViewModel/Pages/messagePageViewModel.ts b/src/ViewModel/Pages/messagePageViewModel.ts index a6e544a9..ed8a7f12 100644 --- a/src/ViewModel/Pages/messagePageViewModel.ts +++ b/src/ViewModel/Pages/messagePageViewModel.ts @@ -16,7 +16,7 @@ export default class MessagePageViewModel extends Context { new React.MapState(); filteredMessageViewModels: React.ListState = new React.ListState(); - replyViewSelectedMessage: React.State = new React.State(undefined); + replyViewSelectedMessage = new React.State(undefined); isReplyViewActive: React.State = React.createProxyState([this.replyViewSelectedMessage], ()=>this.replyViewSelectedMessage.value != undefined); isReplyViewInactive = React.createProxyState([this.isReplyViewActive], ()=>!this.isReplyViewActive.value); searchViewModel: SearchViewModel; diff --git a/src/ViewModel/Pages/settingsPageViewModel.ts b/src/ViewModel/Pages/settingsPageViewModel.ts index 4b7717c5..60d9c7e6 100644 --- a/src/ViewModel/Pages/settingsPageViewModel.ts +++ b/src/ViewModel/Pages/settingsPageViewModel.ts @@ -5,11 +5,8 @@ import { Colors } from "../../colors"; export default class SettingsPageViewModel extends Context { // state - primaryChannel: React.State = new React.State(""); - primaryChannelInput: React.State = new React.State(""); - - namespace: React.State = new React.State(""); - namespaceInput: React.State = new React.State(""); + name: React.State = new React.State(""); + nameInput: React.State = new React.State(""); secondaryChannels: React.ListState = new React.ListState(); newSecondaryChannelInput: React.State = new React.State(""); @@ -25,14 +22,10 @@ export default class SettingsPageViewModel extends Context { // guards cannotSetPrimaryChannel: React.State = React.createProxyState( - [this.primaryChannel, this.primaryChannelInput], + [this.name, this.nameInput], () => - this.primaryChannelInput.value == "" || - this.primaryChannelInput.value == this.primaryChannel.value, - ); - cannotSetNamespace: React.State = React.createProxyState( - [this.namespace, this.namespaceInput], - () => this.namespaceInput.value == this.namespace.value, + this.nameInput.value == "" || + this.nameInput.value == this.name.value, ); cannotAddSecondaryChannel: React.State = React.createProxyState( [this.newSecondaryChannelInput], @@ -41,21 +34,16 @@ export default class SettingsPageViewModel extends Context { cannotSetEncryptionKey: React.State; // methods - setPrimaryChannel = (): void => { - this.chatViewModel.chatModel.setPrimaryChannel( - this.primaryChannelInput.value, + setName = (): void => { + this.chatViewModel.chatModel.setName( + this.nameInput.value, ); - this.primaryChannel.value = - this.chatViewModel.chatModel.info.primaryChannel; + this.name.value = + this.chatViewModel.chatModel.info.name; this.chatViewModel.chatListViewModel.updateIndices(); }; - setNamespace = (): void => { - this.chatViewModel.chatModel.setNamespace(this.namespaceInput.value); - this.namespace.value = this.chatViewModel.chatModel.info.namespace; - }; - addSecondaryChannel = (): void => { this.secondaryChannels.add(this.newSecondaryChannelInput.value); this.newSecondaryChannelInput.value = ""; @@ -95,16 +83,14 @@ export default class SettingsPageViewModel extends Context { // load preloadData = (): void => { - this.primaryChannel.value = - this.chatViewModel.chatModel.info.primaryChannel; - this.namespace.value = this.chatViewModel.chatModel.info.namespace; + this.name.value = + this.chatViewModel.chatModel.info.name; this.color.value = this.chatViewModel.chatModel.color; }; loadData = (): void => { - this.primaryChannelInput.value = this.primaryChannel.value; - this.namespaceInput.value = this.namespace.value; + this.nameInput.value = this.name.value; this.loadSecondaryChannels();