Skip to content

Commit

Permalink
fix(MemberPicker): Rename "users" to "accounts" and "people" to "memb…
Browse files Browse the repository at this point in the history
…ers"

* Mention collective name in title: "Add members to <name>".
* Change "Create" button to "Create without members" if no members are
  picked.

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Nov 10, 2023
1 parent a19740e commit a098f0b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/collective.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('Collective', function() {
cy.get('button span.circles-icon').click()
// cy.get('.circle-selector ul').should('not.contain', 'Foreign')
cy.get('.circle-selector li [title*=History]').click()
cy.get('button').contains('Add people').click()
cy.get('button').contains('Add members').click()
cy.get('button').contains('Create').click()

cy.get('#titleform input').invoke('val').should('contain', 'History Club')
Expand Down
4 changes: 2 additions & 2 deletions src/components/Member/MemberPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:value.sync="searchQuery"
type="text"
:show-trailing-button="isSearching"
:label="t('collectives', 'Search users, groups, circles…')"
:label="t('collectives', 'Search accounts, groups, circles…')"
@trailing-button-click="clearSearch"
@input="onSearch">
<MagnifyIcon :size="16" />
Expand Down Expand Up @@ -35,7 +35,7 @@

<!-- No search results -->
<template v-else-if="currentUserIsAdmin && !showCurrentSkeleton">
<NcAppNavigationCaption class="member-picker-caption" :title="t('collectives', 'Add users, groups or circles…')" />
<NcAppNavigationCaption class="member-picker-caption" :title="t('collectives', 'Add accounts, groups or circles…')" />
<Hint v-if="!isSearching" :hint="t('collectives', 'Search for members to add.')" />
<Hint v-else-if="isSearchLoading" :hint="t('collectives', 'Loading…')" />
<Hint v-else :hint="t('collectives', 'No search results')" />
Expand Down
2 changes: 1 addition & 1 deletion src/components/Member/MemberSearchResults.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="member-search-results">
<template v-if="addableUsers.length !== 0">
<NcAppNavigationCaption :title="t('collectives', 'Add users')"
<NcAppNavigationCaption :title="t('collectives', 'Add accounts')"
class="member-picker-caption" />
<Member v-for="item in addableUsers"
:key="generateKey(item)"
Expand Down
12 changes: 9 additions & 3 deletions src/components/Nav/NewCollectiveModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@
:disabled="!newCollectiveName || nameIsInvalid"
class="modal-buttons-right"
@click="advanceToMembers">
{{ t('collectives', 'Add people') }}
{{ t('collectives', 'Add members') }}
</NcButton>
</div>
</div>

<div v-else-if="state === 1" class="modal-collective-wrapper">
<h2 class="modal-collective-title">
{{ t('collectives', 'Add people') }}
{{ t('collectives', 'Add members to {name}', { name: newCollectiveName }) }}
</h2>

<div class="modal-collective-members">
Expand All @@ -99,7 +99,7 @@
:disabled="loading"
class="modal-buttons-right"
@click="onCreate">
{{ t('collectives', 'Create') }}
{{ createButtonString }}
</NcButton>
</div>
</div>
Expand Down Expand Up @@ -207,6 +207,12 @@ export default {
hasSelectedMembersWithoutSelf() {
return Object.keys(this.selectedMembersWithoutSelf).length !== 0
},
createButtonString() {
return this.hasSelectedMembersWithoutSelf
? t('collectives', 'Create')
: t('collectives', 'Create without members')
},
},
mounted() {
Expand Down

0 comments on commit a098f0b

Please sign in to comment.