diff --git a/.env.development b/.env.development index 6aa9c1ff..d4e9e156 100755 --- a/.env.development +++ b/.env.development @@ -1,6 +1,6 @@ APP_VERSION="0.5.26" SERVICE_WORKER_FILE="service-worker.js" -APP_ID="13" +APP_ID="16" DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_SERVER="freeplanet_serverside" SERVERDIR_WEBSITE="" @@ -12,9 +12,9 @@ LANG_DEFAULT="it" PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF" MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T" MONGODB_HOST="https://localhost:3000" -LOGO_REG='riso-logo-full.png' -TEST_NAME="Paolo" -TEST_SURNAME="Arena" +LOGO_REG='kolibrilab-logo-full.png' +TEST_NAME="Surya" +TEST_SURNAME="Paolo" TEST_EMAIL="" TEST_USERNAME="" TEST_PASSWORD="" diff --git a/_ALL_SITES/arcadei.it/root_spec/home_arcadei/home_arcadei.scss b/_ALL_SITES/arcadei.it/root_spec/home_arcadei/home_arcadei.scss new file mode 100755 index 00000000..0e32f575 --- /dev/null +++ b/_ALL_SITES/arcadei.it/root_spec/home_arcadei/home_arcadei.scss @@ -0,0 +1,452 @@ + +.testo-banda { + //background: -webkit-gradient(linear, left top, left bottom, from(#3144f0), to(transparent)); + //background: linear-gradient(180deg, #3144f0, transparent); + //background: rgba(0, 0, 0, .6) +} + +$grayshadow: #555; + +$textcol: blue; +$textcol_scuro: darkblue; + +p { + margin: 0 0 1.25rem; + //text-shadow: .125rem .125rem .25rem $grayshadow; +} + +h4 { + font-size: 1.25rem; +} + +.mycard { + visibility: hidden; +} + +.landing { +} + +.landing_background { + background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed; + background-size: cover +} + +.landing > section { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + //padding: 0 16px +} + +.intro { + display: flex; + justify-content: space-between; + align-items: stretch; + /* flex-flow: row nowrap; */ + + padding: 1.25rem 0 1.25rem 0; + margin: .125rem; + + * { + width: 100%; + flex: 1; + margin-left: auto; + margin-right: auto; + } + + &__associazione { + min-width: 350px; + } + + &__comeassociarsi { + min-width: 350px; + } +} + +.subtitle { + font-weight: 600; + text-align: center; + letter-spacing: 0.125rem; + text-transform: uppercase; + font-size: 1rem; +} + +.landing > section.padding { + padding: 5.62rem 1rem; +} + +.landing > section.padding_testo { + padding-top: 1.25rem; + padding-bottom: 1rem; +} + +.landing > section.padding_gallery { + padding-top: 3.125rem; + padding-bottom: 5.625rem; +} + +.landing > section > div { + position: relative; + width: 100% +} + +.maxwidth1200 { + max-width: 1200px; +} + +.landing__toolbar { + background: -webkit-gradient(linear, left top, left bottom, from(#000), to(transparent)); + background: linear-gradient(180deg, #000, transparent); + padding: 0 !important +} + +.landing__toolbar .q-btn { + border-radius: 0 0 .315rem .315rem; + -ms-flex-item-align: stretch; + align-self: stretch +} + +.landing__hero { + min-height: 50vh +} + +.landing__header { + height: 18vh +} + +.landing__arrow { + bottom: 1.5rem; + opacity: .4 +} + +.landing__front { + background: -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(15%, rgba(0, 0, 0, .6))); + background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .6) 15%) +} + +.landing__logo { + width: 9.40rem; + height: 9.40rem; + margin-top: 1.315rem; + //-webkit-animation: logo-rotate 240s linear infinite; + //animation: logo-rotate 240s linear infinite +} + +.landing__features .q-icon { + font-size: 4rem +} + +h4 { + line-height: 1.5; + text-shadow: .25rem .25rem .5rem $grayshadow; +} + +.landing__features h4, .landing__features h6 { + margin: 1rem 0 +} + +.landing__features p { + opacity: .7; + font-size: 1rem; + line-height: 1.5; +} + +.landing__footer { + //background: -webkit-gradient(linear, left top, left bottom, color-stop(65%, rgba(0, 0, 0, .1)), to(#000)); + background: linear-gradient(180deg, rgba(0, 0, 0, .8) 95%, #FFF); + padding-top: 4.5rem !important; + padding-bottom: 4.5rem !important; + padding-left: 1.25rem; + padding-right: 1.25rem; + color: #9f9f9f; +} + +.icon_contact:hover { + color: blue; + border-color: white; + border-width: .0625rem; +} + +.landing__footer .doc-link { + color: $textcol; +} + +.landing__footer .doc-link:hover { + opacity: .8 +} + +.landing__swirl-bg { + background-repeat: no-repeat !important; + background-position: top; + background-size: contain !important; + background-image: url(../../../public/images/landing_first_section.png) !important +} + +.feat-descr { + font-size: 1.15rem; +} + +.feat-descr:hover { + transition: opacity 0.5s ease-in-out; + opacity: 0.9; +} + +.q-col-gutter-sm { + padding: 3.125rem 3.125rem; + //margin-left: -48px +} + +body.mobile .landing { + //background: unset +} + +body.mobile .landing:before { + content: ""; + position: fixed; + top: 0; + height: 100vh; + left: 0; + right: 0; + bottom: 0; + z-index: -1; + //background: #000 url(../../public/images/cover.jpg) 50%; + + background-size: cover +} + +/* +@-webkit-keyframes logo-rotate { + to { + -webkit-transform: rotate(-1turn); + transform: rotate(-1turn) + } +} + +@keyframes logo-rotate { + to { + -webkit-transform: rotate(-1turn); + transform: rotate(-1turn) + } +} +*/ + +.home { + //background-color: rgb(250, 250, 250); + padding: 3.125rem; + display: flex; + //flex-wrap: nowrap; + flex-direction: column; + align-items: center; + justify-content: space-between; +} + +.btn-start { + margin: 3.125rem; +} + +.shadow { + //color: white; + text-shadow: 0.125rem 0.125rem 0.25rem $grayshadow; +} + +.text-h1, h1 { + font-size: 3rem; + font-weight: bold; + line-height: 3rem; + letter-spacing: -.01562em; + margin-bottom: 8px !important; +} + +.text-h2 { + font-size: 3.75rem; + font-weight: 300; + line-height: 3.75rem; + letter-spacing: -.00833em; +} + +.text-weight-bold { + font-weight: 700; +} + +.text-vers { + font-size: 0.75rem; + font-weight: 400; + line-height: 1.75rem; + letter-spacing: .00937em; + text-shadow: .25rem .25rem .5rem $grayshadow; +} + +.homep-cover-img-1 { + background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed; + //transition: background-image 1s ease-in-out; +} + +.homep-cover-img-2 { + background: #000 url(../../../public/images/foto2.jpg) no-repeat 50% fixed; + //transition: background-image 1s ease-in-out; +} + +.homep-cover-img-3 { + background: #000 url(../../../public/images/foto3.jpg) no-repeat 50% fixed; + //transition: background-image 1s ease-in-out; +} + +.homep-cover-img.hide-filter:before { + opacity: 0 +} + +.landing__footer-icons { + font-size: 1.75rem +} + +.landing__footer-icons a { + margin: 0 .5rem .5rem; + text-decoration: none; + outline: 0; + color: $textcol; + transition: color .28s +} + +.landing__footer-icons a:hover { + color: $textcol_scuro; +} + +.doc-img { + max-width: 100%; +} + +.mylist { + background: #3fdaff; + padding-left: 1.25rem; +} + +.clgutter { + margin-top: 1.25rem; + padding: .62rem; +} + +.carousel_img_3 { + //background-image: url(../../public/images/cibo_sano.jpg); + background-size: cover !important; + background-position: 50% center !important; + background-repeat: no-repeat !important; +} + +@media (max-width: 718px) { + // PER VERSIONE MOBILE + + .landing__hero { + text-align: center + } + .landing__header { + height: 7vh + } + .clgutter { + margin-top: 0; + padding: 0; + } + .landing__hero .text-h1, h1 { + font-size: 2rem; + line-height: 2.05rem; + margin-bottom: 1.25rem + } + + .landing > section.padding { + padding: 2.5rem 1rem; + } + + .landing > section.padding_testo { + padding-top: 1.25rem; + padding-bottom: 1rem; + } + + .landing > section.padding_gallery { + padding-top: 3.125rem; + padding-bottom: 5.625rem; + + max-width: 800px; + } + + .landing > section.padding_gallery > div { + padding-top: 3.125rem; + padding-bottom: 5.625rem; + + } + + .landing__features h4, .landing__features h6 { + margin: 1.25rem 0 + } + + h4 { + line-height: 1.4; + text-shadow: 0.25rem 0.25rem 0.5rem $grayshadow; + } + + .landing .feature-item { + text-align: center; + margin-top: 1.25rem; + } + .landing__hero-content { + padding-bottom: 11.25rem; + } + .landing__hero2-content { + padding-bottom: 7.25rem; + } + .landing__hero-btns { + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center + } + + .q-col-gutter-sm { + padding: .625rem .315rem; + } + + .text-subtitle1 { + font-size: 1.25rem; + } + .text-vers { + font-size: 0.6rem; + } + + .carousel_img_3 { + //background-image: url(../../public/images/cibo_sano.jpg); + background-size: 620px 620px !important; + background-position: 50% top !important; + background-repeat: no-repeat !important; + } + +} + +.custom-caption { + text-align: center; + padding: .75rem; + color: $textcol; + background-color: rgba(0, 0, 0, .3); +} + +.sfondo-grigio { + padding: 1rem; + color: $textcol; + background-color: rgba(0, 0, 0, .35); +} + +.mycontacts { + color: gray; + letter-spacing: 0.078rem; +} + +.mycontacts_title { + text-shadow: 0.125rem 0.125rem 0.125rem #555; + font-weight: bold; + color: #999; + letter-spacing: 0.125rem; +} + +.mycontacts_text { + color: #999; + letter-spacing: 0.093rem; +} diff --git a/_ALL_SITES/arcadei.it/root_spec/home_arcadei/home_arcadei.ts b/_ALL_SITES/arcadei.it/root_spec/home_arcadei/home_arcadei.ts new file mode 100755 index 00000000..9415ce07 --- /dev/null +++ b/_ALL_SITES/arcadei.it/root_spec/home_arcadei/home_arcadei.ts @@ -0,0 +1,54 @@ +import { defineComponent, ref, onMounted, watch, computed } from 'vue' + +import { useGlobalStore } from '@store/globalStore' +import { useRoute } from 'vue-router' +import { useUserStore } from '@store/UserStore' + +import { Logo } from '@/components/logo' + +import { LandingFooter } from '@/components/LandingFooter' +import { CMyPage } from '@/components/CMyPage/index' + +import { tools } from '@src/store/Modules/tools' +import { static_data } from '@src/db/static_data' +import { toolsext } from '@src/store/Modules/toolsext' +import { Screen } from 'quasar' +import { CCardCarousel, CEventsCalendar, CMyElem, COpenStreetMap } from '@components' +import MixinBase from '@src/mixins/mixin-base' +import { firstimagehome } from '@src/db/static_data' +import MixinMetaTags from '@/mixins/mixin-metatags' + +export default defineComponent({ + name: 'home_arcadei', + components: { Logo, LandingFooter, CMyPage, CMyElem }, + + setup() { + const userStore = useUserStore() + const globalStore = useGlobalStore() + + const { setValDb, getValDb } = MixinBase() + + function getheightgallery() { + if (tools.isMobile()) + return '400px' + else + return '600px' + } + + function created() { + // + } + + created() + + return { + tools, + toolsext, + static_data, + getheightgallery, + getValDb, + globalStore, + } + }, +}) + diff --git a/_ALL_SITES/arcadei.it/root_spec/home_arcadei/home_arcadei.vue b/_ALL_SITES/arcadei.it/root_spec/home_arcadei/home_arcadei.vue new file mode 100755 index 00000000..6280edf0 --- /dev/null +++ b/_ALL_SITES/arcadei.it/root_spec/home_arcadei/home_arcadei.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/package.json b/package.json index 7104a4e5..3f1140f9 100755 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "riso", + "name": "kolibrilab", "version": "0.5.3", - "description": "Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.", - "productName": "Riso", - "author": "Paolo Arena", + "description": "kolibrilab", + "productName": "kolibrilab", + "author": "Surya Paolo", "private": true, "keywords": [], "license": "MIT", @@ -36,7 +36,6 @@ "bcryptjs": "^2.4.3", "chart.js": "^3.9.1", "core-js": "^3.25.0", - "crypto": "^1.0.1", "date-fns": "^2.29.2", "dotenv": "^16.0.2", "echarts": "^5.3.3", diff --git a/public/favicon.ico b/public/favicon.ico index 06be8648..d9f55910 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/images/favicon-16x16.png b/public/images/favicon-16x16.png index 18de7b25..0428de50 100644 Binary files a/public/images/favicon-16x16.png and b/public/images/favicon-16x16.png differ diff --git a/public/images/favicon-32x32.png b/public/images/favicon-32x32.png index 6045a0f4..1592f7e9 100644 Binary files a/public/images/favicon-32x32.png and b/public/images/favicon-32x32.png differ diff --git a/public/images/favicon.ico b/public/images/favicon.ico index 06be8648..d9f55910 100644 Binary files a/public/images/favicon.ico and b/public/images/favicon.ico differ diff --git a/quasar.conf.js b/quasar.conf.js index cbf36237..4d4cffd4 100755 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -147,7 +147,7 @@ module.exports = configure((ctx) => ({ }, devServer: { https: false, - port: 8084, + port: 8090, open: false, // opens browser window automatically }, @@ -275,77 +275,6 @@ module.exports = configure((ctx) => ({ }, // https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa - pwa: { - workboxPluginMode: 'InjectManifest', // 'GenerateSW' or 'InjectManifest' - workboxOptions: {}, // only for GenerateSW - extendGenerateSWOptions (cfg) { - cfg.skipWaiting = false - cfg.clientsClaim = false - }, - // for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts]) - // if using workbox in InjectManifest mode - chainWebpackCustomSW(chain) { - // chain.plugin('eslint-webpack-plugin') - // .use(ESLintPlugin, [{ extensions: ['js'] }]) - }, - - manifest: { - name: 'Riso', - short_name: 'Riso', - description: 'Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.', - display: 'standalone', - orientation: 'portrait', - background_color: '#ffffff', - theme_color: '#027be3', - icons: [ - { - src: 'images/riso-android-icon-512x512.png', - sizes: '512x512', - type: 'image/png', - }, - { - src: 'images/riso-android-icon-384x384.png', - sizes: '384x384', - type: 'image/png', - }, - { - src: 'images/riso-android-icon-192x192.png', - sizes: '192x192', - type: 'image/png', - }, - { - src: 'images/riso-android-icon-144x144.png', - sizes: '144x144', - type: 'image/png', - }, - { - src: 'images/riso-android-icon-96x96.png', - sizes: '96x96', - type: 'image/png', - }, - { - src: 'images/riso-apple-icon-120x120.png', - sizes: '120x120', - type: 'image/png', - }, - { - src: 'images/riso-apple-icon-144x144.png', - sizes: '144x144', - type: 'image/png', - }, - { - src: 'images/riso-apple-icon-152x152.png', - sizes: '152x152', - type: 'image/png', - }, - { - src: 'images/riso-apple-icon-180x180.png', - sizes: '180x180', - type: 'image/png', - }, - ], - }, - }, // Full list of options: https://v2.quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova cordova: { @@ -359,37 +288,5 @@ module.exports = configure((ctx) => ({ // Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron electron: { - bundler: 'packager', // 'packager' or 'builder' - - packager: { - // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options - - // OS X / Mac App Store - // appBundleId: '', - // appCategoryType: '', - // osxSign: '', - // protocol: 'myapp://path', - - // Windows only - // win32metadata: { ... } - }, - - builder: { - // https://www.electron.build/configuration/configuration - - appId: 'Riso', - }, - - // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain - chainWebpack(/* chain */) { - // do something with the Electron main process Webpack cfg - // extendWebpackMain also available besides this chainWebpackMain - }, - - // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain - chainWebpackPreload(/* chain */) { - // do something with the Electron main process Webpack cfg - // extendWebpackPreload also available besides this chainWebpackPreload - }, }, })) diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index 6c0628bd..e12cd4cd 100755 --- a/src/components/CGridTableRec/CGridTableRec.ts +++ b/src/components/CGridTableRec/CGridTableRec.ts @@ -520,7 +520,7 @@ export default defineComponent({ } } - // console.log('sortBy', sortBy) + console.log('sortBy', sortBy) const filtersearch: any[] = [] const filtersearch2: any[] = [] @@ -867,7 +867,7 @@ export default defineComponent({ pagination.value.sortBy = sortBy pagination.value.descending = descending - // console.log('pagination', pagination) + console.log('pagination', pagination) // ...and turn of loading indicator loading.value = false diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index d30d315d..ce2f113c 100755 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -359,6 +359,7 @@ :columns="mycolumns" :filter="myfilter" v-model:pagination="pagination" + @request="onRequest" virtual-scroll :row-key="colkey" :loading="loading" diff --git a/src/components/CMyElem/CMyElem.ts b/src/components/CMyElem/CMyElem.ts index 0839954a..f4ad0674 100755 --- a/src/components/CMyElem/CMyElem.ts +++ b/src/components/CMyElem/CMyElem.ts @@ -15,25 +15,52 @@ import { CCardCarousel } from '@src/components/CCardCarousel' import { CMyPage } from '@src/components/CMyPage' import { CMyPageIntro } from '@src/components/CMyPageIntro' import { CEventsCalendar } from '@src/components/CEventsCalendar' +import { CMyEditor } from '@src/components/CMyEditor' + import MixinMetaTags from '@/mixins/mixin-metatags' +import { useQuasar } from 'quasar' +import { useI18n } from '@/boot/i18n' export default defineComponent({ name: 'CMyElem', - components: { CImgTitle, CTitle, LandingFooter, CEventsCalendar, CCardCarousel, COpenStreetMap, CMyPage, CMyPageIntro }, + components: { CImgTitle, CTitle, LandingFooter, CEventsCalendar, CCardCarousel, COpenStreetMap, CMyPage, CMyPageIntro, CMyEditor }, props: { myelem: { type: Object as PropType, required: true, }, + editOn: { + type: Boolean, + required: false, + default: false, + }, + addOn: { + type: Boolean, + required: false, + default: false, + } }, setup(props) { const globalStore = useGlobalStore() const { setmeta, getsrcbyimg } = MixinMetaTags() + const $q = useQuasar() + const { t } = useI18n() + const animare = ref(0) const slide = ref(0) const slide2 = ref(0) + const disableSave = ref(true) + + const neworder = ref(0) + + const myel = toRef(props, 'myelem') + const newtype = ref('') + + watch(() => myel.value.order, (value, oldval) => { + mounted() + }) function getArrDisciplines() { return globalStore.disciplines.filter((rec: any) => rec.showinhome) @@ -46,6 +73,69 @@ export default defineComponent({ return '600px' } + function saveElem() { + // Save Elem record + const myelem = props.myelem + myelem.order = neworder.value + globalStore.saveMyElem($q, t, myelem).then((ris) => { + if (ris) { + // OK + disableSave.value = true + } + }) + } + + function addNewElem(order?: number) { + + const newrec: IMyElem = { + _id: undefined, + type: newtype.value, + path: props.myelem.path, + order: order ? order : 1000, + active: true, + container: '' + } + + globalStore.addNewElem($q, t, newrec) + } + + function delElem() { + $q.dialog({ + message: 'Eliminare ' + props.myelem.container + ' ?', + html: true, + ok: { + label: 'Elimina', + push: true, + }, + title: '', + cancel: true, + persistent: false, + }).onOk(async () => { + + // Save Elem record + await globalStore.delMyElem($q, t, props.myelem).then((ris) => { + if (ris) { + // OK + disableSave.value = true + } + }) + }) + + } + + function modifElem(value: any) { + disableSave.value = false + } + + function mounted() { + neworder.value = props.myelem.order + + if (props.myelem) + newtype.value = props.myelem.type + } + + onMounted(mounted) + return { tools, shared_consts, @@ -56,6 +146,14 @@ export default defineComponent({ animare, setmeta, getsrcbyimg, + saveElem, + myel, + disableSave, + modifElem, + delElem, + addNewElem, + newtype, + neworder, } }, diff --git a/src/components/CMyElem/CMyElem.vue b/src/components/CMyElem/CMyElem.vue index f2d90dda..524128a5 100755 --- a/src/components/CMyElem/CMyElem.vue +++ b/src/components/CMyElem/CMyElem.vue @@ -1,56 +1,287 @@ diff --git a/src/components/CMyPage/CMyPage.ts b/src/components/CMyPage/CMyPage.ts index 3b8b3da6..0ea694d0 100755 --- a/src/components/CMyPage/CMyPage.ts +++ b/src/components/CMyPage/CMyPage.ts @@ -66,7 +66,9 @@ export default defineComponent({ load() - return { rec } + return { + rec, globalStore + } }, }) diff --git a/src/components/CMyPage/CMyPage.vue b/src/components/CMyPage/CMyPage.vue index 99e50dd9..4b184860 100755 --- a/src/components/CMyPage/CMyPage.vue +++ b/src/components/CMyPage/CMyPage.vue @@ -24,9 +24,7 @@
- -
diff --git a/src/rootgen/admin/home/home.scss b/src/components/CMyPageElem/CMyPageElem.scss similarity index 100% rename from src/rootgen/admin/home/home.scss rename to src/components/CMyPageElem/CMyPageElem.scss diff --git a/src/components/CMyPageElem/CMyPageElem.ts b/src/components/CMyPageElem/CMyPageElem.ts new file mode 100755 index 00000000..10656924 --- /dev/null +++ b/src/components/CMyPageElem/CMyPageElem.ts @@ -0,0 +1,98 @@ +import { + computed, + defineComponent, onMounted, ref, toRef, watch, +} from 'vue' + +import { IMyElem, IMyPage } from '@src/model' +import { useGlobalStore } from '@store/globalStore' +import { LandingFooter } from '@/components/LandingFooter' +import { CMyElem } from '@/components/CMyElem' + +import { CImgTitle } from '../CImgTitle/index' +import { CTitle } from '../CTitle/index' +import { tools } from '@store/Modules/tools' +import { useQuasar } from 'quasar' +import { useI18n } from '@/boot/i18n' +import { shared_consts } from '@/common/shared_vuejs' + +export default defineComponent({ + name: 'CMyPageElem', + components: { LandingFooter, CImgTitle, CTitle, CMyElem }, + props: { + title: String, + mypath: { + type: String, + required: true, + }, + img: { + type: String, + required: false, + default: '', + }, + imgbackground: { + type: String, + required: false, + default: '', + }, + sizes: { + type: String, + required: false, + default: '', + }, + styleadd: { + type: String, + required: false, + default: '', + }, + nofooter: { + type: Boolean, + required: false, + default: false, + }, + }, + + setup(props) { + const rec = ref(null) + const mypathin = toRef(props, 'mypath') + + const $q = useQuasar() + + const { t } = useI18n() + + const editOn = ref(false) + const addOn = ref(false) + + const globalStore = useGlobalStore() + + const myelems = computed(() => { + if (mypathin.value) + return globalStore.getMyElems(mypathin.value) + else + return null + }) + + + const load = async (): Promise => { + // console.log('load', mypathin.value) + if (mypathin.value !== '') rec.value = await globalStore.loadPage('/' + mypathin.value) + } + + watch(() => props.mypath, async (to: string, from: string) => { + console.log('... load', mypathin.value, props.mypath) + await load() + }) + + + onMounted(load) + + return { + rec, myelems, + mypathin, + editOn, + addOn, + tools, + shared_consts, + } + }, + +}) diff --git a/src/components/CMyPageElem/CMyPageElem.vue b/src/components/CMyPageElem/CMyPageElem.vue new file mode 100755 index 00000000..c1f8ae8a --- /dev/null +++ b/src/components/CMyPageElem/CMyPageElem.vue @@ -0,0 +1,75 @@ + + + + diff --git a/src/components/CMyPageElem/index.ts b/src/components/CMyPageElem/index.ts new file mode 100755 index 00000000..1a62d670 --- /dev/null +++ b/src/components/CMyPageElem/index.ts @@ -0,0 +1 @@ +export { default as CMyPageElem } from './CMyPageElem.vue' diff --git a/src/components/CSignUpIscrizioneArcadei/test2 b/src/components/CSignUpIscrizioneArcadei/test2 new file mode 100644 index 00000000..209f36ec --- /dev/null +++ b/src/components/CSignUpIscrizioneArcadei/test2 @@ -0,0 +1,4 @@ +Con la mia contribuzione, dopo l'approvazione dell'assemblea generale entro a far parte del Comitato, con la mia +presenza morale, spirituale, intellettuale e/o contribuendo alle attività pratiche necessarie alla creazione ed +attuazione degli scopi costitutivi. + diff --git a/src/components/index.ts b/src/components/index.ts index 7da20010..5cf8178e 100755 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -16,6 +16,7 @@ export * from './CMyCart' export * from './CMyFieldDb' export * from './CMyFieldRec' export * from './CMyPage' +export * from './CMyPageElem' export * from './CMyPageIntro' export * from './CMyElem' export * from './CMyTeacher' diff --git a/src/db/lang/ws_it.js b/src/db/lang/ws_it.js index 865d73d1..a0b78499 100755 --- a/src/db/lang/ws_it.js +++ b/src/db/lang/ws_it.js @@ -1,9 +1,9 @@ const msg_website_it = { ws: { - sitename: 'Riso', - siteshortname: 'RISO', - description: 'Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.', - keywords: 'riso, piattaforma di scambio, rete italiana scambio orizzontale, riso app, riso piattaforma, scambio e baratto, momenta RIS', + sitename: 'KolibriLab', + siteshortname: 'KolibriLab', + description: '', + keywords: '', }, products: { quantity: 'Quantità', @@ -54,9 +54,9 @@ const msg_website_it = { need_Telegram: 'Per poter utilizzare la Piattaforma occorre avere Telegram installato
', Registrazione_Con_Bot: '1) Copia questo username cliccandoci sopra:', SignUpIscrizione: 'Diventa Socio CNM', + SignUpArcadei: 'Aderisci ad Arcadei', SignUp_alreadylista: 'Registrazione per quelli che erano già nella lista di Notevole (del 2019) !', SignUp2: 'Registrazione', - SignUp3: 'Reg', SignUpBot: 'Registrati', SignIn: 'Login', status: 'Statistiche', @@ -114,8 +114,10 @@ const msg_website_it = { hours: 'Ore', department: 'Uffici', title: 'Titolo', + subtitle: 'SottoTitolo', path: 'Percorso', img1: 'Immagine 1', + imgsize: 'ImgSize', contentfield: 'Testo 1', video1: 'Video 1', ratio1: 'Ratio 1', @@ -142,8 +144,8 @@ const msg_website_it = { color: 'Colore', }, msg: { - myAppName: 'Riso', - myAppDescription: 'Il primo Vero Social Libero, Equo e Solidale, dove Vive Consapevolezza e Aiuto Comunitario. Gratuito', + myAppName: 'Arcadei', + myAppDescription: 'Modello Comunitario', underconstruction: 'App in costruzione...', myDescriz: '', sottoTitoloApp: 'Il primo Vero Social', @@ -158,32 +160,37 @@ const msg_website_it = { + ' che intere popolazioni antiche conoscevano bene.', descrapp_pag2: 'E\' giunta l\'ora di utilizzare i nuovi strumenti Tecnologici a nostro favore, per Liberarci ' + 'così piano piano dalla schiavitù del "Lavoro per generare Denaro" e trasformando le nostre Capacitá in ' - + 'Risorse Umane per poterci sostenere e vivere in Armonia con gli altri.
' + - '
R.I.S.O.
' + - 'Siamo una rete di comunità consapevoli, basata sul sostegno reciproco, la fiducia, la condivisione e l\'ascolto. \n' + - 'Coltiviamo terreno fertile per creare, in armonia con la natura, un mondo di collettività libere e autosufficienti, attraverso un circuito di scambio di esperienze umane, beni e servizi.
' + - 'Partecipa al cambiamento. RISO sei anche tu!
', + + 'Risorse Umane per poterci sostenere e vivere in Armonia con gli altri.', freesocial: { title: 'Social', descr: 'Una Community organizzata per Categorie, dove potrai unirti a Gruppi Tematici, ' + 'Condividere Esperienze e unire Competenze per organizzare e sostenere Progetti Innovativi per il Popolo.

' + 'Verranno evidenziati sviluppi Etici come l\'Auto-Produzione, la Sostenibilitá, ' + 'la Buona Salute Naturale e il Rispetto per l\'Ambiente e per tutti gli Esseri Viventi di questo ' - + 'Pianeta.', + + 'Pianeta. Chiunque potrá esprimere il proprio Consenso o Dissenso partecipando a Sondaggi Interattivi' + + ' e realizzare insieme i Cambiamenti necessari alla nostra Società.', }, freetalent: { title: 'Beni e Servizi', descr: 'Condividi i tuoi Talenti e Abilità, ' + 'Nel Dare e Ricevere, si creeranno così legami di Amicizia, Solidarietà, Cooperazione e Divertimento

' + - 'Favoriamo lo scambio locale di Beni e Servizi dove potrai scegliere cosa chiedere in cambio (Dono, Offerta Libera, Baratto, Monete Alternative, ecc...).' + 'Favoriamo lo scambio locale di Beni e Servizi grazie ad un sistema di baratto organizzato, in cui la comunità stessa si pone come garante.' }, coin: { title: 'RIS - Credito Alternativo', + descr: 'Stiamo lavorando anche per creare una sorta di "moneta alternativa" per conteggiare gli scambi che avvengono tra di noi, quando il semplice baratto risulta non applicabile.
' + + 'Partendo dalle basi del Si.Cre.Na.C.C - Sistema di Credito Naturale a Copertura Certa.
' + + 'Ciascun operatore potrà creare moneta all\'occorrenza, se il saldo del suo conto non sarà sufficiente a coprire la spesa. Potrà quindi mandare il suo conto in "scoperto", accollandosi il conseguente' + + ' Debito, accreditando l\'equivalente somma all\'operatore ricevente, il quale la annovera nel suo conto in qualità di Credito. ' + + 'L\'equilibrio tra il credito dell\'uno ed il debito dell\'altro ha come conseguenza che il debitore dovrà lavorare per rifondere il debito, mentre il ricevente potrà usare il credito come moneta.
' + + 'Per maggiori informazioni consultare il libro gratuito cliccando qui.' + + }, freeliving: { title: 'Gruppi Territoriali', - descr: 'Questo progetto vuole diffondere la creazione di Gruppi Territoriali Provinciali, ' - + 'per poter favorire progetti condivisi in ambito territoriale e creare così una Rete di Fiducia fino al vicinato, come giá viene praticato in piccolo, in numerosi Ecovillaggi e Comunità del mondo.', + descr: 'Questo progetto vuole diffondere la creazione di Gruppi Territoriali Provinciali,' + + 'per poter favorire progetti condivisi in ambito territoriale e creare così una Rete di Fiducia fino al vicinato, come giá viene praticato in piccolo, in numerosi Ecovillaggi e Comunità del mondo.', }, freecollabora: { @@ -231,9 +238,9 @@ const msg_website_it = { }, multiplatform: { title: 'Multi-piattaforma', - descr: 'E\' compatibile con Google Chrome, Firefox, Opera, Safari, iPhone, Android e PC. L\'Applicazione s\'installa facilmente, senza dover passare dallo store. ' + descr: 'E\' compatibile con Google Chrome, Firefox, Opera, Safari, iPhone, Android e PC. L\'Applicazione s\'installa facilmente, senza passare dallo store. ' + 'basta entrare sul sito www.riso.app.
' - + 'Dopo la registrazione chiederà di aggiungerlo alla Schermata Home (oppure cliccare sul menu "..." del browser e scegliere "Installa APP")', + + 'Dopo la registrazione chiederà di aggiungerlo allo schermo (o cliccare sul menu del browser "Installa APP")', }, free: { title: 'Gratuita, Open Source e Niente Pubblicità', diff --git a/src/db/static_data.ts b/src/db/static_data.ts index fdc2e513..9336dbdd 100755 --- a/src/db/static_data.ts +++ b/src/db/static_data.ts @@ -7,29 +7,29 @@ import { import { func } from '@store/Modules/fieldsTable' const functionality: IFunctionality = { - PWA: true, + PWA: false, SHOW_USER_MENU: true, // Cambiare con true SHOW_PROFILE: true, SHOW_REG_BUTTON: true, ENABLE_REGISTRATION: true, - ENABLE_REG_BY_BOT: true, - ENABLE_REG_NEED_TELEGRAM: true, + ENABLE_REG_BY_BOT: false, + ENABLE_REG_NEED_TELEGRAM: false, SHOW_NEWSLETTER: false, SHOW_ONLY_POLICY: true, ENABLE_TODOS_LOADING: false, ENABLE_PROJECTS_LOADING: false, SHOW_IF_IS_SERVER_CONNECTION: false, SHOW_MESSAGES: false, - SHOW_NOTIF: true, - SHOW_COINS: true, - BOOKING_EVENTS: true, + SHOW_NOTIF: false, + SHOW_COINS: false, + BOOKING_EVENTS: false, ENABLE_ECOMMERCE: false, ENABLE_REG_ISP: true, - ENABLE_GROUPS: true, - ENABLE_CIRCUITS: true, - SHOW_COMPETENZE: true, - ENABLE_VIEW_GROUPS: true, - ENABLE_VIEW_USERS: true, + ENABLE_GROUPS: false, + ENABLE_CIRCUITS: false, + SHOW_COMPETENZE: false, + ENABLE_VIEW_GROUPS: false, + ENABLE_VIEW_USERS: false, ENABLE_VIEW_PROFILE: true, } @@ -345,6 +345,20 @@ const routes_manager: IListRoutes[] = [ onlyManager: true, onlyEditor: true }, + { + active: true, + order: 32, + path: '/admin/home', + materialIcon: 'fas fa-file-alt', + name: 'otherpages.admin.elems', + component: () => import('@/rootgen/admin/editElems/editElems.vue'), + inmenu: true, + submenu: true, + level_parent: 0, + level_child: 0.5, + onlyManager: true, + onlyEditor: true + }, { active: true, order: 30, @@ -476,78 +490,12 @@ const baseroutes: IListRoutes[] = [ path: '/', materialIcon: 'home', name: 'pages.home', - component: () => import('@src/root/mainview/mainview.vue'), + component: () => import('@src/root_spec/home_kolibrilab/home_kolibrilab.vue'), reqauth: false, inmenu: true, infooter: true, }, - { - active: true, - order: 12, - path: '/goods', - materialIcon: 'fas fa-tshirt', - name: 'mypages.goods', - component: () => import('@/root/goods/goods.vue'), - meta: { requiresAuth: true }, - inmenu: true, - infooter: true, - }, - { - active: true, - order: 15, - path: '/services', - materialIcon: 'fas fa-house-user', - name: 'mypages.services', - component: () => import('@/root/services/services.vue'), - meta: { requiresAuth: true }, - inmenu: true, - infooter: true, - }, - { - active: true, - order: 15, - path: '/provapao', - materialIcon: 'fas fa-house-user', - name: 'mypages.provapao', - component: () => import('@/root/provapao/provapao.vue'), - meta: { requiresAuth: true }, - inmenu: false, - infooter: false, - }, - { - active: true, - order: 15, - path: '/hosps', - materialIcon: 'fas fa-bed', - name: 'mypages.hosp', - component: () => import('@/root/hosp/hosp.vue'), - meta: { requiresAuth: true }, - inmenu: true, - infooter: true, - }, - { - active: true, - order: 20, - path: '/events', - materialIcon: 'fas fa-bullhorn', - name: 'mypages.events', - component: () => import('@/root/eventi/eventi.vue'), - meta: { requiresAuth: true }, - inmenu: true, - infooter: true, - }, - { - active: true, - order: 100, - path: '/presentazione', - materialIcon: 'fas fa-info', - name: 'pages.presentazione', - component: () => import('@src/root/presentazione/presentazione.vue'), - reqauth: false, - inmenu: true, - infooter: true, - }, - { + /*{ active: true, order: 120, path: '/myprofile', @@ -557,7 +505,7 @@ const baseroutes: IListRoutes[] = [ meta: { requiresAuth: true }, inmenu: true, infooter: true, - }, + },*/ { active: true, order: 120, @@ -569,17 +517,6 @@ const baseroutes: IListRoutes[] = [ inmenu: false, infooter: false, }, - { - active: true, - order: 130, - path: '/friends', - materialIcon: 'fas fa-user-friends', - name: 'mypages.friends', - component: () => import('@/views/user/myfriends/myfriends.vue'), - meta: { requiresAuth: true }, - inmenu: true, - infooter: true, - }, { active: functionality.ENABLE_GROUPS, order: 132, @@ -623,7 +560,7 @@ const baseroutes: IListRoutes[] = [ meta: { requiresAuth: true, newpage: true }, inmenu: false, infooter: false, - },{ + }, { active: true, order: 137, path: '/circuit/:path', @@ -678,16 +615,6 @@ const baseroutes: IListRoutes[] = [ inmenu: false, infooter: false, }, - { - active: true, - order: 150, - path: '/fundraising', - materialIcon: 'fas fa-hand-holding-heart', - name: 'pages.fundraising', - component: () => import('@src/root/fundraising/fundraising.vue'), - inmenu: true, - infooter: true, - }, { active: true, order: 200, @@ -709,6 +636,17 @@ const baseroutes: IListRoutes[] = [ inmenu: false, infooter: false, }, + { + active: true, + order: 15, + path: '/provapao', + materialIcon: 'fas fa-house-user', + name: 'mypages.provapao', + component: () => import('@/root/provapao/provapao.vue'), + meta: { requiresAuth: true }, + inmenu: false, + infooter: false, + }, { active: true, order: 400, @@ -770,17 +708,6 @@ const baseroutes: IListRoutes[] = [ inmenu: false, infooter: true }, - { - active: functionality.ENABLE_REGISTRATION && functionality.ENABLE_REG_NEED_TELEGRAM, - order: 1000, - path: '/signup/:invited/:usernameteleg/:idteleg/:regexpire', - materialIcon: 'how_to_reg', - name: 'pages.SignUp', - component: () => import('@/views/login/signup/signup.vue'), - inmenu: false, - infooter: false, - separator: false - }, { active: functionality.ENABLE_REG_BY_BOT, order: 1000, @@ -791,34 +718,23 @@ const baseroutes: IListRoutes[] = [ infooter: functionality.ENABLE_REG_BY_BOT, separator: false }, - /*{ + { active: functionality.ENABLE_REGISTRATION && !functionality.ENABLE_REG_NEED_TELEGRAM, order: 1000, path: '/signup', materialIcon: 'how_to_reg', name: 'pages.SignUp', - component: () => import('@/views/login/signup/signup_noteleg.vue'), - inmenu: false, - infooter: false, - separator: false - },*/ - { - active: true, - order: 1001, - path: '/signup/:invited', - materialIcon: 'how_to_reg', - name: 'pages.SignUp2', - component: () => import('@/views/login/signup/signup.vue'), + component: () => import('@/views/login/signup_noteleg/signup_noteleg.vue'), inmenu: false, infooter: false, separator: false }, { active: true, - order: 1002, - path: '/signup/:invited/:regexpire', + order: 1001, + path: '/signup/:invited', materialIcon: 'how_to_reg', - name: 'pages.SignUp3', + name: 'pages.SignUp2', component: () => import('@/views/login/signup/signup.vue'), inmenu: false, infooter: false, @@ -842,7 +758,7 @@ const baseroutes: IListRoutes[] = [ materialIcon: 'account_circle', name: 'pages.SignIn', component: () => import('@/views/login/signin_noreg/signin_noreg.vue'), - inmenu: true, + inmenu: false, infooter: true }, // --- NOT IN MENU: --- @@ -882,7 +798,7 @@ const baseroutes: IListRoutes[] = [ isseparator: true, inmenu: true, }, - { + /*{ active: true, order: 80, path: '/calendario-eventi', @@ -893,6 +809,8 @@ const baseroutes: IListRoutes[] = [ inmenu: true, infooter: true }, + + */ { active: true, order: 1000, diff --git a/src/model/GlobalStore.ts b/src/model/GlobalStore.ts index a097a77f..ff236e8a 100755 --- a/src/model/GlobalStore.ts +++ b/src/model/GlobalStore.ts @@ -114,6 +114,7 @@ export interface IMyBot { export interface IMyElem { _id?: string type?: number + path?: string title?: string container?: string container2?: string @@ -123,11 +124,11 @@ export interface IMyElem { ratio?: string containerHtml?: string size?: string - order?: string - width?: string - height?: string - heightimg?: string - widthimg?: string + order?: number + width?: number + height?: number + heightimg?: number + widthimg?: number link?: string onlyif_logged?: boolean active?: boolean diff --git a/src/root/mypage/mypage.ts b/src/root/mypage/mypage.ts index 27126ae6..9c9f2cd2 100755 --- a/src/root/mypage/mypage.ts +++ b/src/root/mypage/mypage.ts @@ -3,11 +3,11 @@ import { defineComponent, ref, onMounted, watch, computed } from 'vue' import { useGlobalStore } from '@store/globalStore' import { useRoute } from 'vue-router' import MixinMetaTags from '@/mixins/mixin-metatags' -import { CMyPage } from '@/components/CMyPage' +import { CMyPageElem } from '@/components/CMyPageElem' export default defineComponent({ name: 'Mypage', - components: { CMyPage }, + components: { CMyPageElem }, setup() { const rec = ref({}) const globalStore = useGlobalStore() diff --git a/src/root/mypage/mypage.vue b/src/root/mypage/mypage.vue index af5dfdbd..1b925258 100755 --- a/src/root/mypage/mypage.vue +++ b/src/root/mypage/mypage.vue @@ -1,6 +1,7 @@ diff --git a/src/rootgen/admin/home/home.ts b/src/rootgen/admin/home/home.ts deleted file mode 100755 index f2d13e2b..00000000 --- a/src/rootgen/admin/home/home.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { defineComponent, ref, onMounted } from 'vue' - -import { CImgText } from '../../../components/CImgText/index' -import { CCard } from '@/components/CCard' -import { CMyPage } from '@/components/CMyPage' -import { CTitleBanner } from '@/components/CTitleBanner' -import { CGridTableRec } from '@/components/CGridTableRec' - -import { colmyelems } from '@src/store/Modules/fieldsTable' -import MixinMetaTags from '@/mixins/mixin-metatags' - -export default defineComponent({ - name: 'Home', - components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec }, - setup() { - - const { setmeta } = MixinMetaTags() - - return { - colmyelems, - setmeta, - } - } -}) diff --git a/src/statics/lang/it.js b/src/statics/lang/it.js index eea12fda..e1f4ef46 100755 --- a/src/statics/lang/it.js +++ b/src/statics/lang/it.js @@ -71,6 +71,7 @@ const msg_it = { monete: 'Monete', pages: 'Pagine', Home: 'Pagina Home', + elems: 'Elementi Pagine', operators: 'Operatori', disciplines: 'Discipline', media: 'Media', @@ -1250,7 +1251,32 @@ const msg_it = { bookings: 'Prenotaz.', profile: 'Profilo', circuits: 'Circuiti', - } + }, + + myelems: { + active: 'active', + title: 'title', + path: 'Path', + order: 'Order', + type: 'Type', + container: 'Container', + container2: 'Container2', + container3: 'Container3', + number: 'Number', + imgback: 'imgback', + size: 'size', + ratio: 'ratio', + containerHtml: 'containerHtml', + height: 'height', + heightimg: 'heightimg', + widthimg: 'widthimg', + link: 'link', + width: 'width', + onlyif_logged: 'onlyif_logged', + color: 'color', + class: 'class', + styleadd: 'styleadd', + }, }, }; diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts index 9a95f58d..fe09c228 100755 --- a/src/store/Modules/fieldsTable.ts +++ b/src/store/Modules/fieldsTable.ts @@ -126,6 +126,7 @@ export const colgallery = [ export const colmyelems = [ AddCol({ name: 'active', label_trans: 'myelems.active', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'title', label_trans: 'myelems.title' }), + AddCol({ name: 'path', label_trans: 'myelems.path' }), AddCol({ name: 'order', label_trans: 'myelems.order', fieldtype: costanti.FieldType.number }), AddCol({ name: 'type', label_trans: 'myelems.type', fieldtype: costanti.FieldType.select, jointable: 'elemtypes' }), AddCol({ name: 'container', label_trans: 'myelems.container' }), diff --git a/src/store/UserStore.ts b/src/store/UserStore.ts index 536abbea..68b98735 100755 --- a/src/store/UserStore.ts +++ b/src/store/UserStore.ts @@ -29,6 +29,7 @@ import { static_data } from '@src/db/static_data' import bcrypt from 'bcryptjs' + import { useTodoStore } from '@store/Todos' import { Router } from 'vue-router' import { useProjectStore } from '@store/Projects' @@ -257,7 +258,7 @@ export const useUserStore = defineStore('UserStore', { // Check if is this User! if (this.my.username === username) return this.my - let trovato:any = null + let trovato: any = null if (this.usersList) trovato = this.usersList.find((item: any) => item.username === username) if (trovato) { @@ -283,7 +284,7 @@ export const useUserStore = defineStore('UserStore', { }, getImgUserByUsername(username: string): string { - let img = this.getImgByUsername(username) + const img = this.getImgByUsername(username) return img ? img : 'images/noimg-user.svg' }, @@ -309,6 +310,7 @@ export const useUserStore = defineStore('UserStore', { return costanti.DIR_UPLOAD + 'profile/' + userparam.username + '/' + userparam.profile.img } } catch (e) { + // } if (!reale) return 'images/noimg.png' @@ -363,6 +365,7 @@ export const useUserStore = defineStore('UserStore', { if (circ.photos && circ.photos.length > 0) return costanti.DIR_UPLOAD + 'circuits/' + circ.path + '/' + circ.photos[0].imagefile } catch (e) { + // } return 'images/noimg.png' }, @@ -370,9 +373,10 @@ export const useUserStore = defineStore('UserStore', { getImgByGroup(group: IMyGroup): string { try { - //++Todo: Sistemare! + // ++Todo: Sistemare! return costanti.DIR_UPLOAD + 'mygroups/' + group.groupname + '/' + group.photos[0].imagefile } catch (e) { + // } return 'images/noimg.png' }, @@ -411,7 +415,7 @@ export const useUserStore = defineStore('UserStore', { }, getNameSurnameByUsername(username: string): string { - let user = this.getUserByUsername(username) + const user = this.getUserByUsername(username) if (user) return `${user.name} ` + !!user.surname ? user.surname : '' return `(${username})` }, @@ -420,7 +424,7 @@ export const useUserStore = defineStore('UserStore', { // Check if is this User! if (this.my._id === userId) return this.my - let trovato:any = null + let trovato: any = null if (this.usersList) trovato = this.usersList.find((item: any) => item._id === userId) diff --git a/src/store/globalStore.ts b/src/store/globalStore.ts index daab53f5..e8d2071d 100644 --- a/src/store/globalStore.ts +++ b/src/store/globalStore.ts @@ -5,8 +5,8 @@ import { IConfig, IDataToSet, IGlobalState, - IListRoutes, - IMyPage, IParamsPickup, + IListRoutes, IMyElem, + IMyPage, IMySkill, IParamsPickup, IParamsQuery, ISettings, StateConnection, @@ -178,6 +178,10 @@ export const useGlobalStore = defineStore('GlobalStore', { getPage: (state: IGlobalState) => (path: string): IMyPage | undefined => state.mypage.find((page) => (`/${page.path}`) === path), + getMyElems: (state: IGlobalState) => (path: string): IMyElem[] | [] => { + return state.myelems.filter((page: IMyElem) => (page.path === path)).sort((a: any, b: any) => a.order - b.order) + }, + getmenu: (state: IGlobalState): any => { // console.log('getmenu', cfgrouter.getmenu()) @@ -1727,6 +1731,52 @@ export const useGlobalStore = defineStore('GlobalStore', { }, + async delMyElem($q: any, t: any, myelem: IMyElem) { + + if (!myelem._id) + return false + + return await this.DeleteRec({table: 'myelems', id: myelem._id }).then((ris) => { + if (ris) { + this.myelems = this.myelems.filter((rec) => rec._id !== myelem._id) + tools.showPositiveNotif($q, t('db.deletedrecord')) + } else { + tools.showNegativeNotif($q, t('db.recdelfailed')) + } + }) + }, + + async saveMyElem($q: any, t: any, myelem: IMyElem) { + const mydata = { + table: 'myelems', + data: {} + } + + mydata.data = myelem + + return await this.saveTable(mydata) + .then((ris) => { + if (ris) { + tools.showPositiveNotif($q, t('db.recupdated')) + } else { + tools.showNegativeNotif($q, t('db.recfailed')) + } + return ris + }).catch((e) => { + tools.showNegativeNotif($q, t('db.recfailed')) + return false + }) + + + }, + + async addNewElem($q: any, t: any, myelem: IMyElem) { + const myrec = await this.saveMyElem($q, t, myelem) + if (myrec) { + myelem._id = myrec._id + this.myelems.push(myelem) + } + }, }, }) diff --git a/tsconfig.json b/tsconfig.json index dc8a33c0..d6fd778d 100755 --- a/tsconfig.json +++ b/tsconfig.json @@ -38,7 +38,10 @@ "@model": ["src/model/index.ts"], "@model/*": ["src/model/*"], "model": ["src/model/index.ts"], - "enums": ["src/enums/*"] + "enums": ["src/enums/*"], + "crypto": [ + "node_modules/bcryptjs" + ], } }, "exclude": [ diff --git a/yarn.lock b/yarn.lock index 8c31065a..fbf11977 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4146,11 +4146,6 @@ crypto-random-string@^4.0.0: dependencies: type-fest "^1.0.1" -crypto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/crypto/-/crypto-1.0.1.tgz#2af1b7cad8175d24c8a1b0778255794a21803037" - integrity sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig== - css-color-names@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"