flameresttable 1.0.0
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/.eslintrc +27 -0
- package/.vscode/extensions.json +3 -0
- package/.vscode/launch.json +28 -0
- package/.vscode/settings.json +11 -0
- package/.vscode/tasks.json +36 -0
- package/README.md +39 -0
- package/capacitor.config.json +6 -0
- package/index.html +18 -0
- package/jsconfig.json +27 -0
- package/package.json +48 -0
- package/postcss.config.js +7 -0
- package/public/favicon.ico +0 -0
- package/public/robots.txt +2 -0
- package/src/App.vue +44 -0
- package/src/Table/Columns.ts +328 -0
- package/src/Table/FlameTable.ts +210 -0
- package/src/Table/Paginator.vue +55 -0
- package/src/Table/Table.vue +189 -0
- package/src/Table/TableFilters.vue +32 -0
- package/src/Table/TableOpts.ts +91 -0
- package/src/assets/icons/facebook.svg +1 -0
- package/src/assets/icons/google.svg +1 -0
- package/src/assets/logo.png +0 -0
- package/src/components/default/Modal.vue +87 -0
- package/src/components.ts +4 -0
- package/src/env.d.ts +8 -0
- package/src/index.css +3 -0
- package/src/main.ts +17 -0
- package/src/pages/Home.vue +33 -0
- package/src/pages/user/Auth.vue +90 -0
- package/src/pages/user/ResetPassword.vue +25 -0
- package/src/pages/user/ResetPasswordRequest.vue +26 -0
- package/src/pages/user/Signup.vue +96 -0
- package/src/pages/user/UserSettings.vue +25 -0
- package/src/plugin.ts +9 -0
- package/src/router.ts +40 -0
- package/src/store.ts +30 -0
- package/tailwind.config.js +73 -0
- package/tsconfig.json +51 -0
- package/tsconfig.node.json +8 -0
- package/vite.config.js +22 -0
- package/volar-fix.ps1 +1 -0
package/src/env.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.vue' {
|
|
4
|
+
import type { DefineComponent } from 'vue'
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
6
|
+
const component: DefineComponent<{}, {}, any>
|
|
7
|
+
export default component
|
|
8
|
+
}
|
package/src/index.css
ADDED
package/src/main.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createApp } from 'vue'
|
|
2
|
+
import App from './App.vue'
|
|
3
|
+
import './index.css'
|
|
4
|
+
import { createPinia } from 'pinia'
|
|
5
|
+
import router from "./router";
|
|
6
|
+
|
|
7
|
+
import 'vue-universal-modal/dist/index.css'
|
|
8
|
+
import VueUniversalModal from 'vue-universal-modal'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
createApp(App)
|
|
14
|
+
.use(createPinia())
|
|
15
|
+
.use(router)
|
|
16
|
+
.use(VueUniversalModal, {teleportTarget: '#my-modals',modalComponent: 'CustomModal'})
|
|
17
|
+
.mount('#app')
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template lang="pug">
|
|
2
|
+
.flex.justify-center.h-screen.items-center.flex-col
|
|
3
|
+
.px-8.py-6.mt-4.text-left.bg-white.shadow-lg.desktop:w-feed-lg
|
|
4
|
+
| Welcome!
|
|
5
|
+
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
|
|
10
|
+
// Основные импорты
|
|
11
|
+
import { onMounted, reactive, defineProps } from '@vue/runtime-core'; import { storeFile } from "@/store"; import { useRoute, useRouter } from 'vue-router'; import REST from "flamerest"
|
|
12
|
+
|
|
13
|
+
// Иконки
|
|
14
|
+
import { XCircleIcon } from '@icons/solid'
|
|
15
|
+
|
|
16
|
+
const store = storeFile(), router = useRouter(), route = useRoute();
|
|
17
|
+
|
|
18
|
+
// Состояние компонента
|
|
19
|
+
const state = reactive({
|
|
20
|
+
test: 5
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
onMounted(() => {
|
|
25
|
+
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style scoped lang="scss">
|
|
32
|
+
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<template lang="pug">
|
|
2
|
+
.flex.justify-center.h-screen.items-center.flex-col
|
|
3
|
+
//h3.text-xl.font-bold.text-center Вход
|
|
4
|
+
.px-8.py-6.mt-4.text-left.bg-white.shadow-lg.desktop:w-[700px]
|
|
5
|
+
.mt-0
|
|
6
|
+
.h-4.mb-3.text-gray-400 Войти через
|
|
7
|
+
.flex.text-sm.flex-col.desktop:flex-row
|
|
8
|
+
a.flex.flex-1.items-center(href="/auth/social?authclient=google")
|
|
9
|
+
img.max-h-8(src="/src/assets/icons/google.svg")
|
|
10
|
+
span.pl-6 Google
|
|
11
|
+
a.flex.flex-1.items-center(
|
|
12
|
+
href="/auth/social?authclient=facebook",
|
|
13
|
+
v-if="store.User.country !== 'RU'"
|
|
14
|
+
)
|
|
15
|
+
img.max-h-8(src="/src/assets/icons/facebook.svg")
|
|
16
|
+
span.pl-6 Facebook
|
|
17
|
+
.h-4.mb-3.text-gray-400.text-xs.mt-4.desktop:mt-6.desktop:text-sm Или с помощью почты и пароля
|
|
18
|
+
|
|
19
|
+
.mt-4
|
|
20
|
+
label.block
|
|
21
|
+
input.w-full.px-4.py-2.mt-0.border.rounded-md.focus:outline-none.focus:ring-1.focus:ring-blue-600.placeholder:text-gray-500(
|
|
22
|
+
v-model="state.login",
|
|
23
|
+
name="email",
|
|
24
|
+
type="text",
|
|
25
|
+
placeholder="Почта",
|
|
26
|
+
)
|
|
27
|
+
span.text-xs.tracking-wide.text-red-600 {{ state.loginErr }}
|
|
28
|
+
.mt-2
|
|
29
|
+
label.block
|
|
30
|
+
input.w-full.px-4.py-2.mt-0.border.rounded-md.focus:outline-none.focus:ring-1.focus:ring-blue-600.placeholder:text-gray-500(
|
|
31
|
+
v-model="state.passw",
|
|
32
|
+
name="password",
|
|
33
|
+
type="password",
|
|
34
|
+
placeholder="Пароль",
|
|
35
|
+
)
|
|
36
|
+
.my-2.text-xs.tracking-wide.text-red-600 {{ state.passwErr }}
|
|
37
|
+
a.my-4.text-xs.text-gray-500.cursor-pointer.hover:underline(
|
|
38
|
+
@click="router.push({ name: 'ResetPasswordRequest' })"
|
|
39
|
+
) Я забыл свой пароль
|
|
40
|
+
|
|
41
|
+
.flex.items-center.justify-between.flex-col
|
|
42
|
+
button.px-6.py-2.mt-4.text-white.bg-blue-600.rounded-lg.w-full.cursor-pointer.hover:bg-blue-900(
|
|
43
|
+
@click="Login()"
|
|
44
|
+
) Войти
|
|
45
|
+
|
|
46
|
+
.pt-2.text-center
|
|
47
|
+
a.text-xs.text-gray-500.cursor-pointer.hover:underline(
|
|
48
|
+
@click="router.push({ name: 'Signup' })"
|
|
49
|
+
) Зарегистрироваться
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script setup lang="ts">
|
|
53
|
+
import { onMounted, reactive, defineProps } from '@vue/runtime-core'; import { storeFile } from "@/store"; import { useRoute, useRouter } from 'vue-router'; import REST from "flamerest"
|
|
54
|
+
|
|
55
|
+
const store = storeFile();
|
|
56
|
+
const router = useRouter(),
|
|
57
|
+
route = useRoute();
|
|
58
|
+
|
|
59
|
+
const state = reactive({
|
|
60
|
+
login: "",
|
|
61
|
+
passw: "",
|
|
62
|
+
loginErr: "",
|
|
63
|
+
passwErr: "",
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
onMounted(() => { });
|
|
67
|
+
|
|
68
|
+
let Login = () => {
|
|
69
|
+
REST.auth(state.login, state.passw).then((res) => {
|
|
70
|
+
if (res.isAuthorized) {
|
|
71
|
+
store.authUser(res);
|
|
72
|
+
store.User.isLoaded = true;
|
|
73
|
+
router.push({ name: "Home" });
|
|
74
|
+
} else {
|
|
75
|
+
if (res.errors) {
|
|
76
|
+
state.loginErr = (
|
|
77
|
+
res.errors["email"] ??
|
|
78
|
+
res.errors["login"] ??
|
|
79
|
+
[]
|
|
80
|
+
).join(". ");
|
|
81
|
+
state.passwErr = (res.errors["password"] ?? []).join(". ");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<style scoped lang="scss">
|
|
89
|
+
|
|
90
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template lang="pug">
|
|
2
|
+
.flex.justify-center.h-screen.items-center.flex-col
|
|
3
|
+
.px-8.py-6.mt-4.text-left.bg-white.shadow-lg.desktop:w-[725px]
|
|
4
|
+
| Not implemented
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
|
|
9
|
+
import { onMounted, reactive, defineProps } from '@vue/runtime-core'; import { storeFile } from "@/store"; import { useRoute, useRouter } from 'vue-router'; import REST from "flamerest"
|
|
10
|
+
const store = storeFile(); const router = useRouter(), route = useRoute();
|
|
11
|
+
|
|
12
|
+
// Состояние компонента
|
|
13
|
+
const state = reactive({
|
|
14
|
+
test: 5
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
onMounted(() => {
|
|
18
|
+
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<style scoped lang="scss">
|
|
24
|
+
|
|
25
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template lang="pug">
|
|
2
|
+
.flex.justify-center.h-screen.items-center.flex-col
|
|
3
|
+
.px-8.py-6.mt-4.text-left.bg-white.shadow-lg.desktop:w-[725px]
|
|
4
|
+
| Not implemented
|
|
5
|
+
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
|
|
10
|
+
import { onMounted, reactive, defineProps } from '@vue/runtime-core'; import { storeFile } from "@/store"; import { useRoute, useRouter } from 'vue-router'; import REST from "flamerest"
|
|
11
|
+
const store = storeFile(); const router = useRouter(), route = useRoute();
|
|
12
|
+
|
|
13
|
+
// Состояние компонента
|
|
14
|
+
const state = reactive({
|
|
15
|
+
test: 5
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
onMounted(() => {
|
|
19
|
+
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style scoped lang="scss">
|
|
25
|
+
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<template lang="pug">
|
|
2
|
+
.flex.justify-center.h-screen.items-center.flex-col
|
|
3
|
+
|
|
4
|
+
.px-8.py-6.mt-4.text-left.bg-white.shadow-lg.desktop:w-feed
|
|
5
|
+
|
|
6
|
+
// Регистрация через соц-сети
|
|
7
|
+
.mt-0
|
|
8
|
+
.h-4.mb-3.text-gray-400 Быстрая регистрация через
|
|
9
|
+
.flex.text-sm.flex-col.desktop:flex-row
|
|
10
|
+
a.flex.flex-1.items-center(href="/auth/social?authclient=google")
|
|
11
|
+
img.max-h-8(src="/src/assets/icons/google.svg")
|
|
12
|
+
span.pl-6 Google
|
|
13
|
+
a.flex.flex-1.items-center(
|
|
14
|
+
href="/auth/social?authclient=facebook",
|
|
15
|
+
v-if="store.User.country !== 'RU'"
|
|
16
|
+
)
|
|
17
|
+
img.max-h-8(src="/src/assets/icons/facebook.svg")
|
|
18
|
+
span.pl-6 Facebook
|
|
19
|
+
|
|
20
|
+
.h-4.mb-3.text-gray-400.text-xs.mt-4.desktop:mt-6.desktop:text-sm Или введите почту и пароль
|
|
21
|
+
|
|
22
|
+
// Регистрация через логин и пароль
|
|
23
|
+
.mt-4
|
|
24
|
+
|
|
25
|
+
// Имя пользователя
|
|
26
|
+
label.block
|
|
27
|
+
input.w-full.px-4.py-2.mt-0.border.rounded-md.focus:outline-none.focus:ring-1.focus:ring-blue-600.placeholder:text-gray-500(
|
|
28
|
+
v-model="state.name",
|
|
29
|
+
name="name",
|
|
30
|
+
type="text",
|
|
31
|
+
placeholder="Ваше имя или никнейм, который увидят другие",
|
|
32
|
+
)
|
|
33
|
+
span.text-xs.tracking-wide.text-red-600 {{ state.errors['name']?.join(". ") }}
|
|
34
|
+
|
|
35
|
+
// Почта
|
|
36
|
+
label.block.mt-2
|
|
37
|
+
input.w-full.px-4.py-2.mt-0.border.rounded-md.focus:outline-none.focus:ring-1.focus:ring-blue-600.placeholder:text-gray-500(
|
|
38
|
+
v-model="state.email",
|
|
39
|
+
name="email",
|
|
40
|
+
type="text",
|
|
41
|
+
placeholder="Почта",
|
|
42
|
+
)
|
|
43
|
+
span.text-xs.tracking-wide.text-red-600 {{ state.errors['email']?.join(". ") }}
|
|
44
|
+
|
|
45
|
+
// Пароль
|
|
46
|
+
label.block.mt-2
|
|
47
|
+
input.w-full.px-4.py-2.mt-0.border.rounded-md.focus:outline-none.focus:ring-1.focus:ring-blue-600.placeholder:text-gray-500(
|
|
48
|
+
v-model="state.passw",
|
|
49
|
+
name="password",
|
|
50
|
+
type="password",
|
|
51
|
+
placeholder="Пароль",
|
|
52
|
+
)
|
|
53
|
+
span.my-4.text-xs.tracking-wide.text-red-600 {{ state.errors['password']?.join(". ") }}
|
|
54
|
+
|
|
55
|
+
// Кнопка реги
|
|
56
|
+
.flex.items-center.justify-between.flex-col
|
|
57
|
+
button.px-6.py-2.mt-4.text-white.bg-blue-600.rounded-lg.w-full.hover:bg-blue-900(
|
|
58
|
+
@click="Signup()"
|
|
59
|
+
) Регистрация
|
|
60
|
+
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<script setup lang="ts">
|
|
64
|
+
import { onMounted, reactive, defineProps } from '@vue/runtime-core'; import { storeFile } from "@/store"; import { useRoute, useRouter } from 'vue-router'; import REST from "flamerest"
|
|
65
|
+
|
|
66
|
+
const store = storeFile();
|
|
67
|
+
const router = useRouter(),
|
|
68
|
+
route = useRoute();
|
|
69
|
+
|
|
70
|
+
const state = reactive({
|
|
71
|
+
email: "",
|
|
72
|
+
passw: "",
|
|
73
|
+
name: "",
|
|
74
|
+
errors: [] as { [key: string]: any }
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
onMounted(() => { });
|
|
78
|
+
|
|
79
|
+
let Signup = () => {
|
|
80
|
+
REST.signup(state.email, null, state.passw, state.name).then((res) => {
|
|
81
|
+
if (res.isAuthorized === true) {
|
|
82
|
+
store.authUser(res);
|
|
83
|
+
store.User.isLoaded = true;
|
|
84
|
+
router.push({ name: "Home" });
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (res.errors) {
|
|
88
|
+
state.errors = res.errors;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<style scoped lang="scss">
|
|
95
|
+
|
|
96
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template lang="pug">
|
|
2
|
+
</template>
|
|
3
|
+
|
|
4
|
+
<script setup lang="ts">
|
|
5
|
+
import { onMounted, reactive, defineProps } from '@vue/runtime-core'; import { storeFile } from "@/store"; import { useRoute, useRouter } from 'vue-router'; import REST from "flamerest"
|
|
6
|
+
import { XCircleIcon } from '@icons/solid'
|
|
7
|
+
|
|
8
|
+
const store = storeFile(), router = useRouter(), route = useRoute();
|
|
9
|
+
|
|
10
|
+
// Иконки
|
|
11
|
+
|
|
12
|
+
// Состояние компонента
|
|
13
|
+
const state = reactive({
|
|
14
|
+
test: 5
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
onMounted(() => {
|
|
18
|
+
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<style scoped lang="scss">
|
|
24
|
+
|
|
25
|
+
</style>
|
package/src/plugin.ts
ADDED
package/src/router.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
|
|
2
|
+
const routes = [
|
|
3
|
+
{
|
|
4
|
+
path: '/',
|
|
5
|
+
name: 'Home',
|
|
6
|
+
component: ()=> import('./pages/Home.vue'),
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
path: '/in',
|
|
10
|
+
name: 'Auth',
|
|
11
|
+
component: ()=> import('./pages/user/Auth.vue'),
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
path: '/signup',
|
|
15
|
+
name: 'Signup',
|
|
16
|
+
component: ()=> import('./pages/user/Signup.vue'),
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
path: '/resetpasswordrequest',
|
|
20
|
+
name: 'ResetPasswordRequest',
|
|
21
|
+
component: ()=> import('./pages/user/ResetPasswordRequest.vue'),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
path: '/resetpassword',
|
|
25
|
+
name: 'ResetPassword',
|
|
26
|
+
component: ()=> import('./pages/user/ResetPassword.vue'),
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
path: '/mysettings',
|
|
30
|
+
name: 'MySettings',
|
|
31
|
+
component: ()=> import('./pages/user/UserSettings.vue'),
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
]
|
|
36
|
+
const router = createRouter({
|
|
37
|
+
history: createWebHistory(),
|
|
38
|
+
routes: routes,
|
|
39
|
+
})
|
|
40
|
+
export default router
|
package/src/store.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineStore } from 'pinia'
|
|
2
|
+
import { Authorized } from 'flamerest'
|
|
3
|
+
|
|
4
|
+
export const storeFile = defineStore('store', {
|
|
5
|
+
state: () => {
|
|
6
|
+
return {
|
|
7
|
+
User: {
|
|
8
|
+
id: 0,
|
|
9
|
+
role: 'Guest',
|
|
10
|
+
name: 'name',
|
|
11
|
+
lang: '',
|
|
12
|
+
country: '',
|
|
13
|
+
avatar: '',
|
|
14
|
+
isLoaded: false
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
Table: {
|
|
18
|
+
rows: {}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
// could also be defined as
|
|
24
|
+
// state: () => ({ count: 0 })
|
|
25
|
+
actions: {
|
|
26
|
+
authUser(tUser: Authorized) {
|
|
27
|
+
this.User = Object.assign(this.User, tUser.User);
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
})
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
+
/* eslint-disable no-undef */
|
|
3
|
+
|
|
4
|
+
const plugin = require('tailwindcss/plugin')
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
mode: 'jit',
|
|
8
|
+
content: [
|
|
9
|
+
"./index.html",
|
|
10
|
+
"./src/**/*.{vue,js,ts,jsx,tsx}",
|
|
11
|
+
],
|
|
12
|
+
theme: {
|
|
13
|
+
extend: {
|
|
14
|
+
spacing: {
|
|
15
|
+
'feed-lg': '777px',
|
|
16
|
+
'desktop': '1110px'
|
|
17
|
+
},
|
|
18
|
+
fontSize: {
|
|
19
|
+
'7': '.438rem',
|
|
20
|
+
'8': '.5rem',
|
|
21
|
+
'9': '.563rem',
|
|
22
|
+
'10': '.625rem',
|
|
23
|
+
'11': '.688rem',
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
screens: {
|
|
27
|
+
|
|
28
|
+
'mobile': { min: '320px', max: '1080px' },
|
|
29
|
+
// => @media (min-width: 640px) { ... }
|
|
30
|
+
|
|
31
|
+
'tablet': { min: '640px', max: '1080px' },
|
|
32
|
+
// => @media (min-width: 640px) { ... }
|
|
33
|
+
|
|
34
|
+
'desktop': '1080px',
|
|
35
|
+
// => @media (min-width: 1280px) { ... }
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
plugins: [
|
|
40
|
+
plugin(function ({ addComponents, theme }) {
|
|
41
|
+
addComponents(
|
|
42
|
+
{
|
|
43
|
+
'.fc': {
|
|
44
|
+
display: 'flex',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
},
|
|
48
|
+
'.fb': {
|
|
49
|
+
display: 'flex',
|
|
50
|
+
justifyContent: 'space-between',
|
|
51
|
+
alignItems: 'center',
|
|
52
|
+
},
|
|
53
|
+
'.button': {
|
|
54
|
+
display: 'inline-flex',
|
|
55
|
+
justifyContent: 'center',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
cursor: 'pointer',
|
|
58
|
+
backgroundColor: 'white',
|
|
59
|
+
padding: '2px 14px',
|
|
60
|
+
'& svg,img': {
|
|
61
|
+
width: '16px',
|
|
62
|
+
marginRight: '4px'
|
|
63
|
+
},
|
|
64
|
+
'&:hover': {
|
|
65
|
+
opacity: 0.8
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
}),
|
|
72
|
+
],
|
|
73
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": "./",
|
|
4
|
+
"paths": {
|
|
5
|
+
"@/*": [
|
|
6
|
+
"src/*"
|
|
7
|
+
],
|
|
8
|
+
"@icons/*": [
|
|
9
|
+
"node_modules/@heroicons/vue/*"
|
|
10
|
+
],
|
|
11
|
+
"@models/*": [
|
|
12
|
+
"models/*"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"target": "esnext",
|
|
16
|
+
"useDefineForClassFields": true,
|
|
17
|
+
"module": "esnext",
|
|
18
|
+
"moduleResolution": "node",
|
|
19
|
+
"strict": true,
|
|
20
|
+
"jsx": "preserve",
|
|
21
|
+
"sourceMap": true,
|
|
22
|
+
"resolveJsonModule": true,
|
|
23
|
+
"isolatedModules": true,
|
|
24
|
+
"esModuleInterop": true,
|
|
25
|
+
"lib": [
|
|
26
|
+
"esnext",
|
|
27
|
+
"dom",
|
|
28
|
+
"ES2016"
|
|
29
|
+
],
|
|
30
|
+
"skipLibCheck": true,
|
|
31
|
+
"allowJs": true,
|
|
32
|
+
"experimentalDecorators": true,
|
|
33
|
+
},
|
|
34
|
+
"include": [
|
|
35
|
+
"src/**/*.ts",
|
|
36
|
+
"src/**/*.d.ts",
|
|
37
|
+
"src/**/*.tsx",
|
|
38
|
+
"src/**/*.vue",
|
|
39
|
+
"models/**/*.ts"
|
|
40
|
+
],
|
|
41
|
+
"references": [
|
|
42
|
+
{
|
|
43
|
+
"path": "./tsconfig.node.json"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"vueCompilerOptions": {
|
|
47
|
+
"plugins": [
|
|
48
|
+
"@volar/vue-language-plugin-pug"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import vue from '@vitejs/plugin-vue'
|
|
3
|
+
import { fileURLToPath, URL } from "url";
|
|
4
|
+
|
|
5
|
+
// https://vitejs.dev/config/
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
base: '/',
|
|
8
|
+
plugins: [vue()],
|
|
9
|
+
resolve: {
|
|
10
|
+
alias: {
|
|
11
|
+
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
12
|
+
"@icons": fileURLToPath(new URL("./node_modules/@heroicons/vue/", import.meta.url)),
|
|
13
|
+
"@models": fileURLToPath(new URL("./models/", import.meta.url)),
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"server": {
|
|
17
|
+
"port": 3000
|
|
18
|
+
},
|
|
19
|
+
"preview": {
|
|
20
|
+
"port": 3000
|
|
21
|
+
},
|
|
22
|
+
})
|
package/volar-fix.ps1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
((Get-Content -path ("" + (gci $env:USERPROFILE/.vscode/extensions/*volar* | sort Name | select -last 1) + "/dist/node/server.js") -Raw).replace('/^\.([_a-z0-9\-]*[_a-z][_a-z0-9\-]*)/i', '/^\.([_a-z0-9\-]*[_a-z]([_a-z0-9\-\[\]]|:(?! ))*)/i')) | Set-Content -Path ("" + (gci $env:USERPROFILE/.vscode/extensions/*volar* | sort Name | select -last 1) + "/dist/node/server.js")
|