Skip to content

Commit

Permalink
refine pluing def, re #6
Browse files Browse the repository at this point in the history
  • Loading branch information
apeters authored and chiatt committed Nov 28, 2024
1 parent 59d828f commit c612f9c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 41 deletions.
26 changes: 0 additions & 26 deletions afrc/media/js/views/afrc-search.js

This file was deleted.

12 changes: 0 additions & 12 deletions afrc/media/js/views/components/plugins/afrc-search-plugin.js

This file was deleted.

31 changes: 31 additions & 0 deletions afrc/media/js/views/components/plugins/afrc-search.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import ko from 'knockout';
import createVueApplication from 'arches/arches/app/media/js/utils/create-vue-application';

import { definePreset } from '@primevue/themes';
import Aura from '@primevue/themes/aura';

import Search from '@/afrc/Search/SearchPage.vue';
import AFRCSEarchTemplate from 'templates/views/components/plugins/afrc-search.htm';

ko.components.register('afrc-search', {
viewModel: function() {
const EditableReportPreset = definePreset(Aura, {
components: {
toast: {
summary: { fontSize: '1.5rem' },
detail: { fontSize: '1.25rem' },
},
},
});

const EditableReportTheme = {
theme: {
preset: EditableReportPreset,
},
};
createVueApplication(Search, EditableReportTheme).then(vueApp => {
vueApp.mount('#search-mounting-point');
});
},
template: AFRCSEarchTemplate,
});
4 changes: 2 additions & 2 deletions afrc/migrations/0002_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class Migration(migrations.Migration):
VALUES ('929e1b9b-a9dc-4603-ae0a-f129d89d8b66',
'{"en": "Search Reference Collections"}',
'fa fa-search',
'views/components/plugins/afrc-search-plugin',
'afrc-search-plugin',
'views/components/plugins/afrc-search',
'afrc-search',
'{"show": true, "description": {"en": null}, "i18n_properties": ["description"]}',
'afrc-search',
1,
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions afrc/templates/views/components/plugins/afrc-search.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div id="search-mounting-point" style="display: flex; flex-grow: 1;"></div>

0 comments on commit c612f9c

Please sign in to comment.