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
61 changes: 19 additions & 42 deletions core/src/views/UnifiedSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<div class="header-menu unified-search-menu">
<NcButton v-show="!showLocalSearch"
class="header-menu__trigger"
<div class="unified-search-menu">
<NcHeaderButton v-show="!showLocalSearch"
:aria-label="t('core', 'Unified search')"
type="tertiary-no-background"
@click="toggleUnifiedSearch">
<template #icon>
<Magnify class="header-menu__trigger-icon" :size="20" />
<NcIconSvgWrapper :path="mdiMagnify" />
</template>
</NcButton>
</NcHeaderButton>
<UnifiedSearchLocalSearchBar v-if="supportsLocalSearch"
:open.sync="showLocalSearch"
:query.sync="queryText"
Expand All @@ -24,25 +22,24 @@
</template>

<script lang="ts">
import { mdiMagnify } from '@mdi/js'
import { emit, subscribe } from '@nextcloud/event-bus'
import { translate } from '@nextcloud/l10n'
import { t } from '@nextcloud/l10n'
import { useBrowserLocation } from '@vueuse/core'
import debounce from 'debounce'
import { defineComponent } from 'vue'

import NcButton from '@nextcloud/vue/components/NcButton'
import Magnify from 'vue-material-design-icons/Magnify.vue'
import NcHeaderButton from '@nextcloud/vue/components/NcHeaderButton'
import NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper'
import UnifiedSearchModal from '../components/UnifiedSearch/UnifiedSearchModal.vue'
import UnifiedSearchLocalSearchBar from '../components/UnifiedSearch/UnifiedSearchLocalSearchBar.vue'

import debounce from 'debounce'
import logger from '../logger'
import logger from '../logger.js'

export default defineComponent({
name: 'UnifiedSearch',

components: {
NcButton,
Magnify,
NcHeaderButton,
NcIconSvgWrapper,
UnifiedSearchModal,
UnifiedSearchLocalSearchBar,
},
Expand All @@ -52,7 +49,9 @@ export default defineComponent({

return {
currentLocation,
t: translate,

mdiMagnify,
t,
}
},

Expand Down Expand Up @@ -175,31 +174,9 @@ export default defineComponent({

<style lang="scss" scoped>
// this is needed to allow us overriding component styles (focus-visible)
#header {
.header-menu {
display: flex;
align-items: center;
justify-content: center;

&__trigger {
height: var(--header-height);
width: var(--header-height) !important;

&:focus-visible {
// align with other header menu entries
outline: none !important;
box-shadow: none !important;
}

&:not(:hover,:focus,:focus-visible) {
opacity: .85;
}

&-icon {
// ensure the icon has the correct color
color: var(--color-background-plain-text) !important;
}
}
}
.unified-search-menu {
display: flex;
align-items: center;
justify-content: center;
}
</style>
4 changes: 2 additions & 2 deletions dist/core-common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-common.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-unified-search.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-unified-search.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/dav-settings-example-content.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dav-settings-example-content.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-users-3239.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-users-3239.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-vue-settings-apps-users-management.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-apps-users-management.js.map

Large diffs are not rendered by default.

Loading