-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves: #39162 Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
- Loading branch information
Showing
7 changed files
with
417 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!-- | ||
- @copyright Copyright (c) 2020 Fon E. Noel NFEBE <fenn25.fn@gmail.com> | ||
- | ||
- @author Fon E. Noel NFEBE <fenn25.fn@gmail.com> | ||
- | ||
- @license GNU AGPL version 3 or any later version | ||
- | ||
- This program is free software: you can redistribute it and/or modify | ||
- it under the terms of the GNU Affero General Public License as | ||
- published by the Free Software Foundation, either version 3 of the | ||
- License, or (at your option) any later version. | ||
- | ||
- This program is distributed in the hope that it will be useful, | ||
- but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
- GNU Affero General Public License for more details. | ||
- | ||
- You should have received a copy of the GNU Affero General Public License | ||
- along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
- | ||
--> | ||
<template> | ||
<div class="result-item"> | ||
<slot name="icon"></slot> | ||
<div class="details"> | ||
<span>Result Title</span> | ||
<small>More details about result</small> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
|
||
export default { | ||
name: 'SearchResultItem', | ||
components: { | ||
}, | ||
|
||
data() { | ||
return { | ||
} | ||
}, | ||
|
||
methods: { | ||
|
||
}, | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.result-item { | ||
display: flex; | ||
padding: 5px; /* Add padding for the border effect */ | ||
border: 1px solid #f0f0f0; /* Faint border */ | ||
border-radius: 10px; | ||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); /* Light shadow */ | ||
transition: background-color 0.3s ease; /* Smooth hover transition */ | ||
|
||
& .details { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
&:hover { | ||
background-color: var(--color-placeholder-light); | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* @copyright Copyright (c) 2020 Fon E. Noel NFEBE <fenn25.fn@gmail.com> | ||
* | ||
* @author Fon E. Noel NFEBE <fenn25.fn@gmail.com> | ||
* | ||
* @license AGPL-3.0-or-later | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
import { getLoggerBuilder } from '@nextcloud/logger' | ||
import { getRequestToken } from '@nextcloud/auth' | ||
import { translate as t, translatePlural as n } from '@nextcloud/l10n' | ||
import Vue from 'vue' | ||
|
||
import GlobalSearch from './views/GlobalSearch.vue' | ||
|
||
// eslint-disable-next-line camelcase | ||
__webpack_nonce__ = btoa(getRequestToken()) | ||
|
||
const logger = getLoggerBuilder() | ||
.setApp('global-search') | ||
.detectUser() | ||
.build() | ||
|
||
Vue.mixin({ | ||
data() { | ||
return { | ||
logger, | ||
} | ||
}, | ||
methods: { | ||
t, | ||
n, | ||
}, | ||
}) | ||
|
||
export default new Vue({ | ||
el: '#global-search', | ||
// eslint-disable-next-line vue/match-component-file-name | ||
name: 'GlobalSearchRoot', | ||
render: h => h(GlobalSearch), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!-- | ||
- @copyright Copyright (c) 2020 Fon E. Noel NFEBE <fenn25.fn@gmail.com> | ||
- | ||
- @author Fon E. Noel NFEBE <fenn25.fn@gmail.com> | ||
- | ||
- @license GNU AGPL version 3 or any later version | ||
- | ||
- This program is free software: you can redistribute it and/or modify | ||
- it under the terms of the GNU Affero General Public License as | ||
- published by the Free Software Foundation, either version 3 of the | ||
- License, or (at your option) any later version. | ||
- | ||
- This program is distributed in the hope that it will be useful, | ||
- but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
- GNU Affero General Public License for more details. | ||
- | ||
- You should have received a copy of the GNU Affero General Public License | ||
- along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
- | ||
--> | ||
<template> | ||
<div> | ||
<NcButton aria-label="Global search" @click="toggleGlobalSearch"> | ||
<template #icon> | ||
<Magnify class="unified-search__trigger" :size="22" /> | ||
</template> | ||
</NcButton> | ||
<GlobalSearchModal :isVisible="showGlobalSearch" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js' | ||
import Magnify from 'vue-material-design-icons/Magnify.vue' | ||
import GlobalSearchModal from './GlobalSearchModal.vue'; | ||
|
||
export default { | ||
name: 'GlobalSearch', | ||
components: { | ||
NcButton, | ||
Magnify, | ||
GlobalSearchModal, | ||
}, | ||
data() { | ||
return { | ||
showGlobalSearch: false, | ||
}; | ||
}, | ||
mounted() { | ||
console.debug("Global search initialized!") | ||
}, | ||
methods: { | ||
toggleGlobalSearch() { | ||
this.showGlobalSearch = !this.showGlobalSearch | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped></style> |
Oops, something went wrong.