@metano/quasar_rest_auth 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +17 -0
- package/LICENSE +21 -0
- package/Makefile +18 -0
- package/README.md +6 -0
- package/boot/alerts.js +152 -0
- package/boot/api.js +155 -0
- package/boot/app.js +111 -0
- package/boot/base.js +242 -0
- package/boot/config.js +117 -0
- package/boot/cripto.js +35 -0
- package/boot/data.js +28 -0
- package/boot/storage.js +74 -0
- package/components/DefinicoesLayout.vue +34 -0
- package/components/FormLogin.vue +217 -0
- package/components/LeftMenu.vue +93 -0
- package/components/LeftMenuSegundo.vue +96 -0
- package/components/MyTest.vue +41 -0
- package/components/RightMenu.vue +36 -0
- package/components/SearchMenu.vue +88 -0
- package/components/SettingsLayout.vue +34 -0
- package/components/TopMenu.vue +68 -0
- package/components/TopMenuSegundo.vue +85 -0
- package/components/footer/Comments.vue +77 -0
- package/components/footer/MainFooter.vue +71 -0
- package/components/header/HeaderBrand.vue +64 -0
- package/components/header/HeaderDarkModeToggle.vue +40 -0
- package/components/header/HeaderFullScreen.vue +55 -0
- package/components/header/HeaderLanguage.vue +56 -0
- package/components/header/HeaderNotifications.vue +53 -0
- package/components/header/HeaderServices.vue +118 -0
- package/components/header/HeaderUser.vue +210 -0
- package/components/header/HeaderUserMenu.vue +0 -0
- package/components/header/RegistarEntidade.vue +309 -0
- package/gitignore +3 -0
- package/help +9 -0
- package/index.js +9 -0
- package/layouts/AuthLayout.vue +74 -0
- package/layouts/MainLayout.vue +190 -0
- package/package.json +31 -0
- package/pages/auth/LoginPage.vue +32 -0
- package/pages/routes.js +33 -0
- package/stores/AuthStore.js +587 -0
- package/stores/example-store.js +21 -0
- package/stores/index.js +20 -0
- package/stores/settings.js +12 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-layout view="hHh lpR fFf">
|
|
3
|
+
<!-- -------------------- DIALOGS -------------------- -->
|
|
4
|
+
<q-dialog v-model="permissoes" persistent>
|
|
5
|
+
<UserPermissoes />
|
|
6
|
+
</q-dialog>
|
|
7
|
+
|
|
8
|
+
<q-dialog v-model="pagepermissoes" persistent>
|
|
9
|
+
<PagePermissoes />
|
|
10
|
+
</q-dialog>
|
|
11
|
+
|
|
12
|
+
<q-dialog v-model="User.Settings" full-width full-height>
|
|
13
|
+
<q-card>
|
|
14
|
+
<q-bar :class="$q.dark.isActive ? 'bg-primary' : 'bg-primary text-white'">
|
|
15
|
+
<q-toolbar-title>
|
|
16
|
+
<span class="text-weight-bold">Definições de Layout</span>
|
|
17
|
+
</q-toolbar-title>
|
|
18
|
+
<q-space />
|
|
19
|
+
<q-btn dense flat icon="close" v-close-popup />
|
|
20
|
+
</q-bar>
|
|
21
|
+
|
|
22
|
+
<q-separator />
|
|
23
|
+
|
|
24
|
+
<q-card-section class="scroll">
|
|
25
|
+
<DefinicoesLayout />
|
|
26
|
+
</q-card-section>
|
|
27
|
+
</q-card>
|
|
28
|
+
</q-dialog>
|
|
29
|
+
|
|
30
|
+
<q-dialog v-model="api_retorno_modal" full-width full-height>
|
|
31
|
+
<q-card>
|
|
32
|
+
<q-bar class="bg-primary text-white">
|
|
33
|
+
<q-toolbar-title>
|
|
34
|
+
<span class="text-weight-bold">API</span>
|
|
35
|
+
</q-toolbar-title>
|
|
36
|
+
<q-space />
|
|
37
|
+
<q-btn dense flat icon="close" v-close-popup />
|
|
38
|
+
</q-bar>
|
|
39
|
+
|
|
40
|
+
<q-separator />
|
|
41
|
+
|
|
42
|
+
<q-card-section class="scroll">
|
|
43
|
+
<ApiRetorno />
|
|
44
|
+
</q-card-section>
|
|
45
|
+
</q-card>
|
|
46
|
+
</q-dialog>
|
|
47
|
+
|
|
48
|
+
<!-- -------------------- HEADER -------------------- -->
|
|
49
|
+
<q-header bordered :class="$q.dark.isActive ? 'bg-dark text-white' : 'bg-primary text-white'">
|
|
50
|
+
<q-toolbar class="no-wrap q-px-md">
|
|
51
|
+
<!-- Menu Esquerdo -->
|
|
52
|
+
<q-btn dense flat round icon="menu" @click="User.toggleLeftTop()" />
|
|
53
|
+
|
|
54
|
+
<!-- Marca (logo + nome) -->
|
|
55
|
+
<HeaderBrand />
|
|
56
|
+
|
|
57
|
+
<q-space />
|
|
58
|
+
|
|
59
|
+
<!-- Dark Mode -->
|
|
60
|
+
<HeaderDarkModeToggle />
|
|
61
|
+
|
|
62
|
+
<!-- Full Screen -->
|
|
63
|
+
<HeaderFullScreen />
|
|
64
|
+
|
|
65
|
+
<!-- Idiomas -->
|
|
66
|
+
<HeaderLanguage />
|
|
67
|
+
|
|
68
|
+
<!-- Serviços -->
|
|
69
|
+
<Servicos />
|
|
70
|
+
|
|
71
|
+
<!-- Notificações -->
|
|
72
|
+
<Notificacoes />
|
|
73
|
+
|
|
74
|
+
<!-- User Menu -->
|
|
75
|
+
<HeaderUser />
|
|
76
|
+
|
|
77
|
+
<!-- Menu Direito -->
|
|
78
|
+
<q-btn dense flat round icon="menu" @click="User.toggleRightTop()" />
|
|
79
|
+
</q-toolbar>
|
|
80
|
+
<TopMenu v-show="!User.LeftTop"></TopMenu>
|
|
81
|
+
</q-header>
|
|
82
|
+
|
|
83
|
+
<!-- -------------------- LEFT DRAWER -------------------- -->
|
|
84
|
+
<q-drawer
|
|
85
|
+
v-model="User.LeftTop"
|
|
86
|
+
show-if-above
|
|
87
|
+
:mini="miniState"
|
|
88
|
+
side="left"
|
|
89
|
+
bordered
|
|
90
|
+
class="q-pr-0"
|
|
91
|
+
:width="300"
|
|
92
|
+
>
|
|
93
|
+
<q-scroll-area class="fit" :thumb-style="thumbStyle" :bar-style="barStyle">
|
|
94
|
+
<LeftMenu />
|
|
95
|
+
</q-scroll-area>
|
|
96
|
+
</q-drawer>
|
|
97
|
+
|
|
98
|
+
<!-- -------------------- RIGHT DRAWER -------------------- -->
|
|
99
|
+
<q-drawer v-model="User.RightTop" side="right" bordered :width="300">
|
|
100
|
+
<q-scroll-area class="fit">
|
|
101
|
+
<RightMenu />
|
|
102
|
+
</q-scroll-area>
|
|
103
|
+
</q-drawer>
|
|
104
|
+
|
|
105
|
+
<!-- -------------------- PAGE CONTAINER -------------------- -->
|
|
106
|
+
|
|
107
|
+
<q-page-container class="">
|
|
108
|
+
<router-view :showing="Load.count === 0" />
|
|
109
|
+
<q-inner-loading :showing="Load.count !== 0">
|
|
110
|
+
<q-spinner-gears size="80px" color="primary" />
|
|
111
|
+
</q-inner-loading>
|
|
112
|
+
</q-page-container>
|
|
113
|
+
|
|
114
|
+
<!-- -------------------- RODAPÉ -------------------- -->
|
|
115
|
+
|
|
116
|
+
<Rodape />
|
|
117
|
+
|
|
118
|
+
<!-- -------------------- PAGE SCROLLER -------------------- -->
|
|
119
|
+
<q-page-scroller position="bottom-right" :scroll-offset="50" :offset="[18, -10]">
|
|
120
|
+
<q-btn icon="keyboard_arrow_up" color="primary" round />
|
|
121
|
+
</q-page-scroller>
|
|
122
|
+
</q-layout>
|
|
123
|
+
</template>
|
|
124
|
+
|
|
125
|
+
<script>
|
|
126
|
+
/* -------------------- IMPORT STORES -------------------- */
|
|
127
|
+
|
|
128
|
+
import { AuthStore, LoadStore, UserStore } from '../stores/AuthStore'
|
|
129
|
+
|
|
130
|
+
/* -------------------- IMPORT COMPONENTS -------------------- */
|
|
131
|
+
import HeaderBrand from '../components/header/HeaderBrand.vue'
|
|
132
|
+
import HeaderUser from '../components/header/HeaderUser.vue'
|
|
133
|
+
import HeaderDarkModeToggle from '../components/header/HeaderDarkModeToggle.vue'
|
|
134
|
+
import HeaderLanguage from '../components/header/HeaderLanguage.vue'
|
|
135
|
+
import HeaderFullScreen from '../components/header/HeaderFullScreen.vue'
|
|
136
|
+
import Servicos from '../components/header/HeaderServices.vue'
|
|
137
|
+
import Notificacoes from '../components/header/HeaderNotifications.vue'
|
|
138
|
+
|
|
139
|
+
import LeftMenu from '../components/LeftMenu.vue'
|
|
140
|
+
import TopMenu from '../components/TopMenu.vue'
|
|
141
|
+
import RightMenu from '../components/RightMenu.vue'
|
|
142
|
+
import Rodape from '../components/footer/MainFooter.vue'
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
import { defineComponent } from 'vue'
|
|
147
|
+
|
|
148
|
+
export default defineComponent({
|
|
149
|
+
components: {
|
|
150
|
+
HeaderBrand,
|
|
151
|
+
HeaderUser,
|
|
152
|
+
HeaderDarkModeToggle,
|
|
153
|
+
HeaderLanguage,
|
|
154
|
+
HeaderFullScreen,
|
|
155
|
+
Servicos,
|
|
156
|
+
Notificacoes,
|
|
157
|
+
LeftMenu,
|
|
158
|
+
TopMenu,
|
|
159
|
+
RightMenu,
|
|
160
|
+
Rodape,
|
|
161
|
+
},
|
|
162
|
+
setup() {
|
|
163
|
+
const Auth = AuthStore()
|
|
164
|
+
const User = UserStore()
|
|
165
|
+
const Load = LoadStore()
|
|
166
|
+
return {
|
|
167
|
+
Auth,
|
|
168
|
+
User,
|
|
169
|
+
Load,
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
data() {
|
|
173
|
+
return {
|
|
174
|
+
permissoes: false,
|
|
175
|
+
pagepermissoes: false,
|
|
176
|
+
api_retorno_modal: false,
|
|
177
|
+
visibilidadeLoad: false,
|
|
178
|
+
comments: false,
|
|
179
|
+
miniState: false,
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
computed: {},
|
|
183
|
+
|
|
184
|
+
mounted() {},
|
|
185
|
+
|
|
186
|
+
methods: {},
|
|
187
|
+
})
|
|
188
|
+
</script>
|
|
189
|
+
|
|
190
|
+
<style></style>
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@metano/quasar_rest_auth",
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "1.0.1",
|
|
7
|
+
"description": "Para cabesalho do quasar framework",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"mytech",
|
|
10
|
+
"api"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/metanochava/quasar#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/metanochava/quasar/issues"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/metanochava/quasar_rest_auth.git"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": "Dias Metano Salvador Chavana",
|
|
22
|
+
"type": "commonjs",
|
|
23
|
+
"main": "index.js",
|
|
24
|
+
"scripts": {
|
|
25
|
+
"test": "No test"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"axios": "^1.13.1",
|
|
29
|
+
"crypto-js": "^4.2.0"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="q-pa-md">
|
|
3
|
+
<FormLogin />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { defineComponent } from 'vue'
|
|
9
|
+
|
|
10
|
+
import { UserStore } from '@metano/quasar/stores/AuthStore'
|
|
11
|
+
import FormLogin from '@metano/quasar/components/FormLogin.vue'
|
|
12
|
+
|
|
13
|
+
export default defineComponent({
|
|
14
|
+
components: {
|
|
15
|
+
FormLogin,
|
|
16
|
+
},
|
|
17
|
+
setup() {
|
|
18
|
+
const User = UserStore()
|
|
19
|
+
return {
|
|
20
|
+
User,
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
data() {
|
|
24
|
+
return {}
|
|
25
|
+
},
|
|
26
|
+
computed: {},
|
|
27
|
+
|
|
28
|
+
mounted() {},
|
|
29
|
+
|
|
30
|
+
methods: {},
|
|
31
|
+
})
|
|
32
|
+
</script>
|
package/pages/routes.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { tdc } from '../boot/app'
|
|
2
|
+
|
|
3
|
+
export let rotas = [
|
|
4
|
+
{
|
|
5
|
+
path: '/rotas',
|
|
6
|
+
component: () => import('../components/MyTest.vue'),
|
|
7
|
+
name: 'list_test',
|
|
8
|
+
meta: { title: tdc('Lista de') + ' ' + tdc('Tests'),
|
|
9
|
+
requiresAuth: true,
|
|
10
|
+
requiredRole: 'list_test' }
|
|
11
|
+
},
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
export const mytech = {
|
|
15
|
+
path: '/',
|
|
16
|
+
component: () => import('../layouts/MainLayout.vue'),
|
|
17
|
+
children: {
|
|
18
|
+
path: '/Teste',
|
|
19
|
+
component: () => import('../components/MyTest.vue'),
|
|
20
|
+
name: 'list_test',
|
|
21
|
+
meta: { title: tdc('Lista de') + ' ' + tdc('Tests'),
|
|
22
|
+
requiresAuth: true,
|
|
23
|
+
requiredRole: 'list_test' }
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const auth = {
|
|
28
|
+
path: '/',
|
|
29
|
+
component: () => import('../layouts/AuthLayout.vue'),
|
|
30
|
+
children: [
|
|
31
|
+
{ path: 'login', component: () => import('./auth/LoginPage.vue'), name: 'login' },
|
|
32
|
+
],
|
|
33
|
+
}
|