This commit is contained in:
parent
1a80fdeaae
commit
03a35b3fd5
3 changed files with 139 additions and 123 deletions
|
@ -1,9 +1,9 @@
|
||||||
<mk-drive>
|
<mk-drive>
|
||||||
<nav ref="nav">
|
<nav ref="nav">
|
||||||
<p onclick={ goRoot }>%fa:cloud%%i18n:mobile.tags.mk-drive.drive%</p>
|
<a onclick={ goRoot } href="/i/drive">%fa:cloud%%i18n:mobile.tags.mk-drive.drive%</a>
|
||||||
<virtual each={ folder in hierarchyFolders }>
|
<virtual each={ folder in hierarchyFolders }>
|
||||||
<span>%fa:angle-right%</span>
|
<span>%fa:angle-right%</span>
|
||||||
<p onclick={ move }>{ folder.name }</p>
|
<a onclick={ move } href="/i/drive/folder/{ folder.id }">{ folder.name }</a>
|
||||||
</virtual>
|
</virtual>
|
||||||
<virtual if={ folder != null }>
|
<virtual if={ folder != null }>
|
||||||
<span>%fa:angle-right%</span>
|
<span>%fa:angle-right%</span>
|
||||||
|
@ -74,9 +74,12 @@
|
||||||
border-bottom solid 1px rgba(0, 0, 0, 0.13)
|
border-bottom solid 1px rgba(0, 0, 0, 0.13)
|
||||||
|
|
||||||
> p
|
> p
|
||||||
|
> a
|
||||||
display inline
|
display inline
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
|
text-decoration none !important
|
||||||
|
color inherit
|
||||||
|
|
||||||
&:last-child
|
&:last-child
|
||||||
font-weight bold
|
font-weight bold
|
||||||
|
@ -246,6 +249,7 @@
|
||||||
|
|
||||||
this.move = ev => {
|
this.move = ev => {
|
||||||
this.cd(ev.item.folder);
|
this.cd(ev.item.folder);
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.cd = (target, silent = false) => {
|
this.cd = (target, silent = false) => {
|
||||||
|
@ -339,6 +343,8 @@
|
||||||
this.trigger('move-root');
|
this.trigger('move-root');
|
||||||
this.fetch();
|
this.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.fetch = () => {
|
this.fetch = () => {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<mk-drive-file onclick={ onclick } data-is-selected={ isSelected }>
|
<mk-drive-file data-is-selected={ isSelected }>
|
||||||
|
<a onclick={ onclick } href="/i/drive/file/{ file.id }">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="thumbnail" style={ 'background-image: url(' + file.url + '?thumbnail&size=128)' }></div>
|
<div class="thumbnail" style={ 'background-image: url(' + file.url + '?thumbnail&size=128)' }></div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
|
@ -20,14 +21,17 @@
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
<style>
|
<style>
|
||||||
:scope
|
:scope
|
||||||
display block
|
display block
|
||||||
|
|
||||||
&, *
|
> a
|
||||||
user-select none
|
display block
|
||||||
|
text-decoration none !important
|
||||||
|
|
||||||
*
|
*
|
||||||
|
user-select none
|
||||||
pointer-events none
|
pointer-events none
|
||||||
|
|
||||||
> .container
|
> .container
|
||||||
|
@ -136,6 +140,7 @@
|
||||||
|
|
||||||
this.onclick = () => {
|
this.onclick = () => {
|
||||||
this.browser.chooseFile(this.file);
|
this.browser.chooseFile(this.file);
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
</mk-drive-file>
|
</mk-drive-file>
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
<mk-drive-folder onclick={ onclick }>
|
<mk-drive-folder onclick={ onclick }>
|
||||||
|
<a onclick={ onclick } href="/i/drive/folder/{ folder.id }">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<p class="name">%fa:folder%{ folder.name }</p>%fa:angle-right%
|
<p class="name">%fa:folder%{ folder.name }</p>%fa:angle-right%
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
<style>
|
<style>
|
||||||
:scope
|
:scope
|
||||||
display block
|
display block
|
||||||
color #777
|
|
||||||
|
|
||||||
&, *
|
> a
|
||||||
user-select none
|
display block
|
||||||
|
color #777
|
||||||
|
text-decoration none !important
|
||||||
|
|
||||||
*
|
*
|
||||||
|
user-select none
|
||||||
pointer-events none
|
pointer-events none
|
||||||
|
|
||||||
> .container
|
> .container
|
||||||
|
@ -42,6 +46,7 @@
|
||||||
|
|
||||||
this.onclick = () => {
|
this.onclick = () => {
|
||||||
this.browser.cd(this.folder);
|
this.browser.cd(this.folder);
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
</mk-drive-folder>
|
</mk-drive-folder>
|
||||||
|
|
Loading…
Reference in a new issue