From 78a79e1ad5923de5dcaaf677a8a7296c69d2733a Mon Sep 17 00:00:00 2001 From: Paolo Arena Date: Fri, 16 Sep 2022 17:39:28 +0200 Subject: [PATCH] fix Saldo when press refuse coins. fix Risolvere problema del ritardo quando si fa il primo login... --- .env.development | 6 +- .env.example.production | 2 +- _ALL_SITES/insiemesipuo.app/.env.development | 2 +- .../popolodelnuovomondo.app/.env.development | 2 +- _ALL_SITES/riso.app/.env.development | 2 +- _ALL_SITES/riso.app/.env.test | 2 +- _ALL_SITES/riso.app/db/static_data.ts | 1 + .../terradellavisione.app/.env.development | 2 +- _ALL_SITES/terradellavisione.app/.env.test | 2 +- package.json | 4 +- public/js/track.js | 2 +- public/js/workbox-sw-6-1.js | 2 + public/js/workbox-sw.js | 2 +- src-pwa/custom-service-worker.js | 55 +- src-pwa/register-service-worker.js | 1 + src/common/shared_vuejs.ts | 21 + src/components/CFinder/CFinder.ts | 5 + src/components/CFinder/CFinder.vue | 4 +- .../CGridTableRec/CGridTableRec.vue | 2 +- src/components/CMyCircuits/CMyCircuits.ts | 6 + src/components/CMyCircuits/CMyCircuits.vue | 4 +- src/components/CMyUser/CMyUser.ts | 4 + src/components/CMyUser/CMyUser.vue | 22 + .../CMyUserOnlyView/CMyUserOnlyView.scss | 4 + .../CMyUserOnlyView/CMyUserOnlyView.ts | 122 + .../CMyUserOnlyView/CMyUserOnlyView.vue | 308 + src/components/CMyUserOnlyView/index.ts | 1 + src/components/CSendCoins/CSendCoins.ts | 24 +- src/components/CSendCoins/CSendCoins.vue | 8 +- src/components/CSignIn/CSignIn.ts | 3 +- src/components/MyHeader/MyHeader.ts | 43 +- src/components/MyHeader/MyHeader.vue | 4 + src/components/index.ts | 1 + src/db/static_data.ts | 3 +- .../toolbar/coinsPopover/coinsPopover.scss | 36 + .../toolbar/coinsPopover/coinsPopover.ts | 193 + .../toolbar/coinsPopover/coinsPopover.vue | 196 + .../toolbar/notifPopover/notifPopover.ts | 63 +- .../toolbar/notifPopover/notifPopover.vue | 49 +- src/model/GlobalStore.ts | 2 + src/rootgen/admin/userPanel/userPanel.ts | 43 + src/rootgen/admin/userPanel/userPanel.vue | 25 + src/statics/lang/it.js | 7 +- src/store/Api/Instance.ts | 6 +- src/store/Modules/tools.ts | 16 +- src/store/NotifStore.ts | 31 +- src/store/UserStore.ts | 40 +- src/store/globalStore.ts | 51 +- src/terradellavisione.html | 146 - src/views/user/mycircuit/mycircuit.vue | 8 +- src/views/user/myprofile/myprofile.ts | 48 +- src/views/user/myprofile/myprofile.vue | 1 + yarn.lock | 5640 ++++++++--------- 53 files changed, 3779 insertions(+), 3498 deletions(-) create mode 100755 public/js/workbox-sw-6-1.js mode change 100755 => 100644 public/js/workbox-sw.js create mode 100755 src/components/CMyUserOnlyView/CMyUserOnlyView.scss create mode 100755 src/components/CMyUserOnlyView/CMyUserOnlyView.ts create mode 100755 src/components/CMyUserOnlyView/CMyUserOnlyView.vue create mode 100755 src/components/CMyUserOnlyView/index.ts create mode 100755 src/layouts/toolbar/coinsPopover/coinsPopover.scss create mode 100755 src/layouts/toolbar/coinsPopover/coinsPopover.ts create mode 100755 src/layouts/toolbar/coinsPopover/coinsPopover.vue delete mode 100644 src/terradellavisione.html diff --git a/.env.development b/.env.development index 1f41131c..a70f66fd 100755 --- a/.env.development +++ b/.env.development @@ -1,17 +1,17 @@ -APP_VERSION="0.5.1" +APP_VERSION="0.5.6" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_SERVER="freeplanet_serverside" SERVERDIR_WEBSITE="" SERVERPW_WEBSITE="" -APP_URL="http://localhost" +APP_URL="https://localhost" URL_FACEBOOK="https://www.facebook.com/freeplanetapp" PROVA_PAOLO="PROVA ENV FUNZIONA!" LANG_DEFAULT="it" PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF" MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T" -MONGODB_HOST="http://localhost:3000" +MONGODB_HOST="https://localhost:3000" LOGO_REG='riso-logo-full.png' TEST_NAME="Paolo" TEST_SURNAME="Arena" diff --git a/.env.example.production b/.env.example.production index f7820536..1484f36e 100755 --- a/.env.example.production +++ b/.env.example.production @@ -1,4 +1,4 @@ -APP_VERSION="0.5.1" +APP_VERSION="0.5.6" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/insiemesipuo.app/.env.development b/_ALL_SITES/insiemesipuo.app/.env.development index 88299dd7..4b67e68e 100755 --- a/_ALL_SITES/insiemesipuo.app/.env.development +++ b/_ALL_SITES/insiemesipuo.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.1" +APP_VERSION="0.5.6" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/popolodelnuovomondo.app/.env.development b/_ALL_SITES/popolodelnuovomondo.app/.env.development index ecb60fa3..6640ed75 100755 --- a/_ALL_SITES/popolodelnuovomondo.app/.env.development +++ b/_ALL_SITES/popolodelnuovomondo.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.1" +APP_VERSION="0.5.6" SERVICE_WORKER_FILE="service-worker.js" APP_ID="12" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/riso.app/.env.development b/_ALL_SITES/riso.app/.env.development index 1f030752..24723fb6 100755 --- a/_ALL_SITES/riso.app/.env.development +++ b/_ALL_SITES/riso.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.1" +APP_VERSION="0.5.6" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/riso.app/.env.test b/_ALL_SITES/riso.app/.env.test index ee118175..7de8f829 100755 --- a/_ALL_SITES/riso.app/.env.test +++ b/_ALL_SITES/riso.app/.env.test @@ -1,4 +1,4 @@ -APP_VERSION="0.5.1" +APP_VERSION="0.5.6" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/riso.app/db/static_data.ts b/_ALL_SITES/riso.app/db/static_data.ts index 51a74d5a..6ee4c4fc 100755 --- a/_ALL_SITES/riso.app/db/static_data.ts +++ b/_ALL_SITES/riso.app/db/static_data.ts @@ -20,6 +20,7 @@ const functionality: IFunctionality = { SHOW_IF_IS_SERVER_CONNECTION: false, SHOW_MESSAGES: false, SHOW_NOTIF: true, + SHOW_COINS: true, BOOKING_EVENTS: true, ENABLE_ECOMMERCE: false, ENABLE_REG_ISP: true, diff --git a/_ALL_SITES/terradellavisione.app/.env.development b/_ALL_SITES/terradellavisione.app/.env.development index 5caf73c4..dfe7cf0d 100755 --- a/_ALL_SITES/terradellavisione.app/.env.development +++ b/_ALL_SITES/terradellavisione.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.1" +APP_VERSION="0.5.6" SERVICE_WORKER_FILE="service-worker.js" APP_ID="14" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/terradellavisione.app/.env.test b/_ALL_SITES/terradellavisione.app/.env.test index d4669233..dd872d27 100755 --- a/_ALL_SITES/terradellavisione.app/.env.test +++ b/_ALL_SITES/terradellavisione.app/.env.test @@ -1,4 +1,4 @@ -APP_VERSION="0.5.1" +APP_VERSION="0.5.6" SERVICE_WORKER_FILE="service-worker.js" APP_ID="14" DIRECTORY_LOCAL=newfreeplanet diff --git a/package.json b/package.json index 97b12e94..7104a4e5 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "riso", - "version": "0.5.1", + "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", @@ -113,7 +113,7 @@ "typescript": "^4.8.2", "vue-cli-plugin-element-ui": "^1.1.4", "vueify": "^9.4.1", - "webpack": "^5.0.0", + "webpack": "^5.74.0", "workbox-webpack-plugin": "^6.5.4" }, "browser": { diff --git a/public/js/track.js b/public/js/track.js index 58e06081..da706b55 100755 --- a/public/js/track.js +++ b/public/js/track.js @@ -2,7 +2,7 @@ function geturl() { const miaurl = document.location.href if (miaurl.includes('localhost')) { - // return 'http://192.168.170.47:8084' + return 'https://127.0.0.1:8084' } return '' } diff --git a/public/js/workbox-sw-6-1.js b/public/js/workbox-sw-6-1.js new file mode 100755 index 00000000..eceac39e --- /dev/null +++ b/public/js/workbox-sw-6-1.js @@ -0,0 +1,2 @@ +!function(){'use strict';try{self['workbox:sw:6.1.0']&&_()}catch(t){}const t={backgroundSync:'background-sync',broadcastUpdate:'broadcast-update',cacheableResponse:'cacheable-response',core:'core',expiration:'expiration',googleAnalytics:'offline-ga',navigationPreload:'navigation-preload',precaching:'precaching',rangeRequests:'range-requests',routing:'routing',strategies:'strategies',streams:'streams',recipes:'recipes'};self.workbox=new class{constructor(){return this.v={},this.Pt={debug:'localhost'===self.location.hostname,modulePathPrefix:null,modulePathCb:null},this.$t=this.Pt.debug?'dev':'prod',this.jt=!1,new Proxy(this,{get(e,s){if(e[s])return e[s];const o=t[s];return o&&e.loadModule('workbox-'+o),e[s]}})}setConfig(t={}){if(this.jt)throw new Error('Config must be set before accessing workbox.* modules');Object.assign(this.Pt,t),this.$t=this.Pt.debug?'dev':'prod'}loadModule(t){const e=this.St(t);try{importScripts(e),this.jt=!0}catch(s){throw console.error(`Unable to import module '${t}' from '${e}'.`),s}}St(t){if(this.Pt.modulePathCb)return this.Pt.modulePathCb(t,this.Pt.debug);let e=['https://storage.googleapis.com/workbox-cdn/releases/6.1.0'];const s=`${t}.${this.$t}.js`,o=this.Pt.modulePathPrefix;return o&&(e=o.split('/'),''===e[e.length-1]&&e.splice(e.length-1,1)),e.push(s),e.join('/')}}}(); +//# sourceMappingURL=workbox-sw.js.map diff --git a/public/js/workbox-sw.js b/public/js/workbox-sw.js old mode 100755 new mode 100644 index eceac39e..f9a60efc --- a/public/js/workbox-sw.js +++ b/public/js/workbox-sw.js @@ -1,2 +1,2 @@ -!function(){'use strict';try{self['workbox:sw:6.1.0']&&_()}catch(t){}const t={backgroundSync:'background-sync',broadcastUpdate:'broadcast-update',cacheableResponse:'cacheable-response',core:'core',expiration:'expiration',googleAnalytics:'offline-ga',navigationPreload:'navigation-preload',precaching:'precaching',rangeRequests:'range-requests',routing:'routing',strategies:'strategies',streams:'streams',recipes:'recipes'};self.workbox=new class{constructor(){return this.v={},this.Pt={debug:'localhost'===self.location.hostname,modulePathPrefix:null,modulePathCb:null},this.$t=this.Pt.debug?'dev':'prod',this.jt=!1,new Proxy(this,{get(e,s){if(e[s])return e[s];const o=t[s];return o&&e.loadModule('workbox-'+o),e[s]}})}setConfig(t={}){if(this.jt)throw new Error('Config must be set before accessing workbox.* modules');Object.assign(this.Pt,t),this.$t=this.Pt.debug?'dev':'prod'}loadModule(t){const e=this.St(t);try{importScripts(e),this.jt=!0}catch(s){throw console.error(`Unable to import module '${t}' from '${e}'.`),s}}St(t){if(this.Pt.modulePathCb)return this.Pt.modulePathCb(t,this.Pt.debug);let e=['https://storage.googleapis.com/workbox-cdn/releases/6.1.0'];const s=`${t}.${this.$t}.js`,o=this.Pt.modulePathPrefix;return o&&(e=o.split('/'),''===e[e.length-1]&&e.splice(e.length-1,1)),e.push(s),e.join('/')}}}(); +!function(){"use strict";try{self["workbox:sw:5.1.4"]&&_()}catch(t){}const t={backgroundSync:"background-sync",broadcastUpdate:"broadcast-update",cacheableResponse:"cacheable-response",core:"core",expiration:"expiration",googleAnalytics:"offline-ga",navigationPreload:"navigation-preload",precaching:"precaching",rangeRequests:"range-requests",routing:"routing",strategies:"strategies",streams:"streams"};self.workbox=new class{constructor(){return this.v={},this.t={debug:"localhost"===self.location.hostname,modulePathPrefix:null,modulePathCb:null},this.s=this.t.debug?"dev":"prod",this.o=!1,new Proxy(this,{get(e,s){if(e[s])return e[s];const o=t[s];return o&&e.loadModule("workbox-"+o),e[s]}})}setConfig(t={}){if(this.o)throw new Error("Config must be set before accessing workbox.* modules");Object.assign(this.t,t),this.s=this.t.debug?"dev":"prod"}loadModule(t){const e=this.i(t);try{importScripts(e),this.o=!0}catch(s){throw console.error(`Unable to import module '${t}' from '${e}'.`),s}}i(t){if(this.t.modulePathCb)return this.t.modulePathCb(t,this.t.debug);let e=["https://storage.googleapis.com/workbox-cdn/releases/5.1.4"];const s=`${t}.${this.s}.js`,o=this.t.modulePathPrefix;return o&&(e=o.split("/"),""===e[e.length-1]&&e.splice(e.length-1,1)),e.push(s),e.join("/")}}}(); //# sourceMappingURL=workbox-sw.js.map diff --git a/src-pwa/custom-service-worker.js b/src-pwa/custom-service-worker.js index 64d7ce7c..5fb08048 100755 --- a/src-pwa/custom-service-worker.js +++ b/src-pwa/custom-service-worker.js @@ -10,19 +10,21 @@ import { CacheFirst, } from 'workbox-strategies' +const ENABLE_DYNAMIC_CACHING = false; + // Used for filtering matches based on status code, header, or both import { CacheableResponsePlugin } from 'workbox-cacheable-response' // Used to limit entries in cache, remove entries after a certain period of time import { ExpirationPlugin } from 'workbox-expiration' console.log( - ' [ VER-0.5.1 ] _---------________------ PAO: this is my custom service worker') + ' [ VER-0.5.4 ] _---------________------ PAO: this is my custom service worker') importScripts('js/idb.js') importScripts('js/storage.js') -// importScripts('js/workbox-sw.js') +importScripts('js/workbox-sw.js') -importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.4/workbox-sw.js'); +// importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.4/workbox-sw.js'); @@ -34,7 +36,7 @@ let port = 3000 if (self.location.hostname.startsWith('test')) { port = 3001 } -console.log('SW-06 1') +console.log('SW- app ver 0.5.4') const cfgenv = { serverweb: `${self.location.protocol}//${self.location.hostname}:${port}`, @@ -126,6 +128,7 @@ if (workbox) { }), ) + /* // Per Articoli.... const articleHandler = new NetworkFirst({ cacheName: 'articles-cache', @@ -142,7 +145,7 @@ if (workbox) { registerRoute( new RegExp(/(.*)article(.*)\.html/), args => articleHandler.handle(args), - ) + ) */ registerRoute( new RegExp(/.*(?:googleapis|gstatic)\.com.*$/), @@ -259,6 +262,7 @@ if (workbox) { return fetch(args.event.request) .then((res) => caches.open('dynamic') .then((cache) => { + console.log('fetch cache') console.log('cache', args.event.request.url) cache.put(args.event.request.url, res.clone()) return res @@ -352,13 +356,15 @@ if ('serviceWorker' in navigator) { } -self.addEventListener('fetch', (event) => { +/* self.addEventListener('fetch', (event) => { if (event.request.url === '/') { const StaleWhileRevalidate = new StaleWhileRevalidate(); event.respondWith(StaleWhileRevalidate.handle({ event })); } }); + */ + self.addEventListener('fetch', function (event) { console.log('[Service Worker] Fetching something ....', event); console.log('event.request.cache=', event.request.cache) @@ -366,7 +372,26 @@ self.addEventListener('fetch', function (event) { console.log('SAME ORIGIN!', event); return; } - event.respondWith(caches.match(event.request)); + event.respondWith((async () => { + const cachedResponse = await caches.match(event.request); + if (cachedResponse) { + return cachedResponse; + } + + const response = await fetch(event.request); + + if (!response || response.status !== 200 || response.type !== 'basic') { + return response; + } + + if (ENABLE_DYNAMIC_CACHING) { + const responseToCache = response.clone(); + const cache = await caches.open(DYNAMIC_CACHE) + await cache.put(event.request, response.clone()); + } + + return response; + })()); }); @@ -384,6 +409,7 @@ self.addEventListener('message', event => { console.log(event.data) }) + addEventListener('fetch', event => { // Prevent the default, and handle the request ourselves. event.respondWith(async function() { @@ -398,19 +424,7 @@ addEventListener('fetch', event => { }()); }); -self.addEventListener('fetch', function (event) { - event.respondWith( - caches.match(event.request).then(function (response) { - return response || - fetch(event.request, event.headers) - .catch(err => { - console.log('_______________________ ERRORE FETCH SW: ', event.request, err) - writeData('config', { _id: 2, stateconn: 'offline' }) - return caches.match(event.request); - }) - }) - ); -}); + self.addEventListener('fetch', function (event) { event.respondWith( @@ -423,6 +437,7 @@ self.addEventListener('fetch', function (event) { ); }); + self.addEventListener('sync', function (event) { console.log('[Service Worker V5] Background syncing', event); console.log('event:', event); diff --git a/src-pwa/register-service-worker.js b/src-pwa/register-service-worker.js index c0859b88..a35acd22 100755 --- a/src-pwa/register-service-worker.js +++ b/src-pwa/register-service-worker.js @@ -6,6 +6,7 @@ import { register } from 'register-service-worker' register(process.env.SERVICE_WORKER_FILE ? process.env.SERVICE_WORKER_FILE : '', { + scope: '/', ready() { console.log('READY::: App is being served from cache by a service worker.') }, diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index 8016111e..2f09b1f6 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -904,6 +904,11 @@ export const shared_consts = { STATUS_GROUPS_REMOVED: 7, }, + QualiNotifs: { + CIRCUITS: 1, + OTHERS: 2, + }, + TypeNotifs: { TYPEDIR_BACHECA: 1, ID_BACHECA_NEW_GOOD: 1, @@ -954,8 +959,24 @@ export const shared_consts = { TYPEDIR_MSGS: 7, ID_MSGS_NEW_REC: 1, + TYPEDIR_TEST: 444, + ID_TEST_NEW_REC: 1, }, + TypeNotifs_Test: [ + { + value: 1, // + labeltrans: 'typenotifs.test', + descr: 'typenotifs.new_rec_bacheca_descr', + icon:'fas fa-house-user', + list: [ + { + value: 1, // ID_TEST_NEW_REC + labeltrans: 'notifsid.test_new', + }, + ], + }, + ], TypeNotifs_Arr: [ { diff --git a/src/components/CFinder/CFinder.ts b/src/components/CFinder/CFinder.ts index 0c88c6ca..d2dc182c 100755 --- a/src/components/CFinder/CFinder.ts +++ b/src/components/CFinder/CFinder.ts @@ -29,6 +29,11 @@ export default defineComponent({ required: false, default: true, }, + noButtAdd: { + type: Boolean, + required: false, + default: false, + }, ind: { type: Number, required: false, diff --git a/src/components/CFinder/CFinder.vue b/src/components/CFinder/CFinder.vue index e2bb02d6..a29b4426 100755 --- a/src/components/CFinder/CFinder.vue +++ b/src/components/CFinder/CFinder.vue @@ -39,9 +39,9 @@ :nodataLabel="noMsgRecord" :prop_search="true" :finder="true" - :labelBtnAddExtra="`Aggiungi ${strextra}`" + :labelBtnAddExtra="noButtAdd ? `` : `Aggiungi ${strextra}`" :choose_visutype="visuType" - :butt_modif_new="true" + :butt_modif_new="true && !noButtAdd" noresultLabel="Il filtro selezionato non ha trovato nessun risultato" :arrfilters="arrfilterand" :filtercustom="filtercustom" diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index bb9eb124..988796c1 100755 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -21,7 +21,7 @@ @click="canEdit = !canEdit"> , required: false, diff --git a/src/components/CMyCircuits/CMyCircuits.vue b/src/components/CMyCircuits/CMyCircuits.vue index 0d25b63d..74821f3b 100755 --- a/src/components/CMyCircuits/CMyCircuits.vue +++ b/src/components/CMyCircuits/CMyCircuits.vue @@ -1,6 +1,6 @@ + + diff --git a/src/components/CMyUserOnlyView/index.ts b/src/components/CMyUserOnlyView/index.ts new file mode 100755 index 00000000..1c6ca67e --- /dev/null +++ b/src/components/CMyUserOnlyView/index.ts @@ -0,0 +1 @@ +export { default as CMyUserOnlyView } from './CMyUserOnlyView.vue' diff --git a/src/components/CSendCoins/CSendCoins.ts b/src/components/CSendCoins/CSendCoins.ts index 1699cc17..b2a843e2 100755 --- a/src/components/CSendCoins/CSendCoins.ts +++ b/src/components/CSendCoins/CSendCoins.ts @@ -7,7 +7,7 @@ import { useUserStore } from '@store/UserStore' import { useCircuitStore } from '@store/CircuitStore' import { useQuasar } from 'quasar' import { useI18n } from '@/boot/i18n' -import { CMyUser } from '@/components/CMyUser' +import { CMyUserOnlyView } from '@/components/CMyUserOnlyView' import { costanti } from '@costanti' export default defineComponent({ @@ -23,7 +23,7 @@ export default defineComponent({ required: true, }, }, - components: { CSaldo, CMyUser }, + components: { CSaldo, CMyUserOnlyView }, setup(props, { emit }) { const $q = useQuasar() @@ -35,7 +35,7 @@ export default defineComponent({ const from_username = ref(userStore.my.username) const circuitsel = ref('') - const qty = ref(1) + const qty = ref('') const causal = ref('') const bothcircuits = ref([]) @@ -103,17 +103,19 @@ export default defineComponent({ // .... + if (props.to_user) { + console.log('user', props.to_user) + bothcircuits.value = userStore.IsMyCircuitByUser(props.to_user) - bothcircuits.value = userStore.IsMyCircuitByUser(props.to_user) + circuitsel.value = tools.getCookie(tools.CIRCUIT_USE, bothcircuits.value[0]) + if (!userStore.IsMyCircuitByName(circuitsel.value)) { + circuitsel.value = bothcircuits.value[0] + } - circuitsel.value = tools.getCookie(tools.CIRCUIT_USE, bothcircuits.value[0]) - if (!userStore.IsMyCircuitByName(circuitsel.value)) { - circuitsel.value = bothcircuits.value[0] + aggiorna() + + show.value = true } - - aggiorna() - - show.value = true } function hide() { diff --git a/src/components/CSendCoins/CSendCoins.vue b/src/components/CSendCoins/CSendCoins.vue index eb845bc9..6bda640b 100755 --- a/src/components/CSendCoins/CSendCoins.vue +++ b/src/components/CSendCoins/CSendCoins.vue @@ -1,6 +1,6 @@