Skip to content

Commit 20aff93

Browse files
committed
init
1 parent 666afa4 commit 20aff93

File tree

411 files changed

+278311
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+278311
-0
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
NODE_ENV=production
2+
VITE_APP_SERVER_PORT=7777
3+
VITE_APP_DEV_TOOLS=close

.env.development

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
NODE_ENV=development
2+
VITE_APP_API_PORT=7777
3+
VITE_APP_DEV_TOOLS=open

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
# dependencies
11+
/node_modules
12+
package-lock.json
13+
yarn.lock
14+
.DS_Store
15+
dist
16+
dist-ssr
17+
coverage
18+
*.local
19+
/release
20+
/cypress/videos/
21+
/cypress/screenshots/
22+
23+
# Editor directories and files
24+
.vscode/*
25+
!.vscode/extensions.json
26+
.idea
27+
*.suo
28+
*.ntvs*
29+
*.njsproj
30+
*.sln
31+
*.sw?
32+
33+
# Themes
34+
public/themes/soho-light/
35+
public/themes/soho-dark/
36+
public/themes/viva-light/
37+
public/themes/viva-dark/
38+
public/themes/mira/
39+
public/themes/nano/

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Changelog
2+
3+
## 3.9.0 (2023-11-01)
4+
5+
**Migration Guide**
6+
7+
- Update theme files.
8+
9+
**Implemented New Features and Enhancements**
10+
11+
- Upgrade to PrimeVue 3.39.0
12+
13+
## 3.8.0 (2023-07-24)
14+
15+
**Migration Guide**
16+
17+
- Update theme files.
18+
- Update assets style files
19+
- Remove code highlight
20+
21+
**Implemented New Features and Enhancements**
22+
23+
- Upgrade to PrimeVue 3.30.2
24+
25+
## 3.7.0 (2023-05-06)
26+
27+
- Upgrade to PrimeVue 3.28.0
28+
29+
**Implemented New Features and Enhancements**
30+
31+
## 3.6.0 (2023-04-12)
32+
33+
**Implemented New Features and Enhancements**
34+
35+
- Upgrade to PrimeVue 3.26.1
36+
- Upgrade to vite 4.2.1

back/gui/src/router/config.chat.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import _ from "lodash";
2+
import message from "./modules.chat/message";
3+
// import server from "./modules/server";
4+
// import pages from "./modules/pages";
5+
// import uikit from "./modules/uikit";
6+
import mesh from "./modules/mesh";
7+
import AppLayout from '@/layout/AppLayout.vue';
8+
9+
const options = {
10+
routes: [
11+
{
12+
path: "/login",
13+
name: "Login",
14+
component: () => import('@/views/pages/auth/Login.vue')
15+
},
16+
{
17+
path: "/:pathMatch(.*)",
18+
name: "404",
19+
component: () => import('@/views/pages/NotFound.vue')
20+
},
21+
{
22+
path: "/403",
23+
name: "403",
24+
component: () => import('@/views/pages/auth/Access.vue')
25+
},
26+
{
27+
path: '/error',
28+
name: 'error',
29+
component: () => import('@/views/pages/auth/Error.vue')
30+
},
31+
32+
// {
33+
// path: "/landing",
34+
// name: "landing",
35+
// component: () => import('@/views/pages/Landing.vue')
36+
// },
37+
{
38+
path: '/root',
39+
name: 'Root',
40+
component: () => import('@/layout/AppRoot.vue')
41+
},
42+
{
43+
path: '/',
44+
component: AppLayout,
45+
redirect: "/root",
46+
children: [
47+
mesh,
48+
message,
49+
{
50+
path: '/workplace',
51+
name: 'Workplace',
52+
component: () => import('@/views.chat/Workplace.vue')
53+
},
54+
// server,
55+
// pages,
56+
// uikit
57+
]
58+
},
59+
],
60+
};
61+
62+
options.initRoutes = _.cloneDeep(options.routes);
63+
export default options;

back/gui/src/router/index.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { createRouter, createWebHashHistory } from 'vue-router';
2+
import { isAdmin } from "@/service/common/authority-utils";
3+
import baseOptions from '@/router/config';
4+
import chatOptions from '@/router/config.chat';
5+
6+
const loginIgnore = {
7+
names: ["404", "403", "Login", "Root"],
8+
paths: ["/login","/root"],
9+
includes(route) {
10+
return this.names.includes(route.name) || this.paths.includes(route.path);
11+
},
12+
};
13+
14+
function resetRoutes(router, store) {
15+
const options = import.meta.env.VITE_APP_MODE=='chat' ? chatOptions : baseOptions;
16+
if(!!router){
17+
const oldRoutes = router.getRoutes();
18+
oldRoutes.forEach((oldRoute) => {
19+
router.removeRoute(oldRoute.name);
20+
});
21+
options.routes.forEach((newRoute) => {
22+
router.addRoute(newRoute);
23+
});
24+
}
25+
return options;
26+
}
27+
28+
async function initRouter({ store }) {
29+
const options = resetRoutes(null, store);
30+
// options.history = createWebHistory(process.env.VUE_APP_PUBLIC_PATH);
31+
options.history = createWebHashHistory();
32+
return createRouter(options);
33+
}
34+
35+
export { loginIgnore, initRouter, resetRoutes };
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const message = {
2+
path: "message",
3+
name: "Message",
4+
redirect: "/message/list",
5+
children: [
6+
{
7+
path: '/message/list',
8+
name: 'message',
9+
component: () => import('@/views.chat/message/MessageList.vue')
10+
},
11+
],
12+
};
13+
14+
export default message;

back/gui/src/views.chat/Workplace.vue

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<script setup>
2+
import { onMounted, reactive, ref, watch } from 'vue';
3+
import { useRouter } from 'vue-router';
4+
import { useStore } from 'vuex';
5+
const store = useStore();
6+
const router = useRouter();
7+
8+
const apps = ref([
9+
{ label: 'Services',route: '/mesh/services', color1: '#c084fc', color2: '#fbbf24', icon: 'pi pi-server' },
10+
{ label: 'Ports', route: '/mesh/ports', color1: '#fbbf24', color2: '#60a5fa', icon: 'pi pi-bullseye' },
11+
{ label: 'Logs', route: '/mesh/log', color1: '#60a5fa', color2: '#c084fc', icon: 'pi pi-book' },
12+
]);
13+
const go = (path) => {
14+
router.push(path);
15+
}
16+
</script>
17+
18+
<template>
19+
20+
<AppHeader :main="true">
21+
<template #center>
22+
<b>Workplace</b>
23+
</template>
24+
25+
<template #end>
26+
</template>
27+
</AppHeader>
28+
<div class="grid mt-3 text-left px-5" >
29+
<div class="col-6 md:col-4 lg:col-3" v-for="app of apps" :key="app.label">
30+
<div class="surface-card shadow-2 p-3 border-round pointer" @click="go(app.route)">
31+
<div class="flex" >
32+
<span class="text-center "
33+
style="border-radius: 6px;height: 40px;line-height: 40px;width: 40px;"
34+
:style="{ backgroundColor: `${app.color1}`, color: '#ffffff' }">
35+
<i class="text-2xl relative" style="top:5px" :class="app.icon" />
36+
</span>
37+
<div class="gap-1 pl-3" style="flex: 1;line-height: 40px;">
38+
<span class="text-surface-500 dark:text-surface-400 text-sm text-xl">{{ app.label }}</span>
39+
</div>
40+
</div>
41+
</div>
42+
</div>
43+
</div>
44+
</template>

0 commit comments

Comments
 (0)