save
This commit is contained in:
parent
2535bf0424
commit
7fb270308d
@ -1,6 +1,7 @@
|
||||
package domain
|
||||
|
||||
import (
|
||||
"admin/apps/game/domain/entity"
|
||||
"admin/apps/game/domain/projects"
|
||||
"admin/apps/game/domain/repo"
|
||||
"admin/apps/game/model"
|
||||
@ -17,6 +18,10 @@ func NewProjectService(db *gorm.DB) *ProjectService {
|
||||
return &ProjectService{repo: repo.NewProjectRepo(db)}
|
||||
}
|
||||
|
||||
func (svc *ProjectService) List() ([]*entity.Project, error) {
|
||||
return svc.repo.List()
|
||||
}
|
||||
|
||||
func (svc *ProjectService) EnsureProjectsDBData() error {
|
||||
_, err := svc.repo.EnsureProjectsDBData()
|
||||
go svc.startProjectBackGroundWorker()
|
||||
|
@ -1,6 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"admin/apps/game/model/dto"
|
||||
"admin/internal/db"
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
@ -31,9 +32,15 @@ func (m *Ban) GetId() int {
|
||||
return m.ID
|
||||
}
|
||||
|
||||
func (m *Ban) GetBanTypeChoices(projectId string) []string {
|
||||
return []string{
|
||||
"作弊",
|
||||
"广告",
|
||||
func (m *Ban) GetBanTypeChoices(projectId string) []*dto.CommonDtoFieldChoice {
|
||||
return []*dto.CommonDtoFieldChoice{
|
||||
{
|
||||
Desc: "作弊",
|
||||
Value: "作弊",
|
||||
},
|
||||
{
|
||||
Desc: "广告",
|
||||
Value: "广告",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,12 @@ type ResourceInitInfo struct {
|
||||
ShowMethods []string `json:"show_methods"`
|
||||
}
|
||||
|
||||
type ProjectInitInfo struct {
|
||||
ProjectId string `json:"project_id"`
|
||||
ProjectName string `json:"project_name"`
|
||||
ResourceList []*ResourceInitInfo `json:"resource_list"`
|
||||
}
|
||||
|
||||
type CommonDtoFieldChoice struct {
|
||||
Desc string `json:"desc"`
|
||||
Value any `json:"value"`
|
||||
|
@ -50,3 +50,7 @@ type CommandListRsp struct {
|
||||
type ResourceListRsp struct {
|
||||
List []*ResourceInitInfo `json:"list"`
|
||||
}
|
||||
|
||||
type RoutesListRsp struct {
|
||||
Projects []*ProjectInitInfo `json:"projects"`
|
||||
}
|
||||
|
@ -9,6 +9,29 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (ctl *controller) GetRoutes(ctx *context.WebContext, params *dto.NilReq, rsp *dto.RoutesListRsp) error {
|
||||
projects, err := ctl.svc.GetProjectList()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, project := range projects {
|
||||
projectDto := &dto.ProjectInitInfo{
|
||||
ProjectId: project.ProjectPo.ProjectId,
|
||||
ProjectName: project.ProjectPo.Name,
|
||||
}
|
||||
for _, v := range ctl.svc.GetSupportResourcesList() {
|
||||
if v.Resource == consts.ResourcesName_Project {
|
||||
continue
|
||||
}
|
||||
projectDto.ResourceList = append(projectDto.ResourceList, v)
|
||||
}
|
||||
rsp.Projects = append(rsp.Projects, projectDto)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ctl *controller) CommandList(ctx *context.WebContext, params *dto.CommandListReq, rsp *dto.CommandListRsp) error {
|
||||
|
||||
url := params.Addr + "/api/commandlist"
|
||||
|
@ -1,9 +1,7 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"admin/apps/game/model/dto"
|
||||
"admin/internal/consts"
|
||||
"admin/internal/context"
|
||||
"admin/lib/web"
|
||||
)
|
||||
|
||||
@ -26,17 +24,7 @@ func (srv *Server) Route(engine *web.Engine) {
|
||||
resourceUnderProjectGroup.Put("", "编辑", consts.WebPathPermit_Read, srv.ctl.CommonPut)
|
||||
resourceUnderProjectGroup.Delete("", "删除", consts.WebPathPermit_Read, srv.ctl.CommonDelete)
|
||||
}
|
||||
|
||||
projectGroup.Get("/resourcelist", "获取支持的资源列表,用于客户端生成前端操作菜单", consts.WebPathPermit_Read, srv.getResourceList)
|
||||
}
|
||||
}
|
||||
|
||||
func (srv *Server) getResourceList(ctx *context.WebContext, params *dto.NilReq, rsp *dto.ResourceListRsp) error {
|
||||
for _, v := range srv.ctl.svc.GetSupportResourcesList() {
|
||||
if v.Resource == consts.ResourcesName_Project {
|
||||
continue
|
||||
}
|
||||
rsp.List = append(rsp.List, v)
|
||||
}
|
||||
return nil
|
||||
apiGroup.Get("/routes", "获取路由列表,用于客户端生成前端操作菜单", consts.WebPathPermit_Read, srv.ctl.GetRoutes)
|
||||
}
|
||||
|
@ -1,5 +1,11 @@
|
||||
package service
|
||||
|
||||
import "admin/apps/game/domain/entity"
|
||||
|
||||
func (svc *Service) GetProjectList() ([]*entity.Project, error) {
|
||||
return svc.projectSvc.List()
|
||||
}
|
||||
|
||||
func (svc *Service) ensureProjectsDBData() error {
|
||||
return svc.projectSvc.EnsureProjectsDBData()
|
||||
}
|
||||
|
920
ui/package-lock.json
generated
920
ui/package-lock.json
generated
@ -17,6 +17,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
"sass": "^1.87.0",
|
||||
"sass-embedded": "^1.87.0",
|
||||
"sass-loader": "^16.0.5",
|
||||
"unplugin-auto-import": "^19.1.2",
|
||||
"unplugin-icons": "^22.1.0",
|
||||
"unplugin-vue-components": "^28.5.0",
|
||||
@ -507,6 +510,13 @@
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@bufbuild/protobuf": {
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.npmmirror.com/@bufbuild/protobuf/-/protobuf-2.2.5.tgz",
|
||||
"integrity": "sha512-/g5EzJifw5GF8aren8wZ/G5oMuPoGeS6MQD3ca8ddcvdXR5UELUfdTZITCGNhNXynY/AYl3Z4plmxdj/tRl/hQ==",
|
||||
"dev": true,
|
||||
"license": "(Apache-2.0 AND BSD-3-Clause)"
|
||||
},
|
||||
"node_modules/@ctrl/tinycolor": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz",
|
||||
@ -1154,6 +1164,316 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher/-/watcher-2.5.1.tgz",
|
||||
"integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"detect-libc": "^1.0.3",
|
||||
"is-glob": "^4.0.3",
|
||||
"micromatch": "^4.0.5",
|
||||
"node-addon-api": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@parcel/watcher-android-arm64": "2.5.1",
|
||||
"@parcel/watcher-darwin-arm64": "2.5.1",
|
||||
"@parcel/watcher-darwin-x64": "2.5.1",
|
||||
"@parcel/watcher-freebsd-x64": "2.5.1",
|
||||
"@parcel/watcher-linux-arm-glibc": "2.5.1",
|
||||
"@parcel/watcher-linux-arm-musl": "2.5.1",
|
||||
"@parcel/watcher-linux-arm64-glibc": "2.5.1",
|
||||
"@parcel/watcher-linux-arm64-musl": "2.5.1",
|
||||
"@parcel/watcher-linux-x64-glibc": "2.5.1",
|
||||
"@parcel/watcher-linux-x64-musl": "2.5.1",
|
||||
"@parcel/watcher-win32-arm64": "2.5.1",
|
||||
"@parcel/watcher-win32-ia32": "2.5.1",
|
||||
"@parcel/watcher-win32-x64": "2.5.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-android-arm64": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz",
|
||||
"integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-darwin-arm64": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz",
|
||||
"integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-darwin-x64": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz",
|
||||
"integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-freebsd-x64": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz",
|
||||
"integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-linux-arm-glibc": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz",
|
||||
"integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-linux-arm-musl": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz",
|
||||
"integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-linux-arm64-glibc": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz",
|
||||
"integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-linux-arm64-musl": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz",
|
||||
"integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-linux-x64-glibc": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz",
|
||||
"integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-linux-x64-musl": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz",
|
||||
"integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-win32-arm64": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz",
|
||||
"integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-win32-ia32": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz",
|
||||
"integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-win32-x64": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz",
|
||||
"integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@polka/url": {
|
||||
"version": "1.0.0-next.29",
|
||||
"resolved": "https://registry.npmmirror.com/@polka/url/-/url-1.0.0-next.29.tgz",
|
||||
@ -1976,6 +2296,13 @@
|
||||
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
||||
}
|
||||
},
|
||||
"node_modules/buffer-builder": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/buffer-builder/-/buffer-builder-0.2.0.tgz",
|
||||
"integrity": "sha512-7VPMEPuYznPSoR21NE1zvd2Xna6c/CloiZCfcMXR1Jny6PjX0N4Nsa38zcBFo/FMK+BlA+FLKbJCQ0i2yxp+Xg==",
|
||||
"dev": true,
|
||||
"license": "MIT/X11"
|
||||
},
|
||||
"node_modules/bundle-name": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/bundle-name/-/bundle-name-4.1.0.tgz",
|
||||
@ -2116,6 +2443,13 @@
|
||||
"consola": "^3.2.3"
|
||||
}
|
||||
},
|
||||
"node_modules/colorjs.io": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmmirror.com/colorjs.io/-/colorjs.io-0.5.2.tgz",
|
||||
"integrity": "sha512-twmVoizEW7ylZSN32OgKdXRmo1qg+wT5/6C3xu5b9QsWzSFAhHLn2xd8ro0diCsKfCj1RdaTP/nrcW+vAoQPIw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
@ -2280,6 +2614,20 @@
|
||||
"integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/detect-libc": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-1.0.3.tgz",
|
||||
"integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"bin": {
|
||||
"detect-libc": "bin/detect-libc.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "16.5.0",
|
||||
"resolved": "https://registry.npmmirror.com/dotenv/-/dotenv-16.5.0.tgz",
|
||||
@ -2815,6 +3163,16 @@
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz",
|
||||
@ -2879,6 +3237,13 @@
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/immutable": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/immutable/-/immutable-5.1.1.tgz",
|
||||
"integrity": "sha512-3jatXi9ObIsPGr3N5hGw/vWWcTkq6hUYhpQz4k0wLC+owqWi/LiugIw9x0EdNZ2yGedKN/HzePiBvaJRXa0Ujg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/is-binary-path": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
@ -3307,6 +3672,21 @@
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/neo-async": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz",
|
||||
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/node-addon-api/-/node-addon-api-7.1.1.tgz",
|
||||
"integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/node-fetch-native": {
|
||||
"version": "1.6.6",
|
||||
"resolved": "https://registry.npmmirror.com/node-fetch-native/-/node-fetch-native-1.6.6.tgz",
|
||||
@ -3755,6 +4135,493 @@
|
||||
"queue-microtask": "^1.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/rxjs": {
|
||||
"version": "7.8.2",
|
||||
"resolved": "https://registry.npmmirror.com/rxjs/-/rxjs-7.8.2.tgz",
|
||||
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass/-/sass-1.87.0.tgz",
|
||||
"integrity": "sha512-d0NoFH4v6SjEK7BoX810Jsrhj7IQSYHAHLi/iSpgqKc7LaIDshFRlSg5LOymf9FqQhxEHs2W5ZQXlvy0KD45Uw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chokidar": "^4.0.0",
|
||||
"immutable": "^5.0.2",
|
||||
"source-map-js": ">=0.6.2 <2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"sass": "sass.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@parcel/watcher": "^2.4.1"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded/-/sass-embedded-1.87.0.tgz",
|
||||
"integrity": "sha512-1IA3iTJNh4BkkA/nidKiVwbmkxr9o6LsPegycHMX/JYs255zpocN5GdLF1+onohQCJxbs5ldr8osKV7qNaNBjg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bufbuild/protobuf": "^2.0.0",
|
||||
"buffer-builder": "^0.2.0",
|
||||
"colorjs.io": "^0.5.0",
|
||||
"immutable": "^5.0.2",
|
||||
"rxjs": "^7.4.0",
|
||||
"supports-color": "^8.1.1",
|
||||
"sync-child-process": "^1.0.2",
|
||||
"varint": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"sass": "dist/bin/sass.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"sass-embedded-android-arm": "1.87.0",
|
||||
"sass-embedded-android-arm64": "1.87.0",
|
||||
"sass-embedded-android-ia32": "1.87.0",
|
||||
"sass-embedded-android-riscv64": "1.87.0",
|
||||
"sass-embedded-android-x64": "1.87.0",
|
||||
"sass-embedded-darwin-arm64": "1.87.0",
|
||||
"sass-embedded-darwin-x64": "1.87.0",
|
||||
"sass-embedded-linux-arm": "1.87.0",
|
||||
"sass-embedded-linux-arm64": "1.87.0",
|
||||
"sass-embedded-linux-ia32": "1.87.0",
|
||||
"sass-embedded-linux-musl-arm": "1.87.0",
|
||||
"sass-embedded-linux-musl-arm64": "1.87.0",
|
||||
"sass-embedded-linux-musl-ia32": "1.87.0",
|
||||
"sass-embedded-linux-musl-riscv64": "1.87.0",
|
||||
"sass-embedded-linux-musl-x64": "1.87.0",
|
||||
"sass-embedded-linux-riscv64": "1.87.0",
|
||||
"sass-embedded-linux-x64": "1.87.0",
|
||||
"sass-embedded-win32-arm64": "1.87.0",
|
||||
"sass-embedded-win32-ia32": "1.87.0",
|
||||
"sass-embedded-win32-x64": "1.87.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-android-arm": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-android-arm/-/sass-embedded-android-arm-1.87.0.tgz",
|
||||
"integrity": "sha512-Z20u/Y1kFDpMbgiloR5YPLxNuMVeKQRC8e/n68oAAxf3u7rDSmNn2msi7USqgT1f2zdBBNawn/ifbFEla6JiHw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-android-arm64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.87.0.tgz",
|
||||
"integrity": "sha512-uqeZoBuXm3W2KhxolScAAfWOLHL21e50g7AxlLmG0he7WZsWw6e9kSnmq301iLIFp4kvmXYXbXbNKAeu9ItRYA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-android-ia32": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-android-ia32/-/sass-embedded-android-ia32-1.87.0.tgz",
|
||||
"integrity": "sha512-hSWTqo2Igdig528cUb1W1+emw9d1J4+nqOoR4tERS04zcwRRFNDiuBT0o5meV7nkEwE982F+h57YdcRXj8gTtg==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-android-riscv64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-android-riscv64/-/sass-embedded-android-riscv64-1.87.0.tgz",
|
||||
"integrity": "sha512-kBAPSjiTBLy5ua/0LRNAJwOAARhzFU7gP35fYORJcdBuz1lkIVPVnid1lh9qQ6Ce9MOJcr7VKFtGnTuqVeig5A==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-android-x64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-android-x64/-/sass-embedded-android-x64-1.87.0.tgz",
|
||||
"integrity": "sha512-ZHMrNdtdMSpJUYco2MesnlPwDTZftD3pqkkOMI2pbqarPoFUKJtP5k80nwCM0sJGtqfNE+O16w9yPght0CMiJg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-darwin-arm64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.87.0.tgz",
|
||||
"integrity": "sha512-7TK1JWJdCIRSdZv5CJv/HpDz/wIfwUy2FoPz9sVOEj1pDTH0N+VfJd5VutCddIdoQN9jr0ap8vwkc65FbAxV2A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-darwin-x64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.87.0.tgz",
|
||||
"integrity": "sha512-2JiQzt7FmgUC4MYT2QvbeH/Bi3e76WEhaYoc5P3WyTW8unsHksyTdMuTuYe0Qf9usIyt6bmm5no/4BBw7c8Cig==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-linux-arm": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.87.0.tgz",
|
||||
"integrity": "sha512-z5P6INMsGXiUcq1sRRbksyQUhalFFYjTEexuxfSYdK3U2YQMADHubQh8pGzkWvFRPOpnh83RiGuwvpaARYHnsw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-linux-arm64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-linux-arm64/-/sass-embedded-linux-arm64-1.87.0.tgz",
|
||||
"integrity": "sha512-5z+mwJCbGZcg+q+MwdEVSh0ogFK7OSAe175Gsozzr/Izw34Q+RGUw9O82jsV2c4YNuTAQvzEHgIO5cvNvt3Quw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-linux-ia32": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-linux-ia32/-/sass-embedded-linux-ia32-1.87.0.tgz",
|
||||
"integrity": "sha512-Xzcp+YPp0iakGL148Jl57CO+MxLuj2jsry3M+rc1cSnDlvkjNVs6TMxaL70GFeV5HdU2V60voYcgE7adDUtJjw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-linux-musl-arm": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-linux-musl-arm/-/sass-embedded-linux-musl-arm-1.87.0.tgz",
|
||||
"integrity": "sha512-4PyqOWhRzyu06RRmpCCBOJdF4BOv7s446wrV6yODtEyyfSIDx3MJabo3KT0oJ1lTWSI/aU3R89bKx0JFXcIHHw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-linux-musl-arm64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-linux-musl-arm64/-/sass-embedded-linux-musl-arm64-1.87.0.tgz",
|
||||
"integrity": "sha512-HWE5eTRCoKzFZWsxOjDMTF5m4DDTQ0n7NJxSYiUXPBDydr9viPXbGOMYG7WVJLjiF7upr7DYo/mfp/SNTMlZyg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-linux-musl-ia32": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-linux-musl-ia32/-/sass-embedded-linux-musl-ia32-1.87.0.tgz",
|
||||
"integrity": "sha512-aQaPvlRn3kh93PLQvl6BcFKu8Ji92+42blFEkg6nMVvmugD5ZwH2TGFrX25ibx4CYxRpMS4ssF7a0i7vy5HB1Q==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-linux-musl-riscv64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-linux-musl-riscv64/-/sass-embedded-linux-musl-riscv64-1.87.0.tgz",
|
||||
"integrity": "sha512-o5DxcqiFzET3KRWo+futHr/lhAMBP3tJGGx8YIgpHQYfvDMbsvE0hiFC+nZ/GF9dbcGd+ceIQwfvE5mcc7Gsjw==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-linux-musl-x64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-linux-musl-x64/-/sass-embedded-linux-musl-x64-1.87.0.tgz",
|
||||
"integrity": "sha512-dKxWsu9Wu/CyfzQmHdeiGqrRSzJ85VUjbSx+aP1/7ttmps3SSg+YW95PuqnCOa7GSuSreC3dKKpXHTywUxMLQA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-linux-riscv64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-linux-riscv64/-/sass-embedded-linux-riscv64-1.87.0.tgz",
|
||||
"integrity": "sha512-Sy3ESZ4FwBiijvmTA9n+0p0w3MNCue1AgINVPzpAY27EFi0h49eqQm9SWfOkFqmkFS2zFRYowdQOr5Bbr2gOXA==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-linux-x64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-linux-x64/-/sass-embedded-linux-x64-1.87.0.tgz",
|
||||
"integrity": "sha512-+UfjakOcHHKTnEqB3EZ+KqzezQOe1emvy4Rs+eQhLyfekpYuNze/qlRvYxfKTmrtvDiUrIto8MXsyZfMLzkuMA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-win32-arm64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-win32-arm64/-/sass-embedded-win32-arm64-1.87.0.tgz",
|
||||
"integrity": "sha512-m1DS6FYUE0/fv+vt38uQB/kxR4UjnyD+2zcSc298pFmA0aYh/XZIPWw7RxG1HL3KLE1ZrGyu3254MPoxRhs3ig==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-win32-ia32": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-win32-ia32/-/sass-embedded-win32-ia32-1.87.0.tgz",
|
||||
"integrity": "sha512-JztXLo59GMe2E6g+kCsyiERYhtZgkcyDYx6CrXoSTE5WaE+RbxRiCCCv8/1+hf406f08pUxJ8G0Ody7M5urtBA==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded-win32-x64": {
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmmirror.com/sass-embedded-win32-x64/-/sass-embedded-win32-x64-1.87.0.tgz",
|
||||
"integrity": "sha512-4nQErpauvhgSo+7ClumGdjdf9sGx+U9yBgvhI0+zUw+D5YvraVgvA0Lk8Wuwntx2PqnvKUk8YDr/vxHJostv4Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-loader": {
|
||||
"version": "16.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/sass-loader/-/sass-loader-16.0.5.tgz",
|
||||
"integrity": "sha512-oL+CMBXrj6BZ/zOq4os+UECPL+bWqt6OAC6DWS8Ln8GZRcMDjlJ4JC3FBDuHJdYaFWIdKNIBYmtZtK2MaMkNIw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"neo-async": "^2.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18.12.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/webpack"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@rspack/core": "0.x || 1.x",
|
||||
"node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
|
||||
"sass": "^1.3.0",
|
||||
"sass-embedded": "*",
|
||||
"webpack": "^5.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@rspack/core": {
|
||||
"optional": true
|
||||
},
|
||||
"node-sass": {
|
||||
"optional": true
|
||||
},
|
||||
"sass": {
|
||||
"optional": true
|
||||
},
|
||||
"sass-embedded": {
|
||||
"optional": true
|
||||
},
|
||||
"webpack": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/chokidar": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-4.0.3.tgz",
|
||||
"integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"readdirp": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.16.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
},
|
||||
"node_modules/sass/node_modules/readdirp": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-4.1.2.tgz",
|
||||
"integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 14.18.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "individual",
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
},
|
||||
"node_modules/scule": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz",
|
||||
@ -3901,6 +4768,45 @@
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-color": {
|
||||
"version": "8.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz",
|
||||
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/supports-color?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/sync-child-process": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/sync-child-process/-/sync-child-process-1.0.2.tgz",
|
||||
"integrity": "sha512-8lD+t2KrrScJ/7KXCSyfhT3/hRq78rC0wBFqNJXv3mZyn6hW2ypM05JmlSvtqRbeq6jqA94oHbxAr2vYsJ8vDA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"sync-message-port": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sync-message-port": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmmirror.com/sync-message-port/-/sync-message-port-1.1.3.tgz",
|
||||
"integrity": "sha512-GTt8rSKje5FilG+wEdfCkOcLL7LWqpMlr2c3LRuKt/YXxcJ52aGSbGBAdI4L3aaqfrBt6y711El53ItyH1NWzg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tinyexec": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmmirror.com/tinyexec/-/tinyexec-0.3.2.tgz",
|
||||
@ -3945,6 +4851,13 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz",
|
||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||
"dev": true,
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/ufo": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.6.1.tgz",
|
||||
@ -4219,6 +5132,13 @@
|
||||
"browserslist": ">= 4.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/varint": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/varint/-/varint-6.0.0.tgz",
|
||||
"integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/vite/-/vite-6.3.0.tgz",
|
||||
|
@ -18,6 +18,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
"sass": "^1.87.0",
|
||||
"sass-embedded": "^1.87.0",
|
||||
"sass-loader": "^16.0.5",
|
||||
"unplugin-auto-import": "^19.1.2",
|
||||
"unplugin-icons": "^22.1.0",
|
||||
"unplugin-vue-components": "^28.5.0",
|
||||
|
@ -1,5 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function generateRoutes() {
|
||||
return request({
|
||||
url: "/routes",
|
||||
method: "get"
|
||||
})
|
||||
}
|
||||
|
||||
export function gameApiRequest(url, method, data) {
|
||||
if (method === "get") {
|
||||
return request({
|
||||
|
35
ui/src/assets/styles/global.scss
Normal file
35
ui/src/assets/styles/global.scss
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
.el-table {
|
||||
.el-table__header-wrapper, .el-table__fixed-header-wrapper {
|
||||
th {
|
||||
word-break: break-word;
|
||||
background-color: #f8f8f9 !important;
|
||||
color: #515a6e;
|
||||
height: 40px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table__body-wrapper {
|
||||
.el-button [class*="el-icon-"] + span {
|
||||
margin-left: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-table .fixed-width .el-button--small {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
/** 表格更多操作下拉样式 */
|
||||
.el-table .el-dropdown-link {
|
||||
cursor: pointer;
|
||||
color: #409EFF;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.el-table .el-dropdown, .el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
<script setup>
|
||||
import {cachedProject, cachedProjectResource} from '@/stores/project.js'
|
||||
import {gameApiRequest} from '@/api/game_api.js'
|
||||
import {projectOperationRoutes, setProjectOperationRoutes} from '@/router/index.js'
|
||||
import {useRouter} from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const curProject = cachedProject().get()
|
||||
const cachedResource = cachedProjectResource()
|
||||
|
||||
const resourceList = ref([])
|
||||
|
||||
console.log("handle project:", curProject)
|
||||
console.log("handle resource:", cachedResource)
|
||||
console.log("command api addr:", curProject.ApiAddr)
|
||||
|
||||
gameApiRequest("/project/resourcelist", "get", {addr: curProject.ApiAddr}).then((res) => {
|
||||
// console.log("请求commandlist成功!", res.data)
|
||||
resourceList.value = res.data.list
|
||||
setProjectOperationRoutes(curProject, resourceList.value)
|
||||
console.log("all routes:", router.getRoutes())
|
||||
}, (err) => {
|
||||
|
||||
})
|
||||
|
||||
const handleMenuSelect = (routePath) => {
|
||||
// let pushPath = {
|
||||
// path: routePath.path,
|
||||
// query: {
|
||||
// resource_url: "/project/" + curProject.ProjectId + "/" + routePath.meta.resource,
|
||||
// }
|
||||
// }
|
||||
let cachedResourceNode = {
|
||||
raw_node: routePath,
|
||||
resource_url: "/project/" + curProject.ProjectId + "/" + routePath.meta.resource,
|
||||
}
|
||||
cachedResource.set(cachedResourceNode)
|
||||
console.log("push node", cachedResourceNode)
|
||||
router.push(routePath.path)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-container>
|
||||
<el-aside width="200px">
|
||||
<el-menu
|
||||
v-for="routePath in projectOperationRoutes"
|
||||
router @select="handleMenuSelect(routePath)"
|
||||
>
|
||||
<el-menu-item :index="routePath.path">
|
||||
<span>{{ routePath.name }}</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-main>
|
||||
<router-view/>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -3,45 +3,24 @@ import {ElNotification} from "element-plus";
|
||||
import {resourceDelete, resourceList, resourcePost, resourcePut} from "@/api/resource.js";
|
||||
import {ref, toRaw} from "vue";
|
||||
import {useRoute} from 'vue-router';
|
||||
import {cachedProjectResource} from '@/stores/project.js'
|
||||
import LocalCache from "@/stores/project.js";
|
||||
|
||||
const cachedResource = cachedProjectResource().get();
|
||||
|
||||
const props = defineProps({
|
||||
// rows: {},
|
||||
resource_url: String,
|
||||
resource_methods: [],
|
||||
|
||||
})
|
||||
const empty_row_click_btn1 = {
|
||||
text: "",
|
||||
icon: null,
|
||||
handler: null,
|
||||
}
|
||||
const empty_row_click_btn2 = {
|
||||
text: "",
|
||||
icon: null,
|
||||
handler: null,
|
||||
}
|
||||
const cachedResource = LocalCache.getCache("resource");
|
||||
|
||||
const listRsp = ref({fields_desc: [], rows: []})
|
||||
const listDataOK = ref(false)
|
||||
const resource_raw_node = cachedResource.raw_node;
|
||||
const resource_url = cachedResource.resource_url;
|
||||
const resource_raw_node = cachedResource;
|
||||
const resource_url = cachedResource.meta.resource_url;
|
||||
const fieldsDescInfo = ref([])
|
||||
const rows = ref([])
|
||||
const rules = ref({})
|
||||
|
||||
const row_click_btn1 = cachedResource.row_click_btn1 !== undefined ? cachedResource.row_click_btn1 : empty_row_click_btn1;
|
||||
const row_click_btn2 = cachedResource.row_click_btn2 !== undefined ? cachedResource.row_click_btn2 : empty_row_click_btn2;
|
||||
|
||||
const item = ref({
|
||||
id: 0,
|
||||
number: 1,
|
||||
})
|
||||
|
||||
console.log("resource_raw_node:", resource_raw_node)
|
||||
console.log("table resource:", resource_url)
|
||||
// console.log("enter table, resource:", cachedResource)
|
||||
|
||||
const listData = async () => {
|
||||
try {
|
||||
@ -49,7 +28,7 @@ const listData = async () => {
|
||||
page_no: 0,
|
||||
page_len: 100,
|
||||
}
|
||||
console.log("list params:", listParams)
|
||||
// console.log("list params:", listParams)
|
||||
const rspData = await resourceList(resource_url, listParams);
|
||||
listRsp.value = rspData;
|
||||
if (listRsp.value.code !== 200) throw new Error("请求失败,错误码:", listRsp.code);
|
||||
@ -71,10 +50,7 @@ const listData = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
console.log('await list rsp:', listRsp.value)
|
||||
console.log("await fields:", fieldsDescInfo.value)
|
||||
console.log("await rows:", toRaw(rows.value))
|
||||
console.log("await rules:", toRaw(rules.value))
|
||||
// console.log('await list rsp:', listRsp.value, fieldsDescInfo.value, toRaw(rows.value), toRaw(rules.value))
|
||||
|
||||
listDataOK.value = true
|
||||
} catch (err) {
|
||||
@ -173,13 +149,6 @@ const handleDelete = (index, row) => {
|
||||
})
|
||||
}
|
||||
|
||||
const tableRowClick = (btnInfo, index, row) => {
|
||||
console.log("row is clicked:", row)
|
||||
if (btnInfo.handler != null) {
|
||||
btnInfo.handler(row)
|
||||
}
|
||||
}
|
||||
|
||||
function addItem(fieldDescInfo) {
|
||||
if (item.value.id == null || item.value.id == '' || item.value.id < 0) {
|
||||
ElMessage('请选择道具!')
|
||||
@ -244,23 +213,23 @@ const handleCloseDialog = () => {
|
||||
<el-table-column prop="func" label="功 能">
|
||||
<template #default="scope">
|
||||
|
||||
<el-button size="default" type="primary"
|
||||
@click="tableRowClick(row_click_btn1, scope.$index, scope.row)"
|
||||
v-if="(row_click_btn1.text !== '')">
|
||||
<el-icon style="vertical-align: middle">
|
||||
<component :is="row_click_btn1.icon"></component>
|
||||
</el-icon>
|
||||
<span>{{ row_click_btn1.text }}</span>
|
||||
</el-button>
|
||||
<!-- <el-button size="default" type="primary"-->
|
||||
<!-- @click="tableRowClick(row_click_btn1, scope.$index, scope.row)"-->
|
||||
<!-- v-if="(row_click_btn1.text !== '')">-->
|
||||
<!-- <el-icon style="vertical-align: middle">-->
|
||||
<!-- <component :is="row_click_btn1.icon"></component>-->
|
||||
<!-- </el-icon>-->
|
||||
<!-- <span>{{ row_click_btn1.text }}</span>-->
|
||||
<!-- </el-button>-->
|
||||
|
||||
<el-button size="default" type="primary"
|
||||
@click="tableRowClick(row_click_btn2, scope.$index, scope.row)"
|
||||
v-if="(row_click_btn2.text !== '')">
|
||||
<el-icon style="vertical-align: middle">
|
||||
<component :is="row_click_btn2.icon"></component>
|
||||
</el-icon>
|
||||
<span>{{ row_click_btn2.text }}</span>
|
||||
</el-button>
|
||||
<!-- <el-button size="default" type="primary"-->
|
||||
<!-- @click="tableRowClick(row_click_btn2, scope.$index, scope.row)"-->
|
||||
<!-- v-if="(row_click_btn2.text !== '')">-->
|
||||
<!-- <el-icon style="vertical-align: middle">-->
|
||||
<!-- <component :is="row_click_btn2.icon"></component>-->
|
||||
<!-- </el-icon>-->
|
||||
<!-- <span>{{ row_click_btn2.text }}</span>-->
|
||||
<!-- </el-button>-->
|
||||
|
||||
<el-button size="default" type="success" @click="handleEdit( scope.$index, scope.row)"
|
||||
v-if="(resource_raw_node.meta.methods.put === true)">
|
||||
@ -370,6 +339,6 @@ const handleCloseDialog = () => {
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
@ -1,11 +0,0 @@
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
test1
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -3,11 +3,18 @@ import './assets/main.css'
|
||||
import {createApp} from 'vue'
|
||||
import {createPinia} from 'pinia'
|
||||
import ElementPlus from 'element-plus'
|
||||
|
||||
import '@/assets/styles/global.scss' // global css
|
||||
|
||||
import 'element-plus/dist/index.css'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
||||
import './permission'
|
||||
|
||||
const pinia = createPinia();
|
||||
pinia.use(piniaPluginPersistedstate);
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
@ -15,9 +22,6 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||
app.component(key, component)
|
||||
}
|
||||
|
||||
const pinia = createPinia();
|
||||
pinia.use(piniaPluginPersistedstate);
|
||||
|
||||
app.use(ElementPlus)
|
||||
app.use(pinia)
|
||||
app.use(router)
|
||||
|
@ -1,6 +1,40 @@
|
||||
import router from './router'
|
||||
import router, {projectOpTreeRoutes, setProjectOperationRoutes} from './router'
|
||||
import {generateRoutes} from "@/api/game_api.js";
|
||||
import LocalCache, {cachedProject, cachedProjectResource} from '@/stores/project.js'
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
|
||||
if (to.path === '/login') {
|
||||
// 推首页
|
||||
next({path: '/'})
|
||||
} else {
|
||||
if (to.path.startsWith('/project')) {
|
||||
const pathSegments = to.path.split("/").filter(segment => segment !== "");
|
||||
if (pathSegments.length === 3) {
|
||||
|
||||
// const projectId = pathSegments[pathSegments.length - 2]
|
||||
// const resource = pathSegments[pathSegments.length - 1]
|
||||
|
||||
// 进行资源操作点击
|
||||
const oldResource = LocalCache.getCache("resource")
|
||||
if (oldResource.path !== to.path) {
|
||||
LocalCache.setCache("resource", to)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (projectOpTreeRoutes.value.length === 0) {
|
||||
generateRoutes().then((res) => {
|
||||
const projectList = ref([])
|
||||
projectList.value = res.data.projects
|
||||
setProjectOperationRoutes(projectList.value)
|
||||
// console.log("all routes:", router.getRoutes())
|
||||
next()
|
||||
}, (err) => {
|
||||
console.log("跳转路径:", to.path, " 报错:", err)
|
||||
})
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -1,78 +1,104 @@
|
||||
import {createRouter, createWebHistory} from 'vue-router'
|
||||
import Home from '../views/Home.vue'
|
||||
|
||||
const query = () => {
|
||||
return {
|
||||
t: Date.now(),
|
||||
}
|
||||
export const projectOpTreeRoutes = ref([]) // 项目操作的树形路由,用于菜单树生成
|
||||
export const projectOpFlatRoutes = ref([]) // 项目操作的展平路由,用于直接挂钩到父组件(即home页面),否则点击子菜单无法在父页面内容区显示)
|
||||
|
||||
export const constProjectResourceRoute = {
|
||||
path: '/project',
|
||||
name: 'project',
|
||||
meta: {
|
||||
name: "project",
|
||||
icon: "App",
|
||||
resource_url: "/project",
|
||||
methods: {
|
||||
get: true,
|
||||
put: true,
|
||||
}
|
||||
},
|
||||
component: () => import('@/views/project/project.vue'),
|
||||
}
|
||||
|
||||
export const projectOperationRoutes = ref([])
|
||||
|
||||
|
||||
const mainRoutes = ref([
|
||||
export const constHomeChildrenRoutes = [
|
||||
{
|
||||
path: '/user',
|
||||
name: 'user',
|
||||
meta: {
|
||||
name: "user",
|
||||
icon: "User",
|
||||
},
|
||||
component: () => import('@/views/user/user.vue')
|
||||
},
|
||||
{
|
||||
path: '/project',
|
||||
name: 'project',
|
||||
component: () => import('@/views/project/project.vue'),
|
||||
// query: query(),
|
||||
children: [
|
||||
{
|
||||
path: 'op',
|
||||
name: "ProjectOperation",
|
||||
component: () => import('@/components/project/op.vue'),
|
||||
children: projectOperationRoutes.value,
|
||||
},
|
||||
]
|
||||
}
|
||||
])
|
||||
constProjectResourceRoute,
|
||||
]
|
||||
|
||||
const homeRoute = {
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: Home,
|
||||
children: constHomeChildrenRoutes,
|
||||
}
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: Home,
|
||||
children: mainRoutes.value,
|
||||
},
|
||||
homeRoute,
|
||||
],
|
||||
})
|
||||
|
||||
export default router
|
||||
|
||||
export function setProjectOperationRoutes(projectInfo, resourceList) {
|
||||
console.log("resourceList:", resourceList)
|
||||
projectOperationRoutes.value = []
|
||||
export function setProjectOperationRoutes(projectList) {
|
||||
// console.log("resourceList:", projectList)
|
||||
|
||||
for (let i = 0; i < resourceList.length; i++) {
|
||||
const resource = resourceList[i]
|
||||
const routerPath = {
|
||||
path: '/project/' + resource.resource,
|
||||
name: resource.desc,
|
||||
projectOpTreeRoutes.value = []
|
||||
projectOpFlatRoutes.value = []
|
||||
|
||||
for (let i = 0; i < projectList.length; i++) {
|
||||
const project = projectList[i]
|
||||
const projectRoute = {
|
||||
path: '/project/' + project.project_id,
|
||||
name: project.project_id,
|
||||
meta: {
|
||||
resource: resource.resource,
|
||||
methods: {},
|
||||
},
|
||||
component: () => {
|
||||
return import('@/components/restful/table.vue')
|
||||
projectId: project.project_id,
|
||||
projectName: project.project_name,
|
||||
},
|
||||
// component: () => {
|
||||
// return import('@/components/restful/table.vue')
|
||||
// },
|
||||
children: [],
|
||||
props: true
|
||||
}
|
||||
// console.log("resource methods:", resource.show_methods)
|
||||
for (let j = 0; j < resource.show_methods.length; j++) {
|
||||
const method = resource.show_methods[j]
|
||||
routerPath.meta.methods[method] = true
|
||||
}
|
||||
projectOperationRoutes.value.push(routerPath)
|
||||
const resourceList = project.resource_list
|
||||
resourceList.forEach((resource) => {
|
||||
const routePath = projectRoute.path + "/" + resource.resource
|
||||
const resourceRoute = {
|
||||
path: routePath,
|
||||
name: projectRoute.name + "_" + resource.resource,
|
||||
meta: {
|
||||
desc: resource.desc,
|
||||
resource: resource.resource,
|
||||
resource_url: routePath,
|
||||
methods: {},
|
||||
},
|
||||
component: () => import('@/views/project/project_op.vue'),
|
||||
props: true
|
||||
}
|
||||
resource.show_methods.forEach((method) => {
|
||||
resourceRoute.meta.methods[method] = true
|
||||
})
|
||||
|
||||
router.addRoute(routerPath)
|
||||
// router.addRoute(projectRoute)
|
||||
|
||||
projectRoute.children.push(resourceRoute)
|
||||
projectOpFlatRoutes.value.push(resourceRoute)
|
||||
// console.log("add resource route:", resourceRoute)
|
||||
})
|
||||
|
||||
projectOpTreeRoutes.value.push(projectRoute)
|
||||
homeRoute.children = constHomeChildrenRoutes.concat(projectOpFlatRoutes.value)
|
||||
router.addRoute(homeRoute)
|
||||
}
|
||||
|
||||
|
||||
console.log("after set all routes:", router.getRoutes())
|
||||
}
|
||||
|
@ -1,6 +1,34 @@
|
||||
import {ref} from 'vue'
|
||||
import {defineStore} from 'pinia'
|
||||
|
||||
class LocalCache {
|
||||
// 添加
|
||||
setCache(key, value) {
|
||||
window.localStorage.setItem(key, JSON.stringify(value))
|
||||
}
|
||||
|
||||
// 查找
|
||||
getCache(key) {
|
||||
// obj=>sting=>obj
|
||||
const value = window.localStorage.getItem(key)
|
||||
if (value) {
|
||||
return JSON.parse(value)
|
||||
}
|
||||
}
|
||||
|
||||
// 删除
|
||||
deleteCache(key) {
|
||||
window.localStorage.removeItem(key)
|
||||
}
|
||||
|
||||
// 清理
|
||||
clearCache() {
|
||||
// window.localStorage.clear()
|
||||
}
|
||||
}
|
||||
|
||||
export default new LocalCache()
|
||||
|
||||
export const cachedProject = defineStore('clickedProject', () => {
|
||||
const project = ref({})
|
||||
const set = (setProject) => project.value = setProject
|
||||
@ -10,7 +38,7 @@ export const cachedProject = defineStore('clickedProject', () => {
|
||||
get,
|
||||
persist: true
|
||||
}
|
||||
})
|
||||
}, {persist: true})
|
||||
|
||||
export const cachedProjectResource = defineStore('clickedProject', () => {
|
||||
const setResource = ref({})
|
||||
@ -21,4 +49,6 @@ export const cachedProjectResource = defineStore('clickedProject', () => {
|
||||
get,
|
||||
persist: true
|
||||
}
|
||||
}, {
|
||||
persist: true
|
||||
})
|
@ -2,6 +2,8 @@
|
||||
import {useRoute, useRouter} from 'vue-router'
|
||||
import {computed} from 'vue'
|
||||
import avatarUrl from '@/assets/icon/header.png'
|
||||
import {projectOpTreeRoutes} from '@/router/index.js'
|
||||
import LocalCache from "@/stores/project.js";
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
@ -10,36 +12,240 @@ const route = useRoute()
|
||||
const activeMenu = computed(() => route.path)
|
||||
|
||||
// 处理菜单点击事件
|
||||
const handleMenuSelect = (index) => {
|
||||
router.push(index)
|
||||
const handleMenuSelect = (clickResource) => {
|
||||
console.log("点击资源:", clickResource)
|
||||
LocalCache.setCache("resource", clickResource)
|
||||
router.push({path: clickResource.path})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main>
|
||||
<div>
|
||||
<el-container>
|
||||
<el-aside width="200px">
|
||||
<el-avatar shape="square" :size="100" :src="avatarUrl"></el-avatar>
|
||||
<el-menu
|
||||
:default-active="activeMenu"
|
||||
@select="handleMenuSelect"
|
||||
>
|
||||
<el-menu-item index="/user">
|
||||
<el-container style="height: 100vh;">
|
||||
<el-aside class="el-aside-demo" width="200px">
|
||||
<!-- <el-avatar shape="square" :size="100" :src="avatarUrl"></el-avatar>-->
|
||||
<div class="sidebar-logo">
|
||||
<img src="@/assets/logo.svg" class="logo" alt="Logo">
|
||||
<span class="system-name">游戏后台管理系统</span>
|
||||
</div>
|
||||
|
||||
<el-menu :default-active="activeMenu" class="el-menu-vertical-demo" :collapse="isCollapse">
|
||||
|
||||
<!-- 静态菜单 -->
|
||||
<el-menu-item index="/user" @click="$router.push('/user')">
|
||||
<span>用户管理</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/project">
|
||||
<el-menu-item index="/project" @click="$router.push('/project')">
|
||||
<span>项目管理</span>
|
||||
</el-menu-item>
|
||||
|
||||
<!-- 分割条 -->
|
||||
<el-divider></el-divider>
|
||||
|
||||
<!-- 动态菜单:每个项目操作 -->
|
||||
<template v-for="project in projectOpTreeRoutes">
|
||||
<el-sub-menu :index="project.path">
|
||||
<!-- 设置菜单栏标题 -->
|
||||
<template #title>
|
||||
<span>{{ project.meta.projectName }}</span>
|
||||
</template>
|
||||
|
||||
<!-- 添加项目资源操作点击菜单 -->
|
||||
<el-menu-item v-for="resource in project.children" :key="resource.path" :index="resource.path"
|
||||
@click="handleMenuSelect(resource)">
|
||||
{{ resource.meta.desc }}
|
||||
</el-menu-item>
|
||||
|
||||
</el-sub-menu>
|
||||
</template>
|
||||
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-header>游戏后台管理系统</el-header>
|
||||
<el-container class="el-container-right">
|
||||
<el-header style="border-bottom: #1f2d3d 1px solid">游戏后台管理系统</el-header>
|
||||
<el-main>
|
||||
<router-view/>
|
||||
<router-view :key="$route.fullPath"></router-view>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.dashboard-container {
|
||||
display: flex;
|
||||
/* 使用flex布局 */
|
||||
justify-content: space-between;
|
||||
/* 子元素之间的间隔 */
|
||||
align-items: flex-start;
|
||||
/* 子元素垂直方向顶部对齐 */
|
||||
padding: 20px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 8px;
|
||||
background-color: #71e4ae;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #333;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.info-list {
|
||||
list-style-type: none;
|
||||
/* 移除列表项前的标记 */
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.info-list li {
|
||||
margin-bottom: 10px;
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 200px;
|
||||
/* 侧边栏宽度 */
|
||||
background-color: #f4f4f4;
|
||||
/* 侧边栏背景色 */
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.sidebar ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar li {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.sidebar a {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
font-size: 16px;
|
||||
display: block;
|
||||
/* 使链接占据整行 */
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.3s;
|
||||
/* 平滑过渡效果 */
|
||||
}
|
||||
|
||||
.sidebar a:hover {
|
||||
background-color: #c6ec97;
|
||||
/* 鼠标悬停时的背景色 */
|
||||
}
|
||||
|
||||
.app-container {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
flex: 1;
|
||||
/* 剩余空间 */
|
||||
padding: 20px;
|
||||
/* 内容区域的内边距 */
|
||||
}
|
||||
|
||||
.sidebar-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 200px;
|
||||
min-height: 100vh;
|
||||
background-color: #545c64;
|
||||
}
|
||||
|
||||
.collapse-button {
|
||||
margin: 10px;
|
||||
align-self: flex-end;
|
||||
background-color: #545c64;
|
||||
color: #fff;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.sidebar-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px 0;
|
||||
text-align: center;
|
||||
background: transparent; /* 关键:透明背景 */
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-bottom: 10px;
|
||||
filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5)); /* 添加微光效果 */
|
||||
}
|
||||
|
||||
.system-name {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 1px;
|
||||
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2); /* 文字阴影增强可读性 */
|
||||
}
|
||||
|
||||
.el-aside-demo {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 200px;
|
||||
z-index: 1000;
|
||||
overflow-y: auto;
|
||||
background-color: #4d4f52;
|
||||
border-right: 1px solid;
|
||||
}
|
||||
|
||||
.el-container-right {
|
||||
margin-left: 0;
|
||||
width: calc(100vw - 220px);
|
||||
}
|
||||
|
||||
.el-menu-vertical-demo {
|
||||
flex: 1;
|
||||
background-color: #4d4f52;
|
||||
}
|
||||
|
||||
:deep(.el-menu-vertical-demo .el-menu-item) {
|
||||
color: #fff;
|
||||
background-color: cadetblue;
|
||||
}
|
||||
|
||||
:deep(.el-menu-vertical-demo .el-sub-menu__title) {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
:deep(.el-menu-vertical-demo .el-menu-item:hover),
|
||||
:deep(.el-menu-vertical-demo .el-sub-menu__title:hover) {
|
||||
background-color: #1f2d3d;
|
||||
}
|
||||
|
||||
:deep(.el-menu-vertical-demo .el-menu-item.is-active),
|
||||
:deep(.el-menu-vertical-demo .el-sub-menu__title.is-active) {
|
||||
background-color: #ffd04b;
|
||||
color: #545c64;
|
||||
}
|
||||
|
||||
:deep(.el-menu-vertical-demo .el-sub-menu__title) i,
|
||||
:deep(.el-menu-vertical-demo .el-menu-item) i {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.router-link-active {
|
||||
color: #ffd04b;
|
||||
}
|
||||
|
||||
</style>
|
@ -1,57 +1,23 @@
|
||||
<script setup>
|
||||
|
||||
import tableView from '@/components/restful/table.vue'
|
||||
import op from '@/components/project/op.vue'
|
||||
import {cachedProject, cachedProjectResource} from '@/stores/project.js'
|
||||
import LocalCache from "@/stores/project.js";
|
||||
import {useRouter} from 'vue-router'
|
||||
import {constProjectResourceRoute} from "@/router/index.js";
|
||||
// import {Aim, ArrowRightBold} from '@element-plus/icons-vue'
|
||||
|
||||
const cachedProject1 = cachedProject()
|
||||
const cachedResource = cachedProjectResource()
|
||||
|
||||
LocalCache.setCache("project", {})
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const pageFlag = ref('project')
|
||||
|
||||
const row_click_handler = (row, column, event) => {
|
||||
// console.log("project row is clicked:", row)
|
||||
cachedProject1.set(row)
|
||||
const cachePro = cachedProject1.get()
|
||||
console.log('cached project:', cachePro)
|
||||
console.log("router:", router.getRoutes())
|
||||
pageFlag.value = 'op'
|
||||
}
|
||||
|
||||
const enter_project_btn = {
|
||||
text: "进入",
|
||||
icon: "ArrowRightBold",
|
||||
handler: row_click_handler,
|
||||
}
|
||||
|
||||
cachedResource.set({
|
||||
raw_node: {
|
||||
meta: {
|
||||
methods: {
|
||||
get: true,
|
||||
put: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
resource_url: "/project",
|
||||
row_click_btn1: enter_project_btn,
|
||||
})
|
||||
LocalCache.setCache("resource", constProjectResourceRoute)
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<div v-if="pageFlag === 'project'">
|
||||
<div>
|
||||
<component :is="tableView"></component>
|
||||
</div>
|
||||
<div v-else-if="pageFlag === 'op'">
|
||||
<component :is="op"></component>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
13
ui/src/views/project/project_op.vue
Normal file
13
ui/src/views/project/project_op.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<script setup>
|
||||
|
||||
import tableView from "@/components/restful/table.vue";
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<component :is="tableView"></component>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -71,5 +71,30 @@ export default defineConfig(({mode, command}) => {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
css: {
|
||||
//fix Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
api: 'modern-compiler',
|
||||
}
|
||||
},
|
||||
postcss: {
|
||||
plugins: [
|
||||
{
|
||||
postcssPlugin: 'internal:charset-removal',
|
||||
AtRule: {
|
||||
charset: (atRule) => {
|
||||
if (atRule.name === 'charset') {
|
||||
atRule.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
,
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user