diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-08-22 14:29:58 +0200 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2022-08-25 08:38:00 +0200 |
commit | d0473214cd2582ec63f4a5021a8f5927f67bc98f (patch) | |
tree | 455708226929d13d55e24bde90833e1508a38714 /core | |
parent | 708018795863999b674d1e3e900313785893d6a8 (diff) | |
download | nextcloud-server-d0473214cd2582ec63f4a5021a8f5927f67bc98f.tar.gz nextcloud-server-d0473214cd2582ec63f4a5021a8f5927f67bc98f.zip |
Add Nc prefix to Nc vue component names
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/src/components/UnifiedSearch/SearchResult.vue | 6 | ||||
-rw-r--r-- | core/src/components/login/LoginButton.vue | 8 | ||||
-rw-r--r-- | core/src/components/login/LoginForm.vue | 8 | ||||
-rw-r--r-- | core/src/components/setup/RecommendedApps.vue | 12 | ||||
-rw-r--r-- | core/src/views/Login.vue | 8 | ||||
-rw-r--r-- | core/src/views/Profile.vue | 30 | ||||
-rw-r--r-- | core/src/views/UnifiedSearch.vue | 34 |
7 files changed, 53 insertions, 53 deletions
diff --git a/core/src/components/UnifiedSearch/SearchResult.vue b/core/src/components/UnifiedSearch/SearchResult.vue index 2df3123f8fe..dfd20868480 100644 --- a/core/src/components/UnifiedSearch/SearchResult.vue +++ b/core/src/components/UnifiedSearch/SearchResult.vue @@ -52,7 +52,7 @@ <!-- Title and sub-title --> <span class="unified-search__result-content"> <h3 class="unified-search__result-line-one" :title="title"> - <Highlight :text="title" :search="query" /> + <NcHighlight :text="title" :search="query" /> </h3> <h4 v-if="subline" class="unified-search__result-line-two" :title="subline">{{ subline }}</h4> </span> @@ -60,13 +60,13 @@ </template> <script> -import Highlight from '@nextcloud/vue/dist/Components/Highlight' +import NcHighlight from '@nextcloud/vue/dist/Components/NcHighlight' export default { name: 'SearchResult', components: { - Highlight, + NcHighlight, }, props: { diff --git a/core/src/components/login/LoginButton.vue b/core/src/components/login/LoginButton.vue index a29314beb2f..c9aaa2522c6 100644 --- a/core/src/components/login/LoginButton.vue +++ b/core/src/components/login/LoginButton.vue @@ -20,7 +20,7 @@ --> <template> - <ButtonVue type="primary" + <NcButton type="primary" native-type="submit" :wide="true" @click="$emit('click')"> @@ -29,18 +29,18 @@ <div v-if="loading" class="submit-wrapper__icon icon-loading-small-dark" /> <ArrowRight v-else class="submit-wrapper__icon" /> </template> - </ButtonVue> + </NcButton> </template> <script> -import ButtonVue from '@nextcloud/vue/dist/Components/ButtonVue' +import NcButton from '@nextcloud/vue/dist/Components/NcButton' import ArrowRight from 'vue-material-design-icons/ArrowRight.vue' export default { name: 'LoginButton', components: { ArrowRight, - ButtonVue, + NcButton, }, props: { value: { diff --git a/core/src/components/login/LoginForm.vue b/core/src/components/login/LoginForm.vue index 5bea7df40d3..e05fa4c17ea 100644 --- a/core/src/components/login/LoginForm.vue +++ b/core/src/components/login/LoginForm.vue @@ -84,7 +84,7 @@ required> <label for="password" class="infield">{{ t('core', 'Password') }}</label> - <ButtonVue class="toggle-password" + <NcButton class="toggle-password" type="tertiary-no-background" :aria-label="isPasswordHidden ? t('core', 'Show password') : t('core', 'Hide password')" @click.stop.prevent="togglePassword"> @@ -92,7 +92,7 @@ <Eye v-if="isPasswordHidden" :size="20" /> <EyeOff v-else :size="20" /> </template> - </ButtonVue> + </NcButton> </p> <LoginButton :loading="loading" /> @@ -136,7 +136,7 @@ import jstz from 'jstimezonedetect' import { generateUrl, imagePath } from '@nextcloud/router' -import ButtonVue from '@nextcloud/vue/dist/Components/ButtonVue' +import NcButton from '@nextcloud/vue/dist/Components/NcButton' import Eye from 'vue-material-design-icons/Eye' import EyeOff from 'vue-material-design-icons/EyeOff' @@ -146,7 +146,7 @@ export default { name: 'LoginForm', components: { - ButtonVue, + NcButton, Eye, EyeOff, LoginButton, diff --git a/core/src/components/setup/RecommendedApps.vue b/core/src/components/setup/RecommendedApps.vue index 3bc046c89a6..1582658d37e 100644 --- a/core/src/components/setup/RecommendedApps.vue +++ b/core/src/components/setup/RecommendedApps.vue @@ -54,19 +54,19 @@ </div> <div class="dialog-row"> - <ButtonVue v-if="showInstallButton" + <NcButton v-if="showInstallButton" type="tertiary" role="link" href="defaultPageUrl" @click="goTo(defaultPageUrl)"> {{ t('core', 'Skip') }} - </ButtonVue> + </NcButton> - <ButtonVue v-if="showInstallButton" + <NcButton v-if="showInstallButton" type="primary" @click.stop.prevent="installApps"> {{ t('core', 'Install recommended apps') }} - </ButtonVue> + </NcButton> </div> </div> </template> @@ -78,7 +78,7 @@ import { loadState } from '@nextcloud/initial-state' import pLimit from 'p-limit' import { translate as t } from '@nextcloud/l10n' -import ButtonVue from '@nextcloud/vue/dist/Components/ButtonVue' +import NcButton from '@nextcloud/vue/dist/Components/NcButton' import logger from '../../logger' @@ -114,7 +114,7 @@ const defaultPageUrl = loadState('core', 'defaultPageUrl') export default { name: 'RecommendedApps', components: { - ButtonVue, + NcButton, }, data() { return { diff --git a/core/src/views/Login.vue b/core/src/views/Login.vue index 0b20f74a87a..0cc8dc39cca 100644 --- a/core/src/views/Login.vue +++ b/core/src/views/Login.vue @@ -105,7 +105,7 @@ </div> <div id="alternative-logins" class="alternative-logins"> - <ButtonVue v-for="(alternativeLogin, index) in alternativeLogins" + <NcButton v-for="(alternativeLogin, index) in alternativeLogins" :key="index" type="primary" :wide="true" @@ -114,7 +114,7 @@ :href="alternativeLogin.href" @click="goTo(alternativeLogin.href)"> {{ alternativeLogin.name }} - </ButtonVue> + </NcButton> </div> </div> </template> @@ -127,7 +127,7 @@ import LoginForm from '../components/login/LoginForm.vue' import PasswordLessLoginForm from '../components/login/PasswordLessLoginForm.vue' import ResetPassword from '../components/login/ResetPassword.vue' import UpdatePassword from '../components/login/UpdatePassword.vue' -import ButtonVue from '@nextcloud/vue/dist/Components/ButtonVue' +import NcButton from '@nextcloud/vue/dist/Components/NcButton' const query = queryString.parse(location.search) if (query.clear === '1') { @@ -148,7 +148,7 @@ export default { PasswordLessLoginForm, ResetPassword, UpdatePassword, - ButtonVue, + NcButton, }, data() { diff --git a/core/src/views/Profile.vue b/core/src/views/Profile.vue index bf58a89c32e..46cd41d468e 100644 --- a/core/src/views/Profile.vue +++ b/core/src/views/Profile.vue @@ -47,7 +47,7 @@ <div class="profile__content"> <div class="profile__sidebar"> - <Avatar class="avatar" + <NcAvatar class="avatar" :class="{ interactive: isCurrentUser }" :user="userId" :size="180" @@ -69,7 +69,7 @@ </PrimaryActionButton> <div class="user-actions__other"> <!-- FIXME Remove inline styles after https://github.com/nextcloud/nextcloud-vue/issues/2315 is fixed --> - <Actions v-for="action in middleActions" + <NcActions v-for="action in middleActions" :key="action.id" :default-icon="action.icon" style=" @@ -80,16 +80,16 @@ backgroundImage: `url(${action.icon})`, ...(colorMainBackground === '#181818' && { filter: 'invert(1)' }) }"> - <ActionLink :close-after-click="true" + <NcActionLink :close-after-click="true" :icon="action.icon" :href="action.target" :target="action.id === 'phone' ? '_self' :'_blank'"> {{ action.title }} - </ActionLink> - </Actions> + </NcActionLink> + </NcActions> <template v-if="otherActions"> - <Actions :force-menu="true"> - <ActionLink v-for="action in otherActions" + <NcActions :force-menu="true"> + <NcActionLink v-for="action in otherActions" :key="action.id" :class="{ 'icon-invert': colorMainBackground === '#181818' }" :close-after-click="true" @@ -97,8 +97,8 @@ :href="action.target" :target="action.id === 'phone' ? '_self' :'_blank'"> {{ action.title }} - </ActionLink> - </Actions> + </NcActionLink> + </NcActions> </template> </div> </div> @@ -145,9 +145,9 @@ import { loadState } from '@nextcloud/initial-state' import { generateUrl } from '@nextcloud/router' import { showError } from '@nextcloud/dialogs' -import Avatar from '@nextcloud/vue/dist/Components/Avatar' -import Actions from '@nextcloud/vue/dist/Components/Actions' -import ActionLink from '@nextcloud/vue/dist/Components/ActionLink' +import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar' +import NcActions from '@nextcloud/vue/dist/Components/NcActions' +import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink' import MapMarkerIcon from 'vue-material-design-icons/MapMarker' import PencilIcon from 'vue-material-design-icons/Pencil' import AccountIcon from 'vue-material-design-icons/Account' @@ -182,9 +182,9 @@ export default { components: { AccountIcon, - ActionLink, - Actions, - Avatar, + NcActionLink, + NcActions, + NcAvatar, MapMarkerIcon, PencilIcon, PrimaryActionButton, diff --git a/core/src/views/UnifiedSearch.vue b/core/src/views/UnifiedSearch.vue index 2d2d2d0a254..32e3073b3aa 100644 --- a/core/src/views/UnifiedSearch.vue +++ b/core/src/views/UnifiedSearch.vue @@ -66,32 +66,32 @@ </form> <!-- Search filters --> - <Actions v-if="availableFilters.length > 1" class="unified-search__filters" placement="bottom"> - <ActionButton v-for="type in availableFilters" + <NcActions v-if="availableFilters.length > 1" class="unified-search__filters" placement="bottom"> + <NcActionButton v-for="type in availableFilters" :key="type" icon="icon-filter" :title="t('core', 'Search for {name} only', { name: typesMap[type] })" @click="onClickFilter(`in:${type}`)"> {{ `in:${type}` }} - </ActionButton> - </Actions> + </NcActionButton> + </NcActions> </div> <template v-if="!hasResults"> <!-- Loading placeholders --> <SearchResultPlaceholders v-if="isLoading" /> - <EmptyContent v-else-if="isValidQuery"> - <Highlight v-if="triggered" :text="t('core', 'No results for {query}', { query })" :search="query" /> + <NcEmptyContent v-else-if="isValidQuery"> + <NcHighlight v-if="triggered" :text="t('core', 'No results for {query}', { query })" :search="query" /> <div v-else> {{ t('core', 'Press enter to start searching') }} </div> <template #icon> <Magnify /> </template> - </EmptyContent> + </NcEmptyContent> - <EmptyContent v-else-if="!isLoading || isShortQuery"> + <NcEmptyContent v-else-if="!isLoading || isShortQuery"> {{ t('core', 'Start typing to search') }} <template #icon> <Magnify /> @@ -103,7 +103,7 @@ minSearchLength, {minSearchLength}) }} </template> - </EmptyContent> + </NcEmptyContent> </template> <!-- Grouped search results --> @@ -142,11 +142,11 @@ import { emit } from '@nextcloud/event-bus' import { minSearchLength, getTypes, search, defaultLimit, regexFilterIn, regexFilterNot, enableLiveSearch } from '../services/UnifiedSearchService' import { showError } from '@nextcloud/dialogs' -import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' -import Actions from '@nextcloud/vue/dist/Components/Actions' +import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton' +import NcActions from '@nextcloud/vue/dist/Components/NcActions' import debounce from 'debounce' -import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent' -import Highlight from '@nextcloud/vue/dist/Components/Highlight' +import NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent' +import NcHighlight from '@nextcloud/vue/dist/Components/NcHighlight' import Magnify from 'vue-material-design-icons/Magnify' import HeaderMenu from '../components/HeaderMenu' @@ -161,11 +161,11 @@ export default { name: 'UnifiedSearch', components: { - ActionButton, - Actions, - EmptyContent, + NcActionButton, + NcActions, + NcEmptyContent, HeaderMenu, - Highlight, + NcHighlight, Magnify, SearchResult, SearchResultPlaceholders, |