Skip to content

Commit

Permalink
upgrade: nc vue components title -> name
Browse files Browse the repository at this point in the history
Nextcloud Vue 8 expects the name attribute
to keep the title attribute for actual element titles

Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed Dec 28, 2023
1 parent e3fae5c commit d2875bf
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 43 deletions.
2 changes: 1 addition & 1 deletion src/components/CollectiveNotFound.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NcEmptyContent :title="t('collectives', 'Collective not found: {collective}', { collective: collectiveParam })"
<NcEmptyContent :name="t('collectives', 'Collective not found: {collective}', { collective: collectiveParam })"
:description="t('collectives', 'You\'re not part of a collective with that name.')">
<template #icon>
<CollectivesIcon />
Expand Down
2 changes: 1 addition & 1 deletion src/components/CollectivePrint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name="sharingToken"
:value="shareTokenParam">
<NcEmptyContent v-show="loading"
:title="t('collectives', 'Preparing collective for exporting or printing')">
:name="t('collectives', 'Preparing collective for exporting or printing')">
<template #icon>
<DownloadIcon />
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Member/CurrentMembers.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="current-members">
<NcAppNavigationCaption v-if="isSearching"
:title="t('collectives', 'Members')" />
:name="t('collectives', 'Members')" />
<Member v-for="item in searchedMembers"
:key="item.singleId"
:circle-id="circleId"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Member/MemberPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<!-- No search results -->
<template v-else-if="currentUserIsAdmin && !showCurrentSkeleton">
<NcAppNavigationCaption class="member-picker-caption" :title="t('collectives', 'Add accounts, groups or circles…')" />
<NcAppNavigationCaption class="member-picker-caption" :name="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
6 changes: 3 additions & 3 deletions 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 accounts')"
<NcAppNavigationCaption :name="t('collectives', 'Add accounts')"
class="member-picker-caption" />
<Member v-for="item in addableUsers"
:key="generateKey(item)"
Expand All @@ -16,7 +16,7 @@
</template>

<template v-if="addableGroups.length !== 0">
<NcAppNavigationCaption :title="t('collectives', 'Add groups')"
<NcAppNavigationCaption :name="t('collectives', 'Add groups')"
class="member-picker-caption" />
<Member v-for="item in addableGroups"
:key="generateKey(item)"
Expand All @@ -31,7 +31,7 @@
</template>

<template v-if="addableCircles.length !== 0">
<NcAppNavigationCaption :title="t('collectives', 'Add circles')"
<NcAppNavigationCaption :name="t('collectives', 'Add circles')"
class="member-picker-caption" />
<Member v-for="item in addableCircles"
:key="generateKey(item)"
Expand Down
11 changes: 5 additions & 6 deletions src/components/Nav/CollectiveSettings.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<NcAppSettingsDialog :open.sync="showSettings"
:title="t('collectives', 'Collective settings')"
:name="t('collectives', 'Collective settings')"
:show-navigation="true">
<NcAppSettingsSection id="name-and-emoji" :title="t('collectives', 'Name and emoji')">
<NcAppSettingsSection id="name-and-emoji" :name="t('collectives', 'Name and emoji')">
<div class="collective-name">
<NcEmojiPicker :show-preview="true"
:allow-unselect="true"
Expand All @@ -11,7 +11,6 @@
@unselect="unselectEmoji">
<NcButton type="tertiary"
:aria-label="t('collectives', 'Select emoji for collective')"
:title="emojiTitle"
:class="{'loading': loading('updateCollectiveEmoji') || loading('renameCollective')}"
class="button-emoji"
@click.prevent>
Expand Down Expand Up @@ -43,7 +42,7 @@
</div>
</NcAppSettingsSection>

<NcAppSettingsSection id="permissions" :title="t('collectives', 'Permissions')">
<NcAppSettingsSection id="permissions" :name="t('collectives', 'Permissions')">
<div class="subsection-header">
{{ t('collectives', 'Allow editing for') }}
</div>
Expand Down Expand Up @@ -101,7 +100,7 @@
</div>
</NcAppSettingsSection>

<NcAppSettingsSection id="page-settings" :title="t('collectives', 'Page settings')">
<NcAppSettingsSection id="page-settings" :name="t('collectives', 'Page settings')">
<div class="subsection-header">
{{ t('collectives', 'Default page mode') }}
</div>
Expand All @@ -124,7 +123,7 @@
</div>
</NcAppSettingsSection>

