diff options
author | Marco <marcoambrosini@icloud.com> | 2022-08-09 13:01:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-09 13:01:45 +0300 |
commit | 11d7383fff77572550bb86a0f3d9ef51992fc377 (patch) | |
tree | e3b073b3547f1e72f769d0510af2d912442957af /src | |
parent | f1cb33745562ab24eb5462a6ddd6d11544599f03 (diff) | |
parent | 349aa30533ba919dcdffc70cff96f85052425c26 (diff) |
Merge pull request #7688 from nextcloud/bugfix/noid/move-settings-to-vue-components
Move conversation settings to vue components
Diffstat (limited to 'src')
-rw-r--r-- | src/components/ConversationSettings/LinkShareSettings.vue | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/src/components/ConversationSettings/LinkShareSettings.vue b/src/components/ConversationSettings/LinkShareSettings.vue index 46c3bb959..507bfeb61 100644 --- a/src/components/ConversationSettings/LinkShareSettings.vue +++ b/src/components/ConversationSettings/LinkShareSettings.vue @@ -70,39 +70,50 @@ name="link_share_settings_link_password" :placeholder="t('spreed', 'Enter a password')" :disabled="isSaving"> - <button id="link_share_settings_link_password_submit" + <Button id="link_share_settings_link_password_submit" :aria-label="t('spreed', 'Save password')" :disabled="isSaving" - type="submit" - class="icon icon-confirm-fade" /> + :native-type="submit"> + <template #icon> + <ArrowRight /> + </template> + </Button> </form> </div> </div> <div class="app-settings-subsection"> - <button ref="copyLinkButton" - @click.prevent="handleCopyLink"> - <ClipboardTextOutline :size="16" /> + <Button ref="copyLinkButton" + @click.prevent="handleCopyLink" + @keydown.enter="handleCopyLink"> + <template #icon> + <ClipboardTextOutline /> + </template> {{ t('spreed', 'Copy conversation link') }} - </button> + </Button> </div> <div v-if="isSharedPublicly" class="app-settings-subsection"> - <button :disabled="isSendingInvitations" - @click.prevent="handleResendInvitations"> - <Email :size="16" /> + <Button :disabled="isSendingInvitations" + @click.prevent="handleResendInvitations" + @keydown.enter="handleResendInvitations"> + <template #icon> + <Email /> + </template> {{ t('spreed', 'Resend invitations') }} - </button> + </Button> <span v-if="isSendingInvitations" class="icon-loading-small spinner" /> </div> </div> </template> <script> +import Button from '@nextcloud/vue/dist/Components/Button' import { showError, showSuccess } from '@nextcloud/dialogs' import { CONVERSATION } from '../../constants.js' import { setConversationPassword, } from '../../services/conversationsService.js' import { generateUrl } from '@nextcloud/router' +import ArrowRight from 'vue-material-design-icons/ArrowRight' import ClipboardTextOutline from 'vue-material-design-icons/ClipboardTextOutline' import Email from 'vue-material-design-icons/Email' @@ -110,6 +121,8 @@ export default { name: 'LinkShareSettings', components: { + Button, + ArrowRight, ClipboardTextOutline, Email, }, @@ -198,8 +211,11 @@ export default { async togglePassword() { if (this.$refs.togglePassword.checked) { this.showPasswordField = true - this.$refs.passwordField.focus() await this.handlePasswordEnable() + this.$nextTick(() => { + console.error(this.$refs.passwordField) + this.$refs.passwordField.focus() + }) } else { this.showPasswordField = false await this.handlePasswordDisable() |