Merge pull request #57012 from nextcloud/refactor/oauth2-to-vue3

refactor(oauth2): migrate to Typescript and Vue 3
This commit is contained in:
Ferdinand Thiessen 2025-12-12 04:44:56 +01:00 committed by GitHub
commit d9d8449340
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
127 changed files with 546 additions and 566 deletions

View file

@ -45,6 +45,8 @@ class Admin implements ISettings {
$this->initialState->provideInitialState('clients', $result);
$this->initialState->provideInitialState('oauth2-doc-link', $this->urlGenerator->linkToDocs('admin-oauth2'));
\OCP\Util::addStyle('oauth2', 'settings-admin');
\OCP\Util::addScript('oauth2', 'settings-admin', 'core');
return new TemplateResponse(
'oauth2',
'admin',

View file

@ -1,173 +0,0 @@
<!--
- SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<NcSettingsSection
:name="t('oauth2', 'OAuth 2.0 clients')"
:description="t('oauth2', 'OAuth 2.0 allows external services to request access to {instanceName}.', { instanceName })"
:doc-url="oauthDocLink">
<table v-if="clients.length > 0" class="grid">
<thead>
<tr>
<th>
{{ t('oauth2', 'Name') }}
</th>
<th>
{{ t('oauth2', 'Redirection URI') }}
</th>
<th>
{{ t('oauth2', 'Client Identifier') }}
</th>
<th>
{{ t('oauth2', 'Secret key') }}
</th>
<th>
{{ t('oauth2', 'Delete client') }}
</th>
</tr>
</thead>
<tbody>
<OAuthItem
v-for="client in clients"
:key="client.id"
:client="client"
@delete="deleteClient" />
</tbody>
</table>
<NcNoteCard
v-if="showSecretWarning"
type="warning">
{{ t('oauth2', 'Make sure you store the secret key, it cannot be recovered.') }}
</NcNoteCard>
<br>
<h3>{{ t('oauth2', 'Add client') }}</h3>
<span v-if="newClient.error" class="msg error">{{ newClient.errorMsg }}</span>
<form class="oauth2-form" @submit.prevent="addClient">
<NcTextField
id="name"
v-model="newClient.name"
type="text"
class="oauth2-form--input"
name="name"
:label="t('oauth2', 'Name')"
:placeholder="t('oauth2', 'Name')" />
<NcTextField
id="redirectUri"
v-model="newClient.redirectUri"
type="url"
class="oauth2-form--input"
name="redirectUri"
:label="t('oauth2', 'Redirection URI')"
:placeholder="t('oauth2', 'Redirection URI')" />
<NcButton type="submit" class="inline-button">
{{ t('oauth2', 'Add') }}
</NcButton>
</form>
</NcSettingsSection>
</template>
<script>
import axios from '@nextcloud/axios'
import { getCapabilities } from '@nextcloud/capabilities'
import { loadState } from '@nextcloud/initial-state'
import { generateUrl } from '@nextcloud/router'
import NcButton from '@nextcloud/vue/components/NcButton'
import NcNoteCard from '@nextcloud/vue/components/NcNoteCard'
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
import NcTextField from '@nextcloud/vue/components/NcTextField'
import OAuthItem from './components/OAuthItem.vue'
export default {
name: 'App',
components: {
OAuthItem,
NcSettingsSection,
NcButton,
NcTextField,
NcNoteCard,
},
props: {
clients: {
type: Array,
required: true,
},
},
data() {
return {
newClient: {
name: '',
redirectUri: '',
errorMsg: '',
error: false,
},
oauthDocLink: loadState('oauth2', 'oauth2-doc-link'),
showSecretWarning: false,
}
},
computed: {
instanceName() {
return getCapabilities().theming.name
},
},
methods: {
deleteClient(id) {
axios.delete(generateUrl('apps/oauth2/clients/{id}', { id }))
.then(() => {
// eslint-disable-next-line vue/no-mutating-props
this.clients = this.clients.filter((client) => client.id !== id)
})
},
addClient() {
this.newClient.error = false
axios.post(
generateUrl('apps/oauth2/clients'),
{
name: this.newClient.name,
redirectUri: this.newClient.redirectUri,
},
).then((response) => {
// eslint-disable-next-line vue/no-mutating-props
this.clients.push(response.data)
this.showSecretWarning = true
this.newClient.name = ''
this.newClient.redirectUri = ''
}).catch((reason) => {
this.newClient.error = true
this.newClient.errorMsg = reason.response.data.message
})
},
},
}
</script>
<style scoped>
table {
max-width: 800px;
}
/** Overwrite button height and position to be aligned with the text input */
.inline-button {
min-height: 34px !important;
display: inline-flex !important;
}
.oauth2-form {
display: flex;
flex-direction: row;
}
.oauth2-form--input {
max-width: 200px;
margin-inline-end: 10px;
}
</style>

View file

@ -2,120 +2,71 @@
- SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<script setup lang="ts">
import type { IOauthClient } from '../views/AdminSettings.vue'
import { t } from '@nextcloud/l10n'
import NcButton from '@nextcloud/vue/components/NcButton'
import NcPasswordField from '@nextcloud/vue/components/NcPasswordField'
import IconTrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
defineProps<{
/**
* The OAuth client to display
*/
client: IOauthClient
}>()
defineEmits<{
delete: []
}>()
</script>
<template>
<tr>
<td>{{ name }}</td>
<td>{{ redirectUri }}</td>
<td><code>{{ clientId }}</code></td>
<td>{{ client.name }}</td>
<td>
<div class="action-secret">
<code>{{ renderedSecret }}</code>
<NcButton
v-if="clientSecret !== ''"
variant="tertiary-no-background"
:aria-label="toggleAriaLabel"
@click="toggleSecret">
<template #icon>
<EyeOutline :size="20" />
</template>
</NcButton>
</div>
<code :class="$style.oAuthItem__code">{{ client.redirectUri }}</code>
</td>
<td class="action-column">
<td>
<code :class="$style.oAuthItem__code">{{ client.clientId }}</code>
</td>
<td>
<NcPasswordField
v-if="client.clientSecret"
:class="$style.oAuthItem__clientSecret"
:aria-label="t('oauth2', 'Secret key')"
as-text
:model-value="client.clientSecret"
show-trailing-button />
<span v-else>*****</span>
</td>
<td>
<NcButton
variant="tertiary-no-background"
:aria-label="t('oauth2', 'Delete')"
@click="$emit('delete', id)">
:title="t('oauth2', 'Delete')"
variant="error"
@click="$emit('delete')">
<template #icon>
<Delete
:size="20"
:title="t('oauth2', 'Delete')" />
<IconTrashCanOutline :size="20" />
</template>
</NcButton>
</td>
</tr>
</template>
<script>
import NcButton from '@nextcloud/vue/components/NcButton'
import EyeOutline from 'vue-material-design-icons/EyeOutline.vue'
import Delete from 'vue-material-design-icons/TrashCanOutline.vue'
export default {
name: 'OAuthItem',
components: {
Delete,
NcButton,
EyeOutline,
},
props: {
client: {
type: Object,
required: true,
},
},
data() {
return {
id: this.client.id,
name: this.client.name,
redirectUri: this.client.redirectUri,
clientId: this.client.clientId,
clientSecret: this.client.clientSecret,
renderSecret: false,
}
},
computed: {
renderedSecret() {
if (this.renderSecret) {
return this.clientSecret
} else {
return '****'
}
},
toggleAriaLabel() {
if (!this.renderSecret) {
return t('oauth2', 'Show client secret')
}
return t('oauth2', 'Hide client secret')
},
},
methods: {
toggleSecret() {
this.renderSecret = !this.renderSecret
},
},
<style module>
.oAuthItem__code {
display: inline-block;
overflow-x: scroll;
padding-block: var(--default-grid-baseline);
text-wrap: nowrap;
vertical-align: middle;
width: 100%;
}
</script>
<style scoped>
.action-secret {
display: flex;
align-items: center;
}
.action-secret code {
padding-top: 5px;
}
td code {
display: inline-block;
vertical-align: middle;
}
table.inline td {
border: none;
padding: 5px;
}
.action-column {
display: flex;
justify-content: flex-end;
padding-inline-end: 0;
}
.oAuthItem__clientSecret {
min-width: 200px;
}
</style>

View file

@ -4,18 +4,14 @@
*/
import { loadState } from '@nextcloud/initial-state'
import Vue from 'vue'
import App from './App.vue'
import { createApp } from 'vue'
import AdminSettings from './views/AdminSettings.vue'
Vue.prototype.t = t
Vue.prototype.OC = OC
import 'vite/modulepreload-polyfill'
const clients = loadState('oauth2', 'clients')
const View = Vue.extend(App)
const oauth = new View({
propsData: {
clients,
},
const app = createApp(AdminSettings, {
modelValue: clients,
})
oauth.$mount('#oauth2')
app.mount('#oauth2')

View file

@ -0,0 +1,202 @@
<!--
- SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<script setup lang="ts">
import axios, { isAxiosError } from '@nextcloud/axios'
import { getCapabilities } from '@nextcloud/capabilities'
import { loadState } from '@nextcloud/initial-state'
import { t } from '@nextcloud/l10n'
import { generateUrl } from '@nextcloud/router'
import { ref } from 'vue'
import NcButton from '@nextcloud/vue/components/NcButton'
import NcNoteCard from '@nextcloud/vue/components/NcNoteCard'
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
import NcTextField from '@nextcloud/vue/components/NcTextField'
import OAuthItem from '../components/OAuthItem.vue'
export interface IOauthClient {
id: string
name: string
redirectUri: string
clientId: string
clientSecret: string
}
const clients = defineModel<IOauthClient[]>({ required: true })
// @ts-expect-error -- missing typing of the API
const instanceName = getCapabilities().theming.name
const oauthDocLink = loadState<string>('oauth2', 'oauth2-doc-link')
const showSecretWarning = ref(false)
const newClient = ref({
name: '',
redirectUri: '',
errorMsg: '',
error: false,
})
/**
* @param id - The id of the client to delete
*/
async function deleteClient(id: string) {
await axios.delete(generateUrl('apps/oauth2/clients/{id}', { id }))
clients.value = clients.value.filter((client) => client.id !== id)
}
/**
* Add the generated client to the backend and display it in the list
*/
async function addClient() {
newClient.value.error = false
try {
const { data } = await axios.post(generateUrl('apps/oauth2/clients'), {
name: newClient.value.name,
redirectUri: newClient.value.redirectUri,
})
clients.value.push(data)
showSecretWarning.value = true
newClient.value.name = ''
newClient.value.redirectUri = ''
} catch (error) {
newClient.value.error = true
if (isAxiosError(error) && error.response) {
newClient.value.errorMsg = error.response.data.message
} else {
newClient.value.errorMsg = t('oauth2', 'An unknown error occurred.')
}
}
}
</script>
<template>
<NcSettingsSection
:name="t('oauth2', 'OAuth 2.0 clients')"
:description="t('oauth2', 'OAuth 2.0 allows external services to request access to {instanceName}.', { instanceName })"
:doc-url="oauthDocLink">
<table v-if="clients.length > 0" :class="[$style.oauthApp__table, { [$style.oauthApp__table_withSecret]: showSecretWarning }]">
<thead>
<tr>
<th>
{{ t('oauth2', 'Name') }}
</th>
<th>
{{ t('oauth2', 'Redirection URI') }}
</th>
<th>
{{ t('oauth2', 'Client identifier') }}
</th>
<th>
{{ t('oauth2', 'Secret key') }}
</th>
<th>
<span class="hidden-visually">{{ t('oauth2', 'Delete client') }}</span>
</th>
</tr>
</thead>
<tbody>
<OAuthItem
v-for="client in clients"
:key="client.id"
:client="client"
@delete="deleteClient(client.id)" />
</tbody>
</table>
<NcNoteCard
v-if="showSecretWarning"
type="warning">
{{ t('oauth2', 'Make sure you store the secret key, it cannot be recovered.') }}
</NcNoteCard>
<br>
<h3>{{ t('oauth2', 'Add client') }}</h3>
<NcNoteCard v-if="newClient.error" type="error">
{{ newClient.errorMsg }}
</NcNoteCard>
<form :class="$style.oauthApp__form" @submit.prevent="addClient">
<NcTextField
id="name"
v-model="newClient.name"
:class="$style.oauthApp__form__input"
name="name"
:label="t('oauth2', 'Name')"
:placeholder="t('oauth2', 'Name')" />
<NcTextField
id="redirectUri"
v-model="newClient.redirectUri"
type="url"
:class="$style.oauthApp__form__input"
name="redirectUri"
:label="t('oauth2', 'Redirection URI')"
:placeholder="t('oauth2', 'Redirection URI')" />
<NcButton type="submit" :class="$style.oauthApp__submitButton">
{{ t('oauth2', 'Add') }}
</NcButton>
</form>
</NcSettingsSection>
</template>
<style module lang="scss">
.oauthApp__form {
display: flex;
flex-direction: row;
}
.oauthApp__form__input {
max-width: 260px;
margin-inline-end: 10px;
}
.oauthApp__table {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
th, td {
overflow: hidden;
padding: var(--default-grid-baseline);
text-wrap: wrap;
word-wrap: break-word;
}
tbody tr {
border-top: 1px solid var(--color-border);
}
th:nth-of-type(2), td:nth-of-type(2) {
width: 33%;
}
th:nth-of-type(3), td:nth-of-type(3) {
width: 50%;
}
// by default hide the secret column
th:nth-of-type(4), td:nth-of-type(4) {
display: none;
}
// the action column only needs to have the button size
th:nth-of-type(5), td:nth-of-type(5) {
width: calc(var(--default-clickable-area) + 2 * var(--default-grid-baseline));
}
}
.oauthApp__table_withSecret {
th:nth-of-type(2), td:nth-of-type(2) {
width: 25%;
}
th:nth-of-type(3), td:nth-of-type(3) {
width: 40%;
}
th:nth-of-type(4), td:nth-of-type(4) {
display: table-cell;
width: calc(200px + 2 * var(--default-grid-baseline));
}
}
</style>

View file

@ -3,9 +3,6 @@
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
\OCP\Util::addScript('oauth2', 'oauth2', 'core');
?>
<div id="oauth2"></div>

View file

@ -54,9 +54,6 @@ module.exports = {
'personal-settings': path.join(__dirname, 'apps/files_sharing/src', 'personal-settings.js'),
'public-nickname-handler': path.join(__dirname, 'apps/files_sharing/src', 'public-nickname-handler.ts'),
},
oauth2: {
oauth2: path.join(__dirname, 'apps/oauth2/src', 'main.js'),
},
profile: {
main: path.join(__dirname, 'apps/profile/src', 'main.ts'),
},

View file

@ -26,6 +26,9 @@ const modules = {
files_versions: {
'sidebar-tab': resolve(import.meta.dirname, 'apps/files_versions/src', 'sidebar_tab.ts'),
},
oauth2: {
'settings-admin': resolve(import.meta.dirname, 'apps/oauth2/src', 'settings-admin.ts'),
},
sharebymail: {
'admin-settings': resolve(import.meta.dirname, 'apps/sharebymail/src', 'settings-admin.ts'),
},

2
dist/ContentCopy-BEfKgtZW.chunk.mjs vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,12 @@
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
SPDX-FileCopyrightText: Rob Cresswell <robcresswell@pm.me>
This file is generated from multiple sources. Included packages:
- @nextcloud/vue
- version: 9.3.1
- license: AGPL-3.0-or-later
- vue-material-design-icons
- version: 5.3.1
- license: MIT

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,12 @@
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
SPDX-FileCopyrightText: Rob Cresswell <robcresswell@pm.me>
This file is generated from multiple sources. Included packages:
- @nextcloud/vue
- version: 9.3.1
- license: AGPL-3.0-or-later
- vue-material-design-icons
- version: 5.3.1
- license: MIT

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
dist/Plus-CeFTF6zT.chunk.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,6 @@ SPDX-FileCopyrightText: Anthony Fu <https://github.com/antfu>
SPDX-FileCopyrightText: Arnout Kazemier
SPDX-FileCopyrightText: Borys Serebrov
SPDX-FileCopyrightText: David Clark
SPDX-FileCopyrightText: Eduardo San Martin Morote
SPDX-FileCopyrightText: Eric Norris (https://github.com/ericnorris)
SPDX-FileCopyrightText: Guillaume Chau <guillaume.b.chau@gmail.com>
SPDX-FileCopyrightText: Jacob Clevenger<https://github.com/wheatjs>
@ -23,7 +22,6 @@ SPDX-FileCopyrightText: Vuepic
SPDX-FileCopyrightText: atomiks
SPDX-FileCopyrightText: chenkai
SPDX-FileCopyrightText: date-fns developers
SPDX-FileCopyrightText: debounce developers
SPDX-FileCopyrightText: p-queue developers
SPDX-FileCopyrightText: ts-md5 developers
@ -46,18 +44,12 @@ This file is generated from multiple sources. Included packages:
- @floating-ui/utils
- version: 0.2.10
- license: MIT
- @nextcloud/capabilities
- version: 1.2.1
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 7.1.0
- license: AGPL-3.0-or-later
- @nextcloud/l10n
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 9.3.1
- license: AGPL-3.0-or-later
@ -76,9 +68,6 @@ This file is generated from multiple sources. Included packages:
- date-fns
- version: 4.1.0
- license: MIT
- debounce
- version: 3.0.0
- license: MIT
- emoji-mart-vue-fast
- version: 15.0.5
- license: BSD-3-Clause
@ -118,9 +107,6 @@ This file is generated from multiple sources. Included packages:
- vue-material-design-icons
- version: 5.3.1
- license: MIT
- vue-router
- version: 4.6.3
- license: MIT
- vue-select
- version: 4.0.0-beta.6
- license: MIT

1
dist/Plus-DDsJI2iW.chunk.mjs.map vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,6 @@ SPDX-FileCopyrightText: Anthony Fu <https://github.com/antfu>
SPDX-FileCopyrightText: Arnout Kazemier
SPDX-FileCopyrightText: Borys Serebrov
SPDX-FileCopyrightText: David Clark
SPDX-FileCopyrightText: Eduardo San Martin Morote
SPDX-FileCopyrightText: Eric Norris (https://github.com/ericnorris)
SPDX-FileCopyrightText: Guillaume Chau <guillaume.b.chau@gmail.com>
SPDX-FileCopyrightText: Jacob Clevenger<https://github.com/wheatjs>
@ -23,7 +22,6 @@ SPDX-FileCopyrightText: Vuepic
SPDX-FileCopyrightText: atomiks
SPDX-FileCopyrightText: chenkai
SPDX-FileCopyrightText: date-fns developers
SPDX-FileCopyrightText: debounce developers
SPDX-FileCopyrightText: p-queue developers
SPDX-FileCopyrightText: ts-md5 developers
@ -46,18 +44,12 @@ This file is generated from multiple sources. Included packages:
- @floating-ui/utils
- version: 0.2.10
- license: MIT
- @nextcloud/capabilities
- version: 1.2.1
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 7.1.0
- license: AGPL-3.0-or-later
- @nextcloud/l10n
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 9.3.1
- license: AGPL-3.0-or-later
@ -76,9 +68,6 @@ This file is generated from multiple sources. Included packages:
- date-fns
- version: 4.1.0
- license: MIT
- debounce
- version: 3.0.0
- license: MIT
- emoji-mart-vue-fast
- version: 15.0.5
- license: BSD-3-Clause
@ -118,9 +107,6 @@ This file is generated from multiple sources. Included packages:
- vue-material-design-icons
- version: 5.3.1
- license: MIT
- vue-router
- version: 4.6.3
- license: MIT
- vue-select
- version: 4.0.0-beta.6
- license: MIT

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,27 @@
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: Eduardo San Martin Morote
SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
SPDX-FileCopyrightText: Rob Cresswell <robcresswell@pm.me>
SPDX-FileCopyrightText: debounce developers
This file is generated from multiple sources. Included packages:
- @nextcloud/capabilities
- version: 1.2.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 9.3.1
- license: AGPL-3.0-or-later
- debounce
- version: 3.0.0
- license: MIT
- vue-material-design-icons
- version: 5.3.1
- license: MIT
- vue-router
- version: 4.6.3
- license: MIT

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,27 @@
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: Eduardo San Martin Morote
SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
SPDX-FileCopyrightText: Rob Cresswell <robcresswell@pm.me>
SPDX-FileCopyrightText: debounce developers
This file is generated from multiple sources. Included packages:
- @nextcloud/capabilities
- version: 1.2.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 9.3.1
- license: AGPL-3.0-or-later
- debounce
- version: 3.0.0
- license: MIT
- vue-material-design-icons
- version: 5.3.1
- license: MIT
- vue-router
- version: 4.6.3
- license: MIT

1
dist/TrayArrowDown-D7mIRwIy.chunk.css vendored Normal file
View file

@ -0,0 +1 @@
.material-design-icon[data-v-9cedb949]{display:flex;align-self:center;justify-self:center;align-items:center;justify-content:center}.settings-section[data-v-9cedb949]{display:block;padding:0 0 calc(var(--default-grid-baseline) * 5) 0;margin:calc(var(--default-grid-baseline) * 7);width:min(900px,100% - var(--default-grid-baseline) * 7 * 2)}.settings-section[data-v-9cedb949]:not(:last-child){border-bottom:1px solid var(--color-border)}.settings-section__name[data-v-9cedb949]{display:inline-flex;align-items:center;justify-content:center;max-width:900px;margin-top:0}.settings-section__info[data-v-9cedb949]{display:flex;align-items:center;justify-content:center;width:var(--default-clickable-area);height:var(--default-clickable-area);margin:calc((var(--default-clickable-area) - 16px) / 2 * -1);margin-inline-start:0;color:var(--color-text-maxcontrast)}.settings-section__info[data-v-9cedb949]:hover,.settings-section__info[data-v-9cedb949]:focus,.settings-section__info[data-v-9cedb949]:active{color:var(--color-main-text)}.settings-section__desc[data-v-9cedb949]{margin-top:-.2em;margin-bottom:1em;color:var(--color-text-maxcontrast);max-width:900px}

8
dist/TrayArrowDown-sRwZP_WA.chunk.mjs vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/core-common.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/dav-CRTiYd1u.chunk.mjs vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,3 +1,4 @@
/* extracted by css-entry-points-plugin */
@import './dav-dav-settings-admin-caldav-7NASuukx.chunk.css';
@import './TrashCanOutline-BE4hS1RR.chunk.css';
@import './TrayArrowDown-D7mIRwIy.chunk.css';
@import './ContentCopy-Ck29Gkyh.chunk.css';

View file

@ -1,2 +1,2 @@
import{l as i,_ as f,N as b,a as g,c as R,e as E,q as C,f as m,r as p,o as S,w as r,m as n,b as c,d as u,t as l,h as V}from"./TrashCanOutline-DKvv_nn_.chunk.mjs";const h=i("dav","userSyncCalendarsDocUrl","#"),k={name:"CalDavSettings",components:{NcCheckboxRadioSwitch:g,NcSettingsSection:b},setup(){return{t:m}},data(){return{userSyncCalendarsDocUrl:h,sendInvitations:i("dav","sendInvitations"),generateBirthdayCalendar:i("dav","generateBirthdayCalendar"),sendEventReminders:i("dav","sendEventReminders"),sendEventRemindersToSharedUsers:i("dav","sendEventRemindersToSharedUsers"),sendEventRemindersPush:i("dav","sendEventRemindersPush")}},computed:{hint(){return m("dav","Also install the {calendarappstoreopen}Calendar app{linkclose}, or {calendardocopen}connect your desktop & mobile for syncing ↗{linkclose}.").replace("{calendarappstoreopen}",'<a target="_blank" href="../apps/office/calendar">').replace("{calendardocopen}",`<a target="_blank" href="${h}" rel="noreferrer noopener">`).replace(/\{linkclose\}/g,"</a>")},sendInvitationsHelpText(){return m("dav","Please make sure to properly set up {emailopen}the email server{linkclose}.").replace("{emailopen}",'<a href="../admin#mail_general_settings">').replace("{linkclose}","</a>")},sendEventRemindersHelpText(){return m("dav","Please make sure to properly set up {emailopen}the email server{linkclose}.").replace("{emailopen}",'<a href="../admin#mail_general_settings">').replace("{linkclose}","</a>")}},watch:{generateBirthdayCalendar(d){const e=d?"/apps/dav/enableBirthdayCalendar":"/apps/dav/disableBirthdayCalendar";E.post(C(e))},sendInvitations(d){OCP.AppConfig.setValue("dav","sendInvitations",d?"yes":"no")},sendEventReminders(d){OCP.AppConfig.setValue("dav","sendEventReminders",d?"yes":"no")},sendEventRemindersToSharedUsers(d){OCP.AppConfig.setValue("dav","sendEventRemindersToSharedUsers",d?"yes":"no")},sendEventRemindersPush(d){OCP.AppConfig.setValue("dav","sendEventRemindersPush",d?"yes":"no")}}},T=["innerHTML"],w=["innerHTML"],_=["innerHTML"],U={class:"indented"},P={class:"indented"};function H(d,e,x,s,a,v){const o=p("NcCheckboxRadioSwitch"),y=p("NcSettingsSection");return S(),R(y,{name:s.t("dav","Calendar server"),"doc-url":a.userSyncCalendarsDocUrl},{default:r(()=>[n("p",{class:"settings-hint",innerHTML:v.hint},null,8,T),n("p",null,[c(o,{id:"caldavSendInvitations",modelValue:a.sendInvitations,"onUpdate:modelValue":e[0]||(e[0]=t=>a.sendInvitations=t),type:"switch"},{default:r(()=>[u(l(s.t("dav","Send invitations to attendees")),1)]),_:1},8,["modelValue"]),n("em",{innerHTML:v.sendInvitationsHelpText},null,8,w)]),n("p",null,[c(o,{id:"caldavGenerateBirthdayCalendar",modelValue:a.generateBirthdayCalendar,"onUpdate:modelValue":e[1]||(e[1]=t=>a.generateBirthdayCalendar=t),type:"switch",class:"checkbox"},{default:r(()=>[u(l(s.t("dav","Automatically generate a birthday calendar")),1)]),_:1},8,["modelValue"]),n("em",null,l(s.t("dav","Birthday calendars will be generated by a background job.")),1),e[5]||(e[5]=n("br",null,null,-1)),n("em",null,l(s.t("dav","Hence they will not be available immediately after enabling but will show up after some time.")),1)]),n("p",null,[c(o,{id:"caldavSendEventReminders",modelValue:a.sendEventReminders,"onUpdate:modelValue":e[2]||(e[2]=t=>a.sendEventReminders=t),type:"switch"},{default:r(()=>[u(l(s.t("dav","Send notifications for events")),1)]),_:1},8,["modelValue"]),n("em",{innerHTML:v.sendEventRemindersHelpText},null,8,_),e[6]||(e[6]=n("br",null,null,-1)),n("em",null,l(s.t("dav","Notifications are sent via background jobs, so these must occur often enough.")),1)]),n("p",U,[c(o,{id:"caldavSendEventRemindersToSharedGroupMembers",modelValue:a.sendEventRemindersToSharedUsers,"onUpdate:modelValue":e[3]||(e[3]=t=>a.sendEventRemindersToSharedUsers=t),type:"switch",disabled:!a.sendEventReminders},{default:r(()=>[u(l(s.t("dav","Send reminder notifications to calendar sharees as well")),1)]),_:1},8,["modelValue","disabled"]),n("em",null,l(s.t("dav","Reminders are always sent to organizers and attendees.")),1)]),n("p",P,[c(o,{id:"caldavSendEventRemindersPush",modelValue:a.sendEventRemindersPush,"onUpdate:modelValue":e[4]||(e[4]=t=>a.sendEventRemindersPush=t),type:"switch",disabled:!a.sendEventReminders},{default:r(()=>[u(l(s.t("dav","Enable notifications for events via push")),1)]),_:1},8,["modelValue","disabled"])])]),_:1},8,["name","doc-url"])}const I=f(k,[["render",H],["__scopeId","data-v-84465bd0"]]),B=V(I);B.mount("#settings-admin-caldav");
import{l as i,_ as y,N as b,c as g,d as R,p as E,e as u,r as v,o as C,w as r,k as n,a as c,b as m,t as l,f as S}from"./TrayArrowDown-sRwZP_WA.chunk.mjs";import{N as V}from"./ContentCopy-BEfKgtZW.chunk.mjs";const h=i("dav","userSyncCalendarsDocUrl","#"),k={name:"CalDavSettings",components:{NcCheckboxRadioSwitch:V,NcSettingsSection:b},setup(){return{t:u}},data(){return{userSyncCalendarsDocUrl:h,sendInvitations:i("dav","sendInvitations"),generateBirthdayCalendar:i("dav","generateBirthdayCalendar"),sendEventReminders:i("dav","sendEventReminders"),sendEventRemindersToSharedUsers:i("dav","sendEventRemindersToSharedUsers"),sendEventRemindersPush:i("dav","sendEventRemindersPush")}},computed:{hint(){return u("dav","Also install the {calendarappstoreopen}Calendar app{linkclose}, or {calendardocopen}connect your desktop & mobile for syncing ↗{linkclose}.").replace("{calendarappstoreopen}",'<a target="_blank" href="../apps/office/calendar">').replace("{calendardocopen}",`<a target="_blank" href="${h}" rel="noreferrer noopener">`).replace(/\{linkclose\}/g,"</a>")},sendInvitationsHelpText(){return u("dav","Please make sure to properly set up {emailopen}the email server{linkclose}.").replace("{emailopen}",'<a href="../admin#mail_general_settings">').replace("{linkclose}","</a>")},sendEventRemindersHelpText(){return u("dav","Please make sure to properly set up {emailopen}the email server{linkclose}.").replace("{emailopen}",'<a href="../admin#mail_general_settings">').replace("{linkclose}","</a>")}},watch:{generateBirthdayCalendar(d){const e=d?"/apps/dav/enableBirthdayCalendar":"/apps/dav/disableBirthdayCalendar";R.post(E(e))},sendInvitations(d){OCP.AppConfig.setValue("dav","sendInvitations",d?"yes":"no")},sendEventReminders(d){OCP.AppConfig.setValue("dav","sendEventReminders",d?"yes":"no")},sendEventRemindersToSharedUsers(d){OCP.AppConfig.setValue("dav","sendEventRemindersToSharedUsers",d?"yes":"no")},sendEventRemindersPush(d){OCP.AppConfig.setValue("dav","sendEventRemindersPush",d?"yes":"no")}}},T=["innerHTML"],w=["innerHTML"],_=["innerHTML"],U={class:"indented"},P={class:"indented"};function H(d,e,x,s,a,p){const o=v("NcCheckboxRadioSwitch"),f=v("NcSettingsSection");return C(),g(f,{name:s.t("dav","Calendar server"),"doc-url":a.userSyncCalendarsDocUrl},{default:r(()=>[n("p",{class:"settings-hint",innerHTML:p.hint},null,8,T),n("p",null,[c(o,{id:"caldavSendInvitations",modelValue:a.sendInvitations,"onUpdate:modelValue":e[0]||(e[0]=t=>a.sendInvitations=t),type:"switch"},{default:r(()=>[m(l(s.t("dav","Send invitations to attendees")),1)]),_:1},8,["modelValue"]),n("em",{innerHTML:p.sendInvitationsHelpText},null,8,w)]),n("p",null,[c(o,{id:"caldavGenerateBirthdayCalendar",modelValue:a.generateBirthdayCalendar,"onUpdate:modelValue":e[1]||(e[1]=t=>a.generateBirthdayCalendar=t),type:"switch",class:"checkbox"},{default:r(()=>[m(l(s.t("dav","Automatically generate a birthday calendar")),1)]),_:1},8,["modelValue"]),n("em",null,l(s.t("dav","Birthday calendars will be generated by a background job.")),1),e[5]||(e[5]=n("br",null,null,-1)),n("em",null,l(s.t("dav","Hence they will not be available immediately after enabling but will show up after some time.")),1)]),n("p",null,[c(o,{id:"caldavSendEventReminders",modelValue:a.sendEventReminders,"onUpdate:modelValue":e[2]||(e[2]=t=>a.sendEventReminders=t),type:"switch"},{default:r(()=>[m(l(s.t("dav","Send notifications for events")),1)]),_:1},8,["modelValue"]),n("em",{innerHTML:p.sendEventRemindersHelpText},null,8,_),e[6]||(e[6]=n("br",null,null,-1)),n("em",null,l(s.t("dav","Notifications are sent via background jobs, so these must occur often enough.")),1)]),n("p",U,[c(o,{id:"caldavSendEventRemindersToSharedGroupMembers",modelValue:a.sendEventRemindersToSharedUsers,"onUpdate:modelValue":e[3]||(e[3]=t=>a.sendEventRemindersToSharedUsers=t),type:"switch",disabled:!a.sendEventReminders},{default:r(()=>[m(l(s.t("dav","Send reminder notifications to calendar sharees as well")),1)]),_:1},8,["modelValue","disabled"]),n("em",null,l(s.t("dav","Reminders are always sent to organizers and attendees.")),1)]),n("p",P,[c(o,{id:"caldavSendEventRemindersPush",modelValue:a.sendEventRemindersPush,"onUpdate:modelValue":e[4]||(e[4]=t=>a.sendEventRemindersPush=t),type:"switch",disabled:!a.sendEventReminders},{default:r(()=>[m(l(s.t("dav","Enable notifications for events via push")),1)]),_:1},8,["modelValue","disabled"])])]),_:1},8,["name","doc-url"])}const I=y(k,[["render",H],["__scopeId","data-v-84465bd0"]]),B=S(I);B.mount("#settings-admin-caldav");
//# sourceMappingURL=dav-settings-admin-caldav.mjs.map

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,6 @@
/* extracted by css-entry-points-plugin */
@import './dav-dav-settings-admin-example-content-BWzlcBW1.chunk.css';
@import './TrashCanOutline-BE4hS1RR.chunk.css';
@import './ContentCopy-Dywt349j.chunk.css';
@import './TrayArrowDown-D7mIRwIy.chunk.css';
@import './TrashCanOutline-CKjk9wDJ.chunk.css';
@import './ContentCopy-Ck29Gkyh.chunk.css';
@import './Plus-CeFTF6zT.chunk.css';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,6 @@
/* extracted by css-entry-points-plugin */
@import './dav-dav-settings-personal-availability-CTwf8DDv.chunk.css';
@import './TrashCanOutline-BE4hS1RR.chunk.css';
@import './ContentCopy-Dywt349j.chunk.css';
@import './TrayArrowDown-D7mIRwIy.chunk.css';
@import './TrashCanOutline-CKjk9wDJ.chunk.css';
@import './ContentCopy-Ck29Gkyh.chunk.css';
@import './Plus-CeFTF6zT.chunk.css';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,6 @@
/* extracted by css-entry-points-plugin */
@import './federatedfilesharing-federatedfilesharing-init-files-DrBRJAfw.chunk.css';
@import './TrashCanOutline-BE4hS1RR.chunk.css';
@import './ContentCopy-Dywt349j.chunk.css';
@import './TrayArrowDown-D7mIRwIy.chunk.css';
@import './TrashCanOutline-CKjk9wDJ.chunk.css';
@import './ContentCopy-Ck29Gkyh.chunk.css';
@import './Plus-CeFTF6zT.chunk.css';

View file

@ -1,2 +1,2 @@
import{i as _,j as y,k as b,f as t,c as u,o as f,w as R,m as v,n as D,t as S,u as i,p as O,_ as k,l as q,s as C,e as d,q as c,v as P}from"./TrashCanOutline-DKvv_nn_.chunk.mjs";import{N as F,a as x,b as E,c as N,s as h}from"./ContentCopy-DXaCAmGe.chunk.mjs";import{l as j}from"./logger-BmseY7xk.chunk.mjs";const M=_({__name:"RemoteShareDialog",props:{name:{},owner:{},remote:{},passwordRequired:{type:Boolean}},emits:["close"],setup(e,{emit:s}){const r=e,a=s,o=y(""),n=b(()=>[{label:t("federatedfilesharing","Cancel"),callback:()=>a("close",!1)},{label:t("federatedfilesharing","Add remote share"),type:r.passwordRequired?"submit":void 0,variant:"primary",callback:()=>a("close",!0,o.value)}]);return(p,l)=>(f(),u(i(x),{buttons:n.value,"is-form":e.passwordRequired,name:i(t)("federatedfilesharing","Remote share"),onSubmit:l[1]||(l[1]=w=>a("close",!0,o.value))},{default:R(()=>[v("p",null,S(i(t)("federatedfilesharing","Do you want to add the remote share {name} from {owner}@{remote}?",{name:e.name,owner:e.owner,remote:e.remote})),1),e.passwordRequired?(f(),u(i(F),{key:0,modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=w=>o.value=w),class:O(p.$style.remoteShareDialog__password),label:i(t)("federatedfilesharing","Remote share password")},null,8,["modelValue","class","label"])):D("",!0)]),_:1},8,["buttons","is-form","name"]))}}),T="_remoteShareDialog__password_1ccpy_2",U={remoteShareDialog__password:T},V={$style:U},$=k(M,[["__cssModules",V]]);async function I(e,s,r,a=!1){const[o,n]=await E($,{name:e,owner:s,remote:r,passwordRequired:a});if(a&&o)return n;if(!o)throw new Error("Dialog was cancelled")}window.addEventListener("DOMContentLoaded",()=>{L(),q("federatedfilesharing","notificationsEnabled",!0)!==!0&&A(),C("notifications:action:executed",({action:e,notification:s})=>{s.app==="files_sharing"&&s.object_type==="remote_share"&&e.type==="POST"&&m()})});function m(){if(!window?.OCP?.Files?.Router?.goToRoute){window.location.reload();return}window.OCP.Files.Router.goToRoute(null,{...window.OCP.Files.Router.params,fileid:void 0},{...window.OCP.Files.Router.query,dir:"/",openfile:void 0})}function L(){const e=window.OC.Util.History.parseUrlQuery();if(e.remote&&e.token&&e.name){const s=(r,a)=>{r!==!1&&d.post(c("apps/federatedfilesharing/askForFederatedShare"),{remote:a.remote,token:a.token,owner:a.owner,ownerDisplayName:a.ownerDisplayName||a.owner,name:a.name,password:a.password||""}).then(({data:o})=>{Object.hasOwn(o,"legacyMount")?m():N(o.message)}).catch(o=>{j.error("Error while processing incoming share",{error:o}),P(o)&&o.response.data.message?h(o.response.data.message):h(t("federatedfilesharing","Incoming share could not be processed"))})};location.hash="",e.passwordProtected=parseInt(e.protected,10)===1,g(e,e.passwordProtected,s)}}async function A(){const{data:e}=await d.get(c("/apps/files_sharing/api/externalShares"));for(let s=0;s<e.length;++s)g(e[s],!1,function(r,a){r===!1?d.delete(c("/apps/files_sharing/api/externalShares/"+a.id)):d.post(c("/apps/files_sharing/api/externalShares"),{id:a.id}).then(()=>m())})}function g(e,s,r){const a=e.ownerDisplayName||e.owner,o=e.name,n=e.remote.replace(/^https?:\/\//,"").replace(/\/$/,"");I(o,a,n,s).then(p=>r(!0,{...e,password:p})).catch(()=>r(!1,e))}
import{h as _,i as y,j as b,e as t,c as u,o as f,w as R,k as v,m as D,t as S,u as i,n as O,_ as k,l as q,s as C,d,p,q as P}from"./TrayArrowDown-sRwZP_WA.chunk.mjs";import{N as F,a as x,b as N,s as h}from"./Plus-DDsJI2iW.chunk.mjs";import{N as E}from"./TrashCanOutline-avc1vI9P.chunk.mjs";import{l as j}from"./logger-Cu5Dvow_.chunk.mjs";import"./ContentCopy-BEfKgtZW.chunk.mjs";const M=_({__name:"RemoteShareDialog",props:{name:{},owner:{},remote:{},passwordRequired:{type:Boolean}},emits:["close"],setup(e,{emit:s}){const r=e,a=s,o=y(""),n=b(()=>[{label:t("federatedfilesharing","Cancel"),callback:()=>a("close",!1)},{label:t("federatedfilesharing","Add remote share"),type:r.passwordRequired?"submit":void 0,variant:"primary",callback:()=>a("close",!0,o.value)}]);return(c,l)=>(f(),u(i(F),{buttons:n.value,"is-form":e.passwordRequired,name:i(t)("federatedfilesharing","Remote share"),onSubmit:l[1]||(l[1]=w=>a("close",!0,o.value))},{default:R(()=>[v("p",null,S(i(t)("federatedfilesharing","Do you want to add the remote share {name} from {owner}@{remote}?",{name:e.name,owner:e.owner,remote:e.remote})),1),e.passwordRequired?(f(),u(i(E),{key:0,modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=w=>o.value=w),class:O(c.$style.remoteShareDialog__password),label:i(t)("federatedfilesharing","Remote share password")},null,8,["modelValue","class","label"])):D("",!0)]),_:1},8,["buttons","is-form","name"]))}}),T="_remoteShareDialog__password_1ccpy_2",U={remoteShareDialog__password:T},V={$style:U},$=k(M,[["__cssModules",V]]);async function I(e,s,r,a=!1){const[o,n]=await x($,{name:e,owner:s,remote:r,passwordRequired:a});if(a&&o)return n;if(!o)throw new Error("Dialog was cancelled")}window.addEventListener("DOMContentLoaded",()=>{L(),q("federatedfilesharing","notificationsEnabled",!0)!==!0&&A(),C("notifications:action:executed",({action:e,notification:s})=>{s.app==="files_sharing"&&s.object_type==="remote_share"&&e.type==="POST"&&m()})});function m(){if(!window?.OCP?.Files?.Router?.goToRoute){window.location.reload();return}window.OCP.Files.Router.goToRoute(null,{...window.OCP.Files.Router.params,fileid:void 0},{...window.OCP.Files.Router.query,dir:"/",openfile:void 0})}function L(){const e=window.OC.Util.History.parseUrlQuery();if(e.remote&&e.token&&e.name){const s=(r,a)=>{r!==!1&&d.post(p("apps/federatedfilesharing/askForFederatedShare"),{remote:a.remote,token:a.token,owner:a.owner,ownerDisplayName:a.ownerDisplayName||a.owner,name:a.name,password:a.password||""}).then(({data:o})=>{Object.hasOwn(o,"legacyMount")?m():N(o.message)}).catch(o=>{j.error("Error while processing incoming share",{error:o}),P(o)&&o.response.data.message?h(o.response.data.message):h(t("federatedfilesharing","Incoming share could not be processed"))})};location.hash="",e.passwordProtected=parseInt(e.protected,10)===1,g(e,e.passwordProtected,s)}}async function A(){const{data:e}=await d.get(p("/apps/files_sharing/api/externalShares"));for(let s=0;s<e.length;++s)g(e[s],!1,function(r,a){r===!1?d.delete(p("/apps/files_sharing/api/externalShares/"+a.id)):d.post(p("/apps/files_sharing/api/externalShares"),{id:a.id}).then(()=>m())})}function g(e,s,r){const a=e.ownerDisplayName||e.owner,o=e.name,n=e.remote.replace(/^https?:\/\//,"").replace(/\/$/,"");I(o,a,n,s).then(c=>r(!0,{...e,password:c})).catch(()=>r(!1,e))}
//# sourceMappingURL=federatedfilesharing-init-files.mjs.map

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,6 @@
/* extracted by css-entry-points-plugin */
@import './federatedfilesharing-federatedfilesharing-settings-admin-DhbMDSZa.chunk.css';
@import './TrashCanOutline-BE4hS1RR.chunk.css';
@import './ContentCopy-Dywt349j.chunk.css';
@import './TrayArrowDown-D7mIRwIy.chunk.css';
@import './TrashCanOutline-CKjk9wDJ.chunk.css';
@import './ContentCopy-Ck29Gkyh.chunk.css';
@import './Plus-CeFTF6zT.chunk.css';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,6 @@
/* extracted by css-entry-points-plugin */
@import './federatedfilesharing-federatedfilesharing-settings-personal-B56uUkOQ.chunk.css';
@import './TrashCanOutline-BE4hS1RR.chunk.css';
@import './ContentCopy-Dywt349j.chunk.css';
@import './TrayArrowDown-D7mIRwIy.chunk.css';
@import './TrashCanOutline-CKjk9wDJ.chunk.css';
@import './ContentCopy-Ck29Gkyh.chunk.css';
@import './Plus-CeFTF6zT.chunk.css';

View file

@ -1,4 +1,4 @@
import{_ as I,x as d,o,m as i,n as M,t as r,B as S,i as j,l as h,C as w,f as a,j as N,k as _,c as x,w as l,b as f,u as e,d as s,F as J,D as W,N as q,h as E}from"./TrashCanOutline-DKvv_nn_.chunk.mjs";import{h as G,I as K,e as b,i as z}from"./ContentCopy-DXaCAmGe.chunk.mjs";import"./modulepreload-polyfill-BxzAKjcf.chunk.mjs";const Q={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},V=["aria-hidden","aria-label"],X=["fill","width","height"],ee={d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},ae={key:0};function te(c,n,t,k,p,y){return o(),d("span",S(c.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon check-icon",role:"img",onClick:n[0]||(n[0]=g=>c.$emit("click",g))}),[(o(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ee,[t.title?(o(),d("title",ae,r(t.title),1)):M("",!0)])],8,X))],16,V)}const ie=I(Q,[["render",te]]),le={name:"WebIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},re=["aria-hidden","aria-label"],oe=["fill","width","height"],ne={d:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},se={key:0};function de(c,n,t,k,p,y){return o(),d("span",S(c.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon web-icon",role:"img",onClick:n[0]||(n[0]=g=>c.$emit("click",g))}),[(o(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ne,[t.title?(o(),d("title",se,r(t.title),1)):M("",!0)])],8,oe))],16,re)}const ce=I(le,[["render",de]]),ue={class:"social-button"},he=["src"],fe=["src"],pe=["src"],ge={style:{margin:"10px 0"}},me=["href"],Ce=j({__name:"PersonalSettings",setup(c){const n=window.OC.theme.productName,t=h("federatedfilesharing","color"),k=h("federatedfilesharing","textColor"),p=h("federatedfilesharing","cloudId"),y=h("federatedfilesharing","docUrlFederated"),g=h("federatedfilesharing","logoPath"),m=h("federatedfilesharing","reference"),D=w("core","facebook"),F=w("core","mastodon"),L=w("core","bluesky"),U=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID, see {url}",{url:m}),B=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID"),R=`https://mastodon.social/?text=${encodeURIComponent(B)}&url=${encodeURIComponent(m)}`,A=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(m)}`,T=`https://bsky.app/intent/compose?text=${encodeURIComponent(U)}`,O=new URL(g,location.origin),v=N(!1),C=N(!1),$=_(()=>`
import{_ as I,v as d,o,k as i,m as M,t as l,B as S,h as j,l as f,C as w,e as a,i as N,j as _,c as x,w as r,a as h,u as e,b as s,F as J,D as W,N as q,f as E}from"./TrayArrowDown-sRwZP_WA.chunk.mjs";import{d as z}from"./Plus-DDsJI2iW.chunk.mjs";import{d as G,b}from"./TrashCanOutline-avc1vI9P.chunk.mjs";import{I as K}from"./ContentCopy-BEfKgtZW.chunk.mjs";import"./modulepreload-polyfill-BxzAKjcf.chunk.mjs";const Q={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},V=["aria-hidden","aria-label"],X=["fill","width","height"],ee={d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},ae={key:0};function te(c,n,t,k,p,v){return o(),d("span",S(c.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon check-icon",role:"img",onClick:n[0]||(n[0]=g=>c.$emit("click",g))}),[(o(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ee,[t.title?(o(),d("title",ae,l(t.title),1)):M("",!0)])],8,X))],16,V)}const ie=I(Q,[["render",te]]),re={name:"WebIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},le=["aria-hidden","aria-label"],oe=["fill","width","height"],ne={d:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},se={key:0};function de(c,n,t,k,p,v){return o(),d("span",S(c.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon web-icon",role:"img",onClick:n[0]||(n[0]=g=>c.$emit("click",g))}),[(o(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ne,[t.title?(o(),d("title",se,l(t.title),1)):M("",!0)])],8,oe))],16,le)}const ce=I(re,[["render",de]]),ue={class:"social-button"},fe=["src"],he=["src"],pe=["src"],ge={style:{margin:"10px 0"}},me=["href"],Ce=j({__name:"PersonalSettings",setup(c){const n=window.OC.theme.productName,t=f("federatedfilesharing","color"),k=f("federatedfilesharing","textColor"),p=f("federatedfilesharing","cloudId"),v=f("federatedfilesharing","docUrlFederated"),g=f("federatedfilesharing","logoPath"),m=f("federatedfilesharing","reference"),D=w("core","facebook"),F=w("core","mastodon"),L=w("core","bluesky"),U=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID, see {url}",{url:m}),B=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID"),R=`https://mastodon.social/?text=${encodeURIComponent(B)}&url=${encodeURIComponent(m)}`,A=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(m)}`,T=`https://bsky.app/intent/compose?text=${encodeURIComponent(U)}`,O=new URL(g,location.origin),y=N(!1),C=N(!1),$=_(()=>`
padding:10px;
background-color:${t};
color:${k};
@ -6,5 +6,5 @@ import{_ as I,x as d,o,m as i,n as M,t as r,B as S,i as j,l as h,C as w,f as a,j
padding-inline-start:4px;`),H=`background-image:url(${O});width:50px;height:30px;position:relative;top:8px;background-size:contain;display:inline-block;background-repeat:no-repeat; background-position: center center;`,P=_(()=>`<a target="_blank" rel="noreferrer noopener" href="${m}" style="${$.value}">
<span style="${H}"></span>
${a("federatedfilesharing","Share with me via Nextcloud")}
</a>`),Y=_(()=>C.value?a("federatedfilesharing","Cloud ID copied"):a("federatedfilesharing","Copy"));async function Z(){try{await navigator.clipboard.writeText(p),z(a("federatedfilesharing","Cloud ID copied"))}catch{window.prompt(a("federatedfilesharing","Clipboard not available. Please copy the cloud ID manually."),p)}C.value=!0,z(a("federatedfilesharing","Copied!")),setTimeout(()=>{C.value=!1},2e3)}return(ye,u)=>(o(),x(e(q),{name:e(a)("federatedfilesharing","Federated Cloud"),description:e(a)("federatedfilesharing","You can share with anyone who uses a {productName} server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com",{productName:e(n)}),"doc-url":e(y)},{default:l(()=>[f(e(G),{class:"federated-cloud__cloud-id",readonly:"",label:e(a)("federatedfilesharing","Your Federated Cloud ID"),"model-value":e(p),success:C.value,"show-trailing-button":"","trailing-button-label":Y.value,onTrailingButtonClick:Z},{"trailing-button-icon":l(()=>[C.value?(o(),x(ie,{key:0,size:20,"fill-color":"var(--color-border-success)"})):(o(),x(K,{key:1,size:20}))]),_:1},8,["label","model-value","success","trailing-button-label"]),i("p",ue,[s(r(e(a)("federatedfilesharing","Share it so your friends can share files with you:")),1),u[1]||(u[1]=i("br",null,null,-1)),f(e(b),{href:T},{icon:l(()=>[i("img",{class:"social-button__icon",src:e(L)},null,8,he)]),default:l(()=>[s(r(e(a)("federatedfilesharing","Bluesky"))+" ",1)]),_:1}),f(e(b),{href:A},{icon:l(()=>[i("img",{class:"social-button__icon social-button__icon--bright",src:e(D)},null,8,fe)]),default:l(()=>[s(r(e(a)("federatedfilesharing","Facebook"))+" ",1)]),_:1}),f(e(b),{href:R},{icon:l(()=>[i("img",{class:"social-button__icon",src:e(F)},null,8,pe)]),default:l(()=>[s(r(e(a)("federatedfilesharing","Mastodon"))+" ",1)]),_:1}),f(e(b),{class:"social-button__website-button",onClick:u[0]||(u[0]=ve=>v.value=!v.value)},{icon:l(()=>[f(ce,{size:20})]),default:l(()=>[s(" "+r(e(a)("federatedfilesharing","Add to your website")),1)]),_:1})]),v.value?(o(),d(J,{key:0},[i("p",ge,[i("a",{target:"_blank",rel:"noreferrer noopener",href:e(m),style:W($.value)},[i("span",{style:H}),s(" "+r(e(a)("federatedfilesharing","Share with me via {productName}",{productName:e(n)})),1)],12,me)]),i("p",null,[s(r(e(a)("federatedfilesharing","HTML Code:"))+" ",1),u[2]||(u[2]=i("br",null,null,-1)),i("pre",null,r(P.value),1)])],64)):M("",!0)]),_:1},8,["name","description","doc-url"]))}}),be=I(Ce,[["__scopeId","data-v-0b473172"]]),ke=E(be);ke.mount("#vue-personal-federated");
</a>`),Y=_(()=>C.value?a("federatedfilesharing","Cloud ID copied"):a("federatedfilesharing","Copy"));async function Z(){try{await navigator.clipboard.writeText(p),z(a("federatedfilesharing","Cloud ID copied"))}catch{window.prompt(a("federatedfilesharing","Clipboard not available. Please copy the cloud ID manually."),p)}C.value=!0,z(a("federatedfilesharing","Copied!")),setTimeout(()=>{C.value=!1},2e3)}return(ve,u)=>(o(),x(e(q),{name:e(a)("federatedfilesharing","Federated Cloud"),description:e(a)("federatedfilesharing","You can share with anyone who uses a {productName} server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com",{productName:e(n)}),"doc-url":e(v)},{default:r(()=>[h(e(G),{class:"federated-cloud__cloud-id",readonly:"",label:e(a)("federatedfilesharing","Your Federated Cloud ID"),"model-value":e(p),success:C.value,"show-trailing-button":"","trailing-button-label":Y.value,onTrailingButtonClick:Z},{"trailing-button-icon":r(()=>[C.value?(o(),x(ie,{key:0,size:20,"fill-color":"var(--color-border-success)"})):(o(),x(K,{key:1,size:20}))]),_:1},8,["label","model-value","success","trailing-button-label"]),i("p",ue,[s(l(e(a)("federatedfilesharing","Share it so your friends can share files with you:")),1),u[1]||(u[1]=i("br",null,null,-1)),h(e(b),{href:T},{icon:r(()=>[i("img",{class:"social-button__icon",src:e(L)},null,8,fe)]),default:r(()=>[s(l(e(a)("federatedfilesharing","Bluesky"))+" ",1)]),_:1}),h(e(b),{href:A},{icon:r(()=>[i("img",{class:"social-button__icon social-button__icon--bright",src:e(D)},null,8,he)]),default:r(()=>[s(l(e(a)("federatedfilesharing","Facebook"))+" ",1)]),_:1}),h(e(b),{href:R},{icon:r(()=>[i("img",{class:"social-button__icon",src:e(F)},null,8,pe)]),default:r(()=>[s(l(e(a)("federatedfilesharing","Mastodon"))+" ",1)]),_:1}),h(e(b),{class:"social-button__website-button",onClick:u[0]||(u[0]=ye=>y.value=!y.value)},{icon:r(()=>[h(ce,{size:20})]),default:r(()=>[s(" "+l(e(a)("federatedfilesharing","Add to your website")),1)]),_:1})]),y.value?(o(),d(J,{key:0},[i("p",ge,[i("a",{target:"_blank",rel:"noreferrer noopener",href:e(m),style:W($.value)},[i("span",{style:H}),s(" "+l(e(a)("federatedfilesharing","Share with me via {productName}",{productName:e(n)})),1)],12,me)]),i("p",null,[s(l(e(a)("federatedfilesharing","HTML Code:"))+" ",1),u[2]||(u[2]=i("br",null,null,-1)),i("pre",null,l(P.value),1)])],64)):M("",!0)]),_:1},8,["name","description","doc-url"]))}}),be=I(Ce,[["__scopeId","data-v-0b473172"]]),ke=E(be);ke.mount("#vue-personal-federated");
//# sourceMappingURL=federatedfilesharing-settings-personal.mjs.map

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,6 @@
/* extracted by css-entry-points-plugin */
@import './files_reminders-files_reminders-init-DFVBcfn7.chunk.css';
@import './TrashCanOutline-BE4hS1RR.chunk.css';
@import './ContentCopy-Dywt349j.chunk.css';
@import './TrayArrowDown-D7mIRwIy.chunk.css';
@import './TrashCanOutline-CKjk9wDJ.chunk.css';
@import './ContentCopy-Ck29Gkyh.chunk.css';
@import './Plus-CeFTF6zT.chunk.css';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,6 @@
/* extracted by css-entry-points-plugin */
@import './files_trashbin-files_trashbin-init-nOmQ7X71.chunk.css';
@import './TrashCanOutline-BE4hS1RR.chunk.css';
@import './ContentCopy-Dywt349j.chunk.css';
@import './TrayArrowDown-D7mIRwIy.chunk.css';
@import './TrashCanOutline-CKjk9wDJ.chunk.css';
@import './ContentCopy-Ck29Gkyh.chunk.css';
@import './Plus-CeFTF6zT.chunk.css';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,6 @@
/* extracted by css-entry-points-plugin */
@import './files_versions-files_versions-sidebar-tab-DbvfeGRa.chunk.css';
@import './TrashCanOutline-BE4hS1RR.chunk.css';
@import './ContentCopy-Dywt349j.chunk.css';
@import './TrayArrowDown-D7mIRwIy.chunk.css';
@import './TrashCanOutline-CKjk9wDJ.chunk.css';
@import './ContentCopy-Ck29Gkyh.chunk.css';
@import './Plus-CeFTF6zT.chunk.css';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/index-Dqjjhtll.chunk.mjs vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

10
dist/index-wzXhnBCQ.chunk.mjs vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,2 +0,0 @@
import{g as e}from"./ContentCopy-DXaCAmGe.chunk.mjs";const o=e().setApp("federatedfilesharing").build();export{o as l};
//# sourceMappingURL=logger-BmseY7xk.chunk.mjs.map

2
dist/logger-CniESSWM.chunk.mjs vendored Normal file
View file

@ -0,0 +1,2 @@
import{g as t}from"./TrashCanOutline-avc1vI9P.chunk.mjs";const o=t().setApp("dav").detectUser().build();export{o as l};
//# sourceMappingURL=logger-CniESSWM.chunk.mjs.map

View file

@ -1 +1 @@
{"version":3,"file":"logger-DKdRkjXT.chunk.mjs","sources":["../build/frontend/apps/dav/src/service/logger.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport const logger = getLoggerBuilder()\n\t.setApp('dav')\n\t.detectUser()\n\t.build()\n"],"names":["logger","getLoggerBuilder"],"mappings":"qDAOO,MAAMA,EAASC,IACpB,OAAO,KAAK,EACZ,WAAA,EACA,MAAA"}
{"version":3,"file":"logger-CniESSWM.chunk.mjs","sources":["../build/frontend/apps/dav/src/service/logger.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport const logger = getLoggerBuilder()\n\t.setApp('dav')\n\t.detectUser()\n\t.build()\n"],"names":["logger","getLoggerBuilder"],"mappings":"yDAOO,MAAMA,EAASC,IACpB,OAAO,KAAK,EACZ,WAAA,EACA,MAAA"}

2
dist/logger-Cu5Dvow_.chunk.mjs vendored Normal file
View file

@ -0,0 +1,2 @@
import{g as e}from"./TrashCanOutline-avc1vI9P.chunk.mjs";const o=e().setApp("federatedfilesharing").build();export{o as l};
//# sourceMappingURL=logger-Cu5Dvow_.chunk.mjs.map

View file

@ -1 +1 @@
{"version":3,"file":"logger-BmseY7xk.chunk.mjs","sources":["../build/frontend/apps/federatedfilesharing/src/services/logger.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nconst logger = getLoggerBuilder()\n\t.setApp('federatedfilesharing')\n\t.build()\nexport default logger\n"],"names":["logger","getLoggerBuilder"],"mappings":"qDAOA,MAAMA,EAASC,EAAA,EACb,OAAO,sBAAsB,EAC7B,MAAA"}
{"version":3,"file":"logger-Cu5Dvow_.chunk.mjs","sources":["../build/frontend/apps/federatedfilesharing/src/services/logger.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nconst logger = getLoggerBuilder()\n\t.setApp('federatedfilesharing')\n\t.build()\nexport default logger\n"],"names":["logger","getLoggerBuilder"],"mappings":"yDAOA,MAAMA,EAASC,EAAA,EACb,OAAO,sBAAsB,EAC7B,MAAA"}

View file

@ -1,2 +0,0 @@
import{g as t}from"./ContentCopy-DXaCAmGe.chunk.mjs";const o=t().setApp("dav").detectUser().build();export{o as l};
//# sourceMappingURL=logger-DKdRkjXT.chunk.mjs.map

Some files were not shown because too many files have changed in this diff Show more