<NcAppSettingsSection id="danger-zone" :title="t('collectives', 'Danger zone')">
<NcAppSettingsSection id="danger-zone" :name="t('collectives', 'Danger zone')">
<div>
<NcButton type="error" :aria-label="t('collectives', 'Delete collective')" @click="trashCollective()">
{{ t('collectives', 'Delete collective') }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Nav/CollectivesGlobalSettings.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NcAppNavigationSettings :title="t('collectives', 'Collectives settings')">
<NcAppNavigationSettings :name="t('collectives', 'Collectives settings')">
<NcTextField name="userFolder"
:label="t('collectives', 'Collectives Folder')"
:label-visible="true"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Nav/NewCollectiveModal.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NcModal :title="t('collectives', 'New collective')" @close="onClose">
<NcModal :name="t('collectives', 'New collective')" @close="onClose">
<div class="modal-content">
<div v-if="state === 0" class="modal-collective-wrapper">
<h2 class="modal-collective-title">
Expand Down
4 changes: 2 additions & 2 deletions src/components/Navigation.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<NcAppNavigation>
<template v-if="loading('collectives')" #list>
<NcAppNavigationCaption :title="t('collectives', 'Select a collective')" />
<NcAppNavigationCaption :name="t('collectives', 'Select a collective')" />
<SkeletonLoading type="items" :count="3" />
</template>
<template v-else #list>
<NcAppNavigationCaption :title="t('collectives', 'Select a collective')" />
<NcAppNavigationCaption :name="t('collectives', 'Select a collective')" />
<CollectiveListItem v-for="collective in collectives"
v-show="!collective.deleted"
:key="collective.id"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Page/PageNotFound.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NcEmptyContent :title="t('collectives', 'Page not found: {page}', { page: pageParam })"
<NcEmptyContent :name="t('collectives', 'Page not found: {page}', { page: pageParam })"
:description="t('collectives', 'Select a page from the list or create a new one.')">
<template #icon>
<PageIcon />
Expand Down
3 changes: 1 addition & 2 deletions src/components/PageList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<NcActions class="toggle toggle-push-to-right">
<NcActionButton class="toggle-button"
:aria-label="labels.showTemplates"
:title="labels.showTemplates"
@click="toggleTemplates()">
<template #icon>
<PagesTemplateIcon :size="12" :fill-color="showTemplates ? 'currentColor' : 'var(--color-text-maxcontrast)'" />
Expand All @@ -19,7 +18,7 @@
</NcActions>
<NcActions class="toggle"
:aria-label="t('collectives', 'Sort order')"
:title="t('collectives', 'Sort order')">
:menu-name="t('collectives', 'Sort order')">
<template #icon>
<SortAscendingIcon v-if="sortedBy('byOrder')" :size="16" />
<SortAlphabeticalAscendingIcon v-else-if="sortedBy('byTitle')" :size="16" />
Expand Down
2 changes: 1 addition & 1 deletion src/components/PageSidebar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<NcAppSidebar ref="sidebar"
:title="title"
:name="title"
:active.sync="active"
@close="close">
<NcAppSidebarTab id="attachments"
Expand Down
6 changes: 3 additions & 3 deletions src/components/PageSidebar/SharingEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@

<!-- clipboard -->
<NcActions v-if="share && share.token" ref="copyButton" class="sharing-entry__copy">
<NcActionButton :title="copyLinkTooltip"
:aria-label="copyLinkTooltip"
<NcActionButton :aria-label="copyLinkTooltip"
@click.prevent="copyLink">
<template #icon>
<CheckIcon v-if="copySuccess" :size="20" />
<NcLoadingIcon v-else-if="copyLoading" :size="20" />
<ContentCopyIcon v-else :size="20" />
</template>
{{ copyLinkTooltip }}
</NcActionButton>
</NcActions>
</div>
Expand Down Expand Up @@ -79,12 +79,12 @@
<!-- Create new share -->
<NcActionButton v-else
class="new-share-link"
:title="t('collectives', 'Create a new share link')"
:aria-label="t('collectives', 'Create a new share link')"
@click.prevent.stop="onNewShare">
<template #icon>
<PlusIcon :size="20" />
</template>
{{ t('collectives', 'Create a new share link') }}
</NcActionButton>
</NcActions>

Expand Down
14 changes: 7 additions & 7 deletions src/components/PageSidebar/SidebarTabAttachments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</NcEmptyContent>

<!-- error message -->
<NcEmptyContent v-else-if="error" :title="error">
<NcEmptyContent v-else-if="error" :name="error">
<template #icon>
<AlertOctagonIcon />
</template>
Expand All @@ -19,7 +19,7 @@
<ul v-show="sortedAttachments.length" class="attachment-list">
<NcListItem v-for="attachment in sortedAttachments"
:key="attachment.id"
:title="attachment.name"
:name="attachment.name"
:href="davUrl(attachment)"
:force-display-actions="true"
class="attachment"
Expand All @@ -32,7 +32,7 @@
width="256"
class="attachment__image">
</template>
<template #subtitle>
<template #subname>
<div class="attachment__info">
<span class="attachment__info_size">{{ formattedFileSize(attachment.filesize) }}</span>
<span class="attachment__info_size">·</span>
Expand Down Expand Up @@ -75,7 +75,7 @@

<NcListItem v-for="attachment in deletedAttachments"
:key="attachment.id"
:title="attachment.name"
:name="attachment.name"
:href="davUrl(attachment)"
:force-display-actions="true"
class="attachment"
Expand All @@ -88,7 +88,7 @@
width="256"
class="attachment__image">
</template>
<template #subtitle>
<template #subname>
<div class="attachment__info">
<span class="attachment__info_size">{{ formattedFileSize(attachment.filesize) }}</span>
<span class="attachment__info_size">·</span>
Expand Down Expand Up @@ -125,7 +125,7 @@

<!-- no attachments found -->
<NcEmptyContent v-else
:title="t('collectives', 'No attachments available')"
:name="t('collectives', 'No attachments available')"
:description="t('collectives', 'If the page has attachments, they will be listed here.')">
<template #icon>
<PaperclipIcon />
Expand Down Expand Up @@ -388,7 +388,7 @@ export default {
display: flex;
flex-direction: row;
:deep(.line-one__title) {
:deep(.line-one__name) {
font-weight: normal;
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/PageSidebar/SidebarTabBacklinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</NcEmptyContent>

<!-- error message -->
<NcEmptyContent v-else-if="error" :title="error">
<NcEmptyContent v-else-if="error" :name="error">
<template #icon>
<AlertOctagonIcon />
</template>
Expand All @@ -19,7 +19,7 @@
<ul class="backlink-list">
<NcListItem v-for="backlinkPage in backlinks"
:key="backlinkPage.id"
:title="pagePathTitle(backlinkPage)"
:name="pagePathTitle(backlinkPage)"
:to="pagePath(backlinkPage)"
class="backlink">
<template #icon>
Expand All @@ -32,7 +32,7 @@
fill-color="var(--color-main-background)"
class="item-icon item-icon__page" />
</template>
<template #subtitle>
<template #subname>
{{ lastUpdate(page) }}
</template>
</NcListItem>
Expand All @@ -41,7 +41,7 @@

<!-- no backlinks found -->
<NcEmptyContent v-else
:title="t('collectives', 'No backlinks available')"
:name="t('collectives', 'No backlinks available')"
:description="t( 'collectives', 'If other pages link to this one, they will be listed here.')">
<template #icon>
<ArrowBottomLeftIcon />
Expand Down Expand Up @@ -141,7 +141,7 @@ export default {
display: flex;
flex-direction: row;
:deep(.line-one__title) {
:deep(.line-one__name) {
font-weight: normal;
}
Expand Down
14 changes: 7 additions & 7 deletions src/components/PageSidebar/SidebarTabVersions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</NcEmptyContent>

<!-- error message -->
<NcEmptyContent v-else-if="error" :title="error">
<NcEmptyContent v-else-if="error" :name="error">
<template #icon>
<AlertOctagonIcon />
</template>
Expand All @@ -18,7 +18,7 @@
<div v-else-if="!loading('versions') && versions.length">
<ul class="version-list">
<span :title="pageFormattedTimestamp">
<NcListItem :title="t('collectives', 'Current version')"
<NcListItem :name="t('collectives', 'Current version')"
class="version"
:class="{'active': !version}"
:active="!version"
Expand All @@ -28,15 +28,15 @@
fill-color="var(--color-main-background)"
class="item-icon item-icon__page" />
</template>
<template #subtitle>
<template #subname>
{{ pageHumanReadableSize }}
</template>
</NcListItem>
</span>
<span v-for="v in versions"
:key="v.downloadUrl"
:title="v.formattedTimestamp">
<NcListItem :title="v.relativeTimestamp"
<NcListItem :name="v.relativeTimestamp"
class="version"
:class="{'active': selected(v)}"
:active="selected(v)"
Expand All @@ -51,7 +51,7 @@
fill-color="var(--color-main-background)"
class="item-icon item-icon__page" />
</template>
<template #subtitle>
<template #subname>
{{ v.humanReadableSize }}
</template>
</NcListItem>
Expand All @@ -61,7 +61,7 @@

<!-- no versions found -->
<NcEmptyContent v-else
:title="t('collectives', 'No other versions available')"
:name="t('collectives', 'No other versions available')"
:description="t( 'collectives', 'After editing you can find old versions of the page here.')">
<template #icon>
<RestoreIcon />
Expand Down Expand Up @@ -194,7 +194,7 @@ export default {
display: flex;
flex-direction: row;
:deep(.line-one__title) {
:deep(.line-one__name) {
font-weight: normal;
}
Expand Down

0 comments on commit d2875bf

Please sign in to comment.