Skip to content

Commit

Permalink
feat: Rebrand circles to teams in the frontend
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Feb 21, 2024
1 parent 40bd712 commit 45b7dca
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion img/circles.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/components/AppContent/CircleContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@

<template>
<AppContent v-if="!circle">
<EmptyContent :name="t('contacts', 'Please select a circle')">
<EmptyContent :name="t('contacts', 'Please select a team')">

Check warning on line 25 in src/components/AppContent/CircleContent.vue

View check run for this annotation

Codecov / codecov/patch

src/components/AppContent/CircleContent.vue#L25

Added line #L25 was not covered by tests
<template #icon>
<IconCircles :size="20" />
</template>
</EmptyContent>
</AppContent>

<AppContent v-else-if="loading">
<EmptyContent class="empty-content" :name="t('contacts', 'Loading circle …')">
<EmptyContent class="empty-content" :name="t('contacts', 'Loading team…')">

Check warning on line 33 in src/components/AppContent/CircleContent.vue

View check run for this annotation

Codecov / codecov/patch

src/components/AppContent/CircleContent.vue#L33

Added line #L33 was not covered by tests
<template #icon>
<IconLoading :size="20" />
</template>
Expand All @@ -50,7 +50,7 @@
<!-- not a member -->
<template v-if="!circle.isMember">
<!-- Pending request validation -->
<EmptyContent v-if="circle.isPendingMember" :name="t('contacts', 'Your request to join this circle is pending approval')">
<EmptyContent v-if="circle.isPendingMember" :name="t('contacts', 'Your request to join this team is pending approval')">

Check warning on line 53 in src/components/AppContent/CircleContent.vue

View check run for this annotation

Codecov / codecov/patch

src/components/AppContent/CircleContent.vue#L53

Added line #L53 was not covered by tests
<template #icon>
<IconLoading :size="20" />
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/components/AppNavigation/CircleNavigationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<!-- leave circle -->
<ActionButton v-if="circle.canLeave"
@click="confirmLeaveCircle">
{{ t('contacts', 'Leave circle') }}
{{ t('contacts', 'Leave team') }}

Check warning on line 60 in src/components/AppNavigation/CircleNavigationItem.vue

View check run for this annotation

Codecov / codecov/patch

src/components/AppNavigation/CircleNavigationItem.vue#L60

Added line #L60 was not covered by tests
<ExitToApp slot="icon"
:size="16"
decorative />
Expand All @@ -79,7 +79,7 @@
<template #icon>
<IconDelete :size="20" />
</template>
{{ t('contacts', 'Delete circle') }}
{{ t('contacts', 'Delete team') }}
</ActionButton>
</template>

Expand Down
14 changes: 7 additions & 7 deletions src/components/AppNavigation/RootNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@

<!-- New circle button caption and modal -->
<AppNavigationCaption id="newcircle"
:name="t('contacts', 'Circles')">
:name="t('contacts', 'Teams')">
<template #actions>
<NcActionButton @click="toggleNewCircleModal">
<template #icon>
<IconAdd :size="20" />
</template>
{{ t('contacts', 'Create a new circle') }}
{{ t('contacts', 'Create a new team') }}

Check warning on line 141 in src/components/AppNavigation/RootNavigation.vue

View check run for this annotation

Codecov / codecov/patch

src/components/AppNavigation/RootNavigation.vue#L141

Added line #L141 was not covered by tests
</NcActionButton>
</template>
</AppNavigationCaption>
Expand Down Expand Up @@ -390,8 +390,8 @@ export default {
},
collapseCirclesTitle() {
return this.collapsedCircles
? t('contacts', 'Show all circles')
: t('contacts', 'Collapse circles')
? t('contacts', 'Show all teams')
: t('contacts', 'Collapse teams')

Check warning on line 394 in src/components/AppNavigation/RootNavigation.vue

View check run for this annotation

Codecov / codecov/patch

src/components/AppNavigation/RootNavigation.vue#L393-L394

Added lines #L393 - L394 were not covered by tests
},
},

