Skip to content

Commit

Permalink
Merge pull request #1 from hyoo-ru/new-tree2
Browse files Browse the repository at this point in the history
$mol_view_tree2 refactor, hyoo-ru/mam_mol#646
  • Loading branch information
nin-jin authored Feb 11, 2024
2 parents 87e63bb + b5ada9a commit 1a166dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion webdav.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ $hyoo_webdav $mol_book

$hyoo_webdav_folder $mol_page
minimal_width 400
event * click?val <=> event_top?val null
body /
<= Description $mol_text
text <= description \
Expand All @@ -58,7 +59,8 @@ $hyoo_webdav_folder $mol_page

$hyoo_webdav_file $mol_page
minimal_width 800
event * click?val <=> event_top?val null
body /
<= Embed $mol_embed_any
<= Embed $mol_embed_native
uri <= src \
mime <= mime \
4 changes: 2 additions & 2 deletions webdav.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace $.$$ {
}

folder_row_title( uri : string ) {
return this.webdav( uri ).prop( 'displayname' )
return this.webdav( uri )?.prop( 'displayname' ) ?? ''
}

folder_row_descr( uri : string ) {
Expand All @@ -102,7 +102,7 @@ namespace $.$$ {
}

file_mime( uri : string ) {
return this.webdav( uri ).prop( 'getcontenttype' )
return this.webdav( uri )?.prop( 'getcontenttype' ) ?? ''
}

file_size( uri : string ) {
Expand Down

0 comments on commit 1a166dc

Please sign in to comment.