Skip to content

Commit

Permalink
feat(web): support direct link
Browse files Browse the repository at this point in the history
  • Loading branch information
reruin committed Oct 19, 2021
1 parent dc5b706 commit 62ad7e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/sharelist-web/src/views/home/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
justify-content:space-between;
align-items: center;
overflow: hidden;
color:#25262b;
}
.item-ctime{
flex: 0 0 auto;
Expand Down
4 changes: 2 additions & 2 deletions packages/sharelist-web/src/views/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default defineComponent({
<Error value={error}>
{files.value.map((i: IFile) => {
return (
<div class="item" title={i.name} onClick={() => onClick(i)}>
<a href={'/' + [...paths.value, i.name].join('/') + '?download'} class="item" title={i.name} onClick={(e) => { onClick(i); e.preventDefault() }}>
<Icon
class="item-icon"
style={{ fontSize: layout.value == 'grid' ? '42px' : '26px' }}
Expand All @@ -61,7 +61,7 @@ export default defineComponent({
<div class="item-ctime">{i.ctimeDisplay}</div>
<div class="item-size">{i.sizeDisplay}</div>
</div>
</div>
</a>
)
})}
</Error>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import useDisk from '@/hooks/useDisk'
const { Item: BreadcrumbItem } = Breadcrumb
import './index.less'
export default defineComponent({
props: {
paths: {
type: Array
}
},
setup(props, ctx) {
const { paths, setPath } = useDisk()

Expand Down

0 comments on commit 62ad7e5

Please sign in to comment.