Expand Down Expand Up @@ -437,13 +437,13 @@ export default {
this.isNewCircleModalOpen = true
},
async createNewCircle(circleName, isPersonal, isLocal) {
this.logger.debug('Creating new circle', { circleName })
this.logger.debug('Creating new team', { circleName })

this.createCircleLoading = true

// Check if already exists
if (this.circles.find(circle => circle.name === circleName)) {
this.createCircleError = t('contacts', 'This circle already exists')
this.createCircleError = t('contacts', 'This team already exists')

Check warning on line 446 in src/components/AppNavigation/RootNavigation.vue

View check run for this annotation

Codecov / codecov/patch

src/components/AppNavigation/RootNavigation.vue#L446

Added line #L446 was not covered by tests
return
}
this.createCircleError = null
Expand All @@ -460,7 +460,7 @@ export default {
},
})
} catch (error) {
showError(t('contacts', 'An error happened during the creation of the circle'))
showError(t('contacts', 'An error happened during the creation of the team'))
} finally {
this.createCircleLoading = false
}
Expand Down
16 changes: 8 additions & 8 deletions src/components/CircleDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<template #title>
<input v-model="circle.displayName"
:readonly="!circle.isOwner"
:placeholder="t('contacts', 'Circle name')"
:placeholder="t('contacts', 'Team name')"
type="text"
autocomplete="off"
autocorrect="off"
Expand All @@ -48,7 +48,7 @@

<!-- org, title -->
<template v-if="!circle.isOwner" #subtitle>
{{ t('contacts', 'Circle owned by {owner}', { owner: circle.owner.displayName}) }}
{{ t('contacts', 'Team owned by {owner}', { owner: circle.owner.displayName}) }}
</template>
</DetailsHeader>

Expand Down Expand Up @@ -105,7 +105,7 @@
<Logout slot="icon"
:size="16"
decorative />
{{ t('contacts', 'Leave circle') }}
{{ t('contacts', 'Leave team') }}

Check warning on line 108 in src/components/CircleDetails.vue

View check run for this annotation

Codecov / codecov/patch

src/components/CircleDetails.vue#L108

Added line #L108 was not covered by tests
</Button>

