From cd31d2d020feb46cc683cb0438144f808cd91ae8 Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Sat, 10 Dec 2022 02:01:26 +0100 Subject: [PATCH] + Registered Users + UsersList Online --- src/components/CElemStat/CElemStat.scss | 34 ++++ src/components/CElemStat/CElemStat.ts | 23 +++ src/components/CElemStat/CElemStat.vue | 37 ++++ src/components/CElemStat/index.ts | 1 + src/components/CFinder/CFinder.ts | 4 + src/components/CMyPopupEdit/CMyPopupEdit.ts | 8 + src/components/CMyPopupEdit/CMyPopupEdit.vue | 43 ++++- src/components/CSkill/CSkill.ts | 12 +- src/components/CStatusReg/CStatusReg.ts | 26 ++- src/components/CStatusReg/CStatusReg.vue | 182 +++++++++++++------ src/components/MyHeader/MyHeader.vue | 2 +- src/css/app.scss | 11 ++ src/db/lang/ws_it.js | 3 +- src/model/GlobalStore.ts | 2 + src/store/Modules/tools.ts | 24 +++ src/store/UserStore.ts | 10 +- src/views/user/mycircuit/mycircuit.ts | 10 +- src/views/user/mycircuit/mycircuit.vue | 4 +- 18 files changed, 364 insertions(+), 72 deletions(-) create mode 100644 src/components/CElemStat/CElemStat.scss create mode 100644 src/components/CElemStat/CElemStat.ts create mode 100644 src/components/CElemStat/CElemStat.vue create mode 100644 src/components/CElemStat/index.ts diff --git a/src/components/CElemStat/CElemStat.scss b/src/components/CElemStat/CElemStat.scss new file mode 100644 index 00000000..7b8641de --- /dev/null +++ b/src/components/CElemStat/CElemStat.scss @@ -0,0 +1,34 @@ +.my-card-stat { + width: 100%; + max-width: 200px; + min-width: 120px; + padding: 1rem 1rem; + @media (max-width: 718px) { + // PER VERSIONE MOBILE + max-width: 150px; + padding: 0; + } + + box-shadow: none; +} + +.my-card-small-stat { + width: 100%; + max-width: 60px; + min-width: 40px; + @media (max-width: 718px) { + // PER VERSIONE MOBILE + max-width: 50px; + min-width: 40px; + } + + box-shadow: none; +} + + +.text-h5-short { + line-height: 1.25rem !important; + @media (max-width: 718px) { + line-height: 1rem !important; + } +} diff --git a/src/components/CElemStat/CElemStat.ts b/src/components/CElemStat/CElemStat.ts new file mode 100644 index 00000000..4add6a65 --- /dev/null +++ b/src/components/CElemStat/CElemStat.ts @@ -0,0 +1,23 @@ +import { defineComponent } from 'vue' + +import { tools } from '@store/Modules/tools' + +export default defineComponent({ + name: 'CElemStat', + props: { + title: String, + icon: String, + value_today: Number, + mytextval: Number, + classColor: String, + colBack: String, + mystyle: String, + }, + components: {}, + setup(props) { + + return { + tools + } + }, +}) diff --git a/src/components/CElemStat/CElemStat.vue b/src/components/CElemStat/CElemStat.vue new file mode 100644 index 00000000..13a564fa --- /dev/null +++ b/src/components/CElemStat/CElemStat.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/src/components/CElemStat/index.ts b/src/components/CElemStat/index.ts new file mode 100644 index 00000000..7221ceda --- /dev/null +++ b/src/components/CElemStat/index.ts @@ -0,0 +1 @@ +export {default as CElemStat} from './CElemStat.vue' diff --git a/src/components/CFinder/CFinder.ts b/src/components/CFinder/CFinder.ts index cd52168b..dc2bdaab 100755 --- a/src/components/CFinder/CFinder.ts +++ b/src/components/CFinder/CFinder.ts @@ -1165,6 +1165,7 @@ export default defineComponent({ username: 1, name: 1, surname: 1, + lasttimeonline: 1, comune: 1, mycities: 1, 'profile.img': 1, @@ -1233,6 +1234,7 @@ export default defineComponent({ username: 1, name: 1, surname: 1, +lasttimeonline: 1, comune: 1, mycities: 1, 'profile.img': 1, @@ -1303,6 +1305,7 @@ export default defineComponent({ username: 1, name: 1, surname: 1, +lasttimeonline: 1, comune: 1, mycities: 1, 'profile.img': 1, @@ -1350,6 +1353,7 @@ export default defineComponent({ username: 1, name: 1, surname: 1, +lasttimeonline: 1, comune: 1, mycities: 1, 'profile.img': 1, diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.ts b/src/components/CMyPopupEdit/CMyPopupEdit.ts index c1ecebf8..41af3b15 100755 --- a/src/components/CMyPopupEdit/CMyPopupEdit.ts +++ b/src/components/CMyPopupEdit/CMyPopupEdit.ts @@ -28,6 +28,7 @@ import MixinBase from '@/mixins/mixin-base' import MixinUsers from '@/mixins/mixin-users' import { toolsext } from '@store/Modules/toolsext' import { shared_consts } from '@/common/shared_vuejs' +import { useRouter } from 'vue-router' export default defineComponent({ @@ -222,6 +223,8 @@ export default defineComponent({ const myImgGall = ref([{}] as IImgGallery[]) + const $router = useRouter() + const col = ref({ name: 'test', fieldtype: 0, @@ -770,6 +773,10 @@ export default defineComponent({ } + function gotoPage(link: string) { + $router.push(link) + } + function nameKeydown(e: any, col: any) { if (col.allowchar === costanti.ALLOWCHAR_CODE) { @@ -817,6 +824,7 @@ export default defineComponent({ myrow, shared_consts, nameKeydown, + gotoPage, } } }) diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.vue b/src/components/CMyPopupEdit/CMyPopupEdit.vue index 29ec638a..77989b36 100755 --- a/src/components/CMyPopupEdit/CMyPopupEdit.vue +++ b/src/components/CMyPopupEdit/CMyPopupEdit.vue @@ -80,17 +80,54 @@
-
+
{{ $t(col.extrafield) }} +
+ + + + + online + + + + {{ tools.getNameToShow(row) }} + {{ + tools.getUserNameOnlyIfToShow(row) + }} + + + +
+ + - - - +
+ + - - - + +
- + @@ -34,49 +53,96 @@
-
{{$t('pages.statusreg.newreg')}}
- + + + + - + + + + + + + + + + - - - - - - - - - - - - - {{ tools.getstrDateTimeShort(user.date_reg) }} - - - - + + {{ + tools.getstrDateTimeShort(user.date_reg) + }} + + + + + +
+ + + + + + + online + + + + {{ + tools.getNameToShow(user) + }} + {{ + tools.getUserNameOnlyIfToShow(user) + }} + + {{ + tools.timeAgo(user.lasttimeonline) + }} + + + +
+
+
- - + -