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

Disable tags for locked files #9873

Merged
merged 6 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-tags-not-editable-locked-files
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Tags are no longer editable for a locked file

Tags are no longer editable for files that are currently locked.

https://github.com/owncloud/web/pull/9873
https://github.com/owncloud/web/issues/9789
20 changes: 20 additions & 0 deletions docs/theming/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,26 @@ Spacing variables get prepended with `--oc-space-`, so e.g. _"xlarge"_ creates t
}
```

### App Banner
grimmoc marked this conversation as resolved.
Show resolved Hide resolved
To configure the app banner shown on mobile devices, you can use the following settings:

```json
{
"appBanner": {
"title": "ownCloud",
"publisher": "ownCloud GmbH",
"additionalInformation": "",
"ctaText": "OPEN",
"icon": "themes/owncloud/assets/owncloud-app-icon.png",
"appScheme": "owncloud"
}
}
```

`title` is usually your app's name as shown in the App Store or Google Play. `publisher` is the app developer's name.
`additionalInformation` can be used to specify pricing information, such as "FREE" or a catchphrase like "don't miss out our awesome app!".
`ctaText` refers to the text in the call to action button on the right side. The `icon` directive may be used to specify your own app icon. `appScheme` is the first part of the URL that is used to tell the mobile os which app to open, so using `owncloud` will generate links such as `owncloud://yourdomain.com/f/2b61b822...`.

## Example theme

An empty template for your custom theme is provided below, and you can use the instructions above to set it up according to your needs. Please note that since changing themes at runtime is not yet supported it only consists of a `default` theme.
Expand Down
5 changes: 4 additions & 1 deletion packages/web-app-files/src/components/SideBar/TagsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
v-model="selectedTags"
class="oc-mb-s"
:multiple="true"
:disabled="readonly"
:options="availableTags"
:contextual-helper="contextualHelper"
taggable
Expand Down Expand Up @@ -85,6 +86,7 @@ export default defineComponent({

const injectedResource = inject<Resource>('resource')
const resource = computed<Resource>(() => unref(injectedResource))
const readonly = computed<boolean>(() => unref(resource).locked === true)
grimmoc marked this conversation as resolved.
Show resolved Hide resolved
const selectedTags = ref<TagOption[]>([])
const availableTags = ref<TagOption[]>([])
let allTags: string[] = []
Expand Down Expand Up @@ -230,7 +232,8 @@ export default defineComponent({
save,
keycode,
keydownMethods,
contextualHelper
contextualHelper,
readonly
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export const useFileActionsShowEditTags = ({ store }: { store?: Store<any> } = {
return false
}

if (resources[0].locked === true) {
return false
}

if (
isLocationTrashActive(router, 'files-trash-generic') ||
isLocationPublicActive(router, 'files-public-link')
Expand Down