Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/dialog/components/RecipientRow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ function mountRow(r: SharingRecipient = recipient()) {
return { wrapper, share }
}

/** Click the "Remove participant" action, found by its label. */
/** Click the "Remove recipient" action, found by its label. */
async function clickRemove(wrapper: ReturnType<typeof mountRow>['wrapper']) {
const action = wrapper.findAllComponents({ name: 'NcActionButton' })
.find((button) => button.text().includes('Remove participant'))
.find((button) => button.text().includes('Remove recipient'))
expect(action, 'the remove action is rendered').toBeDefined()
action!.vm.$emit('click')
await nextTick()
Expand Down
2 changes: 1 addition & 1 deletion lib/dialog/components/RecipientRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<template #icon>
<NcIconSvgWrapper :svg="IconDelete" :size="20" />
</template>
{{ t('Remove participant') }}
{{ t('Remove recipient') }}
</NcActionButton>
</NcActions>

Expand Down
12 changes: 6 additions & 6 deletions lib/dialog/components/SharePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
:modelValue="selectedRecipients"
class="share-panel__recipient-search"
:multiple="true"
:inputLabel="t('Add people')"
:inputLabel="t('Add recipient')"
:options="results"
:loading="searching"
:placeholder="t('Name, team, email or federated cloud ID')"
Expand Down Expand Up @@ -241,17 +241,17 @@ const isDraft = computed(() => props.share.state === 'draft')
const invitedRecipients = computed(() => props.share.recipients.filter((recipient) => recipient.class !== RECIPIENT_TYPE_TOKEN))

/**
* Ask before dropping the invited people when switching to a public link.
* Ask before dropping the recipients when switching to a public link.
*
* @param count Number of invited people that would be removed
* @param count Number of recipients that would be removed
*/
async function confirmDropInvited(count: number): Promise<boolean> {
let confirmed = false
const dialog = (new DialogBuilder())
.setName(t('Share with anyone'))
.setText(n(
'Switching to a public link removes %n invited person from this share.',
'Switching to a public link removes %n invited people from this share.',
'Switching to a public link removes %n recipient from this share.',
'Switching to a public link removes %n recipients from this share.',
count,
))
.setButtons([
Expand All @@ -278,7 +278,7 @@ async function confirmDropInvited(count: number): Promise<boolean> {
}

/**
* Switch the share type. A public link cannot keep invited people, so confirm
* Switch the share type. A public link cannot keep its recipients, so confirm
* and remove them first.
*
* @param tab The tab to switch to
Expand Down
2 changes: 1 addition & 1 deletion tests/ct/RecipientRow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test('removes the recipient from the menu', async ({ mount, page }) => {
}
const component = await mount(Fixture, { on: { removed: onRemoved } })
await component.getByRole('button', { name: 'Recipient actions' }).click()
await page.getByRole('menuitem', { name: 'Remove participant' }).click()
await page.getByRole('menuitem', { name: 'Remove recipient' }).click()
expect(removed).toBe(true)
})

Expand Down
Loading