implement model methods for backup
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ tabWidth: 4
|
|||||||
semi: true
|
semi: true
|
||||||
singleQuote: false
|
singleQuote: false
|
||||||
plugins:
|
plugins:
|
||||||
- "prettier-plugin-sort-imports"
|
- "prettier-plugin-sort-imports"
|
||||||
sortingMethod: "alphabetical"
|
sortingMethod: "alphabetical"
|
||||||
sortingOrder: "ascending"
|
sortingOrder: "ascending"
|
||||||
stripNewlines: true
|
stripNewlines: true
|
||||||
|
|||||||
@@ -0,0 +1,538 @@
|
|||||||
|
let SessionLoad = 1
|
||||||
|
if &cp | set nocp | endif
|
||||||
|
let s:cpo_save=&cpo
|
||||||
|
set cpo&vim
|
||||||
|
inoremap <silent> <Plug>(table-mode-tableize) |:call tablemode#TableizeInsertMode()␍a
|
||||||
|
inoremap <silent> <expr> <PageUp> coc#pum#visible() ? coc#pum#scroll(0) : "\<PageUp>"
|
||||||
|
inoremap <silent> <expr> <PageDown> coc#pum#visible() ? coc#pum#scroll(1) : "\<PageDown>"
|
||||||
|
inoremap <silent> <expr> <C-Y> coc#pum#visible() ? coc#pum#confirm() : coc#inline#visible() ? coc#inline#accept() :"\"
|
||||||
|
inoremap <silent> <expr> <C-E> coc#pum#visible() ? coc#pum#cancel() : coc#inline#visible() ? coc#inline#cancel() : "\"
|
||||||
|
inoremap <silent> <expr> <Up> coc#pum#visible() ? coc#pum#prev(0) : coc#inline#visible() ? coc#inline#prev() :"\<Up>"
|
||||||
|
inoremap <silent> <expr> <Down> coc#pum#visible() ? coc#pum#next(0) : coc#inline#visible() ? coc#inline#next() :"\<Down>"
|
||||||
|
inoremap <silent> <expr> <C-P> coc#pum#visible() ? coc#pum#prev(1) : coc#inline#visible() ? coc#inline#prev() : "\"
|
||||||
|
inoremap <silent> <expr> <C-N> coc#pum#visible() ? coc#pum#next(1) : coc#inline#visible() ? coc#inline#next() : "\"
|
||||||
|
nnoremap :NERDTreeFind
|
||||||
|
nnoremap :NERDTree
|
||||||
|
nmap <Plug>(ctrlp)
|
||||||
|
nnoremap :NERDTreeToggle
|
||||||
|
xmap \T <Plug>(table-mode-tableize-delimiter)
|
||||||
|
xmap \tt <Plug>(table-mode-tableize)
|
||||||
|
nmap \tt <Plug>(table-mode-tableize)
|
||||||
|
nnoremap <silent> \tm :call tablemode#Toggle()
|
||||||
|
nnoremap \4 :call SN("4")
|
||||||
|
nnoremap \3 :call SN("3")
|
||||||
|
nnoremap \2 :call SN("2")
|
||||||
|
nnoremap \1 :call SN("1")
|
||||||
|
nmap \rn <Plug>(coc-rename)
|
||||||
|
xmap gx <Plug>NetrwBrowseXVis
|
||||||
|
nmap gx <Plug>NetrwBrowseX
|
||||||
|
nnoremap <silent> <Plug>GitGutterPreviewHunk :call gitgutter#utility#warn('Please change your map <Plug>GitGutterPreviewHunk to <Plug>(GitGutterPreviewHunk)')
|
||||||
|
nnoremap <silent> <Plug>(GitGutterPreviewHunk) :GitGutterPreviewHunk
|
||||||
|
nnoremap <silent> <Plug>GitGutterUndoHunk :call gitgutter#utility#warn('Please change your map <Plug>GitGutterUndoHunk to <Plug>(GitGutterUndoHunk)')
|
||||||
|
nnoremap <silent> <Plug>(GitGutterUndoHunk) :GitGutterUndoHunk
|
||||||
|
nnoremap <silent> <Plug>GitGutterStageHunk :call gitgutter#utility#warn('Please change your map <Plug>GitGutterStageHunk to <Plug>(GitGutterStageHunk)')
|
||||||
|
nnoremap <silent> <Plug>(GitGutterStageHunk) :GitGutterStageHunk
|
||||||
|
xnoremap <silent> <Plug>GitGutterStageHunk :call gitgutter#utility#warn('Please change your map <Plug>GitGutterStageHunk to <Plug>(GitGutterStageHunk)')
|
||||||
|
xnoremap <silent> <Plug>(GitGutterStageHunk) :GitGutterStageHunk
|
||||||
|
nnoremap <silent> <expr> <Plug>GitGutterPrevHunk &diff ? '[c' : ":\call gitgutter#utility#warn('Please change your map \<Plug>GitGutterPrevHunk to \<Plug>(GitGutterPrevHunk)')\␍"
|
||||||
|
nnoremap <silent> <expr> <Plug>(GitGutterPrevHunk) &diff ? '[c' : ":\execute v:count1 . 'GitGutterPrevHunk'\␍"
|
||||||
|
nnoremap <silent> <expr> <Plug>GitGutterNextHunk &diff ? ']c' : ":\call gitgutter#utility#warn('Please change your map \<Plug>GitGutterNextHunk to \<Plug>(GitGutterNextHunk)')\␍"
|
||||||
|
nnoremap <silent> <expr> <Plug>(GitGutterNextHunk) &diff ? ']c' : ":\execute v:count1 . 'GitGutterNextHunk'\␍"
|
||||||
|
xnoremap <silent> <Plug>(GitGutterTextObjectOuterVisual) :call gitgutter#hunk#text_object(0)
|
||||||
|
xnoremap <silent> <Plug>(GitGutterTextObjectInnerVisual) :call gitgutter#hunk#text_object(1)
|
||||||
|
onoremap <silent> <Plug>(GitGutterTextObjectOuterPending) :call gitgutter#hunk#text_object(0)
|
||||||
|
onoremap <silent> <Plug>(GitGutterTextObjectInnerPending) :call gitgutter#hunk#text_object(1)
|
||||||
|
xnoremap <silent> <Plug>NetrwBrowseXVis :call netrw#BrowseXVis()
|
||||||
|
nnoremap <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))
|
||||||
|
nmap <C-P> <Plug>(ctrlp)
|
||||||
|
nnoremap <silent> <Plug>(ctrlp) :CtrlP
|
||||||
|
nnoremap <silent> <Plug>(table-mode-sort) :call tablemode#spreadsheet#Sort('')
|
||||||
|
nnoremap <silent> <Plug>(table-mode-echo-cell) :call tablemode#spreadsheet#EchoCell()
|
||||||
|
nnoremap <silent> <Plug>(table-mode-eval-formula) :call tablemode#spreadsheet#formula#EvaluateFormulaLine()
|
||||||
|
nnoremap <silent> <Plug>(table-mode-add-formula) :call tablemode#spreadsheet#formula#Add()
|
||||||
|
nnoremap <silent> <Plug>(table-mode-insert-column-after) :call tablemode#spreadsheet#InsertColumn(1)
|
||||||
|
nnoremap <silent> <Plug>(table-mode-insert-column-before) :call tablemode#spreadsheet#InsertColumn(0)
|
||||||
|
nnoremap <silent> <Plug>(table-mode-delete-column) :call tablemode#spreadsheet#DeleteColumn()
|
||||||
|
nnoremap <silent> <Plug>(table-mode-delete-row) :call tablemode#spreadsheet#DeleteRow()
|
||||||
|
xnoremap <silent> <Plug>(table-mode-cell-text-object-i) :call tablemode#spreadsheet#cell#TextObject(1)
|
||||||
|
xnoremap <silent> <Plug>(table-mode-cell-text-object-a) :call tablemode#spreadsheet#cell#TextObject(0)
|
||||||
|
onoremap <silent> <Plug>(table-mode-cell-text-object-i) :call tablemode#spreadsheet#cell#TextObject(1)
|
||||||
|
onoremap <silent> <Plug>(table-mode-cell-text-object-a) :call tablemode#spreadsheet#cell#TextObject(0)
|
||||||
|
nnoremap <silent> <Plug>(table-mode-motion-right) :call tablemode#spreadsheet#cell#Motion('l')
|
||||||
|
nnoremap <silent> <Plug>(table-mode-motion-left) :call tablemode#spreadsheet#cell#Motion('h')
|
||||||
|
nnoremap <silent> <Plug>(table-mode-motion-down) :call tablemode#spreadsheet#cell#Motion('j')
|
||||||
|
nnoremap <silent> <Plug>(table-mode-motion-up) :call tablemode#spreadsheet#cell#Motion('k')
|
||||||
|
nnoremap <silent> <Plug>(table-mode-realign) :call tablemode#table#Realign('.')
|
||||||
|
xnoremap <silent> <Plug>(table-mode-tableize-delimiter) :call tablemode#TableizeByDelimiter()
|
||||||
|
xnoremap <silent> <Plug>(table-mode-tableize) :Tableize
|
||||||
|
nnoremap <silent> <Plug>(table-mode-tableize) :Tableize
|
||||||
|
onoremap <silent> <Plug>(coc-classobj-a) :call CocAction('selectSymbolRange', v:false, '', ['Interface', 'Struct', 'Class'])
|
||||||
|
onoremap <silent> <Plug>(coc-classobj-i) :call CocAction('selectSymbolRange', v:true, '', ['Interface', 'Struct', 'Class'])
|
||||||
|
vnoremap <silent> <Plug>(coc-classobj-a) :call CocAction('selectSymbolRange', v:false, visualmode(), ['Interface', 'Struct', 'Class'])
|
||||||
|
vnoremap <silent> <Plug>(coc-classobj-i) :call CocAction('selectSymbolRange', v:true, visualmode(), ['Interface', 'Struct', 'Class'])
|
||||||
|
onoremap <silent> <Plug>(coc-funcobj-a) :call CocAction('selectSymbolRange', v:false, '', ['Method', 'Function'])
|
||||||
|
onoremap <silent> <Plug>(coc-funcobj-i) :call CocAction('selectSymbolRange', v:true, '', ['Method', 'Function'])
|
||||||
|
vnoremap <silent> <Plug>(coc-funcobj-a) :call CocAction('selectSymbolRange', v:false, visualmode(), ['Method', 'Function'])
|
||||||
|
vnoremap <silent> <Plug>(coc-funcobj-i) :call CocAction('selectSymbolRange', v:true, visualmode(), ['Method', 'Function'])
|
||||||
|
nnoremap <silent> <Plug>(coc-cursors-position) :call CocAction('cursorsSelect', bufnr('%'), 'position', 'n')
|
||||||
|
nnoremap <silent> <Plug>(coc-cursors-word) :call CocAction('cursorsSelect', bufnr('%'), 'word', 'n')
|
||||||
|
vnoremap <silent> <Plug>(coc-cursors-range) :call CocAction('cursorsSelect', bufnr('%'), 'range', visualmode())
|
||||||
|
nnoremap <silent> <Plug>(coc-refactor) :call CocActionAsync('refactor')
|
||||||
|
nnoremap <silent> <Plug>(coc-command-repeat) :call CocAction('repeatCommand')
|
||||||
|
nnoremap <silent> <Plug>(coc-float-jump) :call coc#float#jump()
|
||||||
|
nnoremap <silent> <Plug>(coc-float-hide) :call coc#float#close_all()
|
||||||
|
nnoremap <silent> <Plug>(coc-fix-current) :call CocActionAsync('doQuickfix')
|
||||||
|
nnoremap <silent> <Plug>(coc-openlink) :call CocActionAsync('openLink')
|
||||||
|
nnoremap <silent> <Plug>(coc-references-used) :call CocActionAsync('jumpUsed')
|
||||||
|
nnoremap <silent> <Plug>(coc-references) :call CocActionAsync('jumpReferences')
|
||||||
|
nnoremap <silent> <Plug>(coc-type-definition) :call CocActionAsync('jumpTypeDefinition')
|
||||||
|
nnoremap <silent> <Plug>(coc-implementation) :call CocActionAsync('jumpImplementation')
|
||||||
|
nnoremap <silent> <Plug>(coc-declaration) :call CocActionAsync('jumpDeclaration')
|
||||||
|
nnoremap <silent> <Plug>(coc-definition) :call CocActionAsync('jumpDefinition')
|
||||||
|
nnoremap <silent> <Plug>(coc-diagnostic-prev-error) :call CocActionAsync('diagnosticPrevious', 'error')
|
||||||
|
nnoremap <silent> <Plug>(coc-diagnostic-next-error) :call CocActionAsync('diagnosticNext', 'error')
|
||||||
|
nnoremap <silent> <Plug>(coc-diagnostic-prev) :call CocActionAsync('diagnosticPrevious')
|
||||||
|
nnoremap <silent> <Plug>(coc-diagnostic-next) :call CocActionAsync('diagnosticNext')
|
||||||
|
nnoremap <silent> <Plug>(coc-diagnostic-info) :call CocActionAsync('diagnosticInfo')
|
||||||
|
nnoremap <silent> <Plug>(coc-format) :call CocActionAsync('format')
|
||||||
|
nnoremap <silent> <Plug>(coc-rename) :call CocActionAsync('rename')
|
||||||
|
nnoremap <Plug>(coc-codeaction-source) :call CocActionAsync('codeAction', '', ['source'], v:true)
|
||||||
|
nnoremap <Plug>(coc-codeaction-refactor) :call CocActionAsync('codeAction', 'cursor', ['refactor'], v:true)
|
||||||
|
nnoremap <Plug>(coc-codeaction-cursor) :call CocActionAsync('codeAction', 'cursor')
|
||||||
|
nnoremap <Plug>(coc-codeaction-line) :call CocActionAsync('codeAction', 'currline')
|
||||||
|
nnoremap <Plug>(coc-codeaction) :call CocActionAsync('codeAction', '')
|
||||||
|
vnoremap <Plug>(coc-codeaction-refactor-selected) :call CocActionAsync('codeAction', visualmode(), ['refactor'], v:true)
|
||||||
|
vnoremap <silent> <Plug>(coc-codeaction-selected) :call CocActionAsync('codeAction', visualmode())
|
||||||
|
vnoremap <silent> <Plug>(coc-format-selected) :call CocActionAsync('formatSelected', visualmode())
|
||||||
|
nnoremap <Plug>(coc-codelens-action) :call CocActionAsync('codeLensAction')
|
||||||
|
nnoremap <Plug>(coc-range-select) :call CocActionAsync('rangeSelect', '', v:true)
|
||||||
|
vnoremap <silent> <Plug>(coc-range-select-backward) :call CocActionAsync('rangeSelect', visualmode(), v:false)
|
||||||
|
vnoremap <silent> <Plug>(coc-range-select) :call CocActionAsync('rangeSelect', visualmode(), v:true)
|
||||||
|
nnoremap <C-F> :NERDTreeFind
|
||||||
|
nnoremap <C-T> :NERDTreeToggle
|
||||||
|
nnoremap <C-N> :NERDTree
|
||||||
|
inoremap <silent> <expr> coc#pum#visible() ? coc#pum#cancel() : coc#inline#visible() ? coc#inline#cancel() : "\"
|
||||||
|
inoremap <nowait> <silent> <expr> ␍ coc#pum#visible() ? coc#pum#confirm() : "\␍"
|
||||||
|
inoremap <silent> <expr> coc#pum#visible() ? coc#pum#next(1) : coc#inline#visible() ? coc#inline#next() : "\"
|
||||||
|
inoremap <silent> <expr> coc#pum#visible() ? coc#pum#prev(1) : coc#inline#visible() ? coc#inline#prev() : "\"
|
||||||
|
inoremap <silent> <expr> coc#pum#visible() ? coc#pum#confirm() : coc#inline#visible() ? coc#inline#accept() :"\"
|
||||||
|
let &cpo=s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
set autoread
|
||||||
|
set background=dark
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
set encoding=utf-8
|
||||||
|
set fileencodings=ucs-bom,utf-8,default,latin1
|
||||||
|
set nomodeline
|
||||||
|
set mouse=a
|
||||||
|
set printoptions=paper:a4
|
||||||
|
set ruler
|
||||||
|
set runtimepath=~/.vim,~/.vim/pack/airblade/start/vim-gitgutter,~/.vim/plugged/coc.nvim,~/.vim/plugged/emmet-vim,~/.vim/plugged/nerdtree,~/.vim/plugged/typescript-vim,~/.vim/plugged/vim-jsx-typescript,~/.vim/plugged/vim-table-mode,~/.vim/plugged/ctrlp.vim,/var/lib/vim/addons,/etc/vim,/usr/share/vim/vimfiles,/usr/share/vim/vim90,/usr/share/vim/vimfiles/after,/etc/vim/after,/var/lib/vim/addons/after,~/.vim/plugged/vim-jsx-typescript/after,~/.vim/after
|
||||||
|
set shiftwidth=4
|
||||||
|
set smarttab
|
||||||
|
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
|
||||||
|
set updatetime=500
|
||||||
|
let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
|
||||||
|
let v:this_session=expand("<sfile>:p")
|
||||||
|
silent only
|
||||||
|
silent tabonly
|
||||||
|
cd ~/storage/VDMDI/Comms
|
||||||
|
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
||||||
|
let s:wipebuf = bufnr('%')
|
||||||
|
endif
|
||||||
|
if &shortmess =~ 'A'
|
||||||
|
set shortmess=aoOA
|
||||||
|
else
|
||||||
|
set shortmess=aoO
|
||||||
|
endif
|
||||||
|
badd +0 src/Model/Global/fileTransferModel.ts
|
||||||
|
argglobal
|
||||||
|
%argdel
|
||||||
|
edit src/Model/Global/fileTransferModel.ts
|
||||||
|
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 + 127) / 255)
|
||||||
|
exe 'vert 2resize ' . ((&columns * 223 + 127) / 255)
|
||||||
|
argglobal
|
||||||
|
enew
|
||||||
|
file NERD_tree_tab_1
|
||||||
|
balt src/Model/Global/fileTransferModel.ts
|
||||||
|
let s:cpo_save=&cpo
|
||||||
|
set cpo&vim
|
||||||
|
nnoremap <buffer> <silent> <NL> :call nerdtree#ui_glue#invokeKeyMap("<C-j>")
|
||||||
|
nnoremap <buffer> <silent> :call nerdtree#ui_glue#invokeKeyMap("<C-k>")
|
||||||
|
nnoremap <buffer> <silent> ␍ :call nerdtree#ui_glue#invokeKeyMap("<CR>")
|
||||||
|
nnoremap <buffer> <silent> ? :call nerdtree#ui_glue#invokeKeyMap("?")
|
||||||
|
nnoremap <buffer> <silent> A :call nerdtree#ui_glue#invokeKeyMap("A")
|
||||||
|
nnoremap <buffer> <silent> B :call nerdtree#ui_glue#invokeKeyMap("B")
|
||||||
|
nnoremap <buffer> <silent> C :call nerdtree#ui_glue#invokeKeyMap("C")
|
||||||
|
nnoremap <buffer> <silent> CD :call nerdtree#ui_glue#invokeKeyMap("CD")
|
||||||
|
nnoremap <buffer> <silent> D :call nerdtree#ui_glue#invokeKeyMap("D")
|
||||||
|
nnoremap <buffer> <silent> FL :call nerdtree#ui_glue#invokeKeyMap("FL")
|
||||||
|
nnoremap <buffer> <silent> F :call nerdtree#ui_glue#invokeKeyMap("F")
|
||||||
|
nnoremap <buffer> <silent> I :call nerdtree#ui_glue#invokeKeyMap("I")
|
||||||
|
nnoremap <buffer> <silent> J :call nerdtree#ui_glue#invokeKeyMap("J")
|
||||||
|
nnoremap <buffer> <silent> K :call nerdtree#ui_glue#invokeKeyMap("K")
|
||||||
|
nnoremap <buffer> <silent> O :call nerdtree#ui_glue#invokeKeyMap("O")
|
||||||
|
nnoremap <buffer> <silent> P :call nerdtree#ui_glue#invokeKeyMap("P")
|
||||||
|
nnoremap <buffer> <silent> R :call nerdtree#ui_glue#invokeKeyMap("R")
|
||||||
|
nnoremap <buffer> <silent> T :call nerdtree#ui_glue#invokeKeyMap("T")
|
||||||
|
nnoremap <buffer> <silent> U :call nerdtree#ui_glue#invokeKeyMap("U")
|
||||||
|
nnoremap <buffer> <silent> X :call nerdtree#ui_glue#invokeKeyMap("X")
|
||||||
|
nmap <buffer> [c <Plug>(GitGutterPrevHunk)
|
||||||
|
nmap <buffer> \hp <Plug>(GitGutterPreviewHunk)
|
||||||
|
nmap <buffer> \hu <Plug>(GitGutterUndoHunk)
|
||||||
|
nmap <buffer> \hs <Plug>(GitGutterStageHunk)
|
||||||
|
xmap <buffer> \hs <Plug>(GitGutterStageHunk)
|
||||||
|
nmap <buffer> ]c <Plug>(GitGutterNextHunk)
|
||||||
|
xmap <buffer> ac <Plug>(GitGutterTextObjectOuterVisual)
|
||||||
|
omap <buffer> ac <Plug>(GitGutterTextObjectOuterPending)
|
||||||
|
nnoremap <buffer> <silent> cd :call nerdtree#ui_glue#invokeKeyMap("cd")
|
||||||
|
nnoremap <buffer> <silent> e :call nerdtree#ui_glue#invokeKeyMap("e")
|
||||||
|
nnoremap <buffer> <silent> f :call nerdtree#ui_glue#invokeKeyMap("f")
|
||||||
|
nnoremap <buffer> <silent> go :call nerdtree#ui_glue#invokeKeyMap("go")
|
||||||
|
nnoremap <buffer> <silent> gb :call nerdtree#ui_glue#invokeKeyMap("gb")
|
||||||
|
nnoremap <buffer> <silent> gi :call nerdtree#ui_glue#invokeKeyMap("gi")
|
||||||
|
nnoremap <buffer> <silent> gs :call nerdtree#ui_glue#invokeKeyMap("gs")
|
||||||
|
xmap <buffer> ic <Plug>(GitGutterTextObjectInnerVisual)
|
||||||
|
omap <buffer> ic <Plug>(GitGutterTextObjectInnerPending)
|
||||||
|
nnoremap <buffer> <silent> i :call nerdtree#ui_glue#invokeKeyMap("i")
|
||||||
|
nnoremap <buffer> <silent> m :call nerdtree#ui_glue#invokeKeyMap("m")
|
||||||
|
nnoremap <buffer> <silent> o :call nerdtree#ui_glue#invokeKeyMap("o")
|
||||||
|
nnoremap <buffer> <silent> p :call nerdtree#ui_glue#invokeKeyMap("p")
|
||||||
|
nnoremap <buffer> <silent> q :call nerdtree#ui_glue#invokeKeyMap("q")
|
||||||
|
nnoremap <buffer> <silent> r :call nerdtree#ui_glue#invokeKeyMap("r")
|
||||||
|
nnoremap <buffer> <silent> s :call nerdtree#ui_glue#invokeKeyMap("s")
|
||||||
|
nnoremap <buffer> <silent> t :call nerdtree#ui_glue#invokeKeyMap("t")
|
||||||
|
nnoremap <buffer> <silent> u :call nerdtree#ui_glue#invokeKeyMap("u")
|
||||||
|
nnoremap <buffer> <silent> x :call nerdtree#ui_glue#invokeKeyMap("x")
|
||||||
|
nnoremap <buffer> <silent> <MiddleMouse> :call nerdtree#ui_glue#invokeKeyMap("<MiddleMouse>")
|
||||||
|
nnoremap <buffer> <silent> <2-LeftMouse> :call nerdtree#ui_glue#invokeKeyMap("<2-LeftMouse>")
|
||||||
|
nnoremap <buffer> <silent> <C-K> :call nerdtree#ui_glue#invokeKeyMap("<C-k>")
|
||||||
|
nnoremap <buffer> <silent> <C-J> :call nerdtree#ui_glue#invokeKeyMap("<C-j>")
|
||||||
|
nnoremap <buffer> <silent> <LeftRelease> <LeftRelease>:call nerdtree#ui_glue#invokeKeyMap("<LeftRelease>")
|
||||||
|
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/Model/Global/fileTransferModel.ts
|
||||||
|
let s:cpo_save=&cpo
|
||||||
|
set cpo&vim
|
||||||
|
nmap <buffer> [c <Plug>(GitGutterPrevHunk)
|
||||||
|
nmap <buffer> \hp <Plug>(GitGutterPreviewHunk)
|
||||||
|
nmap <buffer> \hu <Plug>(GitGutterUndoHunk)
|
||||||
|
nmap <buffer> \hs <Plug>(GitGutterStageHunk)
|
||||||
|
xmap <buffer> \hs <Plug>(GitGutterStageHunk)
|
||||||
|
nmap <buffer> ]c <Plug>(GitGutterNextHunk)
|
||||||
|
xmap <buffer> ac <Plug>(GitGutterTextObjectOuterVisual)
|
||||||
|
omap <buffer> ac <Plug>(GitGutterTextObjectOuterPending)
|
||||||
|
xmap <buffer> ic <Plug>(GitGutterTextObjectInnerVisual)
|
||||||
|
omap <buffer> ic <Plug>(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 = 101 - ((4 * winheight(0) + 24) / 48)
|
||||||
|
if s:l < 1 | let s:l = 1 | endif
|
||||||
|
keepjumps exe s:l
|
||||||
|
normal! zt
|
||||||
|
keepjumps 101
|
||||||
|
normal! 05|
|
||||||
|
wincmd w
|
||||||
|
2wincmd w
|
||||||
|
exe 'vert 1resize ' . ((&columns * 31 + 127) / 255)
|
||||||
|
exe 'vert 2resize ' . ((&columns * 223 + 127) / 255)
|
||||||
|
tabnext 1
|
||||||
|
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0
|
||||||
|
silent exe 'bwipe ' . s:wipebuf
|
||||||
|
endif
|
||||||
|
unlet! s:wipebuf
|
||||||
|
set winheight=1 winwidth=20
|
||||||
|
set shortmess=filnxtToOS
|
||||||
|
let &winminheight = s:save_winminheight
|
||||||
|
let &winminwidth = s:save_winminwidth
|
||||||
|
let s:sx = expand("<sfile>:p:r")."x.vim"
|
||||||
|
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 :
|
||||||
@@ -3,12 +3,14 @@
|
|||||||
UDN-Comms is a messenger built for [UDN](https://github.com/marlon-erler/universal-decentralized-network).
|
UDN-Comms is a messenger built for [UDN](https://github.com/marlon-erler/universal-decentralized-network).
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
|
||||||
- Offline support
|
- Offline support
|
||||||
- Encryption
|
- Encryption
|
||||||
- Secondary channels
|
- Secondary channels
|
||||||
|
|
||||||
# Getting Started
|
# Getting Started
|
||||||
|
|
||||||
1. Use or install the web app [here](https://udn-comms.onrender.com/)
|
1. Use or install the web app [here](https://udn-comms.onrender.com/)
|
||||||
3. Enter your name
|
2. Enter your name
|
||||||
2. Connect to your server
|
3. Connect to your server
|
||||||
3. Create a chat and start messaging
|
4. Create a chat and start messaging
|
||||||
|
|||||||
Vendored
+753
-674
File diff suppressed because it is too large
Load Diff
Vendored
+9994
-7627
File diff suppressed because it is too large
Load Diff
Vendored
+71
-50
@@ -28,7 +28,7 @@ body {
|
|||||||
--animation-duration: 0.4s;
|
--animation-duration: 0.4s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal>div,
|
.modal > div,
|
||||||
.slide-up {
|
.slide-up {
|
||||||
animation: slide-up var(--animation-duration);
|
animation: slide-up var(--animation-duration);
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,11 @@ body {
|
|||||||
--text-error: #da1e28;
|
--text-error: #da1e28;
|
||||||
--text-info: #0043ce;
|
--text-info: #0043ce;
|
||||||
|
|
||||||
--highlight-background: linear-gradient(45deg, hsl(30, 100%, 50%), hsl(40, 100%, 50%));
|
--highlight-background: linear-gradient(
|
||||||
|
45deg,
|
||||||
|
hsl(30, 100%, 50%),
|
||||||
|
hsl(40, 100%, 50%)
|
||||||
|
);
|
||||||
--highlight-color: black;
|
--highlight-color: black;
|
||||||
|
|
||||||
--link: #0f62fe;
|
--link: #0f62fe;
|
||||||
@@ -123,7 +127,7 @@ body {
|
|||||||
color: var(--text-placeholder);
|
color: var(--text-placeholder);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal>div {
|
.modal > div {
|
||||||
background: var(--background-glass);
|
background: var(--background-glass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,7 +352,7 @@ select {
|
|||||||
/* backdrop-filter */
|
/* backdrop-filter */
|
||||||
header,
|
header,
|
||||||
menu,
|
menu,
|
||||||
.modal>div,
|
.modal > div,
|
||||||
.blur {
|
.blur {
|
||||||
backdrop-filter: blur(var(--blur));
|
backdrop-filter: blur(var(--blur));
|
||||||
-webkit-backdrop-filter: blur(var(--blur));
|
-webkit-backdrop-filter: blur(var(--blur));
|
||||||
@@ -366,7 +370,9 @@ footer {
|
|||||||
border-top: 1px solid var(--surface-border);
|
border-top: 1px solid var(--surface-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(label.tile *),
|
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
|
||||||
|
label.tile *
|
||||||
|
),
|
||||||
label.tile,
|
label.tile,
|
||||||
select:not(label.tile *),
|
select:not(label.tile *),
|
||||||
textarea:not(label.tile *) {
|
textarea:not(label.tile *) {
|
||||||
@@ -381,7 +387,9 @@ hr {
|
|||||||
border-bottom: 1px solid var(--border) !important;
|
border-bottom: 1px solid var(--border) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus:not(label.tile *):not(.no-outline),
|
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus:not(
|
||||||
|
label.tile *
|
||||||
|
):not(.no-outline),
|
||||||
label.tile:has(input:focus),
|
label.tile:has(input:focus),
|
||||||
label.tile:has(textarea:focus),
|
label.tile:has(textarea:focus),
|
||||||
textarea:focus:not(label.tile *),
|
textarea:focus:not(label.tile *),
|
||||||
@@ -446,13 +454,13 @@ input[type="radio"],
|
|||||||
label.inline,
|
label.inline,
|
||||||
main,
|
main,
|
||||||
.modal[open],
|
.modal[open],
|
||||||
.modal>div,
|
.modal > div,
|
||||||
.tile,
|
.tile,
|
||||||
.tile>div {
|
.tile > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
header>span,
|
header > span,
|
||||||
.flex-column,
|
.flex-column,
|
||||||
.flex-row {
|
.flex-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -479,7 +487,7 @@ textarea {
|
|||||||
|
|
||||||
main,
|
main,
|
||||||
.tile,
|
.tile,
|
||||||
.tile>div {
|
.tile > div {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,9 +499,9 @@ main,
|
|||||||
flex: 0 !important;
|
flex: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal>div,
|
.modal > div,
|
||||||
.modal main,
|
.modal main,
|
||||||
.tile>div {
|
.tile > div {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -516,7 +524,7 @@ label.inline,
|
|||||||
gap: var(--gap-in-controls);
|
gap: var(--gap-in-controls);
|
||||||
}
|
}
|
||||||
|
|
||||||
header>span,
|
header > span,
|
||||||
.gap {
|
.gap {
|
||||||
gap: var(--gap-between-tiles) !important;
|
gap: var(--gap-between-tiles) !important;
|
||||||
}
|
}
|
||||||
@@ -628,7 +636,7 @@ input[type="radio"] {
|
|||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
article>div {
|
article > div {
|
||||||
padding: var(--content-padding);
|
padding: var(--content-padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -652,7 +660,7 @@ textarea,
|
|||||||
padding: var(--control-padding) !important;
|
padding: var(--control-padding) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
header>span {
|
header > span {
|
||||||
padding: var(--gap-between-tiles);
|
padding: var(--gap-between-tiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -668,7 +676,7 @@ header>span {
|
|||||||
padding-top: var(--control-padding) !important;
|
padding-top: var(--control-padding) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
article>div {
|
article > div {
|
||||||
padding-top: calc(var(--header-height) + var(--content-margin));
|
padding-top: calc(var(--header-height) + var(--content-margin));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -700,8 +708,11 @@ select {
|
|||||||
padding-bottom: var(--control-padding) !important;
|
padding-bottom: var(--control-padding) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
article>div {
|
article > div {
|
||||||
padding-bottom: calc(var(--menu-height-mobile) + var(--control-height) + var(--content-padding));
|
padding-bottom: calc(
|
||||||
|
var(--menu-height-mobile) + var(--control-height) +
|
||||||
|
var(--content-padding)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
label:not(.inline) {
|
label:not(.inline) {
|
||||||
@@ -718,10 +729,10 @@ label.tile:has(> span.icon) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* position etc */
|
/* position etc */
|
||||||
article>div,
|
article > div,
|
||||||
footer,
|
footer,
|
||||||
header,
|
header,
|
||||||
select+.icon {
|
select + .icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -752,7 +763,7 @@ label {
|
|||||||
position: sticky !important;
|
position: sticky !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
article>div,
|
article > div,
|
||||||
header,
|
header,
|
||||||
.modal {
|
.modal {
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -762,7 +773,7 @@ header,
|
|||||||
top: 0 !important;
|
top: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
article>div,
|
article > div,
|
||||||
footer,
|
footer,
|
||||||
header,
|
header,
|
||||||
.modal {
|
.modal {
|
||||||
@@ -773,7 +784,7 @@ header,
|
|||||||
left: 0px !important;
|
left: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
article>div,
|
article > div,
|
||||||
footer,
|
footer,
|
||||||
header,
|
header,
|
||||||
.modal {
|
.modal {
|
||||||
@@ -784,7 +795,7 @@ header,
|
|||||||
right: 0px !important;
|
right: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
select+.icon {
|
select + .icon {
|
||||||
right: var(--control-marker-padding);
|
right: var(--control-marker-padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -796,8 +807,8 @@ body:has(> menu) footer {
|
|||||||
bottom: var(--menu-height-mobile);
|
bottom: var(--menu-height-mobile);
|
||||||
}
|
}
|
||||||
|
|
||||||
article>div,
|
article > div,
|
||||||
select+.icon,
|
select + .icon,
|
||||||
.modal {
|
.modal {
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
}
|
}
|
||||||
@@ -809,8 +820,8 @@ select+.icon,
|
|||||||
/* size */
|
/* size */
|
||||||
article,
|
article,
|
||||||
main,
|
main,
|
||||||
select+.icon,
|
select + .icon,
|
||||||
.modal>div,
|
.modal > div,
|
||||||
.modal main {
|
.modal main {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
@@ -827,7 +838,7 @@ button:not(.tile):not(header *),
|
|||||||
footer,
|
footer,
|
||||||
input:not([type="checkbox"]):not([type="radio"]),
|
input:not([type="checkbox"]):not([type="radio"]),
|
||||||
select,
|
select,
|
||||||
select+.icon {
|
select + .icon {
|
||||||
height: var(--control-height);
|
height: var(--control-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -853,7 +864,7 @@ button:not(.tile):not(header *),
|
|||||||
footer,
|
footer,
|
||||||
input:not([type="checkbox"]):not([type="radio"]),
|
input:not([type="checkbox"]):not([type="radio"]),
|
||||||
select,
|
select,
|
||||||
.modal>div> :is(button, div.flex-row) {
|
.modal > div > :is(button, div.flex-row) {
|
||||||
min-height: var(--control-height);
|
min-height: var(--control-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -876,9 +887,9 @@ header,
|
|||||||
main,
|
main,
|
||||||
select,
|
select,
|
||||||
textarea,
|
textarea,
|
||||||
.modal>div,
|
.modal > div,
|
||||||
.tile,
|
.tile,
|
||||||
.tile>div {
|
.tile > div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -932,7 +943,7 @@ code {
|
|||||||
.error,
|
.error,
|
||||||
.warning,
|
.warning,
|
||||||
.success,
|
.success,
|
||||||
label.tile>div>span:not(.icon) {
|
label.tile > div > span:not(.icon) {
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -952,7 +963,7 @@ menu {
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal>div {
|
.modal > div {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1048,8 +1059,11 @@ menu {
|
|||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
article>div {
|
article > div {
|
||||||
padding-bottom: calc(var(--menu-height-mobile) + var(--header-height) + var(--content-padding));
|
padding-bottom: calc(
|
||||||
|
var(--menu-height-mobile) + var(--header-height) +
|
||||||
|
var(--content-padding)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* overflow */
|
/* overflow */
|
||||||
@@ -1069,7 +1083,7 @@ main,
|
|||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
article>div,
|
article > div,
|
||||||
.modal main {
|
.modal main {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
@@ -1121,7 +1135,7 @@ main::-webkit-scrollbar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
main,
|
main,
|
||||||
article>div {
|
article > div {
|
||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1135,30 +1149,29 @@ main {
|
|||||||
|
|
||||||
/* tablet & up */
|
/* tablet & up */
|
||||||
@media (min-width: 640px) {
|
@media (min-width: 640px) {
|
||||||
|
|
||||||
/* basic */
|
/* basic */
|
||||||
.mobile-only {
|
.mobile-only {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* border, outline, etc */
|
/* border, outline, etc */
|
||||||
.modal>div {
|
.modal > div {
|
||||||
border: 1px solid var(--surface-border);
|
border: 1px solid var(--surface-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
menu,
|
menu,
|
||||||
main.split>article:first-of-type {
|
main.split > article:first-of-type {
|
||||||
border-right: 1px solid var(--border);
|
border-right: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* size */
|
/* size */
|
||||||
.modal>div {
|
.modal > div {
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
p,
|
p,
|
||||||
.modal>div {
|
.modal > div {
|
||||||
max-width: var(--max-content-width);
|
max-width: var(--max-content-width);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1187,7 +1200,7 @@ main {
|
|||||||
grid-template-columns: var(--split-pane-width-desktop) 1fr;
|
grid-template-columns: var(--split-pane-width-desktop) 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
article>div {
|
article > div {
|
||||||
padding-bottom: calc(var(--content-padding) + var(--control-height));
|
padding-bottom: calc(var(--content-padding) + var(--control-height));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1234,11 +1247,13 @@ STATE
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes highlight {
|
@keyframes highlight {
|
||||||
30%, 60% {
|
30%,
|
||||||
|
60% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
0%, 100% {
|
0%,
|
||||||
opacity: .1;
|
100% {
|
||||||
|
opacity: 0.1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1247,11 +1262,17 @@ STATE
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes scroll-highlight {
|
@keyframes scroll-highlight {
|
||||||
0%, 40%, 50%, 90% {
|
0%,
|
||||||
|
40%,
|
||||||
|
50%,
|
||||||
|
90% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
10%, 30%, 60%, 80% {
|
10%,
|
||||||
opacity: .5;
|
30%,
|
||||||
|
60%,
|
||||||
|
80% {
|
||||||
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Generated
+530
-530
File diff suppressed because it is too large
Load Diff
+13
-13
@@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/uuid": "^10.0.0",
|
"@types/uuid": "^10.0.0",
|
||||||
"bloatless-react": "1.3.14",
|
"bloatless-react": "1.3.14",
|
||||||
"esbuild": "^0.23.1",
|
"esbuild": "^0.23.1",
|
||||||
"udn-frontend": "^1.0.9",
|
"udn-frontend": "^1.0.9",
|
||||||
"uuid": "^10.0.0"
|
"uuid": "^10.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "esbuild src/index.tsx --bundle --outdir=dist"
|
"build": "esbuild src/index.tsx --bundle --outdir=dist"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prettier-plugin-sort-imports": "^1.8.11"
|
"prettier-plugin-sort-imports": "^1.8.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,10 @@ export default class BoardsAndTasksModel {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly getTaskReferencePath = (boardId: string, fileId: string): string[] => {
|
readonly getTaskReferencePath = (
|
||||||
|
boardId: string,
|
||||||
|
fileId: string,
|
||||||
|
): string[] => {
|
||||||
return [...this.getTaskContainerPath(boardId), fileId];
|
return [...this.getTaskContainerPath(boardId), fileId];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -99,17 +102,23 @@ export default class BoardsAndTasksModel {
|
|||||||
return boardInfoFileContent;
|
return boardInfoFileContent;
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly updateBoard = (boardInfoFileContent: BoardInfoFileContent): void => {
|
readonly updateBoard = (
|
||||||
|
boardInfoFileContent: BoardInfoFileContent,
|
||||||
|
): void => {
|
||||||
this.storeBoard(boardInfoFileContent);
|
this.storeBoard(boardInfoFileContent);
|
||||||
this.boardHandlerManager.trigger(boardInfoFileContent);
|
this.boardHandlerManager.trigger(boardInfoFileContent);
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly updateBoardAndSend = (boardInfoFileContent: BoardInfoFileContent): void => {
|
readonly updateBoardAndSend = (
|
||||||
|
boardInfoFileContent: BoardInfoFileContent,
|
||||||
|
): void => {
|
||||||
this.updateBoard(boardInfoFileContent);
|
this.updateBoard(boardInfoFileContent);
|
||||||
this.chatModel.sendMessage("", undefined, boardInfoFileContent);
|
this.chatModel.sendMessage("", undefined, boardInfoFileContent);
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly storeBoard = (boardInfoFileContent: BoardInfoFileContent): void => {
|
readonly storeBoard = (
|
||||||
|
boardInfoFileContent: BoardInfoFileContent,
|
||||||
|
): void => {
|
||||||
// store info
|
// store info
|
||||||
this.fileModel.storeFileContent(boardInfoFileContent);
|
this.fileModel.storeFileContent(boardInfoFileContent);
|
||||||
|
|
||||||
@@ -194,7 +203,9 @@ export default class BoardsAndTasksModel {
|
|||||||
return versionIds;
|
return versionIds;
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly getLatestTaskFileContent = (taskId: string): TaskFileContent | null => {
|
readonly getLatestTaskFileContent = (
|
||||||
|
taskId: string,
|
||||||
|
): TaskFileContent | null => {
|
||||||
const taskFileContentOrNull: TaskFileContent | null =
|
const taskFileContentOrNull: TaskFileContent | null =
|
||||||
this.fileModel.getLatestFileContent(
|
this.fileModel.getLatestFileContent(
|
||||||
taskId,
|
taskId,
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ export default class CalendarModel {
|
|||||||
readonly settingsModel: SettingsModel;
|
readonly settingsModel: SettingsModel;
|
||||||
|
|
||||||
// paths
|
// paths
|
||||||
get basePath (): string[] {
|
get basePath(): string[] {
|
||||||
return this.fileModel.getModelContainerPath(
|
return this.fileModel.getModelContainerPath(
|
||||||
FileModelSubPath.ModelCalendar,
|
FileModelSubPath.ModelCalendar,
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
|
|
||||||
readonly getViewPath = (): string[] => {
|
readonly getViewPath = (): string[] => {
|
||||||
return [...this.basePath, FileModelSubPath.ModelView];
|
return [...this.basePath, FileModelSubPath.ModelView];
|
||||||
@@ -44,7 +44,10 @@ export default class CalendarModel {
|
|||||||
this.storageModel.write(referencePath, "");
|
this.storageModel.write(referencePath, "");
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly deleteTaskReference = (monthString: string, taskId: string): void => {
|
readonly deleteTaskReference = (
|
||||||
|
monthString: string,
|
||||||
|
taskId: string,
|
||||||
|
): void => {
|
||||||
const monthPath: string[] = this.getMonthPath(monthString);
|
const monthPath: string[] = this.getMonthPath(monthString);
|
||||||
const referencePath: string[] = [...monthPath, taskId];
|
const referencePath: string[] = [...monthPath, taskId];
|
||||||
|
|
||||||
|
|||||||
@@ -29,13 +29,15 @@ export default class FileModel {
|
|||||||
StorageModelSubPaths.Chat,
|
StorageModelSubPaths.Chat,
|
||||||
filePaths.chat.files(this.chatModel.id),
|
filePaths.chat.files(this.chatModel.id),
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
|
|
||||||
readonly getFileContainerPath = (): string[] => {
|
readonly getFileContainerPath = (): string[] => {
|
||||||
return [...this.basePath, FileModelSubPath.Data];
|
return [...this.basePath, FileModelSubPath.Data];
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly getModelContainerPath = (modelName: FileModelSubPath): string[] => {
|
readonly getModelContainerPath = (
|
||||||
|
modelName: FileModelSubPath,
|
||||||
|
): string[] => {
|
||||||
return [...this.basePath, FileModelSubPath.Model, modelName];
|
return [...this.basePath, FileModelSubPath.Model, modelName];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -43,13 +45,18 @@ export default class FileModel {
|
|||||||
return [...this.getFileContainerPath(), fileId];
|
return [...this.getFileContainerPath(), fileId];
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly getFileContentPath = (fileId: string, fileContentId: string): string[] => {
|
readonly getFileContentPath = (
|
||||||
|
fileId: string,
|
||||||
|
fileContentId: string,
|
||||||
|
): string[] => {
|
||||||
const filePath: string[] = this.getFilePath(fileId);
|
const filePath: string[] = this.getFilePath(fileId);
|
||||||
return [...filePath, fileContentId];
|
return [...filePath, fileContentId];
|
||||||
};
|
};
|
||||||
|
|
||||||
// handlers
|
// handlers
|
||||||
readonly handleStringifiedFileContent = (stringifiedFileContent: string): void => {
|
readonly handleStringifiedFileContent = (
|
||||||
|
stringifiedFileContent: string,
|
||||||
|
): void => {
|
||||||
const fileContent: FileContent<string> | null = parseValidObject(
|
const fileContent: FileContent<string> | null = parseValidObject(
|
||||||
stringifiedFileContent,
|
stringifiedFileContent,
|
||||||
FileContentReference,
|
FileContentReference,
|
||||||
@@ -68,7 +75,9 @@ export default class FileModel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
readonly addFileContentAndSend = (fileContent: FileContent<string>): void => {
|
readonly addFileContentAndSend = (
|
||||||
|
fileContent: FileContent<string>,
|
||||||
|
): void => {
|
||||||
this.handleFileContent(fileContent);
|
this.handleFileContent(fileContent);
|
||||||
this.chatModel.sendMessage("", undefined, fileContent);
|
this.chatModel.sendMessage("", undefined, fileContent);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -69,7 +69,9 @@ export default class FileTransferModel {
|
|||||||
this.handleTransferredFile(data.messageBody);
|
this.handleTransferredFile(data.messageBody);
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly handleTransferredFile = async (encryptedFileData: string): Promise<void> => {
|
readonly handleTransferredFile = async (
|
||||||
|
encryptedFileData: string,
|
||||||
|
): Promise<void> => {
|
||||||
if (this.transferData == undefined) return;
|
if (this.transferData == undefined) return;
|
||||||
|
|
||||||
const decrypted: string = await decryptString(
|
const decrypted: string = await decryptString(
|
||||||
@@ -77,9 +79,22 @@ export default class FileTransferModel {
|
|||||||
this.transferData.key,
|
this.transferData.key,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.handleDecryptedFile(decrypted);
|
this.handleDecryptedFile(decrypted);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
readonly handleBackupFile = async (encryptedBackup: string, passphrase: string): Promise<void> => {
|
||||||
|
const decrypted: string = await decryptString(encryptedBackup, passphrase);
|
||||||
|
const parsed = parse(decrypted);
|
||||||
|
if (!Array.isArray(parsed)) {
|
||||||
|
console.error("Canceling backup - not an array", decrypted);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const file of parsed) {
|
||||||
|
this.handleDecryptedFile(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
readonly handleDecryptedFile = (data: string): void => {
|
readonly handleDecryptedFile = (data: string): void => {
|
||||||
const parsed: any = parse(data);
|
const parsed: any = parse(data);
|
||||||
const isFileData: boolean = checkMatchesObjectStructure(
|
const isFileData: boolean = checkMatchesObjectStructure(
|
||||||
@@ -95,25 +110,40 @@ export default class FileTransferModel {
|
|||||||
...fileData.path,
|
...fileData.path,
|
||||||
);
|
);
|
||||||
this.fileHandlerManager.trigger(pathString);
|
this.fileHandlerManager.trigger(pathString);
|
||||||
}
|
};
|
||||||
|
|
||||||
// sending
|
// sending
|
||||||
readonly sendFiles = (
|
readonly sendFiles = (
|
||||||
directoryPaths: IteratorObject<string[]>,
|
directoryPaths: IteratorObject<string[]>,
|
||||||
callback: (path: string) => void,
|
fileCallback: (path: string) => void,
|
||||||
): void => {
|
): void => {
|
||||||
for (const directoryPath of directoryPaths) {
|
for (const directoryPath of directoryPaths) {
|
||||||
this.storageModel.recurse(directoryPath, (filePath: string[]) => {
|
this.storageModel.recurse(directoryPath, (filePath: string[]) => {
|
||||||
this.prepareFileForSending(filePath);
|
const stringifiedFileData =
|
||||||
|
this.prepareFileForSending(filePath);
|
||||||
|
this.sendFile(stringifiedFileData);
|
||||||
const pathString: string = StorageModel.pathComponentsToString(
|
const pathString: string = StorageModel.pathComponentsToString(
|
||||||
...filePath,
|
...filePath,
|
||||||
);
|
);
|
||||||
callback(pathString);
|
fileCallback(pathString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly prepareFileForSending = (filePath: string[]): void => {
|
readonly generateBackup = async (directoryPaths: IteratorObject<string[]>, passphrase: string): Promise<string> => {
|
||||||
|
const files: string[] = [];
|
||||||
|
for (const directoryPath of directoryPaths) {
|
||||||
|
this.storageModel.recurse(directoryPath, (filePath: string[]) => {
|
||||||
|
const stringifiedFileData =
|
||||||
|
this.prepareFileForSending(filePath);
|
||||||
|
files.push(stringifiedFileData);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const rawBackup = stringify(files);
|
||||||
|
return await encryptString(rawBackup, passphrase);
|
||||||
|
};
|
||||||
|
|
||||||
|
readonly prepareFileForSending = (filePath: string[]): string => {
|
||||||
if (this.transferData == undefined) return;
|
if (this.transferData == undefined) return;
|
||||||
const fileContent: string | null = this.storageModel.read(filePath);
|
const fileContent: string | null = this.storageModel.read(filePath);
|
||||||
if (fileContent == null) return;
|
if (fileContent == null) return;
|
||||||
@@ -122,8 +152,7 @@ export default class FileTransferModel {
|
|||||||
path: filePath,
|
path: filePath,
|
||||||
body: fileContent,
|
body: fileContent,
|
||||||
};
|
};
|
||||||
const stringifiedFileData: string = stringify(fileData);
|
return stringify(fileData);
|
||||||
this.sendFile(stringifiedFileData);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly sendFile = async (stringifiedFileData: string): Promise<void> => {
|
readonly sendFile = async (stringifiedFileData: string): Promise<void> => {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default class SettingsModel {
|
|||||||
filePaths.settingsModel[pathName],
|
filePaths.settingsModel[pathName],
|
||||||
);
|
);
|
||||||
this.storageModel.write(path, value);
|
this.storageModel.write(path, value);
|
||||||
}
|
};
|
||||||
|
|
||||||
readonly setName = (newValue: string): void => {
|
readonly setName = (newValue: string): void => {
|
||||||
this.username = newValue;
|
this.username = newValue;
|
||||||
|
|||||||
@@ -69,7 +69,10 @@ export default class StorageModel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// recursion
|
// recursion
|
||||||
readonly recurse = (rootDirectory: string[], fn: (path: string[]) => void): void => {
|
readonly recurse = (
|
||||||
|
rootDirectory: string[],
|
||||||
|
fn: (path: string[]) => void,
|
||||||
|
): void => {
|
||||||
loop_over_files: for (const key of Object.keys(localStorage)) {
|
loop_over_files: for (const key of Object.keys(localStorage)) {
|
||||||
// get path of current entity
|
// get path of current entity
|
||||||
const pathComponentsOfCurrentEntity: string[] =
|
const pathComponentsOfCurrentEntity: string[] =
|
||||||
|
|||||||
@@ -103,9 +103,7 @@ export function SettingsPage(
|
|||||||
coreViewModel.translations.chatPage.settings
|
coreViewModel.translations.chatPage.settings
|
||||||
.setNamespaceButtonAudioLabel
|
.setNamespaceButtonAudioLabel
|
||||||
}
|
}
|
||||||
on:click={
|
on:click={settingsPageViewModel.setNamespace}
|
||||||
settingsPageViewModel.setNamespace
|
|
||||||
}
|
|
||||||
toggle:disabled={
|
toggle:disabled={
|
||||||
settingsPageViewModel.cannotSetNamespace
|
settingsPageViewModel.cannotSetNamespace
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ export default class NotificationViewModel {
|
|||||||
if (this.chatListViewModel.selectedChat.value == undefined) return;
|
if (this.chatListViewModel.selectedChat.value == undefined) return;
|
||||||
|
|
||||||
const currentChat =
|
const currentChat =
|
||||||
this.chatListViewModel.selectedChat.value.chatModel.
|
this.chatListViewModel.selectedChat.value.chatModel
|
||||||
unwrappedPrimaryChannel
|
.unwrappedPrimaryChannel;
|
||||||
const currentPage =
|
const currentPage =
|
||||||
this.chatListViewModel.selectedChat.value.selectedPage.value;
|
this.chatListViewModel.selectedChat.value.selectedPage.value;
|
||||||
if (
|
if (
|
||||||
@@ -41,7 +41,8 @@ export default class NotificationViewModel {
|
|||||||
const chat = [
|
const chat = [
|
||||||
...this.chatListViewModel.chatViewModels.value.values(),
|
...this.chatListViewModel.chatViewModels.value.values(),
|
||||||
].find(
|
].find(
|
||||||
(chat) => chat.chatModel.unwrappedPrimaryChannel == notification.chat,
|
(chat) =>
|
||||||
|
chat.chatModel.unwrappedPrimaryChannel == notification.chat,
|
||||||
);
|
);
|
||||||
chat.open();
|
chat.open();
|
||||||
chat.openPage(ChatPageTypes.Messages);
|
chat.openPage(ChatPageTypes.Messages);
|
||||||
@@ -79,7 +80,7 @@ export default class NotificationViewModel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// init
|
// init
|
||||||
constructor(public readonly chatListViewModel: ChatListViewModel) { }
|
constructor(public readonly chatListViewModel: ChatListViewModel) {}
|
||||||
|
|
||||||
// util
|
// util
|
||||||
static createNotification(message: ChatMessage): Notification {
|
static createNotification(message: ChatMessage): Notification {
|
||||||
|
|||||||
@@ -32,8 +32,7 @@ export default class SettingsPageViewModel extends Context {
|
|||||||
);
|
);
|
||||||
cannotSetNamespace: React.State<boolean> = React.createProxyState(
|
cannotSetNamespace: React.State<boolean> = React.createProxyState(
|
||||||
[this.namespace, this.namespaceInput],
|
[this.namespace, this.namespaceInput],
|
||||||
() =>
|
() => this.namespaceInput.value == this.namespace.value,
|
||||||
this.namespaceInput.value == this.namespace.value,
|
|
||||||
);
|
);
|
||||||
cannotAddSecondaryChannel: React.State<boolean> = React.createProxyState(
|
cannotAddSecondaryChannel: React.State<boolean> = React.createProxyState(
|
||||||
[this.newSecondaryChannelInput],
|
[this.newSecondaryChannelInput],
|
||||||
@@ -53,11 +52,8 @@ export default class SettingsPageViewModel extends Context {
|
|||||||
};
|
};
|
||||||
|
|
||||||
setNamespace = (): void => {
|
setNamespace = (): void => {
|
||||||
this.chatViewModel.chatModel.setNamespace(
|
this.chatViewModel.chatModel.setNamespace(this.namespaceInput.value);
|
||||||
this.namespaceInput.value,
|
this.namespace.value = this.chatViewModel.chatModel.info.namespace;
|
||||||
);
|
|
||||||
this.namespace.value =
|
|
||||||
this.chatViewModel.chatModel.info.namespace;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
addSecondaryChannel = (): void => {
|
addSecondaryChannel = (): void => {
|
||||||
@@ -101,17 +97,14 @@ export default class SettingsPageViewModel extends Context {
|
|||||||
preloadData = (): void => {
|
preloadData = (): void => {
|
||||||
this.primaryChannel.value =
|
this.primaryChannel.value =
|
||||||
this.chatViewModel.chatModel.info.primaryChannel;
|
this.chatViewModel.chatModel.info.primaryChannel;
|
||||||
this.namespace.value =
|
this.namespace.value = this.chatViewModel.chatModel.info.namespace;
|
||||||
this.chatViewModel.chatModel.info.namespace;
|
|
||||||
|
|
||||||
this.color.value = this.chatViewModel.chatModel.color;
|
this.color.value = this.chatViewModel.chatModel.color;
|
||||||
};
|
};
|
||||||
|
|
||||||
loadData = (): void => {
|
loadData = (): void => {
|
||||||
this.primaryChannelInput.value =
|
this.primaryChannelInput.value = this.primaryChannel.value;
|
||||||
this.primaryChannel.value;
|
this.namespaceInput.value = this.namespace.value;
|
||||||
this.namespaceInput.value =
|
|
||||||
this.namespace.value;
|
|
||||||
|
|
||||||
this.loadSecondaryChannels();
|
this.loadSecondaryChannels();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,6 +5,6 @@
|
|||||||
"jsxFactory": "React.createElement",
|
"jsxFactory": "React.createElement",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"target": "es2020",
|
"target": "es2020"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user