From cb909423e64a15ab9429b9a521970b333b9706c9 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Tue, 6 Aug 2024 20:43:20 +0200 Subject: [PATCH 01/16] Togle fix --- src/navigation/Configuration.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/navigation/Configuration.vue b/src/navigation/Configuration.vue index dd1b8b6b..75c10f58 100644 --- a/src/navigation/Configuration.vue +++ b/src/navigation/Configuration.vue @@ -197,6 +197,7 @@ import { NcAppSettingsDialog, NcAppSettingsSection, NcAppNavigationItem, + NcCheckboxRadioSwitch, NcTextField, NcTextArea, NcButton, @@ -213,6 +214,7 @@ export default { NcAppSettingsDialog, NcAppSettingsSection, NcAppNavigationItem, + NcCheckboxRadioSwitch, NcTextField, NcTextArea, NcButton, From b8d95b66b11c45a006a943da839935bd388af38e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 6 Aug 2024 18:44:26 +0000 Subject: [PATCH 02/16] Update src from PHP Codesniffer --- src/store/modules/configuration.js | 10 +++++----- src/store/modules/configuration.spec.js | 10 +++++----- src/store/modules/configuration.specs.js | 12 ++++++------ src/store/modules/metadata.js | 14 +++++++------- src/store/modules/metadata.spec.js | 16 ++++++++-------- src/store/modules/organisation.js | 10 +++++----- src/store/modules/organisation.spec.js | 12 ++++++------ src/store/modules/search.js | 20 ++++++++++---------- src/store/modules/theme.js | 10 +++++----- src/store/modules/theme.spec.js | 12 ++++++------ 10 files changed, 63 insertions(+), 63 deletions(-) diff --git a/src/store/modules/configuration.js b/src/store/modules/configuration.js index a1cb0449..d4561a4b 100644 --- a/src/store/modules/configuration.js +++ b/src/store/modules/configuration.js @@ -27,16 +27,16 @@ export const useConfigurationStore = defineStore( ) .then( (response) => { - response.json().then( - (data) => { - this.setConfigurationItem(data) + response.json().then( + (data) => { + this.setConfigurationItem(data) } - ) + ) } ) .catch( (err) => { - console.error(err) + console.error(err) } ) }, diff --git a/src/store/modules/configuration.spec.js b/src/store/modules/configuration.spec.js index 674586b6..814184e0 100644 --- a/src/store/modules/configuration.spec.js +++ b/src/store/modules/configuration.spec.js @@ -5,15 +5,15 @@ import { useConfigurationStore } from './configuration.js' describe( 'Configuration Store', () => { - beforeEach( - () => { - setActivePinia(createPinia()) + beforeEach( + () => { + setActivePinia(createPinia()) } - ) + ) it( 'sets configuration item correctly', () => { - const store = useConfigurationStore() + const store = useConfigurationStore() store.setConfigurationItem(mockConfiguration()[0]) diff --git a/src/store/modules/configuration.specs.js b/src/store/modules/configuration.specs.js index aeb143d3..62920f59 100644 --- a/src/store/modules/configuration.specs.js +++ b/src/store/modules/configuration.specs.js @@ -6,15 +6,15 @@ import { useConfigurationStore } from './configuration.js'; describe( 'Metadata Store', () => { - beforeEach( - () => { - setActivePinia(createPinia()) + beforeEach( + () => { + setActivePinia(createPinia()) } - ) + ) it( 'sets configuration item correctly', () => { - const store = useConfigurationStore() + const store = useConfigurationStore() store.setConfigurationItem(testData[0]) @@ -38,7 +38,7 @@ describe( it( 'sets configuration list correctly', () => { - const store = useConfigurationStore() + const store = useConfigurationStore() store.setConfigurationItem(testData) diff --git a/src/store/modules/metadata.js b/src/store/modules/metadata.js index cb8c0ffd..0de1c28e 100644 --- a/src/store/modules/metadata.js +++ b/src/store/modules/metadata.js @@ -41,19 +41,19 @@ export const useMetadataStore = defineStore( ) .then( (response) => { - response.json().then( - (data) => { - this.metaDataList = data.results.map( - (metadataItem) => new Metadata(metadataItem), - ) + response.json().then( + (data) => { + this.metaDataList = data.results.map( + (metadataItem) => new Metadata(metadataItem), + ) return data } - ) + ) } ) .catch( (err) => { - console.error(err) + console.error(err) return err } ) diff --git a/src/store/modules/metadata.spec.js b/src/store/modules/metadata.spec.js index 514b5062..38b1a8ab 100644 --- a/src/store/modules/metadata.spec.js +++ b/src/store/modules/metadata.spec.js @@ -6,15 +6,15 @@ import { Metadata, mockMetadata } from '../../entities/index.js' describe( 'Metadata Store', () => { - beforeEach( - () => { - setActivePinia(createPinia()) + beforeEach( + () => { + setActivePinia(createPinia()) } - ) + ) it( 'sets metadata item correctly', () => { - const store = useMetadataStore() + const store = useMetadataStore() store.setMetaDataItem(mockMetadata()[0]) @@ -27,7 +27,7 @@ describe( it( 'sets metadata item with string "properties" property', () => { - const store = useMetadataStore() + const store = useMetadataStore() // stringify json data const mockData = mockMetadata()[0] @@ -44,7 +44,7 @@ describe( it( 'sets metadata list correctly', () => { - const store = useMetadataStore() + const store = useMetadataStore() store.setMetaDataList(mockMetadata()) @@ -57,7 +57,7 @@ describe( it( 'get metadata property from key', () => { - const store = useMetadataStore() + const store = useMetadataStore() store.setMetaDataItem(mockMetadata()[0]) store.setMetadataDataKey('test') diff --git a/src/store/modules/organisation.js b/src/store/modules/organisation.js index 61b952b7..3844677c 100644 --- a/src/store/modules/organisation.js +++ b/src/store/modules/organisation.js @@ -33,16 +33,16 @@ export const useOrganisationStore = defineStore( ) .then( (response) => { - response.json().then( - (data) => { - this.setOrganisationList(data.results) + response.json().then( + (data) => { + this.setOrganisationList(data.results) } - ) + ) } ) .catch( (err) => { - console.error(err) + console.error(err) } ) }, diff --git a/src/store/modules/organisation.spec.js b/src/store/modules/organisation.spec.js index 27385c8e..b14a260b 100644 --- a/src/store/modules/organisation.spec.js +++ b/src/store/modules/organisation.spec.js @@ -6,15 +6,15 @@ import { useOrganisationStore } from './organisation.js'; describe( 'Organisation Store', () => { - beforeEach( - () => { - setActivePinia(createPinia()) + beforeEach( + () => { + setActivePinia(createPinia()) } - ) + ) it( 'sets organisation item correctly', () => { - const store = useOrganisationStore() + const store = useOrganisationStore() store.setOrganisationItem(mockOrganisation()[0]) @@ -38,7 +38,7 @@ describe( it( 'sets organisation list correctly', () => { - const store = useOrganisationStore() + const store = useOrganisationStore() store.setOrganisationList(mockOrganisation()) diff --git a/src/store/modules/search.js b/src/store/modules/search.js index db326f1e..cd1a532b 100644 --- a/src/store/modules/search.js +++ b/src/store/modules/search.js @@ -27,22 +27,22 @@ export const useSearchStore = defineStore( ) .then( (response) => { - response.json().then( - (data) => { - if (data?.code === 403 && data?.message) { - this.searchError = data.message - console.log(this.searchError) - } else { - this.searchError = '' // Clear any previous errors - } + response.json().then( + (data) => { + if (data?.code === 403 && data?.message) { + this.searchError = data.message + console.log(this.searchError) + } else { + this.searchError = '' // Clear any previous errors + } this.searchResults = data } - ) + ) } ) .catch( (err) => { - this.searchError = err.message || 'An error occurred' + this.searchError = err.message || 'An error occurred' console.error(err.message ?? err) } ) diff --git a/src/store/modules/theme.js b/src/store/modules/theme.js index e7fe9bd1..0cecf1b0 100644 --- a/src/store/modules/theme.js +++ b/src/store/modules/theme.js @@ -33,16 +33,16 @@ export const useThemeStore = defineStore( ) .then( (response) => { - response.json().then( - (data) => { - this.setThemeList(data.results) + response.json().then( + (data) => { + this.setThemeList(data.results) } - ) + ) } ) .catch( (err) => { - console.error(err) + console.error(err) } ) }, diff --git a/src/store/modules/theme.spec.js b/src/store/modules/theme.spec.js index 34931d81..cb7b85cc 100644 --- a/src/store/modules/theme.spec.js +++ b/src/store/modules/theme.spec.js @@ -6,15 +6,15 @@ import { mockTheme, Theme } from '../../entities/index.js' describe( 'Theme Store', () => { - beforeEach( - () => { - setActivePinia(createPinia()) + beforeEach( + () => { + setActivePinia(createPinia()) } - ) + ) it( 'sets theme item correctly', () => { - const store = useThemeStore() + const store = useThemeStore() store.setThemeItem(mockTheme()[0]) @@ -38,7 +38,7 @@ describe( it( 'sets theme list correctly', () => { - const store = useThemeStore() + const store = useThemeStore() store.setThemeList(mockTheme()) From 261c6ecc4361a0350bc7331ed27375920a587a74 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Tue, 6 Aug 2024 21:26:46 +0200 Subject: [PATCH 03/16] Fixes on help button and publication page --- src/views/catalogi/CatalogiList.vue | 16 ++++++++++- src/views/directory/DirectoryList.vue | 16 ++++++++++- src/views/metaData/MetaDataList.vue | 13 +++++++++ .../organisations/OrganisationDetail.vue | 6 ++--- src/views/organisations/OrganisationList.vue | 27 ++++++++++--------- src/views/publications/PublicationDetail.vue | 4 +-- src/views/publications/PublicationList.vue | 5 +++- src/views/themes/ThemeDetail.vue | 6 ++--- src/views/themes/ThemeList.vue | 5 +++- 9 files changed, 74 insertions(+), 24 deletions(-) diff --git a/src/views/catalogi/CatalogiList.vue b/src/views/catalogi/CatalogiList.vue index 4134db7f..7d93d05f 100644 --- a/src/views/catalogi/CatalogiList.vue +++ b/src/views/catalogi/CatalogiList.vue @@ -15,6 +15,14 @@ import { catalogiStore, navigationStore } from '../../store/store.js' + + + Help + diff --git a/src/views/directory/DirectoryIndex.vue b/src/views/directory/DirectoryIndex.vue index 80101273..9113240f 100644 --- a/src/views/directory/DirectoryIndex.vue +++ b/src/views/directory/DirectoryIndex.vue @@ -4,25 +4,10 @@ import { navigationStore, searchStore, directoryStore } from '../../store/store. @@ -31,7 +16,9 @@ import { NcAppContent, NcEmptyContent, NcButton } from '@nextcloud/vue' import DirectoryList from './DirectoryList.vue' import ListingDetails from './ListingDetails.vue' // eslint-disable-next-line n/no-missing-import -import LayersOutline from 'vue-material-design-icons/LayersOutline' +import LayersOutline from 'vue-material-design-icons/LayersOutline.vue' +import Plus from 'vue-material-design-icons/Plus.vue' +import HelpCircleOutline from 'vue-material-design-icons/HelpCircleOutline.vue' export default { name: 'DirectoryIndex', @@ -41,12 +28,20 @@ export default { NcButton, DirectoryList, ListingDetails, + // Icons LayersOutline, + Plus, + HelpCircleOutline, }, data() { return { } }, + methods: { + openLink(url, type = '') { + window.open(url, type) + }, + }, } diff --git a/src/views/directory/DirectoryList.vue b/src/views/directory/DirectoryList.vue index a1088332..e735afcb 100644 --- a/src/views/directory/DirectoryList.vue +++ b/src/views/directory/DirectoryList.vue @@ -3,84 +3,106 @@ import { navigationStore, directoryStore } from '../../store/store.js'