UPSTREAM BASELINE: nextcloud/spreed v22.0.12 (без изменений)
Type checking / changes (push) Has been cancelled
Type checking / test (push) Has been cancelled
Type checking / typescript-summary (push) Has been cancelled
Node tests / changes (push) Has been cancelled
Node tests / test (push) Has been cancelled
Node tests / test-summary (push) Has been cancelled
Type checking / changes (push) Has been cancelled
Type checking / test (push) Has been cancelled
Type checking / typescript-summary (push) Has been cancelled
Node tests / changes (push) Has been cancelled
Node tests / test (push) Has been cancelled
Node tests / test-summary (push) Has been cancelled
Источник: https://github.com/nextcloud/spreed/archive/refs/tags/v22.0.12.tar.gz С этого коммита ветка официального Nextcloud Talk отрезана (решение владельца 2026-07-06). Все дальнейшие изменения — только наши; версии релизов: 22.0.12-f7.N.
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
<!--
|
||||
- SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
||||
- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div id="submit-wrapper" class="request-password-wrapper">
|
||||
<!-- "submit-wrapper" is used to mimic the login button and thus get
|
||||
automatic colouring of the confirm icon by the Theming app. -->
|
||||
<NcButton
|
||||
id="request-password-button"
|
||||
variant="primary"
|
||||
:wide="true"
|
||||
:disabled="isRequestInProgress"
|
||||
@click="requestPassword">
|
||||
{{ t('spreed', 'Request password') }}
|
||||
</NcButton>
|
||||
</div>
|
||||
<p v-if="hasRequestFailed" class="warning error-message">
|
||||
{{ t('spreed', 'Error requesting the password.') }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { t } from '@nextcloud/l10n'
|
||||
import NcButton from '@nextcloud/vue/components/NcButton'
|
||||
import { useGetToken } from './composables/useGetToken.ts'
|
||||
import { getPublicShareAuthConversationToken } from './services/filesIntegrationServices.ts'
|
||||
import { useTokenStore } from './stores/token.ts'
|
||||
import { checkBrowser } from './utils/browserCheck.ts'
|
||||
|
||||
export default {
|
||||
|
||||
name: 'PublicShareAuthRequestPasswordButton',
|
||||
|
||||
components: {
|
||||
NcButton,
|
||||
},
|
||||
|
||||
props: {
|
||||
shareToken: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
setup() {
|
||||
return {
|
||||
token: useGetToken(),
|
||||
tokenStore: useTokenStore(),
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
isRequestLoading: false,
|
||||
hasRequestFailed: false,
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
iconClass() {
|
||||
return {
|
||||
'icon-confirm-white': !this.isRequestInProgress,
|
||||
'icon-loading-small-dark': this.isRequestInProgress,
|
||||
}
|
||||
},
|
||||
|
||||
isRequestInProgress() {
|
||||
return this.isRequestLoading || !!this.token
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
t,
|
||||
async requestPassword() {
|
||||
checkBrowser()
|
||||
|
||||
this.hasRequestFailed = false
|
||||
this.isRequestLoading = true
|
||||
|
||||
try {
|
||||
const response = await getPublicShareAuthConversationToken(this.shareToken)
|
||||
|
||||
this.tokenStore.updateToken(response.data.ocs.data.token)
|
||||
} catch (exception) {
|
||||
this.hasRequestFailed = true
|
||||
}
|
||||
|
||||
this.isRequestLoading = false
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user