Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$mol_view_tree2 refactor, https://github.com/hyoo-ru/mam_mol/pull/646 #1

Merged
merged 2 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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