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

Remove unused code, rename share path #9843

Merged
merged 11 commits into from
Oct 24, 2023
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
7 changes: 7 additions & 0 deletions changelog/unreleased/bugfix-display-path-on-resources
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Fix display path on resources

We've fixed a bug, where the display path of a resource was missing parts.
For example the respective space name or the folder name of a share.

https://github.com/owncloud/web/pull/9843

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Enhancement: Add editors to the application menu

We've added 'text-editor' and 'draw.io' to the application menu, so the user can easily
open those apps with a one-click approach.

https://github.com/owncloud/web/pull/9809
https://github.com/owncloud/web/pull/9843
https://github.com/owncloud/web/issues/9807
180 changes: 91 additions & 89 deletions packages/design-system/src/components/OcResource/OcResource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
:full-path="resource.path"
:is-path-displayed="isPathDisplayed"
:is-extension-displayed="isExtensionDisplayed"
@click="$emit('clickFolder')"
AlexAndBear marked this conversation as resolved.
Show resolved Hide resolved
/>
</oc-resource-link>
<div class="oc-resource-indicators">
Expand All @@ -65,7 +66,7 @@
:to="parentFolderLink"
:style="parentFolderStyle"
class="parent-folder"
@click.stop="$emit('parentFolderClicked')"
@click="$emit('clickParentFolder')"
>
<oc-icon v-bind="parentFolderLinkIconAttrs" />
<span class="text" v-text="parentFolderName" />
Expand Down Expand Up @@ -189,7 +190,7 @@ export default defineComponent({
default: true
}
},
emits: ['click', 'parentFolderClicked'],
emits: ['click', 'clickFolder', 'clickParentFolder'],
computed: {
parentFolderComponentType() {
return this.parentFolderLink !== null ? 'router-link' : 'span'
Expand Down Expand Up @@ -301,6 +302,7 @@ export default defineComponent({
a {
text-decoration: none;
}

a:hover,
a:focus {
outline-offset: 0;
Expand Down Expand Up @@ -345,94 +347,94 @@ export default defineComponent({
</style>

<docs>
```js
<template>
<div>
<oc-resource :resource="documents" parent-folder-link="parentFolderLink" class="oc-mb" />
<oc-resource :resource="notes" is-path-displayed="true" class="oc-mb" />
<oc-resource :resource="notes" is-resource-clickable="false" class="oc-mb" />
<oc-resource :resource="notes" :is-extension-displayed="false" class="oc-mb" />
<oc-resource :resource="forest" is-path-displayed="true" />
<oc-resource :resource="something" is-path-displayed="true" parent-folder-name="Example parent folder" />
</div>
</template>
<script>
export default {
computed: {
documents() {
return {
name: "Documents",
path: "/Documents",
indicators: [],
type: "folder",
isFolder: true
}
},
notes() {
return {
name: "notes.txt",
extension: "txt",
path: "Documents/notes.txt",
indicators: this.indicators,
type: "file",
isFolder: false
}
},
forest() {
return {
name: "forest-image-with-filename-with-a-lot-of-characters.jpg",
extension: "jpg",
path: "images/nature/forest-image-with-filename-with-a-lot-of-characters.jpg",
thumbnail: "https://picsum.photos/200/300",
indicators: [],
type: "file",
isFolder: false,
opensInNewWindow: true,
}
},
something() {
return {
name: "another-image.jpg",
extension: "jpg",
path: "another-image.jpg",
thumbnail: "https://picsum.photos/200/300",
indicators: [],
type: "file",
isFolder: false,
opensInNewWindow: true,
```js
<template>
<div>
<oc-resource :resource="documents" parent-folder-link="parentFolderLink" class="oc-mb"/>
<oc-resource :resource="notes" is-path-displayed="true" class="oc-mb"/>
<oc-resource :resource="notes" is-resource-clickable="false" class="oc-mb"/>
<oc-resource :resource="notes" :is-extension-displayed="false" class="oc-mb"/>
<oc-resource :resource="forest" is-path-displayed="true"/>
<oc-resource :resource="something" is-path-displayed="true" parent-folder-name="Example parent folder"/>
</div>
</template>
<script>
export default {
computed: {
documents() {
return {
name: "Documents",
path: "/Documents",
indicators: [],
type: "folder",
isFolder: true
}
},
notes() {
return {
name: "notes.txt",
extension: "txt",
path: "Documents/notes.txt",
indicators: this.indicators,
type: "file",
isFolder: false
}
},
forest() {
return {
name: "forest-image-with-filename-with-a-lot-of-characters.jpg",
extension: "jpg",
path: "images/nature/forest-image-with-filename-with-a-lot-of-characters.jpg",
thumbnail: "https://picsum.photos/200/300",
indicators: [],
type: "file",
isFolder: false,
opensInNewWindow: true,
}
},
something() {
return {
name: "another-image.jpg",
extension: "jpg",
path: "another-image.jpg",
thumbnail: "https://picsum.photos/200/300",
indicators: [],
type: "file",
isFolder: false,
opensInNewWindow: true,
}
},
indicators() {
return [
{
id: 'files-sharing',
label: "Shared with other people",
visible: true,
icon: 'group',
handler: (resource, indicatorId) => alert(`Resource: ${resource.name}, indicator: ${indicatorId}`)
},
{
id: 'file-link',
label: "Shared via link",
visible: true,
icon: 'link',
}
},
indicators() {
return [
{
id: 'files-sharing',
label: "Shared with other people",
visible: true,
icon: 'group',
handler: (resource, indicatorId) => alert(`Resource: ${resource.name}, indicator: ${indicatorId}`)
},
{
id: 'file-link',
label: "Shared via link",
visible: true,
icon: 'link',
}
]
},
parentFolderLink() {
return {
name: "home",
params: {
action: "copy",
item: 'Documents',
},
query: {
resource: "notes"
}
]
},
parentFolderLink() {
return {
name: "home",
params: {
action: "copy",
item: 'Documents',
},
query: {
resource: "notes"
}
}
},
}
</script>
```
}
},
}
</script>
```
</docs>
Loading