-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split copyLinkToClipBoard for public&private link, add quicklinks to …
…sidebar
- Loading branch information
1 parent
d098b83
commit da4c9e3
Showing
8 changed files
with
225 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 0 additions & 104 deletions
104
packages/web-app-files/src/components/SideBar/Shared/CopyToClipboardButton.vue
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
packages/web-app-files/src/components/SideBar/Shares/Links/CreateQuickLink.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<template> | ||
<div class="oc-mb-s oc-width-1-1"> | ||
<h4 class="oc-text-truncate oc-files-file-link-name oc-my-s" v-text="heading" /> | ||
<div class="oc-flex oc-flex-middle oc-flex-between oc-width-1-1 oc-p-s link-name-container"> | ||
<div class="oc-flex oc-flex-middle oc-text-truncate"> | ||
<oc-icon name="link" fill-type="line" /> | ||
<p class="oc-files-file-link-url oc-ml-s oc-text-truncate oc-my-rm" v-text="noLinkLabel" /> | ||
</div> | ||
<oc-button v-oc-tooltip="label" :aria-label="label" @click="createQuickLink"> | ||
<span v-text="createLinkLabel" /> | ||
</oc-button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'CreateQuickLink', | ||
props: { | ||
expirationDate: { | ||
type: Object, | ||
default: () => {}, | ||
required: false | ||
}, | ||
passwordEnforced: { | ||
type: Object, | ||
default: () => {}, | ||
required: false | ||
} | ||
}, | ||
computed: { | ||
heading() { | ||
return this.$gettext('Quick link') | ||
}, | ||
label() { | ||
return this.$gettext('Create quick link') | ||
}, | ||
createLinkLabel() { | ||
return this.$gettext('Create link') | ||
}, | ||
noLinkLabel() { | ||
return this.$gettext('No link') | ||
} | ||
}, | ||
methods: { | ||
createQuickLink() { | ||
// handle expiredate && passwordenforcement | ||
this.$emit('createPublicLink', { | ||
link: { | ||
name: this.$gettext('Quicklink'), | ||
permissions: 1, | ||
quicklink: true | ||
}, | ||
showError: (e) => { | ||
this.error = e | ||
} | ||
}) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.link-name-container { | ||
background-color: var(--oc-color-input-bg); | ||
border: 1px solid var(--oc-color-input-border); | ||
} | ||
</style> |
Oops, something went wrong.