├── .github
└── workflows
│ ├── build.yml
│ ├── build_docker.yml
│ └── release.yml
├── .gitignore
├── README.md
├── dockerfile
├── enc-webui
├── .editorconfig
├── .env.build
├── .env.build-test
├── .env.serve-dev
├── .env.serve-test
├── .eslintignore
├── .eslintrc.json
├── .gitignore
├── .npmrc
├── .prettierrc
├── README.md
├── eslintrc
│ ├── .eslintrc-auto-import.json
│ └── eslint-config.js
├── index.html
├── mock
│ └── example.ts
├── optimize-include.ts
├── package-lock.json
├── package.json
├── public
│ ├── favicon.ico
│ └── logo.png
├── src
│ ├── App.vue
│ ├── api
│ │ └── user.js
│ ├── assets
│ │ ├── 401_images
│ │ │ └── 401.gif
│ │ └── 404_images
│ │ │ ├── 404.png
│ │ │ └── 404_cloud.png
│ ├── components
│ │ ├── ElSvgIcon.vue
│ │ ├── TestUnit.vue
│ │ └── __tests__
│ │ │ └── el-svgIcon.test.jsx
│ ├── directives
│ │ ├── button-codes.js
│ │ ├── codes-permission.js
│ │ ├── index.js
│ │ ├── lang.js
│ │ └── roles-permission.js
│ ├── hooks
│ │ ├── use-common.js
│ │ ├── use-element.js
│ │ ├── use-error-log.js
│ │ ├── use-layout.js
│ │ ├── use-permission.js
│ │ ├── use-self-router.js
│ │ └── use-table.js
│ ├── icons
│ │ ├── SvgIcon.vue
│ │ ├── common
│ │ │ ├── 404.svg
│ │ │ ├── bug.svg
│ │ │ ├── chart.svg
│ │ │ ├── clipboard.svg
│ │ │ ├── component.svg
│ │ │ ├── dashboard.svg
│ │ │ ├── demo.svg
│ │ │ ├── documentation.svg
│ │ │ ├── drag.svg
│ │ │ ├── edit.svg
│ │ │ ├── education.svg
│ │ │ ├── email.svg
│ │ │ ├── example.svg
│ │ │ ├── excel.svg
│ │ │ ├── exit-fullscreen.svg
│ │ │ ├── eye-open.svg
│ │ │ ├── eye.svg
│ │ │ ├── form.svg
│ │ │ ├── fullscreen.svg
│ │ │ ├── guide.svg
│ │ │ ├── hamburger.svg
│ │ │ ├── icon.svg
│ │ │ ├── international.svg
│ │ │ ├── language.svg
│ │ │ ├── link.svg
│ │ │ ├── list.svg
│ │ │ ├── lock.svg
│ │ │ ├── message.svg
│ │ │ ├── money.svg
│ │ │ ├── nested.svg
│ │ │ ├── password.svg
│ │ │ ├── pdf.svg
│ │ │ ├── people.svg
│ │ │ ├── peoples.svg
│ │ │ ├── qq.svg
│ │ │ ├── search.svg
│ │ │ ├── shopping.svg
│ │ │ ├── sidebar-logo.svg
│ │ │ ├── size.svg
│ │ │ ├── skill.svg
│ │ │ ├── star.svg
│ │ │ ├── tab.svg
│ │ │ ├── table.svg
│ │ │ ├── theme.svg
│ │ │ ├── tree-table.svg
│ │ │ ├── tree.svg
│ │ │ ├── user.svg
│ │ │ ├── wechat.svg
│ │ │ └── zip.svg
│ │ └── nav-bar
│ │ │ ├── dashboard.svg
│ │ │ ├── example.svg
│ │ │ ├── eye-open.svg
│ │ │ ├── eye.svg
│ │ │ ├── form.svg
│ │ │ ├── language.svg
│ │ │ ├── link.svg
│ │ │ ├── nested.svg
│ │ │ ├── password.svg
│ │ │ ├── table.svg
│ │ │ ├── theme-icon.svg
│ │ │ ├── tree.svg
│ │ │ └── user.svg
│ ├── lang
│ │ ├── en.js
│ │ ├── index.js
│ │ └── zh.js
│ ├── layout
│ │ ├── app-main
│ │ │ ├── Breadcrumb.vue
│ │ │ ├── Hamburger.vue
│ │ │ ├── Navbar.vue
│ │ │ ├── TagsView.vue
│ │ │ └── index.vue
│ │ ├── index.vue
│ │ └── sidebar
│ │ │ ├── Link.vue
│ │ │ ├── Logo.vue
│ │ │ ├── MenuIcon.vue
│ │ │ ├── SidebarItem.vue
│ │ │ └── index.vue
│ ├── lib
│ │ └── element-plus.js
│ ├── main.js
│ ├── mock-prod-server.js
│ ├── permission.js
│ ├── plugins
│ │ └── vite-plugin-setup-extend
│ │ │ └── index.js
│ ├── router
│ │ ├── index.js
│ │ └── modules
│ │ │ └── basic-demo.js
│ ├── settings.js
│ ├── store
│ │ ├── basic.js
│ │ ├── config.js
│ │ ├── pageStore.js
│ │ └── tags-view.js
│ ├── styles
│ │ ├── index.scss
│ │ ├── reset-elemenet-plus-style.scss
│ │ ├── scss-suger.scss
│ │ └── transition.scss
│ ├── theme
│ │ ├── base
│ │ │ ├── custom
│ │ │ │ └── ct-css-vars.scss
│ │ │ ├── element-plus
│ │ │ │ ├── button.scss
│ │ │ │ ├── checkbox.scss
│ │ │ │ ├── css-vars.scss
│ │ │ │ ├── form.scss
│ │ │ │ ├── pagination.scss
│ │ │ │ ├── redio.scss
│ │ │ │ ├── table.scss
│ │ │ │ └── var.scss
│ │ │ └── index.scss
│ │ ├── china-red
│ │ │ ├── custom
│ │ │ │ └── ct-css-vars.scss
│ │ │ ├── element-plus
│ │ │ │ ├── button.scss
│ │ │ │ ├── checkbox.scss
│ │ │ │ ├── css-vars.scss
│ │ │ │ ├── form.scss
│ │ │ │ ├── pagination.scss
│ │ │ │ ├── redio.scss
│ │ │ │ ├── table.scss
│ │ │ │ └── var.scss
│ │ │ └── index.scss
│ │ ├── dark
│ │ │ ├── custom
│ │ │ │ └── ct-css-vars.scss
│ │ │ ├── element-plus
│ │ │ │ ├── button.scss
│ │ │ │ ├── checkbox.scss
│ │ │ │ ├── css-vars.css
│ │ │ │ ├── css-vars.css.map
│ │ │ │ ├── css-vars.scss
│ │ │ │ ├── form.scss
│ │ │ │ ├── pagination.scss
│ │ │ │ ├── redio.scss
│ │ │ │ ├── table.scss
│ │ │ │ └── var.scss
│ │ │ └── index.scss
│ │ ├── index.scss
│ │ ├── lighting
│ │ │ ├── custom
│ │ │ │ └── ct-css-vars.scss
│ │ │ ├── element-plus
│ │ │ │ ├── button.scss
│ │ │ │ ├── checkbox.scss
│ │ │ │ ├── css-vars.css
│ │ │ │ ├── css-vars.css.map
│ │ │ │ ├── css-vars.scss
│ │ │ │ ├── form.scss
│ │ │ │ ├── pagination.scss
│ │ │ │ ├── redio.scss
│ │ │ │ ├── table.scss
│ │ │ │ └── var.scss
│ │ │ └── index.scss
│ │ ├── mixins
│ │ │ ├── _var.scss
│ │ │ ├── config.scss
│ │ │ ├── function.scss
│ │ │ └── mixins.scss
│ │ └── utils
│ │ │ ├── change-theme.ts
│ │ │ └── index.ts
│ ├── utils
│ │ ├── axios-req.js
│ │ ├── bus.js
│ │ └── common-util.js
│ └── views
│ │ ├── basic-demo
│ │ ├── hook
│ │ │ └── index.vue
│ │ ├── keep-alive
│ │ │ ├── index.vue
│ │ │ ├── second-child.vue
│ │ │ ├── tab-keep-alive.vue
│ │ │ ├── third-child.vue
│ │ │ ├── third-children
│ │ │ │ ├── SecondChildren.vue
│ │ │ │ └── ThirdChildren.vue
│ │ │ └── third-keep-alive.vue
│ │ ├── mock
│ │ │ └── index.vue
│ │ ├── parent-children
│ │ │ ├── Children.vue
│ │ │ ├── SubChildren.vue
│ │ │ └── index.vue
│ │ ├── pinia
│ │ │ └── index.vue
│ │ ├── proxy
│ │ │ └── index.vue
│ │ ├── svg-icon
│ │ │ └── index.vue
│ │ ├── vue3-template
│ │ │ └── Vue3Template.vue
│ │ └── worker
│ │ │ └── index.vue
│ │ ├── charts
│ │ └── index.vue
│ │ ├── dashboard
│ │ └── index.vue
│ │ ├── description
│ │ └── index.vue
│ │ ├── encrypt-local
│ │ └── index.vue
│ │ ├── encrypt-online
│ │ ├── SettingSwitch.vue
│ │ └── index.vue
│ │ ├── error-log
│ │ ├── error-generator.vue
│ │ └── index.vue
│ │ ├── error-page
│ │ ├── 401.vue
│ │ └── 404.vue
│ │ ├── excel
│ │ └── index.vue
│ │ ├── find-password
│ │ └── index.vue
│ │ ├── folder-convert
│ │ └── index.vue
│ │ ├── guid
│ │ └── index.vue
│ │ ├── login
│ │ └── index.vue
│ │ ├── nested
│ │ ├── menu1
│ │ │ ├── index.vue
│ │ │ ├── menu1-1
│ │ │ │ └── index.vue
│ │ │ ├── menu1-2
│ │ │ │ ├── index.vue
│ │ │ │ ├── menu1-2-1
│ │ │ │ │ └── index.vue
│ │ │ │ └── menu1-2-2
│ │ │ │ │ └── index.vue
│ │ │ └── menu1-3
│ │ │ │ └── index.vue
│ │ └── menu2
│ │ │ └── index.vue
│ │ ├── other
│ │ └── index.vue
│ │ ├── rbac-test
│ │ ├── TestAddEdit.vue
│ │ ├── TestButton.vue
│ │ ├── TestDetail.vue
│ │ └── TestMenu.vue
│ │ ├── redirect
│ │ └── index.tsx
│ │ ├── rich-text
│ │ └── index.vue
│ │ ├── roles-codes
│ │ ├── button-permission.vue
│ │ ├── code-index.vue
│ │ ├── index.vue
│ │ └── role-index.vue
│ │ ├── setting-alist
│ │ └── index.vue
│ │ ├── setting-switch
│ │ ├── SettingSwitch.vue
│ │ └── index.vue
│ │ ├── setting-webdav
│ │ └── index.vue
│ │ └── table
│ │ └── index.vue
├── ts-out-dir
│ ├── package.json
│ └── src
│ │ ├── api
│ │ ├── user.d.ts
│ │ └── user.js
│ │ ├── directives
│ │ ├── button-codes.d.ts
│ │ ├── button-codes.js
│ │ ├── codes-permission.d.ts
│ │ ├── codes-permission.js
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── roles-permission.d.ts
│ │ └── roles-permission.js
│ │ ├── hooks
│ │ ├── use-common.d.ts
│ │ ├── use-common.js
│ │ ├── use-element.d.ts
│ │ ├── use-element.js
│ │ ├── use-error-log.d.ts
│ │ ├── use-error-log.js
│ │ ├── use-layout.d.ts
│ │ ├── use-layout.js
│ │ ├── use-permission.d.ts
│ │ ├── use-permission.js
│ │ ├── use-self-router.d.ts
│ │ ├── use-self-router.js
│ │ ├── use-table.d.ts
│ │ └── use-table.js
│ │ ├── lib
│ │ ├── element-plus.d.ts
│ │ └── element-plus.js
│ │ ├── main.d.ts
│ │ ├── main.js
│ │ ├── permission.d.ts
│ │ ├── permission.js
│ │ ├── router
│ │ ├── index.d.ts
│ │ └── index.js
│ │ ├── settings.d.ts
│ │ ├── settings.js
│ │ ├── store
│ │ ├── basic.d.ts
│ │ ├── basic.js
│ │ ├── tagsView.d.ts
│ │ └── tagsView.js
│ │ ├── utils
│ │ ├── axios-req.d.ts
│ │ ├── axios-req.js
│ │ ├── bus.d.ts
│ │ ├── bus.js
│ │ ├── common-util.d.ts
│ │ └── common-util.js
│ │ └── views
│ │ └── redirect
│ │ ├── index.d.ts
│ │ └── index.jsx
├── tsconfig.base.json
├── tsconfig.json
├── typings
│ ├── auto-imports.d.ts
│ ├── basic.d.ts
│ ├── components.d.ts
│ ├── env.d.ts
│ ├── global.d.ts
│ └── shims-vue.d.ts
├── vite.config.js
├── vitest.config.ts
└── vitest.setup.js
└── node-proxy
├── .env
├── .eslintrc.js
├── .prettierrc.js
├── app.js
├── btest.js
├── package-lock.json
├── package.json
├── pkgconfig.dist.json
├── public
├── favicon.ico
├── index.html
├── logo.png
└── static
│ ├── css
│ ├── 401-714c78d6.css
│ ├── 404-ab19c514.css
│ ├── index-1d0ef8d0.css
│ ├── index-2186d1bc.css
│ └── index-40f93645.css
│ ├── gif
│ └── 401-a61ddb94.gif
│ ├── js
│ ├── 401-30166219.js
│ ├── 404-441effb9.js
│ ├── Children-f19505b3.js
│ ├── Children.vue_vue_type_script_setup_true_lang-532ec280.js
│ ├── SecondChildren-bdb250b1.js
│ ├── SettingSwitch-3055b8ed.js
│ ├── SettingSwitch-db23fcc6.js
│ ├── SubChildren-cf671fdf.js
│ ├── SubChildren.vue_vue_type_script_setup_true_lang-b990a4da.js
│ ├── TestAddEdit-b98c6c8a.js
│ ├── TestButton-09d4aded.js
│ ├── TestDetail-32224ef9.js
│ ├── TestMenu-90a98ef1.js
│ ├── ThirdChildren-ad4e4e14.js
│ ├── Vue3Template-4ebd0d41.js
│ ├── button-permission-ba254862.js
│ ├── code-index-0a0d0a8a.js
│ ├── error-generator-45cb83fa.js
│ ├── index-11b0e548.js
│ ├── index-12e61eea.js
│ ├── index-1a68c4cb.js
│ ├── index-1ebb4b3d.js
│ ├── index-2239ba99.js
│ ├── index-28cf73f2.js
│ ├── index-315d7f60.js
│ ├── index-3260c851.js
│ ├── index-348436de.js
│ ├── index-3e4bfa1e.js
│ ├── index-4089b0a2.js
│ ├── index-466a6a35.js
│ ├── index-46c31d81.js
│ ├── index-4b01face.js
│ ├── index-561adb52.js
│ ├── index-641ba208.js
│ ├── index-6f1f5f84.js
│ ├── index-82974afa.js
│ ├── index-869d85f1.js
│ ├── index-95ed2d19.js
│ ├── index-9c921f50.js
│ ├── index-a63a8682.js
│ ├── index-afd6c5bb.js
│ ├── index-b8970c54.js
│ ├── index-c42bf1ef.js
│ ├── index-c8cd5cb3.js
│ ├── index-cb31d750.js
│ ├── index-d21579fd.js
│ ├── index-d6a88df0.js
│ ├── index-d74fd182.js
│ ├── index-d7f06f53.js
│ ├── index-dfb757d4.js
│ ├── index-ef12e676.js
│ ├── index-f039969c.js
│ ├── index-f30b2bf6.js
│ ├── lodash-5ab2684b.js
│ ├── role-index-f43718f8.js
│ ├── second-child-679b3dc6.js
│ ├── tab-keep-alive-aefc63f6.js
│ ├── third-child-2588a277.js
│ ├── third-keep-alive-f4626902.js
│ └── use-self-router-ecbf91f5.js
│ └── png
│ ├── 404-538aa4d7.png
│ └── 404_cloud-98e7ac66.png
├── src
├── @types
│ └── index.d.ts
├── common
│ └── logger.js
├── config.js
├── dao
│ ├── configDao.js
│ ├── fileDao.js
│ └── userDao.js
├── encDavHandle.js
├── encNameRouter.js
├── middleware
│ ├── globalHandle.js
│ └── responseHandle.js
├── router.js
└── utils
│ ├── PRGAExcute.js
│ ├── PRGAFork.js
│ ├── PRGAThread.js
│ ├── PRGAThreadCom.js
│ ├── aesCTR.js
│ ├── chaCha20.js
│ ├── chaCha20Poly.js
│ ├── commonUtil.ts
│ ├── convertFile.ts
│ ├── crc6-8.js
│ ├── flowEnc.js
│ ├── httpClient.js
│ ├── levelDB.js
│ ├── mixBase64.js
│ ├── mixEnc.js
│ ├── rc4Md5.js
│ └── webdavClient.js
├── test
└── chachaTest.js
├── tsconfig.json
├── webdavTest.js
└── webpack.config.ts
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: build
2 | on:
3 | workflow_dispatch:
4 | push:
5 | branches: [ 'main' ]
6 | paths:
7 | - 'node-proxy/**'
8 | pull_request:
9 | branches: [ 'main' ]
10 | paths:
11 | - 'node-proxy/**'
12 |
13 | jobs:
14 | release:
15 | name: Build
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Setup Node.js
19 | uses: actions/setup-node@v3
20 | - name: Checkout
21 | uses: actions/checkout@v3
22 | - name: Build
23 | run: |
24 | cd node-proxy
25 | npm install && npm run build
26 | - name: Upload artifact
27 | if: ${{ success() }}
28 | uses: actions/upload-artifact@v3
29 | with:
30 | name: alist-encrypt-dev
31 | path: |
32 | node-proxy/build/*
33 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: release
2 |
3 | on:
4 | release:
5 | types: [ published ]
6 |
7 | jobs:
8 | release:
9 | name: Release
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: Setup Node.js
13 | uses: actions/setup-node@v3
14 | - name: Checkout
15 | uses: actions/checkout@v3
16 | - name: Build
17 | run: |
18 | cd node-proxy
19 | npm install && npm run build
20 | - name: Compress
21 | if: ${{ success() }}
22 | run: |
23 | cd node-proxy/build
24 | ls -1 | xargs -I {} zip {}.zip {} && \
25 | ls -1 *.zip | xargs -I {} shasum -a 256 {} >> sha256.txt
26 | - name: Upload assets
27 | if: ${{ success() }}
28 | uses: softprops/action-gh-release@v1
29 | with:
30 | files: |
31 | node-proxy/build/*.zip
32 | node-proxy/build/sha256.txt
33 | prerelease: false
34 | token: ${{ secrets.REPO_TOKEN }}
35 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # maven ignore
2 | target/
3 | *.class
4 | *.jar
5 | *.war
6 | *.zip
7 | *.tar
8 | *.tar.gz
9 | dependency-reduced-pom.xml
10 |
11 | # maven plugin ignore
12 | release.properties
13 | cobertura.ser
14 | *.gpg
15 |
16 | # eclipse ignore
17 | .settings/
18 | node_modules/
19 | conf/
20 | dist/
21 | build/
22 | bin
23 | .vscode
24 | .project
25 | .classpath
26 | # idea ignore 33
27 | .idea/
28 | *.ipr
29 | *.iml
30 | *.iws
31 |
32 | # temp ignore
33 | logs/
34 | *.log
35 | *.doc
36 | *.cache
37 | *.diff
38 | *.patch
39 | *.tmp
40 |
41 | # system ignore 额
42 | .DS_Store
43 | Thumbs.db
44 |
45 | # agent build ignore
46 | /agent/
47 |
48 |
--------------------------------------------------------------------------------
/dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:gallium-alpine
2 | WORKDIR /node-proxy
3 | COPY node-proxy/dist /node-proxy
4 | RUN pwd
5 | RUN ls -la
6 | RUN rm -rf /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
7 | EXPOSE 5344
8 | ENTRYPOINT ["node", "index.js"]
--------------------------------------------------------------------------------
/enc-webui/.editorconfig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/enc-webui/.editorconfig
--------------------------------------------------------------------------------
/enc-webui/.env.build:
--------------------------------------------------------------------------------
1 | VITE_APP_ENV = 'prod'
2 | #自动获取地址推荐
3 | VITE_APP_BASE_URL = ''
4 |
5 | #image or oss address
6 | VITE_APP_IMAGE_URL = 'https://github.jzfai.top/gofast-image'
7 |
--------------------------------------------------------------------------------
/enc-webui/.env.build-test:
--------------------------------------------------------------------------------
1 | VITE_APP_ENV = 'test'
2 | #自动获取地址推荐
3 | #VITE_APP_BASE_URL = '/micro-service-api'
4 | VITE_APP_BASE_URL = 'https://github.jzfai.top/micro-service-api'
5 | VITE_APP_BASE_WS_URL = ''
6 |
7 | #image or oss address
8 | VITE_APP_IMAGE_URL = 'https://github.jzfai.top/gofast-image'
9 |
--------------------------------------------------------------------------------
/enc-webui/.env.serve-dev:
--------------------------------------------------------------------------------
1 | #The defined variable must start with VITE_APP_
2 | VITE_APP_ENV = 'dev'
3 | # 开发环境先mock
4 | VITE_APP_BASE_URL = ''
5 |
6 | #VITE_APP_BASE_URL = 'http://127.0.0.1:5344/enc-api'
7 |
8 | #image or oss address
9 | VITE_APP_IMAGE_URL = 'https://github.jzfai.top/gofast-image'
10 |
11 |
12 | #代理拦截前缀,用于后端调试
13 | VITE_PROXY_BASE_URL = '/enc-api'
14 | #proxy转发地址(请求完整地址)
15 | # VITE_PROXY_URL = 'https://github.jzfai.top/micro-service-test'
16 | VITE_PROXY_URL = 'http://127.0.0.1:5344/enc-api'
17 |
--------------------------------------------------------------------------------
/enc-webui/.env.serve-test:
--------------------------------------------------------------------------------
1 | #The defined variable must start with VITE_APP_
2 | VITE_APP_ENV = 'test'
3 | VITE_APP_BASE_URL = 'https://github.jzfai.top/micro-service-api'
4 |
5 | #image or oss address
6 | VITE_APP_IMAGE_URL = 'https://github.jzfai.top/gofast-image'
7 |
8 | #proxy, use this to test proxy
9 | #VITE_APP_BASE_URL = '/api'
10 | #VITE_APP_PROXY_URL = 'https://github.jzfai.top/micro-service-api'
11 |
--------------------------------------------------------------------------------
/enc-webui/.eslintignore:
--------------------------------------------------------------------------------
1 | public
2 | node_modules
3 | .history
4 | .husky
5 | dist
6 | *.d.ts
7 |
--------------------------------------------------------------------------------
/enc-webui/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "extends": ["./eslintrc/eslint-config.js", "./eslintrc/.eslintrc-auto-import.json"]
4 | }
5 |
--------------------------------------------------------------------------------
/enc-webui/.gitignore:
--------------------------------------------------------------------------------
1 | # compiled output
2 | /dist
3 | /dist-ssr
4 | /node_modules
5 |
6 | #lock
7 | pnpm-lock.yaml
8 |
9 | # Logs
10 | logs
11 | *.log
12 | npm-debug.log*
13 | pnpm-debug.log*
14 | yarn-debug.log*
15 | yarn-error.log*
16 | lerna-debug.log*
17 |
18 | # OS
19 | .DS_Store
20 |
21 | # Tests
22 | /coverage
23 | /.nyc_output
24 |
25 | # IDEs and editors
26 | /.idea
27 | .project
28 | .classpath
29 | .c9/
30 | *.launch
31 | .settings/
32 | *.sublime-workspace
33 |
34 | # IDE - VSCode
35 | .vscode/*
36 | !.vscode/settings.json
37 | !.vscode/tasks.json
38 | !.vscode/launch.json
39 | !.vscode/extensions.json
40 |
41 | # Other
42 | .history
43 | *.local
44 | yarn*
45 | pnpm*
46 |
47 |
48 | #.eslintrc-auto-import.json
49 | #auto-imports.d.ts
50 | #components.d.ts
51 | stats.html
52 |
--------------------------------------------------------------------------------
/enc-webui/.npmrc:
--------------------------------------------------------------------------------
1 | shamefully-hoist=true
2 | strict-peer-dependencies=false
3 | registry = https://registry.npmmirror.com
4 |
5 |
--------------------------------------------------------------------------------
/enc-webui/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "useTabs": false,
3 | "tabWidth": 2,
4 | "printWidth": 150,
5 | "singleQuote": true,
6 | "trailingComma": "none",
7 | "bracketSpacing": true,
8 | "semi": false,
9 | "htmlWhitespaceSensitivity": "ignore"
10 | }
11 |
--------------------------------------------------------------------------------
/enc-webui/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | <%= title %>
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/enc-webui/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/enc-webui/public/favicon.ico
--------------------------------------------------------------------------------
/enc-webui/public/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/enc-webui/public/logo.png
--------------------------------------------------------------------------------
/enc-webui/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
41 |
47 |
--------------------------------------------------------------------------------
/enc-webui/src/assets/401_images/401.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/enc-webui/src/assets/401_images/401.gif
--------------------------------------------------------------------------------
/enc-webui/src/assets/404_images/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/enc-webui/src/assets/404_images/404.png
--------------------------------------------------------------------------------
/enc-webui/src/assets/404_images/404_cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/enc-webui/src/assets/404_images/404_cloud.png
--------------------------------------------------------------------------------
/enc-webui/src/components/ElSvgIcon.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
27 |
28 |
37 |
--------------------------------------------------------------------------------
/enc-webui/src/components/TestUnit.vue:
--------------------------------------------------------------------------------
1 |
2 | TestUnit.vue
3 |
4 |
5 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/enc-webui/src/directives/button-codes.js:
--------------------------------------------------------------------------------
1 | import { useBasicStore } from '@/store/basic'
2 |
3 | function checkPermission(el, { value }) {
4 | if (value && Array.isArray(value)) {
5 | if (value.length) {
6 | const permissionRoles = value
7 | const hasPermission = useBasicStore().buttonCodes?.some((code) => permissionRoles.includes(code))
8 | if (!hasPermission) el.parentNode && el.parentNode.removeChild(el)
9 | }
10 | } else {
11 | throw new Error(`need roles! Like v-permission="['admin','editor']"`)
12 | }
13 | }
14 | export default {
15 | mounted(el, binding) {
16 | checkPermission(el, binding)
17 | },
18 | componentUpdated(el, binding) {
19 | checkPermission(el, binding)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/enc-webui/src/directives/codes-permission.js:
--------------------------------------------------------------------------------
1 | import { useBasicStore } from '@/store/basic'
2 | function checkPermission(el, { value }) {
3 | if (value && Array.isArray(value)) {
4 | if (value.length > 0) {
5 | const permissionRoles = value
6 | const hasPermission = useBasicStore().codes?.some((role) => permissionRoles.includes(role))
7 | if (!hasPermission) el.parentNode && el.parentNode.removeChild(el)
8 | }
9 | } else {
10 | throw new Error(`need codes! Like v-codes-permission="['admin','editor']"`)
11 | }
12 | }
13 | export default {
14 | mounted(el, binding) {
15 | checkPermission(el, binding)
16 | },
17 | componentUpdated(el, binding) {
18 | checkPermission(el, binding)
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/enc-webui/src/directives/index.js:
--------------------------------------------------------------------------------
1 | import buttonCodes from './button-codes'
2 | import codesPermission from './codes-permission'
3 | import rolesPermission from './roles-permission'
4 | export default function (app) {
5 | app.directive('ButtonCodes', buttonCodes)
6 | app.directive('CodesPermission', codesPermission)
7 | app.directive('RolesPermission', rolesPermission)
8 | }
9 |
--------------------------------------------------------------------------------
/enc-webui/src/directives/lang.js:
--------------------------------------------------------------------------------
1 | import { watch } from 'vue'
2 | import { storeToRefs } from 'pinia/dist/pinia'
3 | import { langTitle } from '@/hooks/use-common'
4 | import { useConfigStore } from '@/store/config'
5 | //element-plus
6 | const componentToProps = {
7 | ElInput: 'placeholder',
8 | ElTableColumn: 'label'
9 | }
10 |
11 | function checkPermission(el, { value }) {
12 | let saveOriginTitle = ''
13 | const { language } = storeToRefs(useConfigStore())
14 | //save the original title
15 | const name = el.__vueParentComponent?.type?.name
16 | const nameTitle = el.__vueParentComponent?.props[componentToProps[name]]
17 | saveOriginTitle = nameTitle || el.innerText
18 | watch(
19 | () => language.value,
20 | () => {
21 | //element tag or component
22 | if (name?.startsWith('EL')) {
23 | //self cunstrom
24 | if (Object.keys(componentToProps).includes(name)) {
25 | const props = el.__vueParentComponent.props
26 | props[componentToProps[name]] = langTitle(saveOriginTitle)
27 | } else {
28 | el.innerText = langTitle(saveOriginTitle)
29 | }
30 | } else {
31 | //common tag such as div span output so on;
32 | if (el.__vnode?.type) {
33 | el.innerText = langTitle(saveOriginTitle)
34 | }
35 | }
36 | },
37 | { immediate: true }
38 | )
39 | }
40 | export default {
41 | mounted(el, binding) {
42 | checkPermission(el, binding)
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/enc-webui/src/directives/roles-permission.js:
--------------------------------------------------------------------------------
1 | import { useBasicStore } from '@/store/basic'
2 | function checkPermission(el, { value }) {
3 | if (value && Array.isArray(value)) {
4 | if (value.length > 0) {
5 | const permissionRoles = value
6 | const hasPermission = useBasicStore().roles?.some((role) => permissionRoles.includes(role))
7 | if (!hasPermission) el.parentNode && el.parentNode.removeChild(el)
8 | }
9 | } else {
10 | throw new Error(`need roles! Like v-roles-permission="['admin','editor']"`)
11 | }
12 | }
13 | export default {
14 | mounted(el, binding) {
15 | checkPermission(el, binding)
16 | },
17 | componentUpdated(el, binding) {
18 | checkPermission(el, binding)
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/enc-webui/src/hooks/use-common.js:
--------------------------------------------------------------------------------
1 | //复制文本
2 | import useClipboard from 'vue-clipboard3'
3 | import { ElMessage } from 'element-plus'
4 |
5 | // i18n language match title
6 | import { i18n } from '@/lang'
7 | // the keys using zh file
8 | import langEn from '@/lang/zh'
9 | import settings from '@/settings'
10 |
11 | export const sleepTimeout = (time) => {
12 | return new Promise((resolve) => {
13 | const timer = setTimeout(() => {
14 | clearTimeout(timer)
15 | resolve(null)
16 | }, time)
17 | })
18 | }
19 |
20 | //深拷贝
21 | export function cloneDeep(value) {
22 | return JSON.parse(JSON.stringify(value))
23 | }
24 |
25 | //copyValueToClipboard
26 | const { toClipboard } = useClipboard()
27 | export const copyValueToClipboard = (value) => {
28 | toClipboard(JSON.stringify(value))
29 | ElMessage.success('复制成功')
30 | }
31 | const { t, te } = i18n.global
32 | export const langTitle = (title) => {
33 | if (!title) {
34 | return settings.title
35 | }
36 | for (const key of Object.keys(langEn)) {
37 | if (te(`${key}.${title}`) && t(`${key}.${title}`)) {
38 | return t(`${key}.${title}`)
39 | }
40 | }
41 |
42 | return title
43 | }
44 |
45 | //get i18n instance
46 | export const getLangInstance = () => {
47 | return i18n.global
48 | }
49 |
--------------------------------------------------------------------------------
/enc-webui/src/hooks/use-error-log.js:
--------------------------------------------------------------------------------
1 | /*js 错误日志收集*/
2 | import { jsErrorCollection } from 'js-error-collection'
3 | import pack from '../../package.json'
4 | import settings from '@/settings'
5 | import bus from '@/utils/bus'
6 | import axiosReq from 'axios'
7 | const reqUrl = '/integration-front/errorCollection/insert'
8 | let repeatErrorLogJudge = ''
9 |
10 | const errorLogReq = (errLog) => {
11 | axiosReq({
12 | url: import.meta.env.VITE_APP_BASE_URL + reqUrl,
13 | data: {
14 | pageUrl: window.location.href,
15 | errorLog: errLog,
16 | browserType: navigator.userAgent,
17 | version: pack.version
18 | },
19 | method: 'post'
20 | }).then(() => {
21 | //通知错误列表页面更新数据
22 | bus.emit('reloadErrorPage', {})
23 | })
24 | }
25 |
26 | export const useErrorLog = () => {
27 | //判断该环境是否需要收集错误日志,由settings配置决定
28 | if (settings.errorLog?.includes(import.meta.env.VITE_APP_ENV)) {
29 | jsErrorCollection({ runtimeError: true, rejectError: true, consoleError: true }, (errLog) => {
30 | if (!repeatErrorLogJudge || !errLog.includes(repeatErrorLogJudge)) {
31 | errorLogReq(errLog)
32 | //移除重复日志,fix重复提交错误日志,避免造成死循环
33 | repeatErrorLogJudge = errLog.slice(0, 20)
34 | }
35 | })
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/enc-webui/src/hooks/use-layout.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 判断是否是外链
3 | * @param {string} path
4 | * @returns {Boolean}
5 | */
6 | import { onBeforeMount, onBeforeUnmount, onMounted } from 'vue'
7 | import { useBasicStore } from '@/store/basic'
8 | export function isExternal(path) {
9 | return /^(https?:|mailto:|tel:)/.test(path)
10 | }
11 |
12 | /*判断窗口变化控制侧边栏收起或展开*/
13 | export function resizeHandler() {
14 | const { body } = document
15 | const WIDTH = 992
16 | const basicStore = useBasicStore()
17 | const isMobile = () => {
18 | const rect = body.getBoundingClientRect()
19 | return rect.width - 1 < WIDTH
20 | }
21 | const resizeHandler = () => {
22 | if (!document.hidden) {
23 | if (isMobile()) {
24 | /*此处只做根据window尺寸关闭sideBar功能*/
25 | basicStore.setSidebarOpen(false)
26 | } else {
27 | basicStore.setSidebarOpen(true)
28 | }
29 | }
30 | }
31 | onBeforeMount(() => {
32 | window.addEventListener('resize', resizeHandler)
33 | })
34 | onMounted(() => {
35 | if (isMobile()) {
36 | basicStore.setSidebarOpen(false)
37 | } else {
38 | basicStore.setSidebarOpen(true)
39 | }
40 | })
41 | onBeforeUnmount(() => {
42 | window.removeEventListener('resize', resizeHandler)
43 | })
44 | }
45 |
--------------------------------------------------------------------------------
/enc-webui/src/hooks/use-self-router.js:
--------------------------------------------------------------------------------
1 | import router from '@/router'
2 | export const getQueryParam = () => {
3 | const route = router.currentRoute
4 | if (route.value?.query.params) {
5 | return JSON.parse(route.value.query.params)
6 | }
7 | }
8 | // vue router
9 | export const routerPush = (name, params) => {
10 | let data = {}
11 | if (params) {
12 | data = {
13 | params: JSON.stringify(params)
14 | }
15 | } else {
16 | data = {}
17 | }
18 | router.push({
19 | name,
20 | query: data
21 | })
22 | }
23 | export const routerReplace = (name, params) => {
24 | let data = {}
25 | if (params) {
26 | data = {
27 | params: JSON.stringify(params)
28 | }
29 | } else {
30 | data = {}
31 | }
32 | router.replace({
33 | name,
34 | query: data
35 | })
36 | }
37 |
38 | export const routeInfo = () => {
39 | return router.currentRoute
40 | }
41 | export const routerBack = () => {
42 | router.go(-1)
43 | }
44 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/SvgIcon.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
28 |
29 |
46 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/404.svg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/enc-webui/src/icons/common/404.svg
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/bug.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/chart.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/clipboard.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/component.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/demo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/documentation.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/drag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/edit.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/education.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/email.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/example.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/excel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/eye-open.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/fullscreen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/guide.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/hamburger.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/international.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/language.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/list.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/lock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/message.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/money.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/nested.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/password.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/pdf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/people.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/peoples.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/sidebar-logo.svg:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/size.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/skill.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/star.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/tab.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/theme.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/tree-table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/wechat.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/common/zip.svg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/enc-webui/src/icons/common/zip.svg
--------------------------------------------------------------------------------
/enc-webui/src/icons/nav-bar/example.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/nav-bar/eye-open.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/nav-bar/eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/nav-bar/link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/nav-bar/nested.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/nav-bar/password.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/nav-bar/table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/icons/nav-bar/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/enc-webui/src/lang/index.js:
--------------------------------------------------------------------------------
1 | import { createI18n } from 'vue-i18n'
2 | import en from './en'
3 | import zh from './zh'
4 | import settings from '@/settings'
5 | const messages = { en, zh }
6 |
7 | const localeData = {
8 | globalInjection: true, //如果设置true, $t() 函数将注册到全局
9 | legacy: false, //如果想在composition api中使用需要设置为false
10 | locale: settings.defaultLanguage,
11 | messages // set locale messages
12 | }
13 |
14 | export const i18n = createI18n(localeData)
15 | export const setupI18n = {
16 | install(app) {
17 | app.use(i18n)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/enc-webui/src/layout/app-main/Hamburger.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
21 |
22 |
34 |
--------------------------------------------------------------------------------
/enc-webui/src/layout/sidebar/Link.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
32 |
--------------------------------------------------------------------------------
/enc-webui/src/layout/sidebar/MenuIcon.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
15 |
16 |
26 |
--------------------------------------------------------------------------------
/enc-webui/src/layout/sidebar/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
38 |
47 |
--------------------------------------------------------------------------------
/enc-webui/src/lib/element-plus.js:
--------------------------------------------------------------------------------
1 | import * as AllComponent from 'element-plus'
2 | //element-plus中按需引入会引起首次加载过慢
3 | const elementPlusComponentNameArr = ['ElButton']
4 | export default function (app) {
5 | elementPlusComponentNameArr.forEach((component) => {
6 | app.component(component, AllComponent[component])
7 | })
8 | }
9 |
--------------------------------------------------------------------------------
/enc-webui/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import { createPinia } from 'pinia'
3 | import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
4 | import ElementPlus from 'element-plus'
5 | import App from './App.vue'
6 | import router from './router'
7 |
8 | //import theme
9 | import './theme/index.scss'
10 |
11 | //import unocss
12 | import 'uno.css'
13 |
14 | //i18n
15 | import { setupI18n } from '@/lang'
16 |
17 | import '@/styles/index.scss' // global css
18 |
19 | //svg-icon
20 | import 'virtual:svg-icons-register'
21 | import svgIcon from '@/icons/SvgIcon.vue'
22 | import directive from '@/directives'
23 |
24 | //import router intercept
25 | import './permission'
26 |
27 | //import element-plus
28 | import 'element-plus/dist/index.css'
29 | const app = createApp(App)
30 |
31 | //router
32 | app.use(router)
33 |
34 | //pinia
35 | const pinia = createPinia()
36 | pinia.use(piniaPluginPersistedstate)
37 | app.use(pinia)
38 |
39 | //i18n
40 | app.use(setupI18n)
41 | app.component('SvgIcon', svgIcon)
42 | directive(app)
43 |
44 | //element-plus
45 | app.use(ElementPlus)
46 |
47 | app.mount('#app')
48 |
--------------------------------------------------------------------------------
/enc-webui/src/mock-prod-server.js:
--------------------------------------------------------------------------------
1 | import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
2 | //https://cn.vitejs.dev/guide/features.html#glob-import
3 | const modulesFiles = import.meta.glob('../mock/*', { eager: true })
4 | let modules = []
5 | for (const filePath in modulesFiles) {
6 | //读取文件内容到 modules
7 | modules = modules.concat(modulesFiles[filePath].default)
8 | }
9 | export function setupProdMockServer() {
10 | //创建prod mock server
11 | createProdMockServer([...modules])
12 | }
13 |
--------------------------------------------------------------------------------
/enc-webui/src/plugins/vite-plugin-setup-extend/index.js:
--------------------------------------------------------------------------------
1 | import { parse } from '@vue/compiler-sfc'
2 | import { render } from 'ejs'
3 | export default ({ inject }) => {
4 | // let viteConfig
5 | return {
6 | name: 'vite-plugin-setup-extend',
7 | enforce: 'pre',
8 | // configResolved(resolvedConfig) {
9 | // viteConfig = resolvedConfig
10 | // },
11 | async transformIndexHtml(html) {
12 | const result = await render(html, { ...inject })
13 | return result
14 | },
15 | transform(code, id) {
16 | if (/\.vue$/.test(id)) {
17 | const { descriptor } = parse(code)
18 | if (!descriptor?.scriptSetup?.setup) {
19 | return null
20 | }
21 | const { lang, name } = descriptor.scriptSetup?.attrs || {}
22 | const dillStr = headString(lang, name)
23 | code += dillStr
24 | return code
25 | }
26 | }
27 | }
28 | }
29 |
30 | const headString = (lang, name) => {
31 | return `\n`
37 | }
38 |
--------------------------------------------------------------------------------
/enc-webui/src/store/config.js:
--------------------------------------------------------------------------------
1 | import { defineStore } from 'pinia'
2 | import { langTitle } from '@/hooks/use-common'
3 | import settings from '@/settings'
4 | import { toggleHtmlClass } from '@/theme/utils'
5 | import { i18n } from '@/lang'
6 | import router from '@/router'
7 | const { locale } = i18n.global
8 | export const useConfigStore = defineStore('config', {
9 | state: () => {
10 | return {
11 | language: settings.defaultLanguage,
12 | theme: settings.defaultTheme,
13 | size: settings.defaultSize
14 | }
15 | },
16 | persist: {
17 | storage: localStorage,
18 | paths: ['language', 'theme', 'size']
19 | },
20 | actions: {
21 | setTheme(data) {
22 | this.theme = data
23 | toggleHtmlClass(data)
24 | },
25 | setSize(data) {
26 | this.size = data
27 | },
28 | setLanguage(lang) {
29 | this.language = lang
30 | locale.value = lang
31 | const route = router.currentRoute
32 | document.title = langTitle(route.value.meta?.title) // i18 page title
33 | }
34 | }
35 | })
36 |
--------------------------------------------------------------------------------
/enc-webui/src/store/pageStore.js:
--------------------------------------------------------------------------------
1 | import { defineStore } from 'pinia'
2 | export const usePageStore = defineStore('page', {
3 | state: () => {
4 | return {
5 | folderInfo: { folderPath: '/test', outPath: '/test/out' }
6 | }
7 | },
8 | persist: {
9 | storage: localStorage,
10 | paths: ['folderInfo']
11 | },
12 | actions: {
13 | setFolderInfo({ folderPath, outPath }) {
14 | this.$patch((state) => {
15 | state.folderInfo = { folderPath, outPath }
16 | })
17 | }
18 | }
19 | })
20 |
--------------------------------------------------------------------------------
/enc-webui/src/styles/index.scss:
--------------------------------------------------------------------------------
1 | //scss 语法糖包含常用的布局方式 flex column
2 | @import './scss-suger.scss';
3 | //重置 element-plus 样式
4 | @import './reset-elemenet-plus-style.scss';
5 | //动画文件
6 | @import './transition.scss';
7 |
8 | //reset style
9 | body {
10 | height: 100%;
11 | margin: 0;
12 | padding: 0;
13 | font-size: 14px;
14 | }
15 | * {
16 | box-sizing: border-box;
17 | }
18 | *::before,
19 | *::after {
20 | box-sizing: border-box;
21 | }
22 | a:focus,
23 | a:active {
24 | outline: none;
25 | }
26 | a,
27 | a:focus,
28 | a:hover {
29 | cursor: pointer;
30 | color: inherit;
31 | text-decoration: none;
32 | }
33 |
34 | h1,
35 | h2,
36 | h3,
37 | h4,
38 | h5,
39 | h6 {
40 | line-height: 1;
41 | font-weight: 400;
42 | margin: 0;
43 | padding: 0;
44 | }
45 | span,
46 | output {
47 | display: inline-block;
48 | line-height: 1;
49 | }
50 |
51 | //scroll
52 | @mixin main-show-wh() {
53 | /* css 声明 */
54 | //height: calc(100vh - #{$navBarHeight} - #{$tagViewHeight} - #{$appMainPadding * 2});
55 | height: calc(100vh - #{var(--nav-bar-height)} - #{var(--tag-view-height)} - #{calc(var(--app-main-padding) * 2)});
56 | width: 100%;
57 | }
58 | .scroll-y {
59 | @include main-show-wh();
60 | overflow-y: auto;
61 | }
62 | .scroll-x {
63 | @include main-show-wh();
64 | overflow-x: auto;
65 | }
66 | .scroll-xy {
67 | @include main-show-wh();
68 | overflow: auto;
69 | }
70 |
--------------------------------------------------------------------------------
/enc-webui/src/styles/reset-elemenet-plus-style.scss:
--------------------------------------------------------------------------------
1 | //leave the padding of el-scroll sidebar
2 | .el-scrollbar__view {
3 | padding-bottom: 80px;
4 | }
5 |
--------------------------------------------------------------------------------
/enc-webui/src/styles/transition.scss:
--------------------------------------------------------------------------------
1 | // vue global transition css define
2 | /* sidebar-logo-fade */
3 | .sidebar-logo-fade-enter-active {
4 | transition: opacity var(--logo-switch-duration);
5 | }
6 | .sidebar-logo-fade-enter-from,
7 | .sidebar-logo-fade-leave-to {
8 | opacity: 0;
9 | }
10 |
11 | /* fade-transform AppMain*/
12 | .fade-transform-leave-active,
13 | .fade-transform-enter-active {
14 | transition: all var(--page-transform-duration);
15 | }
16 |
17 | .fade-transform-enter-from {
18 | opacity: 0;
19 | transform: translateX(-10px);
20 | }
21 |
22 | .fade-transform-leave-to {
23 | opacity: 0;
24 | transform: translateX(10px);
25 | }
26 | .fade-transform-active {
27 | position: absolute;
28 | }
29 |
30 | /* breadcrumb transition */
31 | .breadcrumb-enter-active,
32 | .breadcrumb-leave-active {
33 | transition: all var(--breadcrumb-change-duration);
34 | }
35 |
36 | .breadcrumb-enter-from,
37 | .breadcrumb-leave-active {
38 | opacity: 0;
39 | transform: translateX(10px);
40 | }
41 |
42 | .breadcrumb-leave-active {
43 | position: absolute;
44 | }
45 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/base/element-plus/checkbox.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-checkbox {
3 | --el-checkbox-font-size: 14px;
4 | --el-checkbox-font-weight: var(--el-font-weight-primary);
5 | --el-checkbox-text-color: #262626;
6 | --el-checkbox-input-height: 14px;
7 | --el-checkbox-input-width: 14px;
8 | --el-checkbox-border-radius: var(--el-border-radius-small);
9 | --el-checkbox-bg-color: var(--el-fill-color-blank);
10 | --el-checkbox-input-border: var(--el-border);
11 |
12 | //disabled
13 | --el-checkbox-disabled-border-color: var(--el-border-color);
14 | --el-checkbox-disabled-input-fill: var(--el-fill-color-light);
15 | --el-checkbox-disabled-icon-color: var(--el-text-color-placeholder);
16 | --el-checkbox-disabled-checked-input-fill: var(--el-border-color-extra-light);
17 | --el-checkbox-disabled-checked-input-border-color: var(--el-border-color);
18 | --el-checkbox-disabled-checked-icon-color: var(--el-text-color-placeholder);
19 |
20 | //check
21 | --el-checkbox-checked-text-color: #262626;
22 | --el-checkbox-checked-input-border-color: transparent;
23 | --el-checkbox-checked-bg-color: #c72210;
24 | --el-checkbox-checked-icon-color: #ffffff;
25 | --el-checkbox-input-border-color-hover: #c72210;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/base/element-plus/css-vars.scss:
--------------------------------------------------------------------------------
1 | @use 'sass:map';
2 |
3 | @use './var' as *;
4 | @use '../../mixins/var' as *;
5 | @use '../../mixins/mixins' as *;
6 |
7 | html.china-red {
8 | color-scheme: china-red;
9 | @each $type in (primary, success, warning, danger, error, info) {
10 | @include set-css-color-rgb($colors, $type);
11 | }
12 |
13 | @each $type in (primary, success, warning, danger, error, info) {
14 | @include set-css-color-type($colors, $type);
15 | }
16 | //--el-color-primary: #c72210;
17 | }
18 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/base/element-plus/form.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | //date
3 | .el-date-range-picker {
4 | --el-datepicker-text-color: var(--el-text-color-regular);
5 | --el-datepicker-off-text-color: var(--el-text-color-placeholder);
6 | --el-datepicker-header-text-color: var(--el-text-color-regular);
7 | --el-datepicker-icon-color: var(--el-text-color-primary);
8 | --el-datepicker-border-color: var(--el-disabled-border-color);
9 | --el-datepicker-inner-border-color: var(--el-border-color-light);
10 | --el-datepicker-inrange-bg-color: #ffece6;
11 | --el-datepicker-inrange-hover-bg-color: var(--el-border-color-extra-light);
12 | --el-datepicker-active-color: var(--el-color-primary);
13 | --el-datepicker-hover-text-color: var(--el-color-primary);
14 | }
15 |
16 | .el-select-dropdown__item.hover,
17 | .el-select-dropdown__item:hover {
18 | background-color: #ffece6;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/base/element-plus/pagination.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-pagination {
3 | --el-text-color-regular: #8c8c8c;
4 | --el-pagination-font-size: 14px;
5 | --el-pagination-bg-color: var(--el-fill-color-blank);
6 | --el-pagination-text-color: var(--el-text-color-primary);
7 | --el-pagination-border-radius: 3px;
8 | --el-pagination-button-color: var(--el-text-color-primary);
9 | --el-pagination-button-width: 32px;
10 | --el-pagination-button-height: 32px;
11 | --el-pagination-button-disabled-color: var(--el-text-color-placeholder);
12 | --el-pagination-button-disabled-bg-color: var(--el-fill-color-blank);
13 | --el-pagination-button-bg-color: var(--el-fill-color);
14 | --el-pagination-hover-color: var(--el-color-primary);
15 | --el-pagination-height-extra-small: 24px;
16 | --el-pagination-line-height-extra-small: var(--el-pagination-height-extra-small);
17 | white-space: nowrap;
18 | padding: 2px 5px;
19 | color: var(--el-pagination-text-color);
20 | font-weight: 400;
21 | display: flex;
22 | align-items: center;
23 | }
24 |
25 | .el-pagination__total {
26 | margin-right: 16px;
27 | font-weight: 400;
28 | color: var(--el-text-color-regular);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/base/element-plus/redio.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-radio {
3 | --el-radio-font-size: var(--el-font-size-base);
4 | --el-radio-text-color: #262626;
5 | --el-radio-font-weight: var(--el-font-weight-primary);
6 | --el-radio-input-height: 14px;
7 | --el-radio-input-width: 14px;
8 | --el-radio-input-border-radius: var(--el-border-radius-circle);
9 | --el-radio-input-bg-color: var(--el-fill-color-blank);
10 | --el-radio-input-border: var(--el-border);
11 | --el-radio-input-border-color: transparent;
12 | //--el-radio-input-border-color-hover: transparent;
13 | }
14 |
15 | .el-radio__input.is-checked + .el-radio__label {
16 | color: #262626;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/base/element-plus/table.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-table {
3 | --el-table-border-color: #f0f0f0;
4 | --el-table-border: 1px solid #f0f0f0;
5 | --el-table-text-color: var(--el-text-color-regular);
6 | --el-table-header-text-color: var(--el-text-color-secondary);
7 | --el-table-row-hover-bg-color: #ffece6;
8 | --el-table-current-row-bg-color: var(--el-color-primary-light-9);
9 | --el-table-header-bg-color: #fafafa;
10 | --el-table-fixed-box-shadow: var(--el-box-shadow-light);
11 | --el-table-bg-color: var(--el-fill-color-blank);
12 | --el-table-tr-bg-color: var(--el-fill-color-blank);
13 | --el-table-expanded-cell-bg-color: var(--el-fill-color-blank);
14 | --el-table-fixed-left-column: inset 10px 0 10px -10px rgba(0, 0, 0, 0.15);
15 | --el-table-fixed-right-column: inset -10px 0 10px -10px rgba(0, 0, 0, 0.15);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/base/index.scss:
--------------------------------------------------------------------------------
1 | /*china-red*/
2 | //element-plus
3 | @use "./element-plus/css-vars";
4 | @use "./element-plus/var";
5 | @use "./element-plus/button";
6 | @use "./element-plus/checkbox";
7 | @use "./element-plus/redio";
8 | @use "./element-plus/pagination";
9 | @use "./element-plus/form";
10 | @use "./element-plus/table";
11 |
12 | //custom
13 | @use "./custom/ct-css-vars";
14 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/china-red/element-plus/checkbox.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-checkbox {
3 | --el-checkbox-font-size: 14px;
4 | --el-checkbox-font-weight: var(--el-font-weight-primary);
5 | --el-checkbox-text-color: #262626;
6 | --el-checkbox-input-height: 14px;
7 | --el-checkbox-input-width: 14px;
8 | --el-checkbox-border-radius: var(--el-border-radius-small);
9 | --el-checkbox-bg-color: var(--el-fill-color-blank);
10 | --el-checkbox-input-border: var(--el-border);
11 |
12 | //disabled
13 | --el-checkbox-disabled-border-color: var(--el-border-color);
14 | --el-checkbox-disabled-input-fill: var(--el-fill-color-light);
15 | --el-checkbox-disabled-icon-color: var(--el-text-color-placeholder);
16 | --el-checkbox-disabled-checked-input-fill: var(--el-border-color-extra-light);
17 | --el-checkbox-disabled-checked-input-border-color: var(--el-border-color);
18 | --el-checkbox-disabled-checked-icon-color: var(--el-text-color-placeholder);
19 |
20 | //check
21 | --el-checkbox-checked-text-color: #262626;
22 | --el-checkbox-checked-input-border-color: transparent;
23 | --el-checkbox-checked-bg-color: #c72210;
24 | --el-checkbox-checked-icon-color: #ffffff;
25 | --el-checkbox-input-border-color-hover: #c72210;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/china-red/element-plus/css-vars.scss:
--------------------------------------------------------------------------------
1 | @use 'sass:map';
2 |
3 | @use './var' as *;
4 | @use '../../mixins/var' as *;
5 | @use '../../mixins/mixins' as *;
6 |
7 | html.china-red {
8 | color-scheme: china-red;
9 | @each $type in (primary, success, warning, danger, error, info) {
10 | @include set-css-color-rgb($colors, $type);
11 | }
12 |
13 | @each $type in (primary, success, warning, danger, error, info) {
14 | @include set-css-color-type($colors, $type);
15 | }
16 | //--el-color-primary: #c72210;
17 | }
18 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/china-red/element-plus/form.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | //date
3 | .el-date-range-picker {
4 | --el-datepicker-text-color: var(--el-text-color-regular);
5 | --el-datepicker-off-text-color: var(--el-text-color-placeholder);
6 | --el-datepicker-header-text-color: var(--el-text-color-regular);
7 | --el-datepicker-icon-color: var(--el-text-color-primary);
8 | --el-datepicker-border-color: var(--el-disabled-border-color);
9 | --el-datepicker-inner-border-color: var(--el-border-color-light);
10 | --el-datepicker-inrange-bg-color: #ffece6;
11 | --el-datepicker-inrange-hover-bg-color: var(--el-border-color-extra-light);
12 | --el-datepicker-active-color: var(--el-color-primary);
13 | --el-datepicker-hover-text-color: var(--el-color-primary);
14 | }
15 |
16 | .el-select-dropdown__item.hover,
17 | .el-select-dropdown__item:hover {
18 | background-color: #ffece6;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/china-red/element-plus/pagination.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-pagination {
3 | --el-text-color-regular: #8c8c8c;
4 | --el-pagination-font-size: 14px;
5 | --el-pagination-bg-color: var(--el-fill-color-blank);
6 | --el-pagination-text-color: var(--el-text-color-primary);
7 | --el-pagination-border-radius: 3px;
8 | --el-pagination-button-color: var(--el-text-color-primary);
9 | --el-pagination-button-width: 32px;
10 | --el-pagination-button-height: 32px;
11 | --el-pagination-button-disabled-color: var(--el-text-color-placeholder);
12 | --el-pagination-button-disabled-bg-color: var(--el-fill-color-blank);
13 | --el-pagination-button-bg-color: var(--el-fill-color);
14 | --el-pagination-hover-color: var(--el-color-primary);
15 | --el-pagination-height-extra-small: 24px;
16 | --el-pagination-line-height-extra-small: var(--el-pagination-height-extra-small);
17 | white-space: nowrap;
18 | padding: 2px 5px;
19 | color: var(--el-pagination-text-color);
20 | font-weight: 400;
21 | display: flex;
22 | align-items: center;
23 | }
24 |
25 | .el-pagination__total {
26 | margin-right: 16px;
27 | font-weight: 400;
28 | color: var(--el-text-color-regular);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/china-red/element-plus/redio.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-radio {
3 | --el-radio-font-size: var(--el-font-size-base);
4 | --el-radio-text-color: #262626;
5 | --el-radio-font-weight: var(--el-font-weight-primary);
6 | --el-radio-input-height: 14px;
7 | --el-radio-input-width: 14px;
8 | --el-radio-input-border-radius: var(--el-border-radius-circle);
9 | --el-radio-input-bg-color: var(--el-fill-color-blank);
10 | --el-radio-input-border: var(--el-border);
11 | --el-radio-input-border-color: transparent;
12 | //--el-radio-input-border-color-hover: transparent;
13 | }
14 |
15 | .el-radio__input.is-checked + .el-radio__label {
16 | color: #262626;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/china-red/element-plus/table.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-table {
3 | --el-table-border-color: #f0f0f0;
4 | --el-table-border: 1px solid #f0f0f0;
5 | --el-table-text-color: var(--el-text-color-regular);
6 | --el-table-header-text-color: var(--el-text-color-secondary);
7 | --el-table-row-hover-bg-color: #ffece6;
8 | --el-table-current-row-bg-color: var(--el-color-primary-light-9);
9 | --el-table-header-bg-color: #fafafa;
10 | --el-table-fixed-box-shadow: var(--el-box-shadow-light);
11 | --el-table-bg-color: var(--el-fill-color-blank);
12 | --el-table-tr-bg-color: var(--el-fill-color-blank);
13 | --el-table-expanded-cell-bg-color: var(--el-fill-color-blank);
14 | --el-table-fixed-left-column: inset 10px 0 10px -10px rgba(0, 0, 0, 0.15);
15 | --el-table-fixed-right-column: inset -10px 0 10px -10px rgba(0, 0, 0, 0.15);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/china-red/index.scss:
--------------------------------------------------------------------------------
1 | /*china-red*/
2 | //element-plus
3 | @use "./element-plus/css-vars";
4 | @use "./element-plus/var";
5 | @use "./element-plus/button";
6 | @use "./element-plus/checkbox";
7 | @use "./element-plus/redio";
8 | @use "./element-plus/pagination";
9 | @use "./element-plus/form";
10 | @use "./element-plus/table";
11 |
12 | //custom
13 | @use "./custom/ct-css-vars";
14 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/dark/element-plus/checkbox.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-checkbox {
3 | --el-checkbox-font-size: 14px;
4 | --el-checkbox-font-weight: var(--el-font-weight-primary);
5 | --el-checkbox-text-color: #262626;
6 | --el-checkbox-input-height: 14px;
7 | --el-checkbox-input-width: 14px;
8 | --el-checkbox-border-radius: var(--el-border-radius-small);
9 | --el-checkbox-bg-color: var(--el-fill-color-blank);
10 | --el-checkbox-input-border: var(--el-border);
11 |
12 | //disabled
13 | --el-checkbox-disabled-border-color: var(--el-border-color);
14 | --el-checkbox-disabled-input-fill: var(--el-fill-color-light);
15 | --el-checkbox-disabled-icon-color: var(--el-text-color-placeholder);
16 | --el-checkbox-disabled-checked-input-fill: var(--el-border-color-extra-light);
17 | --el-checkbox-disabled-checked-input-border-color: var(--el-border-color);
18 | --el-checkbox-disabled-checked-icon-color: var(--el-text-color-placeholder);
19 |
20 | //check
21 | --el-checkbox-checked-text-color: #262626;
22 | --el-checkbox-checked-input-border-color: transparent;
23 | --el-checkbox-checked-bg-color: #c72210;
24 | --el-checkbox-checked-icon-color: #ffffff;
25 | --el-checkbox-input-border-color-hover: #c72210;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/dark/element-plus/css-vars.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/enc-webui/src/theme/dark/element-plus/css-vars.css
--------------------------------------------------------------------------------
/enc-webui/src/theme/dark/element-plus/css-vars.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sourceRoot":"","sources":["var.scss","css-vars.scss","../../mixins/_var.scss"],"names":[],"mappings":"AAAA;ACMA;EACE;ECKA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA","file":"css-vars.css"}
--------------------------------------------------------------------------------
/enc-webui/src/theme/dark/element-plus/css-vars.scss:
--------------------------------------------------------------------------------
1 | @use 'sass:map';
2 |
3 | @use './var' as *;
4 | @use '../../mixins/var' as *;
5 | @use '../../mixins/mixins' as *;
6 |
7 | html.china-red {
8 | color-scheme: china-red;
9 | @each $type in (primary, success, warning, danger, error, info) {
10 | @include set-css-color-rgb($colors, $type);
11 | }
12 |
13 | @each $type in (primary, success, warning, danger, error, info) {
14 | @include set-css-color-type($colors, $type);
15 | }
16 | //--el-color-primary: #c72210;
17 | }
18 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/dark/element-plus/form.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | //date
3 | .el-date-range-picker {
4 | --el-datepicker-text-color: var(--el-text-color-regular);
5 | --el-datepicker-off-text-color: var(--el-text-color-placeholder);
6 | --el-datepicker-header-text-color: var(--el-text-color-regular);
7 | --el-datepicker-icon-color: var(--el-text-color-primary);
8 | --el-datepicker-border-color: var(--el-disabled-border-color);
9 | --el-datepicker-inner-border-color: var(--el-border-color-light);
10 | --el-datepicker-inrange-bg-color: #ffece6;
11 | --el-datepicker-inrange-hover-bg-color: var(--el-border-color-extra-light);
12 | --el-datepicker-active-color: var(--el-color-primary);
13 | --el-datepicker-hover-text-color: var(--el-color-primary);
14 | }
15 |
16 | .el-select-dropdown__item.hover,
17 | .el-select-dropdown__item:hover {
18 | background-color: #ffece6;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/dark/element-plus/pagination.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-pagination {
3 | --el-text-color-regular: #8c8c8c;
4 | --el-pagination-font-size: 14px;
5 | --el-pagination-bg-color: var(--el-fill-color-blank);
6 | --el-pagination-text-color: var(--el-text-color-primary);
7 | --el-pagination-border-radius: 3px;
8 | --el-pagination-button-color: var(--el-text-color-primary);
9 | --el-pagination-button-width: 32px;
10 | --el-pagination-button-height: 32px;
11 | --el-pagination-button-disabled-color: var(--el-text-color-placeholder);
12 | --el-pagination-button-disabled-bg-color: var(--el-fill-color-blank);
13 | --el-pagination-button-bg-color: var(--el-fill-color);
14 | --el-pagination-hover-color: var(--el-color-primary);
15 | --el-pagination-height-extra-small: 24px;
16 | --el-pagination-line-height-extra-small: var(--el-pagination-height-extra-small);
17 | white-space: nowrap;
18 | padding: 2px 5px;
19 | color: var(--el-pagination-text-color);
20 | font-weight: 400;
21 | display: flex;
22 | align-items: center;
23 | }
24 |
25 | .el-pagination__total {
26 | margin-right: 16px;
27 | font-weight: 400;
28 | color: var(--el-text-color-regular);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/dark/element-plus/redio.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-radio {
3 | --el-radio-font-size: var(--el-font-size-base);
4 | --el-radio-text-color: #262626;
5 | --el-radio-font-weight: var(--el-font-weight-primary);
6 | --el-radio-input-height: 14px;
7 | --el-radio-input-width: 14px;
8 | --el-radio-input-border-radius: var(--el-border-radius-circle);
9 | --el-radio-input-bg-color: var(--el-fill-color-blank);
10 | --el-radio-input-border: var(--el-border);
11 | --el-radio-input-border-color: transparent;
12 | //--el-radio-input-border-color-hover: transparent;
13 | }
14 |
15 | .el-radio__input.is-checked + .el-radio__label {
16 | color: #262626;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/dark/element-plus/table.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-table {
3 | --el-table-border-color: #f0f0f0;
4 | --el-table-border: 1px solid #f0f0f0;
5 | --el-table-text-color: var(--el-text-color-regular);
6 | --el-table-header-text-color: var(--el-text-color-secondary);
7 | --el-table-row-hover-bg-color: #ffece6;
8 | --el-table-current-row-bg-color: var(--el-color-primary-light-9);
9 | --el-table-header-bg-color: #fafafa;
10 | --el-table-fixed-box-shadow: var(--el-box-shadow-light);
11 | --el-table-bg-color: var(--el-fill-color-blank);
12 | --el-table-tr-bg-color: var(--el-fill-color-blank);
13 | --el-table-expanded-cell-bg-color: var(--el-fill-color-blank);
14 | --el-table-fixed-left-column: inset 10px 0 10px -10px rgba(0, 0, 0, 0.15);
15 | --el-table-fixed-right-column: inset -10px 0 10px -10px rgba(0, 0, 0, 0.15);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/dark/index.scss:
--------------------------------------------------------------------------------
1 | /*china-red*/
2 | //element-plus
3 | //@use "./element-plus/css-vars";
4 | //@use "./element-plus/var";
5 | //@use "./element-plus/button";
6 | //@use "./element-plus/checkbox";
7 | //@use "./element-plus/redio";
8 | //@use "./element-plus/pagination";
9 | //@use "./element-plus/form";
10 | //@use "./element-plus/table";
11 |
12 | //custom
13 | @use "./custom/ct-css-vars";
14 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/index.scss:
--------------------------------------------------------------------------------
1 | // we can add this to custom namespace, default is 'el'
2 | //@forward "element-plus/theme-chalk/src/mixins/config.scss" with (
3 | // $namespace: "el"
4 | //);
5 |
6 | //base-theme
7 | @use "./base";
8 | //theme style such as dark-theme lighting
9 | @use "./dark";
10 | @use "./lighting";
11 | @use "./china-red";
12 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/lighting/element-plus/checkbox.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-checkbox {
3 | --el-checkbox-font-size: 14px;
4 | --el-checkbox-font-weight: var(--el-font-weight-primary);
5 | --el-checkbox-text-color: #262626;
6 | --el-checkbox-input-height: 14px;
7 | --el-checkbox-input-width: 14px;
8 | --el-checkbox-border-radius: var(--el-border-radius-small);
9 | --el-checkbox-bg-color: var(--el-fill-color-blank);
10 | --el-checkbox-input-border: var(--el-border);
11 |
12 | //disabled
13 | --el-checkbox-disabled-border-color: var(--el-border-color);
14 | --el-checkbox-disabled-input-fill: var(--el-fill-color-light);
15 | --el-checkbox-disabled-icon-color: var(--el-text-color-placeholder);
16 | --el-checkbox-disabled-checked-input-fill: var(--el-border-color-extra-light);
17 | --el-checkbox-disabled-checked-input-border-color: var(--el-border-color);
18 | --el-checkbox-disabled-checked-icon-color: var(--el-text-color-placeholder);
19 |
20 | //check
21 | --el-checkbox-checked-text-color: #262626;
22 | --el-checkbox-checked-input-border-color: transparent;
23 | --el-checkbox-checked-bg-color: #c72210;
24 | --el-checkbox-checked-icon-color: #ffffff;
25 | --el-checkbox-input-border-color-hover: #c72210;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/lighting/element-plus/css-vars.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/enc-webui/src/theme/lighting/element-plus/css-vars.css
--------------------------------------------------------------------------------
/enc-webui/src/theme/lighting/element-plus/css-vars.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sourceRoot":"","sources":["var.scss","css-vars.scss","../../mixins/_var.scss"],"names":[],"mappings":"AAAA;ACMA;EACE;ECKA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA","file":"css-vars.css"}
--------------------------------------------------------------------------------
/enc-webui/src/theme/lighting/element-plus/css-vars.scss:
--------------------------------------------------------------------------------
1 | @use 'sass:map';
2 |
3 | @use './var' as *;
4 | @use '../../mixins/var' as *;
5 | @use '../../mixins/mixins' as *;
6 |
7 | html.china-red {
8 | color-scheme: china-red;
9 | @each $type in (primary, success, warning, danger, error, info) {
10 | @include set-css-color-rgb($colors,$type);
11 | }
12 |
13 | @each $type in (primary, success, warning, danger, error, info) {
14 | @include set-css-color-type($colors, $type);
15 | }
16 | //--el-color-primary: #c72210;
17 | }
18 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/lighting/element-plus/form.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | //date
3 | .el-date-range-picker {
4 | --el-datepicker-text-color: var(--el-text-color-regular);
5 | --el-datepicker-off-text-color: var(--el-text-color-placeholder);
6 | --el-datepicker-header-text-color: var(--el-text-color-regular);
7 | --el-datepicker-icon-color: var(--el-text-color-primary);
8 | --el-datepicker-border-color: var(--el-disabled-border-color);
9 | --el-datepicker-inner-border-color: var(--el-border-color-light);
10 | --el-datepicker-inrange-bg-color: #ffece6;
11 | --el-datepicker-inrange-hover-bg-color: var(--el-border-color-extra-light);
12 | --el-datepicker-active-color: var(--el-color-primary);
13 | --el-datepicker-hover-text-color: var(--el-color-primary);
14 | }
15 |
16 | .el-select-dropdown__item.hover,
17 | .el-select-dropdown__item:hover {
18 | background-color: #ffece6;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/lighting/element-plus/pagination.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-pagination {
3 | --el-text-color-regular: #8c8c8c;
4 | --el-pagination-font-size: 14px;
5 | --el-pagination-bg-color: var(--el-fill-color-blank);
6 | --el-pagination-text-color: var(--el-text-color-primary);
7 | --el-pagination-border-radius: 3px;
8 | --el-pagination-button-color: var(--el-text-color-primary);
9 | --el-pagination-button-width: 32px;
10 | --el-pagination-button-height: 32px;
11 | --el-pagination-button-disabled-color: var(--el-text-color-placeholder);
12 | --el-pagination-button-disabled-bg-color: var(--el-fill-color-blank);
13 | --el-pagination-button-bg-color: var(--el-fill-color);
14 | --el-pagination-hover-color: var(--el-color-primary);
15 | --el-pagination-height-extra-small: 24px;
16 | --el-pagination-line-height-extra-small: var(--el-pagination-height-extra-small);
17 | white-space: nowrap;
18 | padding: 2px 5px;
19 | color: var(--el-pagination-text-color);
20 | font-weight: 400;
21 | display: flex;
22 | align-items: center;
23 | }
24 |
25 | .el-pagination__total {
26 | margin-right: 16px;
27 | font-weight: 400;
28 | color: var(--el-text-color-regular);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/lighting/element-plus/redio.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-radio {
3 | --el-radio-font-size: var(--el-font-size-base);
4 | --el-radio-text-color: #262626;
5 | --el-radio-font-weight: var(--el-font-weight-primary);
6 | --el-radio-input-height: 14px;
7 | --el-radio-input-width: 14px;
8 | --el-radio-input-border-radius: var(--el-border-radius-circle);
9 | --el-radio-input-bg-color: var(--el-fill-color-blank);
10 | --el-radio-input-border: var(--el-border);
11 | --el-radio-input-border-color: transparent;
12 | //--el-radio-input-border-color-hover: transparent;
13 | }
14 |
15 | .el-radio__input.is-checked + .el-radio__label {
16 | color: #262626;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/lighting/element-plus/table.scss:
--------------------------------------------------------------------------------
1 | html.china-red {
2 | .el-table {
3 | --el-table-border-color: #f0f0f0;
4 | --el-table-border: 1px solid #f0f0f0;
5 | --el-table-text-color: var(--el-text-color-regular);
6 | --el-table-header-text-color: var(--el-text-color-secondary);
7 | --el-table-row-hover-bg-color: #ffece6;
8 | --el-table-current-row-bg-color: var(--el-color-primary-light-9);
9 | --el-table-header-bg-color: #fafafa;
10 | --el-table-fixed-box-shadow: var(--el-box-shadow-light);
11 | --el-table-bg-color: var(--el-fill-color-blank);
12 | --el-table-tr-bg-color: var(--el-fill-color-blank);
13 | --el-table-expanded-cell-bg-color: var(--el-fill-color-blank);
14 | --el-table-fixed-left-column: inset 10px 0 10px -10px rgba(0, 0, 0, 0.15);
15 | --el-table-fixed-right-column: inset -10px 0 10px -10px rgba(0, 0, 0, 0.15);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/lighting/index.scss:
--------------------------------------------------------------------------------
1 | /*china-red*/
2 | //element-plus
3 | //@use "./element-plus/css-vars";
4 | //@use "./element-plus/var";
5 | //@use "./element-plus/button";
6 | //@use "./element-plus/checkbox";
7 | //@use "./element-plus/redio";
8 | //@use "./element-plus/pagination";
9 | //@use "./element-plus/form";
10 | //@use "./element-plus/table";
11 |
12 | //custom
13 | @use "./custom/ct-css-vars";
14 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/mixins/config.scss:
--------------------------------------------------------------------------------
1 | $namespace: 'el' !default;
2 | $common-separator: '-' !default;
3 | $element-separator: '__' !default;
4 | $modifier-separator: '--' !default;
5 | $state-prefix: 'is-' !default;
6 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/mixins/function.scss:
--------------------------------------------------------------------------------
1 | @use 'config';
2 |
3 | // getCssVarName('button', 'text-color') => '--el-button-text-color'
4 | @function getCssVarName($args...) {
5 | @return joinVarName($args);
6 | }
7 |
8 | // getCssVar('button', 'text-color') => var(--el-button-text-color)
9 | @function getCssVar($args...) {
10 | @return var(#{joinVarName($args)});
11 | }
12 |
13 | @function selectorToString($selector) {
14 | $selector: inspect($selector);
15 | $selector: str-slice($selector, 2, -2);
16 | @return $selector;
17 | }
18 |
19 | @function containsModifier($selector) {
20 | $selector: selectorToString($selector);
21 |
22 | @if str-index($selector, config.$modifier-separator) {
23 | @return true;
24 | } @else {
25 | @return false;
26 | }
27 | }
28 | @function hitAllSpecialNestRule($selector) {
29 | @return containsModifier($selector) or containWhenFlag($selector) or containPseudoClass($selector);
30 | }
31 | @function containWhenFlag($selector) {
32 | $selector: selectorToString($selector);
33 |
34 | @if str-index($selector, '.' + config.$state-prefix) {
35 | @return true;
36 | } @else {
37 | @return false;
38 | }
39 | }
40 | @function containPseudoClass($selector) {
41 | $selector: selectorToString($selector);
42 |
43 | @if str-index($selector, ':') {
44 | @return true;
45 | } @else {
46 | @return false;
47 | }
48 | }
49 |
50 | // join var name
51 | // joinVarName(('button', 'text-color')) => '--el-button-text-color'
52 | @function joinVarName($list) {
53 | $name: '--' + config.$namespace;
54 | @each $item in $list {
55 | @if $item != '' {
56 | $name: $name + '-' + $item;
57 | }
58 | }
59 | @return $name;
60 | }
61 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/mixins/mixins.scss:
--------------------------------------------------------------------------------
1 | //input function
2 | @use 'function' as *;
3 | @forward 'function';
4 |
5 | @forward 'config';
6 | @use 'config' as *;
7 | // el-button{}
8 | @mixin b($block) {
9 | $B: $namespace + '-' + $block !global;
10 |
11 | .#{$B} {
12 | @content;
13 | }
14 | }
15 | @mixin e($element) {
16 | $E: $element !global;
17 | $selector: &;
18 | $currentSelector: '';
19 | @each $unit in $element {
20 | //el-button__text
21 | $currentSelector: #{$currentSelector + '.' + $B + $element-separator + $unit + ','};
22 | }
23 |
24 | @if hitAllSpecialNestRule($selector) {
25 | @at-root {
26 | #{$selector} {
27 | #{$currentSelector} {
28 | @content;
29 | }
30 | }
31 | }
32 | } @else {
33 | @at-root {
34 | #{$currentSelector} {
35 | @content;
36 | }
37 | }
38 | }
39 | }
40 |
41 | @mixin m($modifier) {
42 | $selector: &;
43 | $currentSelector: '';
44 | @each $unit in $modifier {
45 | $currentSelector: #{$currentSelector + $selector + $modifier-separator + $unit + ','};
46 | }
47 |
48 | @at-root {
49 | #{$currentSelector} {
50 | @content;
51 | }
52 | }
53 | }
54 |
55 | @mixin when($state) {
56 | @at-root {
57 | &.#{$state-prefix + $state} {
58 | @content;
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/utils/change-theme.ts:
--------------------------------------------------------------------------------
1 | export const toggleHtmlClass = (className) => {
2 | document.querySelectorAll('html')[0].className = className
3 | }
4 |
--------------------------------------------------------------------------------
/enc-webui/src/theme/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './change-theme'
2 |
--------------------------------------------------------------------------------
/enc-webui/src/utils/bus.js:
--------------------------------------------------------------------------------
1 | //bus even
2 | import mitt from 'mitt'
3 | export default mitt()
4 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/hook/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
引入use-common.ts中的copyValueToClipboard
4 |
执行hook方法
5 |
6 |
7 |
8 |
15 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/keep-alive/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
39 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/keep-alive/second-child.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/keep-alive/tab-keep-alive.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
20 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/keep-alive/third-child.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
third-level.vue
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | 返回
13 |
14 |
15 |
16 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/keep-alive/third-children/SecondChildren.vue:
--------------------------------------------------------------------------------
1 |
2 | I Am SecondChildren.vue
3 |
4 |
5 |
6 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/keep-alive/third-children/ThirdChildren.vue:
--------------------------------------------------------------------------------
1 |
2 | I Am ThirdChildren.vue
3 |
4 |
5 |
6 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/keep-alive/third-keep-alive.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
third-keep-alive demo
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/mock/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/parent-children/SubChildren.vue:
--------------------------------------------------------------------------------
1 |
2 | provide and inject using
3 | {{ title }}
4 |
5 | Teleport Using
6 |
10 |
11 |
12 |
13 |
14 |
15 | to container
16 | Close
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | showModalOpen
25 |
26 |
27 |
35 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/parent-children/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
23 |
55 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/pinia/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
由于使用了 AutoImport 插件 可以直接引入pinia里的api
4 |
switch sidebar.opened
5 |
6 |
7 |
8 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/proxy/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
提供跨域使用例子
4 |
测试跨域
5 |
6 |
7 |
8 |
24 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/svg-icon/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/vue3-template/Vue3Template.vue:
--------------------------------------------------------------------------------
1 |
2 | vue3推荐模板可以集成在你们的vscode或webstorm中,有助于快速开发
3 |
4 |
5 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/enc-webui/src/views/basic-demo/worker/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
the recommend using way of worker
4 |
计算结果:{{ showPageRef }}
5 |
6 |
7 |
46 |
--------------------------------------------------------------------------------
/enc-webui/src/views/charts/index.vue:
--------------------------------------------------------------------------------
1 |
2 | chart
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/enc-webui/src/views/encrypt-online/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/enc-webui/src/views/excel/index.vue:
--------------------------------------------------------------------------------
1 |
2 | excel
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/enc-webui/src/views/find-password/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/enc-webui/src/views/folder-convert/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
23 |
24 |
25 |
28 |
--------------------------------------------------------------------------------
/enc-webui/src/views/guid/index.vue:
--------------------------------------------------------------------------------
1 |
2 | guid
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/enc-webui/src/views/nested/menu1/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/enc-webui/src/views/nested/menu1/menu1-1/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/enc-webui/src/views/nested/menu1/menu1-2/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/enc-webui/src/views/nested/menu1/menu1-2/menu1-2-1/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/enc-webui/src/views/nested/menu1/menu1-2/menu1-2-2/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/enc-webui/src/views/nested/menu1/menu1-3/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/enc-webui/src/views/nested/menu2/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/enc-webui/src/views/other/index.vue:
--------------------------------------------------------------------------------
1 |
2 | other
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/enc-webui/src/views/rbac-test/TestAddEdit.vue:
--------------------------------------------------------------------------------
1 |
2 | TestAddEdit.vue
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/enc-webui/src/views/rbac-test/TestButton.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | button code test TestTableList.vue
4 |
5 | 按钮1
6 |
7 |
8 |
9 | 按钮2
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/enc-webui/src/views/rbac-test/TestDetail.vue:
--------------------------------------------------------------------------------
1 |
2 | TestAddEdit.vue
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/enc-webui/src/views/rbac-test/TestMenu.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | page test TestTableQuery.vue
4 |
5 | toTestDetail.vue
6 | TestAddEdit.vue
7 |
8 |
9 |
10 | 去配置
11 |
12 |
13 |
14 |
15 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/enc-webui/src/views/redirect/index.tsx:
--------------------------------------------------------------------------------
1 | import { defineComponent } from 'vue'
2 | export default defineComponent({
3 | setup() {
4 | const route = useRoute()
5 | const router = useRouter()
6 | onBeforeMount(() => {
7 | const { params, query } = route
8 | const { path } = params
9 | router.replace({ path: `/${path}`, query })
10 | })
11 | return () =>
12 | }
13 | })
14 |
--------------------------------------------------------------------------------
/enc-webui/src/views/rich-text/index.vue:
--------------------------------------------------------------------------------
1 |
2 | rich-text
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/enc-webui/src/views/roles-codes/button-permission.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | showing when then role of admin
4 | editor
5 | editor and admin
6 |
7 |
8 |
--------------------------------------------------------------------------------
/enc-webui/src/views/roles-codes/code-index.vue:
--------------------------------------------------------------------------------
1 |
2 | CodePage.vue
3 |
4 |
5 |
--------------------------------------------------------------------------------
/enc-webui/src/views/roles-codes/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
notice: setting the permissionMode of settings file before you test
4 |
5 |
roles 页面权限控制
6 |
{{ roles }}
7 |
roles切换为editor
8 |
roles切换为admin
9 |
10 |
codes 页面权限控制
11 |
{{ codes }}
12 |
Codes切换为[1]
13 |
C odes切换为[16]
14 |
15 |
16 |
17 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/enc-webui/src/views/roles-codes/role-index.vue:
--------------------------------------------------------------------------------
1 | showing when then role of admin
2 |
3 |
4 |
--------------------------------------------------------------------------------
/enc-webui/src/views/table/index.vue:
--------------------------------------------------------------------------------
1 |
2 | table
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/api/user.d.ts:
--------------------------------------------------------------------------------
1 | export declare const userInfoReq: () => Promise;
2 | export declare const loginReq: (subForm: any) => import("axios").AxiosPromise;
3 | export declare const loginOutReq: () => import("axios").AxiosPromise;
4 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/api/user.js:
--------------------------------------------------------------------------------
1 | import axiosReq from '@/utils/axios-req';
2 | export const userInfoReq = () => {
3 | return new Promise((resolve) => {
4 | const reqConfig = {
5 | url: '/basis-func/user/getUserInfo',
6 | params: { plateFormId: 2 },
7 | method: 'post'
8 | };
9 | axiosReq(reqConfig).then(({ data }) => {
10 | resolve(data);
11 | });
12 | });
13 | };
14 | export const loginReq = (subForm) => {
15 | return axiosReq({
16 | url: '/basis-func/user/loginValid',
17 | params: subForm,
18 | method: 'post'
19 | });
20 | };
21 | export const loginOutReq = () => {
22 | return axiosReq({
23 | url: '/basis-func/user/loginValid',
24 | method: 'post'
25 | });
26 | };
27 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/directives/button-codes.d.ts:
--------------------------------------------------------------------------------
1 | declare const _default: {
2 | mounted(el: any, binding: any): void;
3 | componentUpdated(el: any, binding: any): void;
4 | };
5 | export default _default;
6 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/directives/button-codes.js:
--------------------------------------------------------------------------------
1 | import { useBasicStore } from '@/store/basic';
2 | function checkPermission(el, { value }) {
3 | if (value && Array.isArray(value)) {
4 | if (value.length) {
5 | const permissionRoles = value;
6 | const hasPermission = useBasicStore().buttonCodes?.some((code) => permissionRoles.includes(code));
7 | if (!hasPermission)
8 | el.parentNode && el.parentNode.removeChild(el);
9 | }
10 | }
11 | else {
12 | throw new Error(`need roles! Like v-permission="['admin','editor']"`);
13 | }
14 | }
15 | export default {
16 | mounted(el, binding) {
17 | checkPermission(el, binding);
18 | },
19 | componentUpdated(el, binding) {
20 | checkPermission(el, binding);
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/directives/codes-permission.d.ts:
--------------------------------------------------------------------------------
1 | declare const _default: {
2 | mounted(el: any, binding: any): void;
3 | componentUpdated(el: any, binding: any): void;
4 | };
5 | export default _default;
6 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/directives/codes-permission.js:
--------------------------------------------------------------------------------
1 | import { useBasicStore } from '@/store/basic';
2 | function checkPermission(el, { value }) {
3 | if (value && Array.isArray(value)) {
4 | if (value.length > 0) {
5 | const permissionRoles = value;
6 | const hasPermission = useBasicStore().codes?.some((role) => permissionRoles.includes(role));
7 | if (!hasPermission)
8 | el.parentNode && el.parentNode.removeChild(el);
9 | }
10 | }
11 | else {
12 | throw new Error(`need codes! Like v-codes-permission="['admin','editor']"`);
13 | }
14 | }
15 | export default {
16 | mounted(el, binding) {
17 | checkPermission(el, binding);
18 | },
19 | componentUpdated(el, binding) {
20 | checkPermission(el, binding);
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/directives/index.d.ts:
--------------------------------------------------------------------------------
1 | export default function (app: any): void;
2 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/directives/index.js:
--------------------------------------------------------------------------------
1 | import buttonCodes from './button-codes';
2 | import codesPermission from './codes-permission';
3 | import rolesPermission from './roles-permission';
4 | export default function (app) {
5 | app.directive('ButtonCodes', buttonCodes);
6 | app.directive('CodesPermission', codesPermission);
7 | app.directive('RolesPermission', rolesPermission);
8 | }
9 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/directives/roles-permission.d.ts:
--------------------------------------------------------------------------------
1 | declare const _default: {
2 | mounted(el: any, binding: any): void;
3 | componentUpdated(el: any, binding: any): void;
4 | };
5 | export default _default;
6 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/directives/roles-permission.js:
--------------------------------------------------------------------------------
1 | import { useBasicStore } from '@/store/basic';
2 | function checkPermission(el, { value }) {
3 | if (value && Array.isArray(value)) {
4 | if (value.length > 0) {
5 | const permissionRoles = value;
6 | const hasPermission = useBasicStore().roles?.some((role) => permissionRoles.includes(role));
7 | if (!hasPermission)
8 | el.parentNode && el.parentNode.removeChild(el);
9 | }
10 | }
11 | else {
12 | throw new Error(`need roles! Like v-roles-permission="['admin','editor']"`);
13 | }
14 | }
15 | export default {
16 | mounted(el, binding) {
17 | checkPermission(el, binding);
18 | },
19 | componentUpdated(el, binding) {
20 | checkPermission(el, binding);
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/hooks/use-common.d.ts:
--------------------------------------------------------------------------------
1 | export declare const sleepTimeout: (time: number) => Promise;
2 | export declare const useCommon: () => {
3 | totalPage: import("vue").Ref;
4 | startEndArr: import("vue").Ref;
5 | searchForm: import("vue").Ref<{}>;
6 | dialogTitle: import("vue").Ref;
7 | detailDialog: import("vue").Ref;
8 | };
9 | export declare function cloneDeep(value: any): any;
10 | export declare const copyValueToClipboard: (value: any) => void;
11 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/hooks/use-common.js:
--------------------------------------------------------------------------------
1 | import { reactive, toRefs } from 'vue';
2 | import useClipboard from 'vue-clipboard3';
3 | import { ElMessage } from 'element-plus';
4 | export const sleepTimeout = (time) => {
5 | return new Promise((resolve) => {
6 | const timer = setTimeout(() => {
7 | clearTimeout(timer);
8 | resolve(null);
9 | }, time);
10 | });
11 | };
12 | export const useCommon = () => {
13 | const state = reactive({
14 | totalPage: 0,
15 | startEndArr: [],
16 | searchForm: {},
17 | dialogTitle: '',
18 | detailDialog: false
19 | });
20 | return {
21 | ...toRefs(state)
22 | };
23 | };
24 | export function cloneDeep(value) {
25 | return JSON.parse(JSON.stringify(value));
26 | }
27 | const { toClipboard } = useClipboard();
28 | export const copyValueToClipboard = (value) => {
29 | toClipboard(JSON.stringify(value));
30 | ElMessage.success('复制成功');
31 | };
32 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/hooks/use-error-log.d.ts:
--------------------------------------------------------------------------------
1 | export declare const useErrorLog: () => void;
2 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/hooks/use-error-log.js:
--------------------------------------------------------------------------------
1 | import { jsErrorCollection } from 'js-error-collection';
2 | import pack from '../../package.json';
3 | import settings from '@/settings';
4 | import bus from '@/utils/bus';
5 | import axiosReq from '@/utils/axios-req';
6 | const reqUrl = '/integration-front/errorCollection/insert';
7 | const errorLogReq = (errLog) => {
8 | axiosReq({
9 | url: reqUrl,
10 | data: {
11 | pageUrl: window.location.href,
12 | errorLog: errLog,
13 | browserType: navigator.userAgent,
14 | version: pack.version
15 | },
16 | method: 'post'
17 | }).then(() => {
18 | bus.emit('reloadErrorPage', {});
19 | });
20 | };
21 | export const useErrorLog = () => {
22 | if (settings.errorLog?.includes(import.meta.env.VITE_APP_ENV)) {
23 | jsErrorCollection({ runtimeError: true, rejectError: true, consoleError: true }, (errLog) => {
24 | if (!errLog.includes(reqUrl))
25 | errorLogReq(errLog);
26 | });
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/hooks/use-layout.d.ts:
--------------------------------------------------------------------------------
1 | export declare function isExternal(path: any): boolean;
2 | export declare function resizeHandler(): void;
3 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/hooks/use-layout.js:
--------------------------------------------------------------------------------
1 | import { onBeforeMount, onBeforeUnmount, onMounted } from 'vue';
2 | import { useBasicStore } from '@/store/basic';
3 | export function isExternal(path) {
4 | return /^(https?:|mailto:|tel:)/.test(path);
5 | }
6 | export function resizeHandler() {
7 | const { body } = document;
8 | const WIDTH = 992;
9 | const basicStore = useBasicStore();
10 | const isMobile = () => {
11 | const rect = body.getBoundingClientRect();
12 | return rect.width - 1 < WIDTH;
13 | };
14 | const resizeHandler = () => {
15 | if (!document.hidden) {
16 | if (isMobile()) {
17 | basicStore.setSidebarOpen(false);
18 | }
19 | else {
20 | basicStore.setSidebarOpen(true);
21 | }
22 | }
23 | };
24 | onBeforeMount(() => {
25 | window.addEventListener('resize', resizeHandler);
26 | });
27 | onMounted(() => {
28 | if (isMobile()) {
29 | basicStore.setSidebarOpen(false);
30 | }
31 | else {
32 | basicStore.setSidebarOpen(true);
33 | }
34 | });
35 | onBeforeUnmount(() => {
36 | window.removeEventListener('resize', resizeHandler);
37 | });
38 | }
39 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/hooks/use-permission.d.ts:
--------------------------------------------------------------------------------
1 | import type { RouterTypes } from '~/basic';
2 | import 'nprogress/nprogress.css';
3 | export declare const filterAsyncRoutesByMenuList: (menuList: any) => RouterTypes;
4 | export declare function filterAsyncRoutesByRoles(routes: any, roles: any): RouterTypes;
5 | export declare function filterAsyncRouterByCodes(codesRoutes: any, codes: any): RouterTypes;
6 | export declare function filterAsyncRouter({ menuList, roles, codes }: {
7 | menuList: any;
8 | roles: any;
9 | codes: any;
10 | }): void;
11 | export declare function resetRouter(): void;
12 | export declare function resetState(): void;
13 | export declare function freshRouter(data: any): void;
14 | export declare const progressStart: () => void;
15 | export declare const progressClose: () => void;
16 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/hooks/use-self-router.d.ts:
--------------------------------------------------------------------------------
1 | export declare const getQueryParam: () => any;
2 | export declare const routerPush: (name: any, params: any) => void;
3 | export declare const routerReplace: (name: any, params: any) => void;
4 | export declare const routerBack: () => void;
5 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/hooks/use-self-router.js:
--------------------------------------------------------------------------------
1 | import router from '@/router';
2 | export const getQueryParam = () => {
3 | const route = router.currentRoute;
4 | if (route.value?.query.params) {
5 | return JSON.parse(route.value.query.params);
6 | }
7 | };
8 | export const routerPush = (name, params) => {
9 | let data = {};
10 | if (params) {
11 | data = {
12 | params: JSON.stringify(params)
13 | };
14 | }
15 | else {
16 | data = {};
17 | }
18 | router.push({
19 | name,
20 | query: data
21 | });
22 | };
23 | export const routerReplace = (name, params) => {
24 | let data = {};
25 | if (params) {
26 | data = {
27 | params: JSON.stringify(params)
28 | };
29 | }
30 | else {
31 | data = {};
32 | }
33 | router.replace({
34 | name,
35 | query: data
36 | });
37 | };
38 | export const routerBack = () => {
39 | router.go(-1);
40 | };
41 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/hooks/use-table.d.ts:
--------------------------------------------------------------------------------
1 | export declare const useTable: (searchForm: any, selectPageReq: any) => {
2 | pageNum: import("vue").Ref;
3 | pageSize: import("vue").Ref;
4 | totalPage: import("vue").Ref;
5 | tableListData: import("vue").Ref;
6 | tableListReq: (config: any) => import("axios").AxiosPromise;
7 | dateRangePacking: (timeArr: any) => void;
8 | multipleSelection: import("vue").Ref;
9 | handleSelectionChange: (val: any) => void;
10 | handleCurrentChange: (val: any) => void;
11 | handleSizeChange: (val: any) => void;
12 | resetPageReq: () => void;
13 | multiDelBtnDill: (reqConfig: any) => void;
14 | tableDelDill: (row: any, reqConfig: any) => void;
15 | };
16 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/lib/element-plus.d.ts:
--------------------------------------------------------------------------------
1 | export default function (app: any): void;
2 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/lib/element-plus.js:
--------------------------------------------------------------------------------
1 | import * as AllComponent from 'element-plus';
2 | const elementPlusComponentNameArr = ['ElButton'];
3 | export default function (app) {
4 | elementPlusComponentNameArr.forEach((component) => {
5 | app.component(component, AllComponent[component]);
6 | });
7 | }
8 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/main.d.ts:
--------------------------------------------------------------------------------
1 | import '@/styles/index.scss';
2 | import 'virtual:svg-icons-register';
3 | import './permission';
4 | import './theme/index.scss';
5 | import 'uno.css';
6 | import 'element-plus/dist/index.css';
7 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/main.js:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue';
2 | import App from './App.vue';
3 | const app = createApp(App);
4 | import router from './router';
5 | import '@/styles/index.scss';
6 | import 'virtual:svg-icons-register';
7 | import svgIcon from '@/icons/SvgIcon.vue';
8 | import directive from '@/directives';
9 | import './permission';
10 | import './theme/index.scss';
11 | import 'uno.css';
12 | import ElementPlus from 'element-plus';
13 | import 'element-plus/dist/index.css';
14 | app.use(ElementPlus);
15 | app.component('SvgIcon', svgIcon);
16 | directive(app);
17 | import { createPinia } from 'pinia';
18 | import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
19 | const pinia = createPinia();
20 | pinia.use(piniaPluginPersistedstate);
21 | app.use(pinia);
22 | app.use(router).mount('#app');
23 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/permission.d.ts:
--------------------------------------------------------------------------------
1 | export {};
2 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/permission.js:
--------------------------------------------------------------------------------
1 | import router from '@/router';
2 | import { filterAsyncRouter, progressClose, progressStart } from '@/hooks/use-permission';
3 | import { useBasicStore } from '@/store/basic';
4 | import { userInfoReq } from '@/api/user';
5 | const whiteList = ['/login', '/404', '/401'];
6 | router.beforeEach(async (to) => {
7 | progressStart();
8 | const basicStore = useBasicStore();
9 | if (basicStore.token) {
10 | if (to.path === '/login') {
11 | return '/';
12 | }
13 | else {
14 | if (!basicStore.getUserInfo) {
15 | try {
16 | const userData = await userInfoReq();
17 | filterAsyncRouter(userData);
18 | basicStore.setUserInfo(userData);
19 | return { ...to, replace: true };
20 | }
21 | catch (e) {
22 | console.error(`route permission error${e}`);
23 | basicStore.resetState();
24 | progressClose();
25 | return `/login?redirect=${to.path}`;
26 | }
27 | }
28 | else {
29 | return true;
30 | }
31 | }
32 | }
33 | else {
34 | if (!whiteList.includes(to.path)) {
35 | return `/login?redirect=${to.path}`;
36 | }
37 | else {
38 | return true;
39 | }
40 | }
41 | });
42 | router.afterEach(() => {
43 | progressClose();
44 | });
45 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/router/index.d.ts:
--------------------------------------------------------------------------------
1 | import type { RouterTypes } from '~/basic';
2 | export declare const constantRoutes: RouterTypes;
3 | export declare const roleCodeRoutes: RouterTypes;
4 | export declare const asyncRoutes: RouterTypes;
5 | declare const router: import("vue-router").Router;
6 | export default router;
7 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/settings.d.ts:
--------------------------------------------------------------------------------
1 | import type { SettingsConfig } from '~/basic';
2 | declare const settings: SettingsConfig;
3 | export default settings;
4 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/settings.js:
--------------------------------------------------------------------------------
1 | const settings = {
2 | title: 'Vue3 Admin Template',
3 | sidebarLogo: true,
4 | showNavbarTitle: false,
5 | ShowDropDown: true,
6 | showHamburger: true,
7 | showLeftMenu: true,
8 | showTagsView: true,
9 | tagsViewNum: 6,
10 | showTopNavbar: true,
11 | mainNeedAnimation: true,
12 | isNeedNprogress: true,
13 | isNeedLogin: true,
14 | permissionMode: 'roles',
15 | openProdMock: true,
16 | errorLog: ['prod'],
17 | delWindowHeight: '210px',
18 | tmpToken: 'tmp_token',
19 | viteBasePath: './'
20 | };
21 | export default settings;
22 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/store/basic.d.ts:
--------------------------------------------------------------------------------
1 | import type { RouterTypes } from '~/basic';
2 | export declare const useBasicStore: import("pinia").StoreDefinition<"basic", {
3 | token: string;
4 | getUserInfo: boolean;
5 | userInfo: {
6 | username: string;
7 | avatar: string;
8 | };
9 | allRoutes: RouterTypes;
10 | buttonCodes: never[];
11 | filterAsyncRoutes: never[];
12 | roles: string[];
13 | codes: number[];
14 | cachedViews: string[];
15 | cachedViewsDeep: string[];
16 | sidebar: {
17 | opened: boolean;
18 | };
19 | axiosPromiseArr: ObjKeys[];
20 | settings: import("~/basic").SettingsConfig;
21 | }, {}, {
22 | setToken(data: any): void;
23 | setFilterAsyncRoutes(routes: any): void;
24 | setUserInfo({ userInfo, roles, codes }: {
25 | userInfo: any;
26 | roles: any;
27 | codes: any;
28 | }): void;
29 | resetState(): void;
30 | resetStateAndToLogin(): void;
31 | M_settings(data: any): void;
32 | setSidebarOpen(data: any): void;
33 | setToggleSideBar(): void;
34 | addCachedView(view: any): void;
35 | delCachedView(view: any): void;
36 | M_RESET_CACHED_VIEW(): void;
37 | addCachedViewDeep(view: any): void;
38 | setCacheViewDeep(view: any): void;
39 | M_RESET_CACHED_VIEW_DEEP(): void;
40 | A_sidebar_opened(data: any): void;
41 | }>;
42 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/store/tagsView.d.ts:
--------------------------------------------------------------------------------
1 | export declare const useTagsViewStore: import("pinia").StoreDefinition<"tagsView", {
2 | visitedViews: never[];
3 | }, {}, {
4 | addVisitedView(view: any): void;
5 | delVisitedView(view: any): Promise;
6 | delOthersVisitedViews(view: any): Promise;
7 | delAllVisitedViews(): Promise;
8 | }>;
9 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/utils/axios-req.d.ts:
--------------------------------------------------------------------------------
1 | export default function axiosReq(config: any): import("axios").AxiosPromise;
2 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/utils/bus.d.ts:
--------------------------------------------------------------------------------
1 | declare const _default: import("mitt").Emitter>;
2 | export default _default;
3 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/utils/bus.js:
--------------------------------------------------------------------------------
1 | import mitt from 'mitt';
2 | export default mitt();
3 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/utils/common-util.d.ts:
--------------------------------------------------------------------------------
1 | declare const _default: {
2 | getWeek(): string;
3 | mobilePhone(str: any): boolean;
4 | toSplitNumFor(num: any, numToSpace: any): any;
5 | bankCardNo(str: any): boolean;
6 | regEmail(str: any): boolean;
7 | idCardNumber(str: any): boolean;
8 | deleteArrItem(arr: any, arrItem: any): void;
9 | arrToRepeat(arr: any): any;
10 | deRepeatArr(seriesArr: any): unknown[];
11 | byArrObjDeleteArrObj2(arrObj: any, arrObj2: any, objKey: any): any;
12 | deleteArrObjByKey(arrObj: any, objKey: any, value: any): any;
13 | findArrObjByKey(arrObj: any, objKey: any, value: any): any;
14 | byArrObjFindArrObj2(arrObj: any, arrObj2: any, objKey: any): any[];
15 | };
16 | export default _default;
17 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/views/redirect/index.d.ts:
--------------------------------------------------------------------------------
1 | declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly>, {}>;
2 | export default _default;
3 |
--------------------------------------------------------------------------------
/enc-webui/ts-out-dir/src/views/redirect/index.jsx:
--------------------------------------------------------------------------------
1 | import { defineComponent } from 'vue';
2 | export default defineComponent({
3 | setup() {
4 | const route = useRoute();
5 | const router = useRouter();
6 | onBeforeMount(() => {
7 | const { params, query } = route;
8 | const { path } = params;
9 | router.replace({ path: `/${path}`, query });
10 | });
11 | return () =>
;
12 | }
13 | });
14 |
--------------------------------------------------------------------------------
/enc-webui/tsconfig.base.json:
--------------------------------------------------------------------------------
1 | {
2 | //设置files为空,则不会自动扫描默认目录,也就是只会扫描include配置的目录
3 | "files": [],
4 | "compilerOptions": {
5 | "target": "esnext",
6 | "module": "esnext",
7 | //启用所有严格类型检查选项。
8 | //启用 --strict相当于启用 --noImplicitAny, --noImplicitThis, --alwaysStrict, --strictNullChecks和 --strictFunctionTypes和--strictPropertyInitialization。
9 | "strict": true,
10 | // 允许编译器编译JS,JSX文件
11 | "allowJs": false,
12 | // 允许在JS文件中报错,通常与allowJS一起使用
13 | "checkJs": false,
14 | // 允许使用jsx
15 | "jsx": "preserve",
16 | "declaration": true,
17 | //移除注解
18 | "removeComments": true,
19 | //不可以忽略any
20 | "noImplicitAny": false,
21 | //关闭 this 类型注解提示
22 | "noImplicitThis": true,
23 | //null/undefined不能作为其他类型的子类型:
24 | //let a: number = null; //这里会报错.
25 | "strictNullChecks": true,
26 | //生成枚举的映射代码
27 | "preserveConstEnums": true,
28 | //根目录
29 | //输出目录
30 | "outDir": "./ts-out-dir",
31 | //是否输出src2.js.map文件
32 | "sourceMap": false,
33 | //变量定义了但是未使用
34 | "noUnusedLocals": false,
35 | //是否允许把json文件当做模块进行解析
36 | "resolveJsonModule": true,
37 | //和noUnusedLocals一样,针对func
38 | "noUnusedParameters": false,
39 | // 模块解析策略,ts默认用node的解析策略,即相对的方式导入
40 | "moduleResolution": "node",
41 | //允许export=导出,由import from 导入
42 | "esModuleInterop": true,
43 | //忽略所有的声明文件( *.d.ts)的类型检查。
44 | "skipLibCheck": true,
45 | "baseUrl": ".",
46 | //指定默认读取的目录
47 | //"typeRoots": ["./node_modules/@types/", "./types"],
48 | "lib": ["ES2018", "DOM"]
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/enc-webui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.base.json",
3 | "compilerOptions": {
4 | "allowJs": true,
5 | "paths": {
6 | "@/*": ["src/*"],
7 | "~/*": ["typings/*"]
8 | }
9 | },
10 | "include": ["src", "typings"],
11 | "exclude": ["node_modules", "**/dist"]
12 | }
13 |
--------------------------------------------------------------------------------
/enc-webui/typings/basic.d.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * 声明.d.ts文件规范
3 | * 导出的类型以大写开头
4 | * 对象:config
5 | * 数组:options
6 | * 枚举:emu
7 | * 函数:Fn
8 | * 属性:props
9 | * 实例:instance
10 | * */
11 |
12 | /*router*/
13 | import type { RouteRecordRaw } from 'vue-router'
14 | export interface rawConfig {
15 | hidden?: boolean
16 | alwaysShow?: boolean
17 | code?: number
18 | name?: string
19 | fullPath?: string
20 | path?: string
21 | meta?: {
22 | title: string
23 | icon?: string
24 | affix?: boolean
25 | activeMenu?: string
26 | breadcrumb?: boolean
27 | roles?: Array
28 | elSvgIcon?: string
29 | code?: number
30 | cachePage?: boolean
31 | leaveRmCachePage?: boolean
32 | closeTabRmCache?: boolean
33 | }
34 | children?: RouterOptions
35 | redirect?: string
36 | }
37 | export type RouteRawConfig = RouteRecordRaw & rawConfig
38 | export type RouterTypes = Array
39 |
40 | /*settings*/
41 | export interface SettingsConfig {
42 | title: string
43 | sidebarLogo: boolean
44 | showLeftMenu: boolean
45 | ShowDropDown: boolean
46 | showHamburger: boolean
47 | isNeedLogin: boolean
48 | isNeedNprogress: boolean
49 | showTagsView: boolean
50 | tagsViewNum: number
51 | openProdMock: boolean
52 | errorLog: string | Array
53 | permissionMode: string
54 | delWindowHeight: string
55 | tmpToken: string
56 | showNavbarTitle: boolean
57 | showTopNavbar: boolean
58 | mainNeedAnimation: boolean
59 | viteBasePath: string
60 | defaultLanguage: string
61 | defaultSize: string
62 | defaultTheme: string
63 | plateFormId: number
64 | }
65 |
66 | export {}
67 |
--------------------------------------------------------------------------------
/enc-webui/typings/components.d.ts:
--------------------------------------------------------------------------------
1 | // generated by unplugin-vue-components
2 | // We suggest you to commit this file into source control
3 | // Read more: https://github.com/vuejs/core/pull/3399
4 | import '@vue/runtime-core'
5 |
6 | export {}
7 |
8 | declare module '@vue/runtime-core' {
9 | export interface GlobalComponents {
10 | ElSvgIcon: typeof import('./../src/components/ElSvgIcon.vue')['default']
11 | RouterLink: typeof import('vue-router')['RouterLink']
12 | RouterView: typeof import('vue-router')['RouterView']
13 | SvgIcon: typeof import('./../src/icons/SvgIcon.vue')['default']
14 | TestUnit: typeof import('./../src/components/TestUnit.vue')['default']
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/enc-webui/typings/env.d.ts:
--------------------------------------------------------------------------------
1 | declare global {
2 | interface ImportMetaEnv {
3 | readonly VITE_APP_BASE_URL: string
4 | readonly VITE_APP_IMAGE_URL: string
5 | readonly VITE_APP_ENV: string
6 | readonly VITE_PROXY_BASE_URL: string
7 | readonly VITE_PROXY_URL: string
8 | // 更多环境变量...
9 | }
10 | interface ImportMeta {
11 | readonly env: ImportMetaEnv
12 | }
13 | }
14 | export {}
15 |
--------------------------------------------------------------------------------
/enc-webui/typings/global.d.ts:
--------------------------------------------------------------------------------
1 | import type { defineOptions as _defineOptions } from 'unplugin-vue-define-options/macros.d.ts'
2 | declare global {
3 | interface ObjKeys {
4 | [propName: string]: any
5 | }
6 | const GLOBAL_VAR: String
7 | const defineOptions: typeof _defineOptions
8 | const $ref: any
9 | }
10 | export {}
11 |
--------------------------------------------------------------------------------
/enc-webui/typings/shims-vue.d.ts:
--------------------------------------------------------------------------------
1 | /*fix the import warning issue of vue file*/
2 | declare module '*.vue' {
3 | import { DefineComponent } from 'vue'
4 | const component: DefineComponent<{}, {}, any>
5 | export default component
6 | }
7 |
--------------------------------------------------------------------------------
/enc-webui/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config'
2 | import Vue from '@vitejs/plugin-vue'
3 | import VueJsx from '@vitejs/plugin-vue-jsx'
4 | export default defineConfig({
5 | plugins: [Vue(), VueJsx()],
6 | optimizeDeps: {
7 | disabled: true
8 | },
9 | test: {
10 | clearMocks: true,
11 | environment: 'jsdom',
12 | //setup 文件的路径。它们将运行在每个测试文件之前。
13 | setupFiles: ['./vitest.setup.ts'],
14 | transformMode: {
15 | web: [/\.[jt]sx$/]
16 | }
17 | }
18 | })
19 |
--------------------------------------------------------------------------------
/enc-webui/vitest.setup.js:
--------------------------------------------------------------------------------
1 | import { config } from '@vue/test-utils'
2 | import { vi } from 'vitest'
3 | import ResizeObserver from 'resize-observer-polyfill'
4 |
5 | vi.stubGlobal('ResizeObserver', ResizeObserver)
6 |
7 | config.global.stubs = {}
8 |
--------------------------------------------------------------------------------
/node-proxy/.env:
--------------------------------------------------------------------------------
1 | RUN_MODE=DEV
--------------------------------------------------------------------------------
/node-proxy/.eslintrc.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs')
2 |
3 | module.exports = {
4 | env: {
5 | browser: true,
6 | node: true,
7 | es6: true,
8 | es2021: true,
9 | },
10 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
11 | parser: '@typescript-eslint/parser',
12 | parserOptions: {
13 | ecmaVersion: 'latest',
14 | sourceType: 'module',
15 | },
16 | plugins: ['@typescript-eslint'],
17 | rules: {
18 | '@typescript-eslint/no-var-requires': 0, // 允许require语句
19 | 'prettier/prettier': [1, prettierrc()],
20 | 'no-empty': [2, { allowEmptyCatch: true }], //允许空catch子句
21 | },
22 | }
23 |
24 | function prettierrc() {
25 | const prettierrc_id = require.resolve('./.prettierrc')
26 | var stat = fs.statSync(prettierrc_id)
27 | if (stat.mtimeMs > (process.prettierrc_file_mtimeMs || 0)) {
28 | process.prettierrc_file_mtimeMs = stat.mtimeMs
29 | require.cache[prettierrc_id] = undefined
30 | }
31 | const conf = require('./.prettierrc')
32 | return conf
33 | }
34 |
--------------------------------------------------------------------------------
/node-proxy/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | semi: false,
3 | tabWidth: 2,
4 | printWidth: 150,
5 | singleQuote: true,
6 | endOfLine: 'auto',
7 | trailingComma: 'es5',
8 | }
9 |
--------------------------------------------------------------------------------
/node-proxy/btest.js:
--------------------------------------------------------------------------------
1 | import crypto from 'crypto'
2 | import path from 'path'
3 | import { logger } from '@/common/logger'
4 | import ChaCha20Poly from '@/utils/chaCha20Poly'
5 | import { chownSync, copyFileSync } from 'fs'
6 | import CRCN from '@/utils/crc6-8'
7 | import fs from 'fs'
8 | import { encodeName, decodeName } from '@/utils/commonUtil'
9 | import { getWebdavFileInfo } from '@/utils/webdavClient'
10 |
11 | getWebdavFileInfo(
12 | 'http://192.168.8.240:5244/dav/aliyun%E4%BA%91%E7%9B%98/atest/d%E5%AF%B9%E6%96%B9%E6%88%91testrclone/kline_d%2Bata12342%E6%AD%A3%E6%96%87%E7%9A%84%E7%9A%84%E5%89%AF%E6%9C%AC.txt',
13 | 'Basic YWRtaW46WWl1Tkg3bHk='
14 | ).then((res) => {
15 | console.log(res)
16 | })
17 |
18 | console.log('@@dd', path.isAbsolute('/ddf'))
19 | const content = 'fileInfoTable_/dav/aliyun%Evfnnz%BA%91%E7%9B%98/atest/12%E5%A4%A7%E5%A4%B4%E7%9A%84%E6%97%8F%E6%96%87%E4%BB%B6_8Xn78oZjs7VSr~qjdzVH4/4'
20 |
21 | console.log('@@content', decodeURIComponent(content))
22 | const reg = 'test'
23 |
24 | const enw = content.replace(new RegExp(reg, 'g'), '@@')
25 | console.log(enw)
26 |
27 | const ext = ''.trim() || path.extname('/dfdf.df')
28 |
29 | const encname = encodeName('123456', 'aesctr', '3wd.tex')
30 |
31 | const decname = decodeName('123456', 'aesctr', encname)
32 | console.log('##', ext, decname)
33 |
34 | logger.debug('dfeeeef')
35 |
--------------------------------------------------------------------------------
/node-proxy/pkgconfig.dist.json:
--------------------------------------------------------------------------------
1 | {
2 | "bin": "index.js",
3 | "pkg": {
4 | "scripts": [
5 | "PRGAThreadCom.js"
6 | ],
7 | "assets": [
8 | "public/**/*"
9 | ],
10 | "outputPath": "build"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/node-proxy/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/node-proxy/public/favicon.ico
--------------------------------------------------------------------------------
/node-proxy/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | alist-encryption
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/node-proxy/public/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/node-proxy/public/logo.png
--------------------------------------------------------------------------------
/node-proxy/public/static/css/401-714c78d6.css:
--------------------------------------------------------------------------------
1 | .errPage-container[data-v-16256ffe]{width:800px;max-width:100%;margin:100px auto}.errPage-container .pan-back-btn[data-v-16256ffe]{background:#008489;color:#fff;border:none!important}.errPage-container .pan-gif[data-v-16256ffe]{margin:0 auto;display:block}.errPage-container .pan-img[data-v-16256ffe]{display:block;margin:0 auto;width:100%}.errPage-container .text-jumbo[data-v-16256ffe]{font-size:60px;font-weight:700;color:#484848}.errPage-container .list-unstyled[data-v-16256ffe]{font-size:14px}.errPage-container .list-unstyled li[data-v-16256ffe]{padding-bottom:5px}.errPage-container .list-unstyled a[data-v-16256ffe]{color:#008489;text-decoration:none}.errPage-container .list-unstyled a[data-v-16256ffe]:hover{text-decoration:underline}
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/css/index-1d0ef8d0.css:
--------------------------------------------------------------------------------
1 | .login-container[data-v-74456f4d]{height:100vh;width:100%;background-color:#2d3a4b}.login-container .login-form[data-v-74456f4d]{margin-bottom:20vh;width:360px}.login-container .title-container .title[data-v-74456f4d]{font-size:22px;color:#eee;margin:0 auto 25px;text-align:center;font-weight:700}.svg-container[data-v-74456f4d]{padding-left:6px;color:#889aa4;text-align:center;width:30px}.tip-message[data-v-74456f4d]{color:#e4393c;height:30px;margin-top:-12px;font-size:12px}.login-btn[data-v-74456f4d]{width:100%;margin-bottom:30px}.show-pwd[data-v-74456f4d]{width:50px;font-size:16px;color:#889aa4;cursor:pointer;text-align:center}.login-container .el-input__wrapper{background-color:transparent;box-shadow:none}.login-container .el-form-item{border:1px solid rgba(255,255,255,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container .el-input input{background:transparent;border:0px;-webkit-appearance:none;border-radius:0;padding:10px 5px 10px 15px;color:#fff;height:42px;caret-color:#fff}.login-container .el-input__inner{box-shadow:none!important}
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/css/index-40f93645.css:
--------------------------------------------------------------------------------
1 | .svg-class[data-v-d19c4a35]{font-size:100px;color:var(--sidebar-logo-color)}
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/gif/401-a61ddb94.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/node-proxy/public/static/gif/401-a61ddb94.gif
--------------------------------------------------------------------------------
/node-proxy/public/static/js/404-441effb9.js:
--------------------------------------------------------------------------------
1 | import{_ as o,d as _,B as i,i as l,j as n,l as t,t as r,m as d,C as h,x as p,y as m,b as u}from"./index-c42bf1ef.js";const b=""+new URL("../png/404-538aa4d7.png",import.meta.url).href,a=""+new URL("../png/404_cloud-98e7ac66.png",import.meta.url).href;const e=s=>(p("data-v-31896b96"),s=s(),m(),s),v={class:"wscn-http404-container"},g={class:"wscn-http404"},f=h('',1),w={class:"bullshit"},y=e(()=>t("div",{class:"bullshit__oops"},"OOPS!",-1)),k=e(()=>t("div",{class:"bullshit__info"},[u(" All rights reserved "),t("a",{style:{color:"#20a0ff"},href:"https://wallstreetcn.com",target:"_blank"},"wallstreetcn")],-1)),x={class:"bullshit__headline"},S=e(()=>t("div",{class:"bullshit__info"}," Please check that the URL you entered is correct, or click the button below to return to the homepage. ",-1)),B=e(()=>t("a",{href:"",class:"bullshit__return-home"},"Back to home",-1)),I=_({}),L=Object.assign(I,{__name:"404",setup(s){const c=i(()=>"The webmaster said that you can not enter this page...");return(N,O)=>(l(),n("div",v,[t("div",g,[f,t("div",w,[y,k,t("div",x,r(d(c)),1),S,B])])]))}}),U=o(L,[["__scopeId","data-v-31896b96"]]);export{U as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/Children-f19505b3.js:
--------------------------------------------------------------------------------
1 | import{_ as o}from"./Children.vue_vue_type_script_setup_true_lang-532ec280.js";import"./SubChildren.vue_vue_type_script_setup_true_lang-b990a4da.js";import"./index-c42bf1ef.js";export{o as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/Children.vue_vue_type_script_setup_true_lang-532ec280.js:
--------------------------------------------------------------------------------
1 | import{_ as x}from"./SubChildren.vue_vue_type_script_setup_true_lang-b990a4da.js";import{d as p,r as T,g as k,a9 as M,J as u,D as $,h as y,i as F,j as N,l as e,c as o,k as s,b as l,aa as r,t as P,L as V}from"./index-c42bf1ef.js";const S=e("div",{class:"font-bold mb-10px mt-20px"},"call father method",-1),B=e("div",{class:"mt-20px font-bold mb-10px"},"slot using",-1),R=e("h3",null,"没传内容",-1),q=e("h3",null,"没传header插槽",-1),D=e("h3",null,"没传footer插槽",-1),j=e("div",{class:"mt-20px mb-10px font-bold"},"v-model sync using",-1),w=p({}),L=p({...w,__name:"Children",props:{fatherName:{require:!0,default:"",type:String},childrenTitle:{require:!0,default:"",type:String}},emits:["emitParent","update:childrenTitle"],setup(i,{expose:m,emit:d}){var h;const c=i,_=T({name:"Children"}),f=k("childRef"),g=()=>"childMethod",n=(h=M())==null?void 0:h.proxy,b=()=>{var t;(t=n==null?void 0:n.$parent)==null||t.fartherMethod()},v=()=>{d("emitParent",{val:"子组件传递的信息"})};u(()=>{console.log("得到父元素的prop",c.fatherName)}),u(()=>{console.log(`this is v-model parent data:${c.childrenTitle}`)});const C=()=>{d("update:childrenTitle","update it childrenTitle")};return m({childRef:f,childMethod:g}),$(_),(t,E)=>{const a=y("el-button");return F(),N(V,null,[e("div",null,[S,o(a,{onClick:v},{default:s(()=>[l("emitFather")]),_:1}),o(a,{onClick:b},{default:s(()=>[l("getFatherMethod")]),_:1}),o(x)]),B,r(t.$slots,"default",{},()=>[R]),r(t.$slots,"header",{},()=>[q]),r(t.$slots,"footer",{testProps:"子组件作用域传的值"},()=>[D]),j,e("div",null,P(i.childrenTitle),1),o(a,{onClick:C},{default:s(()=>[l("changeParentValue")]),_:1})],64)}}});export{L as _};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/SecondChildren-bdb250b1.js:
--------------------------------------------------------------------------------
1 | import{d as n,g as s,h as a,i as d,j as p,c as r,m as u,E as c,L as m,l as i}from"./index-c42bf1ef.js";const _=i("div",{class:"mt-20px mb-10px font-bold"},"I Am SecondChildren.vue",-1),f=n({name:"SecondChildren"}),V=n({...f,setup(h){const e=s("");return(v,t)=>{const o=a("el-input");return d(),p(m,null,[_,r(o,{modelValue:u(e),"onUpdate:modelValue":t[0]||(t[0]=l=>c(e)?e.value=l:null),placeholder:"input test keepAlive",style:{width:"400px"}},null,8,["modelValue"])],64)}}});export{V as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/SubChildren-cf671fdf.js:
--------------------------------------------------------------------------------
1 | import{_ as m}from"./SubChildren.vue_vue_type_script_setup_true_lang-b990a4da.js";import"./index-c42bf1ef.js";export{m as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/SubChildren.vue_vue_type_script_setup_true_lang-b990a4da.js:
--------------------------------------------------------------------------------
1 | import{d as i,ab as m,g as p,h as u,i as a,j as f,l as e,t as v,m as l,n as b,b as o,c,k as d,ac as h,Y as x,L as C}from"./index-c42bf1ef.js";const k=e("div",{class:"font-bold mt-20px mb-10px"},"provide and inject using",-1),g=e("div",{class:"mt-20px font-bold mb-10px"},"Teleport Using",-1),B=e("div",{id:"modal-container"},null,-1),N={class:"modal"},V=i({}),y=i({...V,__name:"SubChildren",setup(j){const r=m("title"),t=p(!1),_=()=>{t.value=!0};return(w,n)=>{const s=u("el-button");return a(),f(C,null,[k,e("div",null,v(l(r)),1),g,B,l(t)?(a(),b(h,{key:0,to:"#modal-container"},[e("div",N,[e("div",null,[o(" to container "),c(s,{onClick:n[0]||(n[0]=O=>t.value=!1)},{default:d(()=>[o("Close")]),_:1})])])])):x("",!0),c(s,{onClick:_},{default:d(()=>[o("showModalOpen")]),_:1})],64)}}});export{y as _};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/TestAddEdit-b98c6c8a.js:
--------------------------------------------------------------------------------
1 | import{_ as e,i as t,j as c}from"./index-c42bf1ef.js";const n={};function r(s,d){return t(),c("div",null,"TestAddEdit.vue")}const _=e(n,[["render",r]]);export{_ as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/TestButton-09d4aded.js:
--------------------------------------------------------------------------------
1 | import{_ as l,h as r,G as u,i as t,j as _,b as e,l as d,H as s,n as c,k as a}from"./index-c42bf1ef.js";const i={};function f(v,B){const o=r("el-button"),n=u("button-codes");return t(),_("div",null,[e(" button code test TestTableList.vue "),d("div",null,[s((t(),c(o,null,{default:a(()=>[e("按钮1")]),_:1})),[[n,["TestButton:AddBtn"]]]),s((t(),c(o,null,{default:a(()=>[e("按钮2")]),_:1})),[[n,["TestButton:Edit"]]])])])}const m=l(i,[["render",f]]);export{m as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/TestDetail-32224ef9.js:
--------------------------------------------------------------------------------
1 | import{_ as e,i as t,j as c}from"./index-c42bf1ef.js";const n={};function r(s,o){return t(),c("div",null,"TestAddEdit.vue")}const _=e(n,[["render",r]]);export{_ as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/TestMenu-90a98ef1.js:
--------------------------------------------------------------------------------
1 | import{d,a as p,h as c,i as _,j as m,b as t,l,c as s,k as n,m as u}from"./index-c42bf1ef.js";const f={class:"mt-20px"},v=d({}),k=Object.assign(v,{__name:"TestMenu",setup(T){const a=p(),r=()=>{location.href="https://github.jzfai.top/low-code-platform/#/permission-center/user-table-query"};return(b,e)=>{const o=c("el-button");return _(),m("div",null,[t(" page test TestTableQuery.vue "),l("div",null,[s(o,{onClick:e[0]||(e[0]=i=>u(a).push({name:"TestDetail"}))},{default:n(()=>[t("toTestDetail.vue")]),_:1}),s(o,{onClick:e[1]||(e[1]=i=>u(a).push({name:"TestAddEdit"}))},{default:n(()=>[t("TestAddEdit.vue")]),_:1})]),l("div",f,[s(o,{type:"primary",onClick:r},{default:n(()=>[t("去配置")]),_:1})])])}}});export{k as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/ThirdChildren-ad4e4e14.js:
--------------------------------------------------------------------------------
1 | import{d as s,g as o,h as a,i as r,j as d,c as p,m as u,E as i,L as m,l as c}from"./index-c42bf1ef.js";const _=c("div",{class:"mt-20px mb-10px font-bold"},"I Am ThirdChildren.vue",-1),f=s({name:"ThirdChildren"}),V=Object.assign(f,{setup(h){const e=o("");return(v,t)=>{const n=a("el-input");return r(),d(m,null,[_,p(n,{modelValue:u(e),"onUpdate:modelValue":t[0]||(t[0]=l=>i(e)?e.value=l:null),placeholder:"input test keepAlive",style:{width:"400px"}},null,8,["modelValue"])],64)}}});export{V as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/Vue3Template-4ebd0d41.js:
--------------------------------------------------------------------------------
1 | import{d as l,r as u,B as c,w as r,a as i,J as m,D as p,i as d,j as _}from"./index-c42bf1ef.js";const f=l({}),g=Object.assign(f,{__name:"Vue3Template",props:{name:{require:!0,default:"fai",type:String}},setup(e,{expose:t}){const o=e,a=u({levelList:null});return c(()=>"value"),r(()=>o.name,(s,n)=>{},{immediate:!0}),i(),m(()=>{console.log("页面挂载了")}),t({helloFunc:()=>{console.log("helloFunc")}}),p(a),(s,n)=>(d(),_("div",null,"vue3推荐模板可以集成在你们的vscode或webstorm中,有助于快速开发"))}});export{g as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/button-permission-ba254862.js:
--------------------------------------------------------------------------------
1 | import{_ as a,h as l,G as c,i as e,j as d,H as o,n as s,k as i,b as r}from"./index-c42bf1ef.js";const _={};function m(u,f){const t=l("el-button"),n=c("RolesPermission");return e(),d("div",null,[o((e(),s(t,null,{default:i(()=>[r("showing when then role of admin")]),_:1})),[[n,["admin"]]]),o((e(),s(t,null,{default:i(()=>[r("editor")]),_:1})),[[n,["editor"]]]),o((e(),s(t,null,{default:i(()=>[r("editor and admin")]),_:1})),[[n,["admin","editor"]]])])}const p=a(_,[["render",m]]);export{p as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/code-index-0a0d0a8a.js:
--------------------------------------------------------------------------------
1 | import{_ as e,i as c,j as n}from"./index-c42bf1ef.js";const o={};function r(t,a){return c(),n("div",null,"CodePage.vue")}const _=e(o,[["render",r]]);export{_ as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-11b0e548.js:
--------------------------------------------------------------------------------
1 | import{_ as e,i as c,j as n}from"./index-c42bf1ef.js";const r={};function t(o,s){return c(),n("div",null,"other")}const a=e(r,[["render",t]]);export{a as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-12e61eea.js:
--------------------------------------------------------------------------------
1 | import{_ as r,h as e,i as t,j as s,c as o,k as n,n as _,a6 as i}from"./index-c42bf1ef.js";const m={};function u(f,d){const a=e("el-alert"),c=e("router-view");return t(),s("div",null,[o(c,null,{default:n(({Component:l})=>[o(a,{closable:!1,title:"menu 1"},{default:n(()=>[(t(),_(i(l)))]),_:2},1024)]),_:1})])}const v=r(m,[["render",u]]);export{v as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-1a68c4cb.js:
--------------------------------------------------------------------------------
1 | import{d as r,u as n,a as u,o as c,c as p,b as d}from"./index-c42bf1ef.js";const i=r({setup(){const e=n(),t=u();return c(()=>{const{params:o,query:a}=e,{path:s}=o;t.replace({path:`/${s}`,query:a})}),()=>p("div",null,[d(" ")])}});export{i as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-1ebb4b3d.js:
--------------------------------------------------------------------------------
1 | import{d as p,a0 as v,e as x,h as C,i as b,j as k,l as s,t as c,m as u,c as n,k as l,b as d,ah as m}from"./index-c42bf1ef.js";const h={class:"mt-10px"},B=s("div",{class:"mb-20px text-20px font-bold"},"notice: setting the permissionMode of settings file before you test",-1),$=s("div",{class:"mb-20px"},"roles 页面权限控制",-1),g=s("div",{class:"mb-10px"},"codes 页面权限控制",-1),N=p({}),y=p({...N,__name:"index",setup(R){let{codes:a,roles:r}=v(x());const _=t=>{r=t,m({roles:t})},f=t=>{a=t,m({codes:t})};return(t,e)=>{const o=C("el-button");return b(),k("div",h,[B,$,s("div",null,c(u(r)),1),n(o,{onClick:e[0]||(e[0]=i=>_(["editor"]))},{default:l(()=>[d("roles切换为editor")]),_:1}),n(o,{onClick:e[1]||(e[1]=i=>_(["admin"]))},{default:l(()=>[d("roles切换为admin")]),_:1}),g,s("div",null,c(u(a)),1),n(o,{onClick:e[2]||(e[2]=i=>f([1]))},{default:l(()=>[d("Codes切换为[1]")]),_:1}),n(o,{onClick:e[3]||(e[3]=i=>f([16,9,10,11,12,13,15]))},{default:l(()=>[d("C odes切换为[16]")]),_:1})])}}});export{y as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-2239ba99.js:
--------------------------------------------------------------------------------
1 | import{_ as p}from"./Children.vue_vue_type_script_setup_true_lang-532ec280.js";import{d,g as r,J as v,a8 as g,w as T,h as x,i as C,j as M,c as i,k as n,b as c,t as b,m as k,E as V,l as s}from"./index-c42bf1ef.js";import"./SubChildren.vue_vue_type_script_setup_true_lang-b990a4da.js";const w={class:"scroll-y"},y=s("div",{class:"font-bold mb-10px"},"call child method",-1),B=s("div",null,"默认插槽",-1),E=s("div",null,"具名插槽",-1),N=d({}),J=d({...N,__name:"index",setup(P,{expose:_}){const e=r();v(()=>{console.log(e.value)});const h=()=>{console.log(e.value.childMethod()),console.log(e.value.childRef)},f=o=>{console.log("得到子组件的信息111",o)},u=()=>{console.log("fartherMethod")};g("title","provide value");const t=r("parentTitle");return T(()=>t.value,(o,l)=>{console.log("触发parent更新了",o,l)},{immediate:!0}),_({fartherMethod:u}),(o,l)=>{const m=x("el-button");return C(),M("div",w,[y,i(m,{onClick:h},{default:n(()=>[c("call childMethod")]),_:1}),i(p,{ref_key:"refChildren",ref:e,childrenTitle:k(t),"onUpdate:childrenTitle":l[0]||(l[0]=a=>V(t)?t.value=a:null),"father-name":"Vue3Template",onEmitParent:f},{default:n(()=>[B]),header:n(()=>[E]),footer:n(({testProps:a})=>[c(b(a),1)]),_:1},8,["childrenTitle"])])}}});export{J as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-28cf73f2.js:
--------------------------------------------------------------------------------
1 | import{_ as e,i as c,j as t}from"./index-c42bf1ef.js";const n={};function r(o,s){return c(),t("div",null,"rich-text")}const a=e(n,[["render",r]]);export{a as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-315d7f60.js:
--------------------------------------------------------------------------------
1 | import{_ as e,i as c,j as n}from"./index-c42bf1ef.js";const r={};function t(o,a){return c(),n("div",null,"chart")}const _=e(r,[["render",t]]);export{_ as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-348436de.js:
--------------------------------------------------------------------------------
1 | import{r as _}from"./use-self-router-ecbf91f5.js";import{d,r as f,g as v,a2 as b,a3 as g,h as l,i as h,j as x,c as e,k as a,m as n,b as V,l as A}from"./index-c42bf1ef.js";const k={class:"scroll-y"},C=A("div",{class:"font-bold mb-10px"},"Second Page KeepAlive Demo",-1),w=d({name:"KeepAliveGroup"}),F=d({...w,setup(D){const o=f({name:"",age:""}),r=v(1);r.value=2,console.log(r.value),b(()=>{console.log("onActivated")}),g(()=>{console.log("onDeactivated")});const i=()=>{_("SecondChild",{name:"SecondKeepAlive"})};return(S,t)=>{const c=l("el-input"),p=l("el-form-item"),m=l("el-form"),u=l("el-button");return h(),x("div",k,[C,e(m,{ref:"refsearchForm",inline:!0,class:"mt-2"},{default:a(()=>[e(p,{"label-width":"0px",label:"",prop:"errorLog","label-position":"left"},{default:a(()=>[e(c,{modelValue:n(o).name,"onUpdate:modelValue":t[0]||(t[0]=s=>n(o).name=s),class:"w-150px",placeholder:"input to test keepAlive"},null,8,["modelValue"])]),_:1}),e(p,{"label-width":"0px",label:"",prop:"pageUrl","label-position":"left"},{default:a(()=>[e(c,{modelValue:n(o).age,"onUpdate:modelValue":t[1]||(t[1]=s=>n(o).age=s),class:"w-150px",placeholder:"input to test keepAlive"},null,8,["modelValue"])]),_:1})]),_:1},512),e(u,{type:"primary",onClick:i},{default:a(()=>[V("to SecondChild.vue")]),_:1})])}}});export{F as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-3e4bfa1e.js:
--------------------------------------------------------------------------------
1 | import{_ as e,i as c,j as n}from"./index-c42bf1ef.js";const r={};function t(o,s){return c(),n("div",null,"guid")}const a=e(r,[["render",t]]);export{a as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-4089b0a2.js:
--------------------------------------------------------------------------------
1 | import{d as e,a0 as o,e as t,i as a,j as c,l as s}from"./index-c42bf1ef.js";const _={class:"scroll-y"},n=s("h3",{class:"mb-20px"},"功能",-1),r=s("div",{class:"rowSS"},"文件可以在线加密解密",-1),i=[n,r],d=e({}),h=Object.assign(d,{__name:"index",setup(l){return o(t()),(p,m)=>(a(),c("div",_,i))}});export{h as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-466a6a35.js:
--------------------------------------------------------------------------------
1 | import{_ as t,h as o,i as n,j as c,c as s}from"./index-c42bf1ef.js";const a={},r={style:{padding:"15px"}};function l(_,d){const e=o("el-alert");return n(),c("div",r,[s(e,{closable:!1,title:"menu 2"})])}const p=t(a,[["render",l]]);export{p as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-46c31d81.js:
--------------------------------------------------------------------------------
1 | import{d as e,a0 as o,e as t,i as a,j as c,l as s}from"./index-c42bf1ef.js";const _={class:"scroll-y"},n=s("h3",{class:"mb-20px"},"功能",-1),i=s("div",{class:"rowSS"},"找回密码,但是仅限于mix密码",-1),r=[n,i],d=e({}),h=Object.assign(d,{__name:"index",setup(l){return o(t()),(m,p)=>(a(),c("div",_,r))}});export{h as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-4b01face.js:
--------------------------------------------------------------------------------
1 | import{_ as t,h as n,i as o,j as c,c as s}from"./index-c42bf1ef.js";const a={},r={style:{padding:"30px"}};function l(_,i){const e=n("el-alert");return o(),c("div",r,[s(e,{closable:!1,title:"menu 1-2-2",type:"warning"})])}const p=t(a,[["render",l]]);export{p as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-6f1f5f84.js:
--------------------------------------------------------------------------------
1 | import{_ as t,h as n,i as o,j as c,c as s}from"./index-c42bf1ef.js";const a={},r={style:{padding:"30px"}};function l(_,i){const e=n("el-alert");return o(),c("div",r,[s(e,{closable:!1,title:"menu 1-2-1",type:"warning"})])}const p=t(a,[["render",l]]);export{p as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-82974afa.js:
--------------------------------------------------------------------------------
1 | import{d as o,h as n,i as c,j as l,c as _,k as r,b as d,l as i,ad as m}from"./index-c42bf1ef.js";const p=i("div",{class:"font-bold mb-20px"},"提供跨域使用例子",-1),u=o({}),b=o({...u,__name:"index",setup(f){const s=()=>{const e={baseURL:{}.VITE_PROXY_URL,url:"/basis-func/user/getUserInfo",timeout:8e3,params:{plateFormId:2},method:"post"};m(e).then(({data:t})=>{console.log(t)})};return(e,t)=>{const a=n("el-button");return c(),l("div",null,[p,_(a,{onClick:s},{default:r(()=>[d("测试跨域")]),_:1})])}}});export{b as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-869d85f1.js:
--------------------------------------------------------------------------------
1 | import{d as s,a0 as a,e as r,h as d,i as c,j as i,c as p,k as _,b as l,m as o,l as u}from"./index-c42bf1ef.js";const m=u("div",{class:"font-bold mb-20px"},"由于使用了 AutoImport 插件 可以直接引入pinia里的api",-1),f=s({}),B=s({...f,__name:"index",setup(b){const{sidebar:e}=a(r());return(x,t)=>{const n=d("el-button");return c(),i("div",null,[m,p(n,{onClick:t[0]||(t[0]=k=>o(e).opened=!o(e).opened)},{default:_(()=>[l("switch sidebar.opened")]),_:1})])}}});export{B as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-95ed2d19.js:
--------------------------------------------------------------------------------
1 | import{d as t,h as a,i as n,j as c,c as _,k as l,b as r,l as d,a7 as i,A as p}from"./index-c42bf1ef.js";const m={class:"scroll-y"},f=d("div",{class:"font-bold mb-20px"},"mock使用示例",-1),u=t({}),b=t({...u,__name:"index",setup(x){const o=()=>{i.get("/getMapInfo").then(({data:e})=>{p(e)})};return(e,h)=>{const s=a("el-button");return n(),c("div",m,[f,_(s,{type:"primary",onClick:o},{default:l(()=>[r("点击发送mock请求")]),_:1})])}}});export{b as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-a63a8682.js:
--------------------------------------------------------------------------------
1 | import{d as a,g as l,ae as c,af as d,i,j as u,l as r,t as g,m}from"./index-c42bf1ef.js";const _=r("div",null,"the recommend using way of worker",-1),f=a({}),B=a({...f,__name:"index",setup(p){const t=(e=>{const o=new Blob([`(${e.toString()})()`]),n=URL.createObjectURL(o);return new Worker(n)})(()=>{onmessage=e=>{console.time("加载时间"),console.log(`接收到主线程的信息${e.data}`);let o=0;for(let n=0;n{console.log(`主进程收到了子进程发出的信息:${e.data}`),s.value=e.data,d(),t.terminate()},(e,o)=>(i(),u("div",null,[_,r("div",null,"计算结果:"+g(m(s)),1)]))}});export{B as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-afd6c5bb.js:
--------------------------------------------------------------------------------
1 | import{d as r,a0 as c,e as p,h as a,i as _,j as m,c as l,k as s,b as f,l as o}from"./index-c42bf1ef.js";const u={class:"scroll-y"},v=o("h3",{class:"mb-20px"},"文件转存功能(即将上线)",-1),h=o("div",{class:"rowSS"},"文件转存,可以把任意的网盘文件转到加密文件夹中,建议1G内的文件使用",-1),b=o("div",{class:"rowSS"},"大文件推荐使用本地加密后,再从云盘客户端上进行上传,比较可靠",-1),w=o("div",{class:"el-upload__tip"},"即将上线",-1),S=r({}),B=Object.assign(S,{__name:"index",setup(k){return c(p()),(e,t)=>{const n=a("el-button"),i=a("el-upload");return _(),m("div",u,[v,h,b,l(i,{"file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=d=>e.fileList=d),class:"upload-demo",action:"/enc-api/encryptFile",multiple:"","on-preview":e.handlePreview,"on-remove":e.handleRemove,"before-remove":e.beforeRemove,limit:3,"on-exceed":e.handleExceed},{tip:s(()=>[w]),default:s(()=>[l(n,{type:"primary"},{default:s(()=>[f("Click to upload")]),_:1})]),_:1},8,["file-list","on-preview","on-remove","before-remove","on-exceed"])])}}});export{B as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-b8970c54.js:
--------------------------------------------------------------------------------
1 | import{_ as e,i as c,j as n}from"./index-c42bf1ef.js";const r={};function t(o,s){return c(),n("div",null,"excel")}const a=e(r,[["render",t]]);export{a as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-c8cd5cb3.js:
--------------------------------------------------------------------------------
1 | import{_ as r,h as e,i as t,n as o,k as s,l,c as _,a6 as i}from"./index-c42bf1ef.js";const d={},p={style:{padding:"15px"}};function u(f,m){const n=e("el-alert"),a=e("router-view");return t(),o(a,null,{default:s(({Component:c})=>[l("div",p,[_(n,{closable:!1,title:"menu 1-2-2",type:"success"},{default:s(()=>[(t(),o(i(c)))]),_:2},1024)])]),_:1})}const v=r(d,[["render",u]]);export{v as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-cb31d750.js:
--------------------------------------------------------------------------------
1 | import{_ as l,h as e,i as t,j as r,c as o,k as n,l as _,n as i,a6 as d}from"./index-c42bf1ef.js";const p={},u={style:{padding:"15px"}};function m(f,v){const s=e("el-alert"),a=e("router-view");return t(),r("div",null,[o(a,null,{default:n(({Component:c})=>[_("div",u,[o(s,{closable:!1,title:"menu 1-1",type:"success"},{default:n(()=>[(t(),i(d(c)))]),_:2},1024)])]),_:1})])}const h=l(p,[["render",m]]);export{h as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-d21579fd.js:
--------------------------------------------------------------------------------
1 | import{_ as t,h as c,i as n,j as o,c as s}from"./index-c42bf1ef.js";const a={};function l(r,_){const e=c("el-alert");return n(),o("div",null,[s(e,{closable:!1,title:"menu 1-3",type:"success"})])}const i=t(a,[["render",l]]);export{i as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-d74fd182.js:
--------------------------------------------------------------------------------
1 | import{d as o,h as a,i as n,j as s,c,k as l,b as _,l as d,a1 as p}from"./index-c42bf1ef.js";const r=d("div",{class:"font-bold mb-20px"},"引入use-common.ts中的copyValueToClipboard",-1),i=o({}),h=o({...i,__name:"index",setup(m){const e=()=>{p("执行hook方法")};return(u,b)=>{const t=a("el-button");return n(),s("div",null,[r,c(t,{onClick:e},{default:l(()=>[_("执行hook方法")]),_:1})])}}});export{h as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-d7f06f53.js:
--------------------------------------------------------------------------------
1 | import{d as e,i as c,j as _,c as a,v as t,x as n,y as d,l as p,_ as i}from"./index-c42bf1ef.js";const l=s=>(n("data-v-d19c4a35"),s=s(),d(),s),r={class:"scroll-y"},u=l(()=>p("div",{class:"font-bold mb-20px"},"svg-icon使用示例",-1)),v=e({}),m=e({...v,__name:"index",setup(s){return(x,f)=>{const o=t;return c(),_("div",r,[u,a(o,{"icon-class":"sidebar-logo",class:"svg-class"})])}}});const h=i(m,[["__scopeId","data-v-d19c4a35"]]);export{h as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/index-ef12e676.js:
--------------------------------------------------------------------------------
1 | import{_ as e,i as c,j as n}from"./index-c42bf1ef.js";const t={};function r(o,a){return c(),n("div",null,"table")}const _=e(t,[["render",r]]);export{_ as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/role-index-f43718f8.js:
--------------------------------------------------------------------------------
1 | import{_ as e,i as n,j as o}from"./index-c42bf1ef.js";const r={};function c(t,s){return n(),o("div",null,"showing when then role of admin")}const _=e(r,[["render",c]]);export{_ as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/second-child-679b3dc6.js:
--------------------------------------------------------------------------------
1 | import{g as f,a as h,r as b}from"./use-self-router-ecbf91f5.js";import{d as p,r as C,J as k,h as a,i as x,j as V,c as e,k as o,m as n,b as c,l as g}from"./index-c42bf1ef.js";const v={class:"scroll-y"},y=g("div",{class:"font-bold mb-20px"},"second-level.vue",-1),w=p({name:"SecondChild"}),U=p({...w,setup(B){const l=C({name:"",age:""});k(()=>{console.log(f())});const i=()=>{h()},u=()=>{b("ThirdChild",{name:"SecondChild"})};return(N,t)=>{const s=a("el-input"),d=a("el-form-item"),_=a("el-form"),m=a("el-button");return x(),V("div",v,[y,e(_,{ref:"refsearchForm",inline:!0,class:"mt-2"},{default:o(()=>[e(d,{"label-width":"0px",label:"",prop:"errorLog","label-position":"left"},{default:o(()=>[e(s,{modelValue:n(l).name,"onUpdate:modelValue":t[0]||(t[0]=r=>n(l).name=r),class:"w-150px",placeholder:"input to test keepAlive"},null,8,["modelValue"])]),_:1}),e(d,{"label-width":"0px",label:"",prop:"pageUrl","label-position":"left"},{default:o(()=>[e(s,{modelValue:n(l).age,"onUpdate:modelValue":t[1]||(t[1]=r=>n(l).age=r),class:"w-150px",placeholder:"demo1"},null,8,["modelValue"])]),_:1})]),_:1},512),e(m,{type:"primary",onClick:u},{default:o(()=>[c("to ThirdChild.vue")]),_:1}),e(m,{type:"primary",onClick:i},{default:o(()=>[c("返回")]),_:1})])}}});export{U as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/tab-keep-alive-aefc63f6.js:
--------------------------------------------------------------------------------
1 | import{d as a,r as c,g as r,a2 as p,a3 as d,h as i,i as m,j as _,c as u,m as t,l as v}from"./index-c42bf1ef.js";const f={class:"scroll-y"},g=v("div",{class:"font-bold mb-10px"},"Tab KeepAlive Demo",-1),b=a({name:"TabKeepAlive"}),x=a({...b,setup(h){const e=c({pageUrl:""}),s=r(1);return s.value=2,p(()=>{console.log("onActivated")}),d(()=>{console.log("onDeactivated")}),(A,o)=>{const l=i("el-input");return m(),_("div",f,[g,u(l,{modelValue:t(e).pageUrl,"onUpdate:modelValue":o[0]||(o[0]=n=>t(e).pageUrl=n),style:{width:"200px"},placeholder:"input to test TabKeepAlive"},null,8,["modelValue"])])}}});export{x as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/third-child-2588a277.js:
--------------------------------------------------------------------------------
1 | import{g as d,a as u}from"./use-self-router-ecbf91f5.js";import{d as _,r as f,J as b,h as t,i as g,j as h,c as e,k as a,m as r,b as k,l as x}from"./index-c42bf1ef.js";const V={class:"scroll-y"},v=x("h2",{class:"font-bold mb-10px"},"third-level.vue",-1),C=_({name:"ThirdChild"}),L=Object.assign(C,{setup(w){const o=f({name:"",age:""}),c=()=>{u()};return b(()=>{console.log(d())}),(U,l)=>{const s=t("el-input"),p=t("el-form-item"),i=t("el-form"),m=t("el-button");return g(),h("div",V,[v,e(i,{ref:"refsearchForm",inline:!0,class:"mt-2"},{default:a(()=>[e(p,{"label-width":"0px",label:"",prop:"errorLog","label-position":"left"},{default:a(()=>[e(s,{modelValue:r(o).errorLog,"onUpdate:modelValue":l[0]||(l[0]=n=>r(o).errorLog=n),class:"w-150px",placeholder:"input to test keepAlive"},null,8,["modelValue"])]),_:1}),e(p,{"label-width":"0px",label:"",prop:"pageUrl","label-position":"left"},{default:a(()=>[e(s,{modelValue:r(o).pageUrl,"onUpdate:modelValue":l[1]||(l[1]=n=>r(o).pageUrl=n),class:"w-150px",placeholder:"input to test keepAlive"},null,8,["modelValue"])]),_:1})]),_:1},512),e(m,{type:"primary",onClick:c},{default:a(()=>[k("返回")]),_:1})])}}});export{L as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/third-keep-alive-f4626902.js:
--------------------------------------------------------------------------------
1 | import{d as c,g as d,e as m,h as l,i as o,j as _,c as s,m as a,E as v,k as f,n as i,a5 as h,a6 as k,l as V}from"./index-c42bf1ef.js";const w=V("div",{class:"font-bold mb-10px"},"third-keep-alive demo",-1),x=c({name:"ThirdKeepAlive"}),b=c({...x,setup(B){const e=d(),{cachedViewsDeep:p}=m();return(C,n)=>{const r=l("el-input"),u=l("router-view");return o(),_("div",null,[w,s(r,{modelValue:a(e),"onUpdate:modelValue":n[0]||(n[0]=t=>v(e)?e.value=t:null),style:{width:"400px"},placeholder:"input test keepAlive"},null,8,["modelValue"]),s(u,null,{default:f(({Component:t})=>[(o(),i(h,{include:a(p)},[(o(),i(k(t)))],1032,["include"]))]),_:1})])}}});export{b as default};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/js/use-self-router-ecbf91f5.js:
--------------------------------------------------------------------------------
1 | import{a4 as t}from"./index-c42bf1ef.js";const u=()=>{var r;const e=t.currentRoute;if((r=e.value)!=null&&r.query.params)return JSON.parse(e.value.query.params)},o=(e,r)=>{let a={};r?a={params:JSON.stringify(r)}:a={},t.push({name:e,query:a})},n=()=>{t.go(-1)};export{n as a,u as g,o as r};
2 |
--------------------------------------------------------------------------------
/node-proxy/public/static/png/404-538aa4d7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/node-proxy/public/static/png/404-538aa4d7.png
--------------------------------------------------------------------------------
/node-proxy/public/static/png/404_cloud-98e7ac66.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/traceless/alist-encrypt/8c65d77f1caa68fc760e51c61e605903c868afe4/node-proxy/public/static/png/404_cloud-98e7ac66.png
--------------------------------------------------------------------------------
/node-proxy/src/@types/index.d.ts:
--------------------------------------------------------------------------------
1 | export {}
2 | declare global {
3 | interface PasswdInfo {
4 | encPath: string
5 | enable: string
6 | password: string
7 | encType: string
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/node-proxy/src/common/logger.js:
--------------------------------------------------------------------------------
1 | import log4js from 'log4js'
2 | import dotenv from 'dotenv'
3 | dotenv.config('./env')
4 |
5 | log4js.configure({
6 | appenders: {
7 | console: { type: 'console' },
8 | fileLogs: { type: 'file', filename: process.cwd() + '/logs/server.log', category: 'cheese' },
9 | err: { type: 'stderr' },
10 | },
11 | categories: {
12 | debug: { appenders: ['console'], level: 'debug' },
13 | default: { appenders: ['console', 'fileLogs'], level: 'info' },
14 | },
15 | })
16 |
17 | const category = process.env.RUN_MODE === 'DEV' ? 'debug' : 'default'
18 | export const logger = log4js.getLogger(category)
19 |
--------------------------------------------------------------------------------
/node-proxy/src/dao/configDao.js:
--------------------------------------------------------------------------------
1 | import levelDB from '@/utils/levelDB'
2 |
3 | export const configTable = 'configTable'
4 |
5 | export async function initConfigTable() {
6 | }
7 | // alist配置
8 | const alistConfigKey = '_alist_config_key'
9 | export async function updateAlistConfig(config) {
10 | await levelDB.setValue(alistConfigKey, config)
11 | }
12 | export async function getAlistConfig() {
13 | return await levelDB.getValue(alistConfigKey)
14 | }
15 |
16 | // 缓存文件信息
17 | export async function addOrUpdateWebdav(config) {
18 | const id = config.id
19 | const value = await levelDB.getValue(configTable)
20 | value[id] = config
21 | await levelDB.setValue(configTable, value)
22 | }
23 |
24 | export async function delWebdavConfig(config) {
25 | const id = config.id
26 | const value = await levelDB.getValue(configTable)
27 | delete value[id]
28 | await levelDB.setValue(configTable, value)
29 | }
30 |
--------------------------------------------------------------------------------
/node-proxy/src/dao/fileDao.js:
--------------------------------------------------------------------------------
1 | import levelDB from '@/utils/levelDB'
2 | import crypto from 'crypto'
3 |
4 | export const fileInfoTable = 'fileInfoTable_'
5 |
6 | // 缓存多少分钟
7 | const cacheTime = 60 * 24
8 |
9 | export async function initFileTable() {}
10 |
11 | // 缓存文件信息
12 | export async function cacheFileInfo(fileInfo) {
13 | fileInfo.path = decodeURIComponent(fileInfo.path)
14 | const pathKey = fileInfoTable + fileInfo.path
15 | fileInfo.table = fileInfoTable
16 | await levelDB.setExpire(pathKey, fileInfo, 1000 * 60 * cacheTime)
17 | }
18 |
19 | // 获取文件信息,偶尔要清理一下缓存
20 | export async function getFileInfo(path) {
21 | const pathKey = decodeURIComponent(fileInfoTable + path)
22 | const value = await levelDB.getValue(pathKey)
23 | return value
24 | }
25 |
26 | // 获取文件信息
27 | export async function getAllFileInfo() {
28 | const value = await levelDB.getValue({ table: fileInfoTable })
29 | return value
30 | }
31 |
--------------------------------------------------------------------------------
/node-proxy/src/dao/userDao.js:
--------------------------------------------------------------------------------
1 | import levelDB from '@/utils/levelDB'
2 |
3 | export const userTable = 'userTable'
4 |
5 | export async function initUserTable() {
6 | // const value = await levelDB.getValue(userTable)
7 | // if (value == null) {
8 | // await levelDB.setValue(userTable, {})
9 | // }
10 | }
11 | // 获取用户信息
12 | export async function getUserInfo(username) {
13 | const value = await levelDB.getValue(userTable)
14 | if (value == null) {
15 | return null
16 | }
17 | return value[username]
18 | }
19 |
20 | // 获取用户信息
21 | export async function getUserByToken(token) {
22 | return levelDB.getValue(token)
23 | }
24 | // 缓存用户信息
25 | export async function cacheUserToken(token, userInfo) {
26 | const value = await levelDB.setExpire(token, userInfo, 60 * 60 * 24)
27 | return value
28 | }
29 |
30 | export async function addUserInfo(userInfo) {
31 | const value = await levelDB.getValue(userTable) || {}
32 | value[userInfo.username] = userInfo
33 | await levelDB.setValue(userTable, value)
34 | }
35 |
36 | export async function updateUserInfo(userInfo) {
37 | const value = await levelDB.getValue(userTable)
38 | if (value[userInfo.username]) {
39 | value[userInfo.username] = userInfo
40 | levelDB.setValue(userTable, value)
41 | }
42 | }
43 |
44 | export async function delectUserInfo(userInfo) {
45 | const value = await levelDB.getValue(userTable)
46 | if (value[userInfo.username]) {
47 | delete value[userInfo.username]
48 | await levelDB.setValue(userTable, value)
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/node-proxy/src/middleware/globalHandle.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | export default async function (ctx, next) {
4 | const env = 'dev'
5 | try {
6 | await next()
7 | // 兼容webdav中401的时候,body = ''
8 | if (!ctx.body) {
9 | return
10 | }
11 | // 参数转换, 转换成自己的数据格式
12 | } catch (err) {
13 | // 所有的异常都在 app 上触发一个 error 事件,框架会记录一条错误日志
14 | // app.emit('error', err, this);
15 | const status = err.status || 500
16 | // 生产环境时 500 错误的详细错误内容不返回给客户端,因为可能包含敏感信息
17 | const error = status === 500 && env === 'prod' ? 'Internal Server Error' : err.message
18 | console.error('@@err', err)
19 | // 从 error 对象上读出各个属性,设置到响应中
20 | ctx.body = {
21 | success: false,
22 | message: error,
23 | code: status, // 服务端自身的处理逻辑错误(包含框架错误500 及 自定义业务逻辑错误533开始 ) 客户端请求参数导致的错误(4xx开始),设置不同的状态码
24 | data: null,
25 | }
26 | // 406 是能让用户看到的错误,参数校验失败也不能让用户看到(一般不存在参数校验失败)
27 | if (status === '403' || status === '406') {
28 | ctx.body.message = error
29 | }
30 | ctx.status = 200
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/node-proxy/src/middleware/responseHandle.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | export default async function (ctx, next) {
4 | const env = 'dev'
5 | try {
6 | await next()
7 | // 参数转换, 转换成自己的数据格式
8 | if (typeof ctx.body === 'object') {
9 | const { flag, msg, code, data } = ctx.body
10 | const body = {
11 | flag: flag || true,
12 | msg,
13 | code: code || 200,
14 | data,
15 | }
16 | ctx.body = body
17 | }
18 | if (ctx.status === 404) {
19 | ctx.throw(404, '请求资源未找到!')
20 | }
21 | } catch (err) {
22 | // 所有的异常都在 app 上触发一个 error 事件,框架会记录一条错误日志
23 | console.log(err)
24 | const status = err.status || 500
25 | // 生产环境时 500 错误的详细错误内容不返回给客户端,因为可能包含敏感信息
26 | const error = status === 500 && env === 'prod' ? 'Internal Server Error' : err.message
27 | // 从 error 对象上读出各个属性,设置到响应中
28 | ctx.body = {
29 | flag: false,
30 | msg: error,
31 | code: status, // 服务端自身的处理逻辑错误(包含框架错误500 及 自定义业务逻辑错误533开始 ) 客户端请求参数导致的错误(4xx开始),设置不同的状态码
32 | data: null,
33 | }
34 |
35 | // 406 是能让用户看到的错误,参数校验失败也不能让用户看到(一般不存在参数校验失败)
36 | if (status === '403' || status === '406') {
37 | ctx.body.message = error
38 | }
39 | ctx.status = 200
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/node-proxy/src/utils/PRGAExcute.js:
--------------------------------------------------------------------------------
1 | const PRGAExcute = function (data) {
2 | let { sbox: S, i, j, position } = data
3 | for (let k = 0; k < position * 1; k++) {
4 | i = (i + 1) % 256
5 | j = (j + S[i]) % 256
6 | // swap
7 | const temp = S[i]
8 | S[i] = S[j]
9 | S[j] = temp
10 | }
11 | // 记录位置,下次继续伪随机
12 | return { sbox: S, i, j }
13 | }
14 |
15 | process.on('message', function ({ msgId, workerData }) {
16 | console.log('来自父进程的消息: ' + JSON.stringify(workerData))
17 | const resData = PRGAExcute(workerData)
18 | process.send({ msgId, resData })
19 | })
20 |
--------------------------------------------------------------------------------
/node-proxy/src/utils/PRGAFork.js:
--------------------------------------------------------------------------------
1 | import { fork } from 'child_process'
2 | import { randomUUID } from 'crypto'
3 | import os from 'os'
4 | let index = parseInt(os.cpus().length / 2)
5 |
6 | const childList = []
7 | for (let i = index; i--; ) {
8 | const child = fork('./utils/PRGAExcute.js')
9 | childList[i] = child
10 | child.once('message', ({ msgId, resData }) => {
11 | child.emit(msgId, resData)
12 | })
13 | }
14 |
15 | const PRGAExcuteThread = function (workerData) {
16 | return new Promise((resolve, reject) => {
17 | const child = childList[index++ % childList.length]
18 | // 只监听一次,这样就可以重复监听
19 | const msgId = randomUUID()
20 | child.once(msgId, (res) => {
21 | resolve(res)
22 | })
23 | child.send(workerData)
24 | })
25 | }
26 |
27 | export default PRGAExcuteThread
28 |
--------------------------------------------------------------------------------
/node-proxy/src/utils/PRGAThreadCom.js:
--------------------------------------------------------------------------------
1 | const { isMainThread, parentPort, workerData } = require('worker_threads')
2 |
3 | // is not MainThread
4 | if (!isMainThread) {
5 | // Excute the posistion info
6 | const PRGAExcute = function (data) {
7 | let { sbox: S, i, j, position } = data
8 | for (let k = 0; k < position; k++) {
9 | i = (i + 1) % 256
10 | j = (j + S[i]) % 256
11 | // swap
12 | const temp = S[i]
13 | S[i] = S[j]
14 | S[j] = temp
15 | }
16 | // return this position info
17 | return { sbox: S, i, j }
18 | }
19 | // workerData 由主线程发送过来的信息
20 | parentPort.on('message', ({ msgId, data }) => {
21 | const startTime = Date.now()
22 | const resData = PRGAExcute(data)
23 | parentPort.postMessage({ msgId, resData })
24 | const time = Date.now() - startTime
25 | console.log('@@@PRGAExcute-end', data.position, Date.now(), '@time:' + time, workerData)
26 | })
27 | }
28 |
--------------------------------------------------------------------------------
/node-proxy/src/utils/levelDB.js:
--------------------------------------------------------------------------------
1 | import Datastore from 'nedb-promises'
2 |
3 | // let datastore = Datastore.create('/path/to/db.db')
4 | /**
5 | * 封装新方法
6 | */
7 | class Nedb {
8 | constructor(dbFile) {
9 | this.datastore = Datastore.create(dbFile)
10 | }
11 |
12 | async load() {
13 | await this.datastore.load()
14 | }
15 |
16 | // 新增过期设置
17 | async setValue(key, value) {
18 | await this.datastore.removeMany({ key })
19 | console.log('@@setValue', key, value )
20 | await this.datastore.insert({ key, expire: -1, value })
21 | }
22 |
23 | async setExpire(key, value, second = 6 * 10) {
24 | await this.datastore.removeMany({ key })
25 | const expire = Date.now() + second * 1000
26 | await this.datastore.insert({ key, expire, value })
27 | }
28 |
29 | async getValue(key) {
30 | try {
31 | const { expire, value } = await this.datastore.findOne({ key })
32 | // 没有限制时间
33 | if (expire < 0) {
34 | return value
35 | }
36 | if (expire && expire > Date.now()) {
37 | return value
38 | }
39 | } catch (e) {
40 | return null
41 | }
42 | // 删除key
43 | this.datastore.remove(key)
44 | return null
45 | }
46 | }
47 |
48 | const nedb = new Nedb(process.cwd() + '/conf/nedb/datafile')
49 |
50 | // 定时清除过期的数据
51 | setInterval(async () => {
52 | const allData = await nedb.datastore.find({})
53 | for (const data of allData) {
54 | const { key, expire } = data
55 | if (expire && expire > 0 && expire < Date.now()) {
56 | console.log('@@expire:', key, expire, Date.now())
57 | nedb.datastore.remove({ key })
58 | }
59 | }
60 | }, 30 * 1000)
61 |
62 | export default nedb
63 |
--------------------------------------------------------------------------------
/node-proxy/src/utils/webdavClient.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | import { httpClient } from './httpClient'
4 | import { XMLParser } from 'fast-xml-parser'
5 |
6 | // get file info from webdav
7 | export async function getWebdavFileInfo(urlAddr, authorization) {
8 | const request = {
9 | method: 'PROPFIND',
10 | headers: {
11 | depth: 1,
12 | authorization,
13 | },
14 | urlAddr,
15 | }
16 | const parser = new XMLParser({ removeNSPrefix: true })
17 | try {
18 | const XMLdata = await httpClient(request)
19 | const respBody = parser.parse(XMLdata)
20 | const res = respBody.multistatus.response
21 | const filePath = res.href
22 | const size = res.propstat.prop.getcontentlength || 0
23 | const name = res.propstat.prop.displayname
24 | const isDir = size === 0
25 | return { size, name, is_dir: isDir, path: filePath }
26 | } catch (e) {
27 | console.log('@@webdavFileInfo_error:', urlAddr)
28 | }
29 | return null
30 | }
31 |
--------------------------------------------------------------------------------
/node-proxy/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "NodeNext",
4 | "target": "ES5",
5 | "types": ["./src/@types"],
6 | "baseUrl": ".",
7 | "paths": { "@/*": ["src/*"] },
8 | "allowSyntheticDefaultImports": true,
9 | // "allowImportingTsExtensions": true,
10 | "allowJs": true,
11 | "outDir": "./dist"
12 | },
13 | "exclude": ["node_modules", "**/node_modules/*", "dist"],
14 | "ts-node": {
15 | "compilerOptions": {
16 | "module": "NodeNext"
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/node-proxy/webdavTest.js:
--------------------------------------------------------------------------------
1 | const url = 'http://192.168.8.21:5344/dav/aliyun'
2 | const client = {
3 | username: 'admin',
4 | password: 'YiuNH7ly',
5 | }
6 | console.log(url, client)
7 |
--------------------------------------------------------------------------------