diff options
Diffstat (limited to 'core/src/unified-search.ts')
-rw-r--r-- | core/src/unified-search.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/unified-search.ts b/core/src/unified-search.ts index 95f4c865eaf..a13b1036da1 100644 --- a/core/src/unified-search.ts +++ b/core/src/unified-search.ts @@ -4,7 +4,7 @@ */ import { getLoggerBuilder } from '@nextcloud/logger' -import { getRequestToken } from '@nextcloud/auth' +import { getCSPNonce } from '@nextcloud/auth' import { translate as t, translatePlural as n } from '@nextcloud/l10n' import { createPinia, PiniaVuePlugin } from 'pinia' import Vue from 'vue' @@ -13,7 +13,7 @@ import UnifiedSearch from './views/UnifiedSearch.vue' import { useSearchStore } from '../src/store/unified-search-external-filters.js' // eslint-disable-next-line camelcase -__webpack_nonce__ = btoa(getRequestToken()) +__webpack_nonce__ = getCSPNonce() const logger = getLoggerBuilder() .setApp('unified-search') @@ -36,6 +36,7 @@ Vue.mixin({ interface UnifiedSearchAction { id: string; appId: string; + searchFrom: string; label: string; icon: string; callback: () => void; @@ -44,9 +45,9 @@ interface UnifiedSearchAction { // Register the add/register filter action API globally window.OCA = window.OCA || {} window.OCA.UnifiedSearch = { - registerFilterAction: ({ id, appId, label, callback, icon }: UnifiedSearchAction) => { + registerFilterAction: ({ id, appId, searchFrom, label, callback, icon }: UnifiedSearchAction) => { const searchStore = useSearchStore() - searchStore.registerExternalFilter({ id, appId, label, callback, icon }) + searchStore.registerExternalFilter({ id, appId, searchFrom, label, callback, icon }) }, } |