<!-- delete circle -->
Expand All @@ -116,7 +116,7 @@
<template #icon>
<IconDelete :size="20" />
</template>
{{ t('contacts', 'Delete circle') }}
{{ t('contacts', 'Delete team') }}
</Button>
</section>
</AppContentDetails>
Expand Down Expand Up @@ -173,9 +173,9 @@ export default {
computed: {
descriptionPlaceholder() {
if (this.circle.description.trim() === '') {
return t('contacts', 'There is no description for this circle')
return t('contacts', 'There is no description for this team')
}
return t('contacts', 'Enter a description for the circle')
return t('contacts', 'Enter a description for the team')
},

isEmptyDescription() {
Expand Down Expand Up @@ -211,7 +211,7 @@ export default {
try {
await editCircle(this.circle.id, CircleEdit.Description, description)
} catch (error) {
console.error('Unable to edit circle description', description, error)
console.error('Unable to edit team description', description, error)
showError(t('contacts', 'An error happened during description sync'))
} finally {
this.loadingDescription = false
Expand All @@ -226,7 +226,7 @@ export default {
try {
await editCircle(this.circle.id, CircleEdit.Name, name)
} catch (error) {
console.error('Unable to edit circle name', name, error)
console.error('Unable to edit name', name, error)
showError(t('contacts', 'An error happened during name sync'))
} finally {
this.loadingName = false
Expand Down
4 changes: 2 additions & 2 deletions src/components/CircleDetails/CirclePasswordSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
:disabled="loading.length > 0"
wrapper-element="li"
@update:checked="changePasswordProtection">
{{ t('contacts', 'Enforce password protection on files shared to this circle') }}
{{ t('contacts', 'Enforce password protection on files shared to this team') }}

Check warning on line 36 in src/components/CircleDetails/CirclePasswordSettings.vue

View check run for this annotation

Codecov / codecov/patch

src/components/CircleDetails/CirclePasswordSettings.vue#L36

Added line #L36 was not covered by tests
</CheckboxRadioSwitch>

<CheckboxRadioSwitch v-if="enforcePasswordProtection"
Expand All @@ -42,7 +42,7 @@
:disabled="loading.length > 0"
wrapper-element="li"
@update:checked="changeUseUniquePassword">
{{ t('contacts', 'Use a unique password for all shares to this circle') }}
{{ t('contacts', 'Use a unique password for all shares to this team') }}
</CheckboxRadioSwitch>

<li class="unique-password">
Expand Down
12 changes: 6 additions & 6 deletions src/components/EntityPicker/NewCircleIntro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div class="entity-picker__new">
<input ref="input"
v-model="circleName"
:placeholder="t('contacts', 'New circle name')"
:placeholder="t('contacts', 'New team name')"
class="entity-picker__new-input"
type="text"
@keypress.enter="onSubmit">
Expand All @@ -42,21 +42,21 @@
<template v-if="false">
<CheckboxRadioSwitch :checked.sync="isPersonal"
:disabled="loading !== false">
{{ t('contacts', 'Personal circle') }}
{{ t('contacts', 'Personal team') }}

Check warning on line 45 in src/components/EntityPicker/NewCircleIntro.vue

View check run for this annotation

Codecov / codecov/patch

src/components/EntityPicker/NewCircleIntro.vue#L45

Added line #L45 was not covered by tests
</CheckboxRadioSwitch>
<p>
{{ t('contacts', 'This circle will only be visible to you. Other members will not be able to see or use it.') }}
{{ t('contacts', 'This team will only be visible to you. Other members will not be able to see or use it.') }}
</p>
</template>

<!-- Local circle -->
<template v-if="isGlobalScale">
<CheckboxRadioSwitch :checked.sync="isLocal"
:disabled="loading !== false">
{{ t('contacts', 'Local circle') }}
{{ t('contacts', 'Local team') }}

Check warning on line 56 in src/components/EntityPicker/NewCircleIntro.vue

View check run for this annotation

Codecov / codecov/patch

src/components/EntityPicker/NewCircleIntro.vue#L56

Added line #L56 was not covered by tests
</CheckboxRadioSwitch>
<p>
{{ t('contacts', 'This circle will not be shared with the other instances of the global scale') }}
{{ t('contacts', 'This team will not be shared with the other instances of the global scale') }}

Check warning on line 59 in src/components/EntityPicker/NewCircleIntro.vue

View check run for this annotation

Codecov / codecov/patch

src/components/EntityPicker/NewCircleIntro.vue#L59

Added line #L59 was not covered by tests
</p>
</template>
</div>
Expand All @@ -70,7 +70,7 @@
<button :disabled="isEmptyName || loading"
class="navigation__button-right primary"
@click="onSubmit">
{{ t('contacts', 'Create circle') }}
{{ t('contacts', 'Create team') }}
</button>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/components/MemberList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</EmptyContent>
</template>
<template v-else-if="!circle.isMember">
<EmptyContent class="empty-content" :name="t('contacts', 'The list of members is only visible to members of this circle')">
<EmptyContent class="empty-content" :name="t('contacts', 'The list of members is only visible to members of this team')">
<template #icon>
<IconContact :size="20" />
</template>
Expand Down Expand Up @@ -60,7 +60,7 @@
<template #icon>
<IconInfo :size="20" />
</template>
{{ t('contacts', 'Show circle details') }}
{{ t('contacts', 'Show team details') }}

Check warning on line 63 in src/components/MemberList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/MemberList.vue#L63

Added line #L63 was not covered by tests
</Button>
</div>

Expand Down Expand Up @@ -294,7 +294,7 @@ export default {

this.resetPicker()
} catch (error) {
showError(t('contacts', 'There was an issue adding members to the circle'))
showError(t('contacts', 'There was an issue adding members to the team'))
console.error('There was an issue adding members to the circle', this.pickerCircle, error)
} finally {
this.pickerLoading = false
Expand Down
2 changes: 1 addition & 1 deletion src/components/MembersList/MembersListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

<!-- Leave or delete member from circle -->
<ActionButton v-if="isCurrentUser && !circle.isOwner" @click="deleteMember">
{{ t('contacts', 'Leave circle') }}
{{ t('contacts', 'Leave team') }}
<ExitToApp slot="icon"
:size="16"
decorative />
Expand Down
12 changes: 6 additions & 6 deletions src/mixins/CircleActionsMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {
if (this.circle.requireJoinAccept) {
return t('contacts', 'Request to join')
}
return t('contacts', 'Join circle')
return t('contacts', 'Join team')

Check warning on line 67 in src/mixins/CircleActionsMixin.js

View check run for this annotation

Codecov / codecov/patch

src/mixins/CircleActionsMixin.js#L67

Added line #L67 was not covered by tests
},
},

Expand All @@ -74,7 +74,7 @@ export default {
t('contacts', 'You are about to leave {circle}.\nAre you sure?', {
circle: this.circle.displayName,
}),
t('contacts', 'Please confirm circle leave'),
t('contacts', 'Please confirm team leave'),
OC.dialogs.YES_NO_BUTTONS,
this.leaveCircle,
true,
Expand All @@ -99,7 +99,7 @@ export default {
this.circle.initiator = null
} catch (error) {
console.error('Could not leave the circle', member, error)
showError(t('contacts', 'Could not leave the circle {displayName}', this.circle))
showError(t('contacts', 'Could not leave the team {displayName}', this.circle))

Check warning on line 102 in src/mixins/CircleActionsMixin.js

View check run for this annotation

Codecov / codecov/patch

src/mixins/CircleActionsMixin.js#L102

Added line #L102 was not covered by tests
} finally {
this.loadingAction = false
}
Expand All @@ -118,7 +118,7 @@ export default {
// Append new member
member.circle.addMember(member)
} catch (error) {
showError(t('contacts', 'Unable to join the circle'))
showError(t('contacts', 'Unable to join the team'))

Check warning on line 121 in src/mixins/CircleActionsMixin.js

View check run for this annotation

Codecov / codecov/patch

src/mixins/CircleActionsMixin.js#L121

Added line #L121 was not covered by tests
console.error('Unable to join the circle', error)
} finally {
this.loadingJoin = false
Expand All @@ -131,7 +131,7 @@ export default {
t('contacts', 'You are about to delete {circle}.\nAre you sure?', {
circle: this.circle.displayName,
}),
t('contacts', 'Please confirm circle deletion'),
t('contacts', 'Please confirm team deletion'),
OC.dialogs.YES_NO_BUTTONS,
this.deleteCircle,
true,
Expand All @@ -148,7 +148,7 @@ export default {
try {
this.$store.dispatch('deleteCircle', this.circle.id)
} catch (error) {
showError(t('contacts', 'Unable to delete the circle'))
showError(t('contacts', 'Unable to delete the team'))

Check warning on line 151 in src/mixins/CircleActionsMixin.js

View check run for this annotation

Codecov / codecov/patch

src/mixins/CircleActionsMixin.js#L151

Added line #L151 was not covered by tests
} finally {
this.loadingAction = false
}
Expand Down
14 changes: 7 additions & 7 deletions src/models/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const MEMBER_TYPE_MAIL: MemberType = 4
const MEMBER_TYPE_CONTACT: MemberType = 8
const MEMBER_TYPE_CIRCLE: MemberType = 16

export const CIRCLE_DESC = t('contacts', 'Circles are groups of people that you can create yourself and with whom you can share data. They can be made up of other accounts or groups of accounts of the Nextcloud instance, but also of contacts from your address book or even external people by simply entering their e-mail addresses.')
export const CIRCLE_DESC = t('contacts', 'Teams are groups of people that you can create yourself and with whom you can share data. They can be made up of other accounts or groups of accounts of the Nextcloud instance, but also of contacts from your address book or even external people by simply entering their e-mail addresses.')

// Circles config flags
/* eslint-disable no-tabs */
Expand All @@ -90,7 +90,7 @@ const CIRCLE_CONFIG_FEDERATED: CircleConfig = 32768 // Federated

// Existing members types
export const CIRCLES_MEMBER_TYPES = {
[MEMBER_TYPE_CIRCLE]: t('contacts', 'Circle'),
[MEMBER_TYPE_CIRCLE]: t('contacts', 'Team'),
[MEMBER_TYPE_USER]: t('contacts', 'User'),
[MEMBER_TYPE_GROUP]: t('contacts', 'Group'),
[MEMBER_TYPE_MAIL]: t('contacts', 'Email'),
Expand Down Expand Up @@ -121,10 +121,10 @@ export const PUBLIC_CIRCLE_CONFIG = {
[CIRCLE_CONFIG_VISIBLE]: t('contacts', 'Visible to everyone'),
},

[t('contacts', 'Circle membership')]: {
[t('contacts', 'Team membership')]: {
// TODO: implement backend
// [CIRCLE_CONFIG_CIRCLE_INVITE]: t('contacts', 'Circle must confirm when invited in another circle'),
[CIRCLE_CONFIG_ROOT]: t('contacts', 'Prevent circle from being a member of another circle'),
// [CIRCLE_CONFIG_CIRCLE_INVITE]: t('contacts', 'Team must confirm when invited in another circle'),
[CIRCLE_CONFIG_ROOT]: t('contacts', 'Prevent teams from being a member of another team'),
},
}

Expand Down Expand Up @@ -158,7 +158,7 @@ export const CIRCLES_MEMBER_GROUPING = [
// },
{
id: `picker-${Type.SHARE_TYPE_CIRCLE}`,
label: t('contacts', 'Circles'),
label: t('contacts', 'Teams'),
share: Type.SHARE_TYPE_CIRCLE,
type: MEMBER_TYPE_CIRCLE,
},
Expand All @@ -171,7 +171,7 @@ export const CIRCLES_MEMBER_GROUPING = [
// TODO: implement SHARE_TYPE_CONTACT
{
id: 'picker-contact',
label: t('contacts', 'Contacts'),
label: t('contacts', 'Teams'),
share: Type.SHARE_TYPE_EMAIL,
type: MEMBER_TYPE_CONTACT,
},
Expand Down
6 changes: 3 additions & 3 deletions src/store/circles.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const actions = {
})

if (failure) {
showError(t('contacts', 'An error has occurred in circle(s). Check the console for more details.'))
showError(t('contacts', 'An error has occurred in team(s). Check the console for more details.'))

Check warning on line 143 in src/store/circles.js

View check run for this annotation

Codecov / codecov/patch

src/store/circles.js#L143

Added line #L143 was not covered by tests
}

return circles
Expand Down Expand Up @@ -200,7 +200,7 @@ const actions = {
return circle
} catch (error) {
console.error(error)
showError(t('contacts', 'Unable to create circle {circleName}', { circleName }))
showError(t('contacts', 'Unable to create team {circleName}', { circleName }))

Check warning on line 203 in src/store/circles.js

View check run for this annotation

Codecov / codecov/patch

src/store/circles.js#L203

Added line #L203 was not covered by tests
}
},

Expand All @@ -218,7 +218,7 @@ const actions = {
logger.debug('Deleted circle', { circleId })
} catch (error) {
console.error(error)
showError(t('contacts', 'Unable to delete circle {circleId}', circleId))
showError(t('contacts', 'Unable to delete team {circleId}', circleId))

Check warning on line 221 in src/store/circles.js

View check run for this annotation

Codecov / codecov/patch

src/store/circles.js#L221

Added line #L221 was not covered by tests
}
},

Expand Down

0 comments on commit 45b7dca

Please sign in to comment.