Skip to content

Commit 01b9939

Browse files
committed
feat(takeout): add a takeout section to the account settings
Shows the export component in its own section of the account page, next to the GDPR export.
1 parent 944729f commit 01b9939

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

packages/web-runtime/src/pages/account.vue

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,28 @@
255255
</oc-td>
256256
</oc-tr>
257257
</account-table>
258+
259+
<account-table
260+
v-if="showTakeout"
261+
:title="$gettext('Takeout')"
262+
:fields="[
263+
$gettext('Takeout action name'),
264+
$gettext('Takeout action description'),
265+
$gettext('Takeout actions')
266+
]"
267+
class="account-page-takeout"
268+
>
269+
<oc-tr class="account-page-takeout">
270+
<oc-td>{{ $gettext('Export') }}</oc-td>
271+
<oc-td>
272+
<span v-text="$gettext('Export all your files from CERNBox')" />
273+
</oc-td>
274+
<oc-td data-testid="takeout">
275+
<takeout />
276+
</oc-td>
277+
</oc-tr>
278+
</account-table>
279+
258280
<account-table
259281
v-if="showGdprExport"
260282
:title="$gettext('GDPR')"
@@ -313,6 +335,7 @@ import QuotaInformation from '../components/Account/QuotaInformation.vue'
313335
import AccountTable from '../components/Account/AccountTable.vue'
314336
import { useNotificationsSettings } from '../composables/notificationsSettings'
315337
import { captureException } from '@sentry/vue'
338+
import Takeout from '../components/Account/Takeout.vue'
316339
317340
const MOBILE_BREAKPOINT = 800
318341
export default defineComponent({
@@ -323,7 +346,8 @@ export default defineComponent({
323346
GdprExport,
324347
ExtensionPreference,
325348
ThemeSwitcher,
326-
AccountTable
349+
AccountTable,
350+
Takeout
327351
},
328352
setup() {
329353
const { showMessage, showErrorMessage } = useMessages()
@@ -373,6 +397,9 @@ export default defineComponent({
373397
spacesStore.personalSpace
374398
)
375399
})
400+
const showTakeout = computed(() => {
401+
return authStore.userContextReady
402+
})
376403
const showChangePassword = computed(() => {
377404
return authStore.userContextReady && !capabilityStore.graphUsersChangeSelfPasswordDisabled
378405
})
@@ -754,6 +781,7 @@ export default defineComponent({
754781
accountEditLink: computed(() => configStore.options.accountEditLink),
755782
showLogout,
756783
showGdprExport,
784+
showTakeout,
757785
showNotifications,
758786
showAccountSection,
759787
showChangePassword,

0 commit comments

Comments
 (0)