|
| 1 | +<template> |
| 2 | + <div class="sharingTabDetailsView"> |
| 3 | + <div class="sharingTabDetailsView__header"> |
| 4 | + <span> |
| 5 | + <FolderIcon :size="40" /> |
| 6 | + </span> |
| 7 | + <span> |
| 8 | + <h1>{{ t('file_sharing', 'Edit Share Link') }}</h1> |
| 9 | + <small>Dummy: Important documents</small> |
| 10 | + </span> |
| 11 | + </div> |
| 12 | + <div class="sharingTabDetailsView__quick-permissions"> |
| 13 | + <ul> |
| 14 | + <li> <span> |
| 15 | + <ViewIcon /> |
| 16 | + </span> View only</li> |
| 17 | + <li> <span> |
| 18 | + <EditIcon /> |
| 19 | + </span> Edit</li> |
| 20 | + <li> <span> |
| 21 | + <UploadIcon /> |
| 22 | + </span> File drop</li> |
| 23 | + </ul> |
| 24 | + </div> |
| 25 | + <div class="sharingTabDetailsView__advanced-control"> |
| 26 | + <button @click="advancedSectionAccordionExpanded = !advancedSectionAccordionExpanded"> |
| 27 | + Advanced Settings |
| 28 | + <span> |
| 29 | + <MenuDownIcon /> |
| 30 | + </span> |
| 31 | + </button> |
| 32 | + </div> |
| 33 | + <div v-if="advancedSectionAccordionExpanded" class="sharingTabDetailsView__advanced"> |
| 34 | + <section> |
| 35 | + <NcTextField :value.sync="noteToRecipient" :label="t('file_sharing', 'Note to recipient')" |
| 36 | + :label-visible="true" :show-trailing-button="noteToRecipient !== ''" |
| 37 | + @trailing-button-click="noteToRecipient = ''"> |
| 38 | + </NcTextField> |
| 39 | + <NcCheckboxRadioSwitch :checked.sync="setPassword">{{ t('file_sharing', 'Set password') }} |
| 40 | + </NcCheckboxRadioSwitch> |
| 41 | + <NcInputField :label="t('file_sharing', 'Password')"> |
| 42 | + </NcInputField> |
| 43 | + |
| 44 | + <NcCheckboxRadioSwitch :checked.sync="setExpirationDate">{{ t('file_sharing', 'Set expiration date') }} |
| 45 | + </NcCheckboxRadioSwitch> |
| 46 | + <NcInputField :value.sync="expirationDate" :label="t('file_sharing', 'Expiration date')"> |
| 47 | + </NcInputField> |
| 48 | + <NcCheckboxRadioSwitch :checked.sync="hideDownload">{{ t('file_sharing', 'Hide download') }} |
| 49 | + </NcCheckboxRadioSwitch> |
| 50 | + <NcInputField :value.sync="shareLabel" :label-visible="true" :label="t('file_sharing', 'Share label')"> |
| 51 | + </NcInputField> |
| 52 | + </section> |
| 53 | + </div> |
| 54 | + |
| 55 | + <div class="sharingTabDetailsView__footer"> |
| 56 | + <a href=""> |
| 57 | + <CloseIcon /> |
| 58 | + Delete link |
| 59 | + </a> |
| 60 | + <div class="button-group"> |
| 61 | + <NcButton @click="$emit('close-sharing-details')">{{ t('file_sharing', 'Cancel') }}</NcButton> |
| 62 | + <NcButton>{{ t('file_sharing', 'Share & copy link') }}</NcButton> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + </div> |
| 66 | +</template> |
| 67 | + |
| 68 | +<script> |
| 69 | +import NcButton from '@nextcloud/vue/dist/Components/NcButton.js' |
| 70 | +import NcInputField from '@nextcloud/vue/dist/Components/NcInputField.js' |
| 71 | +import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js' |
| 72 | +import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js' |
| 73 | +import FolderIcon from 'vue-material-design-icons/Folder.vue' |
| 74 | +import CloseIcon from 'vue-material-design-icons/Close.vue' |
| 75 | +import EditIcon from 'vue-material-design-icons/Pencil.vue' |
| 76 | +import ViewIcon from 'vue-material-design-icons/Eye.vue' |
| 77 | +import UploadIcon from 'vue-material-design-icons/Upload.vue' |
| 78 | +import MenuDownIcon from 'vue-material-design-icons/MenuDown.vue' |
| 79 | +
|
| 80 | +export default { |
| 81 | + name: 'SharingDetailsTab', |
| 82 | + components: { |
| 83 | + NcButton, |
| 84 | + NcInputField, |
| 85 | + NcTextField, |
| 86 | + NcCheckboxRadioSwitch, |
| 87 | + FolderIcon, |
| 88 | + CloseIcon, |
| 89 | + EditIcon, |
| 90 | + ViewIcon, |
| 91 | + UploadIcon, |
| 92 | + MenuDownIcon, |
| 93 | + }, |
| 94 | + data() { |
| 95 | + return { |
| 96 | + setPassword: false, |
| 97 | + password: '', |
| 98 | + noteToRecipient: '', |
| 99 | + setExpirationDate: false, |
| 100 | + expirationDate: '', |
| 101 | + hideDownload: false, |
| 102 | + shareLabel: '', |
| 103 | + advancedSectionAccordionExpanded: false, |
| 104 | + }; |
| 105 | + }, |
| 106 | + methods: { |
| 107 | + }, |
| 108 | + mounted() { |
| 109 | + } |
| 110 | +}; |
| 111 | +</script> |
| 112 | + |
| 113 | +<style lang="scss" scoped> |
| 114 | +.sharingTabDetailsView { |
| 115 | + width: 96%; |
| 116 | + margin: 0 auto; |
| 117 | +
|
| 118 | + &__header { |
| 119 | + display: flex; |
| 120 | + align-items: center; |
| 121 | + justify-content: left; |
| 122 | + width: 100%; |
| 123 | + margin-bottom: 0.2em; |
| 124 | + box-sizing: border-box; |
| 125 | +
|
| 126 | + span:nth-child(1) { |
| 127 | + align-items: center; |
| 128 | + justify-content: center; |
| 129 | + color: var(--color-primary-element); |
| 130 | + padding: 0.1em; |
| 131 | + } |
| 132 | +
|
| 133 | + span:nth-child(2) { |
| 134 | + display: flex; |
| 135 | + flex-direction: column; |
| 136 | + justify-content: left; |
| 137 | + align-items: flex-start; |
| 138 | + text-align: left; |
| 139 | +
|
| 140 | + h1 { |
| 141 | + margin: 0; |
| 142 | + font-size: 16px; |
| 143 | + } |
| 144 | +
|
| 145 | + small { |
| 146 | + font-size: 12px; |
| 147 | + margin-top: 0; |
| 148 | + color: rgb(65, 62, 62); |
| 149 | + } |
| 150 | + } |
| 151 | + } |
| 152 | +
|
| 153 | +
|
| 154 | + &__quick-permissions { |
| 155 | + display: flex; |
| 156 | + justify-content: center; |
| 157 | + margin-bottom: 0.2em; |
| 158 | +
|
| 159 | + ul { |
| 160 | + list-style: none; |
| 161 | + margin: 0; |
| 162 | + border: 2px solid #ddd; |
| 163 | + text-align: left; |
| 164 | + width: 100%; |
| 165 | + box-sizing: border-box; |
| 166 | +
|
| 167 | + li { |
| 168 | + padding: 0.5em; |
| 169 | + display: flex; |
| 170 | + flex-direction: row; |
| 171 | + border-bottom: 1px solid #ddd; |
| 172 | +
|
| 173 | + span:nth-child(1) { |
| 174 | + align-items: center; |
| 175 | + justify-content: center; |
| 176 | + color: var(--color-primary-element); |
| 177 | + padding: 0.1em; |
| 178 | + } |
| 179 | +
|
| 180 | + &:last-child { |
| 181 | + border-bottom: none; |
| 182 | + } |
| 183 | + } |
| 184 | + } |
| 185 | + } |
| 186 | +
|
| 187 | + &__advanced-control { |
| 188 | + button { |
| 189 | + display: flex; |
| 190 | + border: none; |
| 191 | + background-color: transparent; |
| 192 | + color: inherit; |
| 193 | + font: inherit; |
| 194 | + font-weight: bolder; |
| 195 | + line-height: normal; |
| 196 | + overflow: visible; |
| 197 | + text-align: inherit; |
| 198 | + text-transform: none; |
| 199 | + -webkit-appearance: none; |
| 200 | + -moz-appearance: none; |
| 201 | + appearance: none; |
| 202 | + cursor: pointer; |
| 203 | +
|
| 204 | + &:focus { |
| 205 | + outline: none; |
| 206 | + } |
| 207 | + } |
| 208 | +
|
| 209 | + } |
| 210 | +
|
| 211 | + &__advanced { |
| 212 | + margin-bottom: 0.5em; |
| 213 | +
|
| 214 | + section { |
| 215 | + input { |
| 216 | + border-radius: 0 !important; |
| 217 | + } |
| 218 | + } |
| 219 | + } |
| 220 | +
|
| 221 | + &__footer { |
| 222 | + display: flex; |
| 223 | + flex-direction: column; |
| 224 | + justify-content: space-between; |
| 225 | + align-items: flex-start; |
| 226 | +
|
| 227 | + a { |
| 228 | + display: flex; |
| 229 | + align-items: center; |
| 230 | + color: rgb(223, 7, 7); |
| 231 | + text-decoration: underline; |
| 232 | + font-size: 16px; |
| 233 | + } |
| 234 | +
|
| 235 | + .button-group { |
| 236 | + display: flex; |
| 237 | + justify-content: space-between; |
| 238 | + width: 100%; |
| 239 | + margin-top: 16px; |
| 240 | +
|
| 241 | + button { |
| 242 | + flex: 1; |
| 243 | + margin-left: 16px; |
| 244 | +
|
| 245 | + &:first-child { |
| 246 | + margin-left: 0; |
| 247 | + } |
| 248 | + } |
| 249 | + } |
| 250 | + } |
| 251 | +} |
| 252 | +</style> |
0 commit comments