diff --git a/webapp/src/main/resources/locale/portlet/Portlets_en.properties b/webapp/src/main/resources/locale/portlet/Portlets_en.properties index 2712a361c40..c151f811626 100644 --- a/webapp/src/main/resources/locale/portlet/Portlets_en.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_en.properties @@ -1112,3 +1112,16 @@ categoryInput.restrictedCategoryLink=Restricted access. You can't manage this ca categoryInput.cancel=Cancel categoryInput.update=Update categorySuggester.searchCategories=Search for a category + +########Simple Storage################ +simpleStorage.title.label=Simple storage +simpleStorage.addImage.label=Add +simpleStorage.filter.placeholder=Filter by name +simpleStorage.name.label=Name +simpleStorage.creationDate.label=Creation Date +simpleStorage.size.label=Size +simpleStorage.actions.label=Actions +simpleStorage.delete.label=Delete +simpleStorage.copyLink.label=Copy link + + diff --git a/webapp/src/main/resources/locale/portlet/Portlets_fr.properties b/webapp/src/main/resources/locale/portlet/Portlets_fr.properties index 2667d4010b4..d4d002a8c15 100644 --- a/webapp/src/main/resources/locale/portlet/Portlets_fr.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_fr.properties @@ -1112,3 +1112,14 @@ categoryInput.restrictedCategoryLink=Accès restreint. Vous ne pouvez pas gérer categoryInput.cancel=Annuler categoryInput.update=Mettre à jour categorySuggester.searchCategories=Rechercher une catégorie + +########Simple Storage################ +simpleStorage.title.label=Stockage simple +simpleStorage.addImage.label=Ajouter +simpleStorage.filter.placeholder=Filtrer par nom +simpleStorage.name.label=Nom +simpleStorage.creationDate.label=Date de cr\u00E9ation +simpleStorage.size.label=Taille +simpleStorage.actions.label=Actions +simpleStorage.delete.label=Supprimer +simpleStorage.copyLink.label=Copier le lien diff --git a/webapp/src/main/webapp/WEB-INF/gatein-resources.xml b/webapp/src/main/webapp/WEB-INF/gatein-resources.xml index 3dee6e87d3f..c2754b5ddf7 100644 --- a/webapp/src/main/webapp/WEB-INF/gatein-resources.xml +++ b/webapp/src/main/webapp/WEB-INF/gatein-resources.xml @@ -2061,6 +2061,34 @@ + + SimpleStorage + + + + vue + + + vuetify + + + commonVueComponents + + + applicationToolbarComponent + + + eXoVueI18n + + + extensionRegistry + + + + siteDetailsComponent vueGRP diff --git a/webapp/src/main/webapp/WEB-INF/portlet.xml b/webapp/src/main/webapp/WEB-INF/portlet.xml index 86e7fd9bcee..8f25943af49 100644 --- a/webapp/src/main/webapp/WEB-INF/portlet.xml +++ b/webapp/src/main/webapp/WEB-INF/portlet.xml @@ -1115,4 +1115,25 @@ + + SimpleStorage + Simple storage portlet + org.exoplatform.commons.api.portlet.GenericDispatchedViewPortlet + + portlet-view-dispatched-file-path + /html/simpleStorage.html + + -1 + PUBLIC + + text/html + + en + locale.portlet.Portlets + + Simple storage + Simple storage + + + diff --git a/webapp/src/main/webapp/html/simpleStorage.html b/webapp/src/main/webapp/html/simpleStorage.html new file mode 100644 index 00000000000..6854b165a92 --- /dev/null +++ b/webapp/src/main/webapp/html/simpleStorage.html @@ -0,0 +1,7 @@ +
+
+ +
+
diff --git a/webapp/src/main/webapp/vue-apps/simple-storage/components/SimpleStorageApp.vue b/webapp/src/main/webapp/vue-apps/simple-storage/components/SimpleStorageApp.vue new file mode 100644 index 00000000000..4680b6cbd05 --- /dev/null +++ b/webapp/src/main/webapp/vue-apps/simple-storage/components/SimpleStorageApp.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/webapp/src/main/webapp/vue-apps/simple-storage/components/view/SimpleStorageImageList.vue b/webapp/src/main/webapp/vue-apps/simple-storage/components/view/SimpleStorageImageList.vue new file mode 100644 index 00000000000..3f1f17a5f65 --- /dev/null +++ b/webapp/src/main/webapp/vue-apps/simple-storage/components/view/SimpleStorageImageList.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/webapp/src/main/webapp/vue-apps/simple-storage/components/view/SimpleStorageToolbar.vue b/webapp/src/main/webapp/vue-apps/simple-storage/components/view/SimpleStorageToolbar.vue new file mode 100644 index 00000000000..e48a08c4fae --- /dev/null +++ b/webapp/src/main/webapp/vue-apps/simple-storage/components/view/SimpleStorageToolbar.vue @@ -0,0 +1,50 @@ + + + + diff --git a/webapp/src/main/webapp/vue-apps/simple-storage/initComponents.js b/webapp/src/main/webapp/vue-apps/simple-storage/initComponents.js new file mode 100644 index 00000000000..e86bcdc22d7 --- /dev/null +++ b/webapp/src/main/webapp/vue-apps/simple-storage/initComponents.js @@ -0,0 +1,33 @@ +/* + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2025 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +import SimpleStorageApp from './components/SimpleStorageApp.vue'; +import SimpleStorageToolbar from './components/view/SimpleStorageToolbar.vue'; +import SimpleStorageImageList from './components/view/SimpleStorageImageList.vue'; + +const components = { + 'simple-storage-app': SimpleStorageApp, + 'simple-storage-toolbar': SimpleStorageToolbar, + 'simple-storage-image-list': SimpleStorageImageList +}; + +for (const key in components) { + Vue.component(key, components[key]); +} diff --git a/webapp/src/main/webapp/vue-apps/simple-storage/main.js b/webapp/src/main/webapp/vue-apps/simple-storage/main.js new file mode 100644 index 00000000000..baff65a72c3 --- /dev/null +++ b/webapp/src/main/webapp/vue-apps/simple-storage/main.js @@ -0,0 +1,50 @@ +/* +* This file is part of the Meeds project (https://meeds.io/). +* +* Copyright (C) 2025 Meeds Association contact@meeds.io +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + + +import './initComponents.js'; + +// get overridden components if exists +if (extensionRegistry) { + const components = extensionRegistry.loadComponents('simpleStorage'); + if (components && components.length > 0) { + components.forEach(cmp => { + Vue.component(cmp.componentName, cmp.componentOptions); + }); + } +} + +const lang = eXo && eXo.env.portal.language || 'en'; +const url = `/social/i18n/locale.portlet.Portlets?lang=${lang}`; +const vuetify = Vue.prototype.vuetifyOptions; +const appId = 'simpleStorage'; + +export function init(languages) { + exoi18n.loadLanguageAsync(lang, url).then(i18n => { + Vue.createApp({ + data: { + languages: languages, + }, + template: '', + vuetify, + i18n + }, `#${appId}`, 'Simple storage'); + }); +} diff --git a/webapp/webpack.common.js b/webapp/webpack.common.js index 4b44bfe6afc..9ecb0dff2b3 100644 --- a/webapp/webpack.common.js +++ b/webapp/webpack.common.js @@ -95,7 +95,8 @@ let config = { breadcrumb: './src/main/webapp/vue-apps/breadcrumb/main.js', complementaryFilter: './src/main/webapp/vue-apps/complementary-filter/main.js', organizationalChart: './src/main/webapp/vue-apps/organizational-chart/main.js', - organizationalChartExtension: './src/main/webapp/vue-apps/organizational-chart/extensions/main.js' + organizationalChartExtension: './src/main/webapp/vue-apps/organizational-chart/extensions/main.js', + simpleStorage: './src/main/webapp/vue-apps/simple-storage/main.js' }, module: { rules: [