nextcloud/apps/encryption/src/encryption.ts
Ferdinand Thiessen 108858daef
refactor(encryption): migrate to Vue 3 and Typescript and script setup
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-13 22:49:18 +01:00

21 lines
615 B
TypeScript

/*!
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { getCurrentUser } from '@nextcloud/auth'
import axios from '@nextcloud/axios'
import { showWarning } from '@nextcloud/dialogs'
import { generateUrl } from '@nextcloud/router'
window.addEventListener('DOMContentLoaded', async function() {
if (getCurrentUser() === null) {
// skip for public pages
return
}
const { data } = await axios.get(generateUrl('/apps/encryption/ajax/getStatus'))
if (data.status === 'interactionNeeded') {
showWarning(data.data.message)
}
})