├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── adapter
├── index.js
└── yunzai
│ ├── index.js
│ ├── mock
│ ├── genshin
│ │ └── mys.js
│ └── system
│ │ └── apps.js
│ ├── v3.js
│ ├── v4.js
│ └── version.js
├── apps
├── helper.js
├── login.js
├── update.js
└── v2-adapter.js
├── components
└── Changelog.js
├── defSet
└── application.yaml
├── framework
├── README.md
├── index.js
└── src
│ ├── GuobaApplication.js
│ ├── components
│ ├── GitTools.js
│ ├── GuobaError.js
│ ├── Pager.js
│ ├── Result.js
│ └── YamlReader.js
│ ├── core
│ ├── Controller.js
│ ├── Decorator.js
│ ├── Interceptor.js
│ ├── Preload.js
│ ├── RestController.js
│ └── Service.js
│ ├── helper
│ └── injection.js
│ ├── loader
│ ├── loadComponents.js
│ ├── loadDecorator.js
│ ├── loadHelper.js
│ └── loadPreload.js
│ └── utils
│ └── common.js
├── guoba.support.js
├── index.js
├── lib
├── compareVersions.js
├── diskinfo.js
└── v2-js
│ └── 目录说明.txt
├── main.js
├── models
├── libs.js
├── platform.js
└── utils.js
├── package.json
├── resources
├── images
│ ├── help.jpg
│ ├── icon.png
│ ├── no-miao.png
│ └── readme
│ │ ├── 001.png
│ │ ├── 002.png
│ │ ├── 003.png
│ │ ├── 004.png
│ │ └── 005.png
└── json
│ └── city.json
├── server
├── constant
│ └── Constant.js
├── controller
│ ├── ErrorController.js
│ ├── HelperController.js
│ ├── biz
│ │ ├── BotController.js
│ │ ├── ConfigController.js
│ │ ├── OicqController.js
│ │ └── PluginController.js
│ ├── other
│ │ └── v2
│ │ │ ├── V2Transfer.js
│ │ │ └── child
│ │ │ ├── .ignored_loader
│ │ │ ├── constant.js
│ │ │ └── transfer.js
│ ├── plugin
│ │ └── MiaoPluginController.js
│ └── system
│ │ ├── HomeController.js
│ │ ├── LoginController.js
│ │ ├── PermissionController.js
│ │ ├── SystemController.js
│ │ └── UserController.js
├── core
│ └── ApiController.js
├── decorator
│ ├── RedisDecorator.js
│ └── ReqDecorator.js
├── helper
│ ├── listen.js
│ └── pluginsIndex.js
├── index.js
├── interceptor
│ └── TokenInterceptor.js
├── preload
│ └── ConfigPreload.js
├── service
│ ├── both
│ │ ├── HelperService.js
│ │ ├── LoginService.js
│ │ ├── OicqService.js
│ │ ├── plugin
│ │ │ └── miao
│ │ │ │ ├── IMiaoPluginService.js
│ │ │ │ ├── MiaoPluginService.js
│ │ │ │ └── MiaoPluginV1Service.js
│ │ └── system
│ │ │ ├── SystemService.js
│ │ │ └── model
│ │ │ ├── .ignored_loader
│ │ │ ├── menus
│ │ │ ├── index.js
│ │ │ ├── pluginMenus.js
│ │ │ └── systemMenus.js
│ │ │ └── tokens.js
│ ├── interface
│ │ ├── IBotService.js
│ │ ├── IConfigService.js
│ │ └── IPluginService.js
│ ├── v2
│ │ └── PluginService.js
│ └── v3
│ │ ├── config
│ │ ├── ConfigServiceImpl.js
│ │ ├── model
│ │ │ ├── .ignored_loader
│ │ │ ├── useConfig.js
│ │ │ ├── useMiaoConfig.js
│ │ │ └── useTRSSConfig.js
│ │ └── utils
│ │ │ ├── .ignored_loader
│ │ │ ├── ConfigUtils.js
│ │ │ ├── MiaoConfigUtils.js
│ │ │ └── TRSSConfigUtils.js
│ │ └── system
│ │ ├── BotService.js
│ │ └── PluginService.js
├── static
│ ├── _app.config.js
│ ├── assets
│ │ ├── 21ae6624.js
│ │ ├── ArrayForm.css
│ │ ├── ArrayForm.js
│ │ ├── ArrowLeftOutlined.js
│ │ ├── BackupDrawer.css
│ │ ├── BackupDrawer.js
│ │ ├── BackupDrawer2.js
│ │ ├── BasicForm.css
│ │ ├── BasicForm.js
│ │ ├── BasicForm.vue_vue_type_style_index_0_lang.js
│ │ ├── Breadcrumb.css
│ │ ├── Breadcrumb.js
│ │ ├── CardForm.css
│ │ ├── CardForm.js
│ │ ├── ConfigForm.js
│ │ ├── CopyOutlined.js
│ │ ├── DeleteOutlined.js
│ │ ├── DetailModal.js
│ │ ├── DetailModal.vue_vue_type_script_setup_true_lang.js
│ │ ├── DropMenuItem.js
│ │ ├── DynamicInfo.js
│ │ ├── DynamicInfo.vue_vue_type_script_setup_true_lang.js
│ │ ├── DynamicInfo.vue_vue_type_script_setup_true_lang2.js
│ │ ├── DynamicInfo2.js
│ │ ├── EasyCronInput.css
│ │ ├── EasyCronInput.js
│ │ ├── EditBodyModal.css
│ │ ├── EditBodyModal.js
│ │ ├── EditBodyModal2.css
│ │ ├── EditBodyModal2.js
│ │ ├── ErrorAction.js
│ │ ├── Exception.css
│ │ ├── Exception.js
│ │ ├── Exception.vue_vue_type_style_index_0_lang.js
│ │ ├── ForgetPasswordForm.js
│ │ ├── ForgetPasswordForm.vue_vue_type_script_setup_true_lang.js
│ │ ├── FrameBlank.js
│ │ ├── FullscreenOutlined.js
│ │ ├── GButtons.css
│ │ ├── GButtons.js
│ │ ├── GColorPicker.css
│ │ ├── GColorPicker.js
│ │ ├── GPluginModal.css
│ │ ├── GPluginModal.js
│ │ ├── GSelectBiz.css
│ │ ├── GSelectBiz.js
│ │ ├── GSelectFriend.css
│ │ ├── GSelectFriend.js
│ │ ├── GSelectGroup.css
│ │ ├── GSelectGroup.js
│ │ ├── GTags.js
│ │ ├── GithubFilled.js
│ │ ├── GrowCard.js
│ │ ├── GrowCard.vue_vue_type_script_setup_true_lang.js
│ │ ├── GuobaLoginForm.js
│ │ ├── GuobaLoginForm.vue_vue_type_script_setup_true_lang.js
│ │ ├── HYWH-65W.woff
│ │ ├── HelpComps.js
│ │ ├── HelpPanel.css
│ │ ├── HelpPanel.js
│ │ ├── HelpPanel.vue_vue_type_style_index_0_lang.js
│ │ ├── HelpPanel2.css
│ │ ├── HelpPanel2.js
│ │ ├── IconUploader.css
│ │ ├── IconUploader.js
│ │ ├── IconUploader2.css
│ │ ├── IconUploader2.js
│ │ ├── InputNumberItem.css
│ │ ├── InputNumberItem.js
│ │ ├── LoadGist.js
│ │ ├── LoadGitee.js
│ │ ├── LoadGitee.vue_vue_type_script_setup_true_lang.js
│ │ ├── LockModal.css
│ │ ├── LockModal.js
│ │ ├── LockPage.css
│ │ ├── LockPage.js
│ │ ├── Login.css
│ │ ├── Login.js
│ │ ├── Login.vue_vue_type_style_index_0_lang.js
│ │ ├── LoginForm.js
│ │ ├── LoginFormTitle.js
│ │ ├── LoginFormTitle.vue_vue_type_script_setup_true_lang.js
│ │ ├── MarkdownViewer.vue_vue_type_script_setup_true_lang.js
│ │ ├── MasterLogin.js
│ │ ├── MiaoHeader.js
│ │ ├── MiaoHeader.vue_vue_type_script_setup_true_lang.js
│ │ ├── MiaoHeader.vue_vue_type_script_setup_true_lang2.js
│ │ ├── MiaoHeader2.js
│ │ ├── MobileForm.js
│ │ ├── MobileForm.vue_vue_type_script_setup_true_lang.js
│ │ ├── ModeBox.js
│ │ ├── ModeBox.vue_vue_type_script_setup_true_lang.js
│ │ ├── NZBZ.woff
│ │ ├── PathSelect.css
│ │ ├── PluginIcon.css
│ │ ├── PluginIcon.vue_vue_type_style_index_0_lang.js
│ │ ├── PluginsCard.css
│ │ ├── PluginsCard.js
│ │ ├── ProjectCard.js
│ │ ├── QrCodeForm.js
│ │ ├── QrCodeForm.vue_vue_type_script_setup_true_lang.js
│ │ ├── QuickNav.css
│ │ ├── QuickNav.js
│ │ ├── QuickNav.vue_vue_type_script_setup_true_lang.js
│ │ ├── QuickNav2.js
│ │ ├── RedoOutlined.js
│ │ ├── RegisterForm.js
│ │ ├── RegisterForm.vue_vue_type_script_setup_true_lang.js
│ │ ├── SaleRadar.css
│ │ ├── SaleRadar.js
│ │ ├── SaleRadar.vue_vue_type_script_setup_true_lang.js
│ │ ├── SaleRadar.vue_vue_type_style_index_0_lang.js
│ │ ├── SaleRadar2.js
│ │ ├── SalesProductPie.js
│ │ ├── SalesProductPie.vue_vue_type_script_setup_true_lang.js
│ │ ├── SelectFriendModal.js
│ │ ├── SelectGroupModal.js
│ │ ├── SelectIconModal.css
│ │ ├── SelectIconModal.js
│ │ ├── SelectIconModal2.css
│ │ ├── SelectIconModal2.js
│ │ ├── SelectItem.css
│ │ ├── SelectItem.js
│ │ ├── SessionTimeoutLogin.css
│ │ ├── SessionTimeoutLogin.js
│ │ ├── SettingDrawer.js
│ │ ├── SettingDrawer.vue_vue_type_script_setup_true_lang.js
│ │ ├── SettingFooter.css
│ │ ├── SettingFooter.js
│ │ ├── SiderTrigger.js
│ │ ├── SiteAnalysis.js
│ │ ├── SiteAnalysis.vue_vue_type_script_setup_true_lang.js
│ │ ├── Step1-1.js
│ │ ├── Step1-1.vue_vue_type_script_setup_true_lang.js
│ │ ├── Step1-2.js
│ │ ├── Step1-2.vue_vue_type_script_setup_true_lang.js
│ │ ├── Step1-3.js
│ │ ├── Step1-3.vue_vue_type_script_setup_true_lang.js
│ │ ├── Step1-4.js
│ │ ├── Step1-4.vue_vue_type_script_setup_true_lang.js
│ │ ├── Step1.js
│ │ ├── Step1.vue_vue_type_script_setup_true_lang.js
│ │ ├── Step2.css
│ │ ├── Step2.js
│ │ ├── StepBtn.js
│ │ ├── StepBtn.vue_vue_type_script_setup_true_lang.js
│ │ ├── SubForm.css
│ │ ├── SubForm.js
│ │ ├── SwitchItem.css
│ │ ├── SwitchItem.js
│ │ ├── TableBatchDropdown.js
│ │ ├── TableBatchDropdown.vue_vue_type_script_setup_true_lang.js
│ │ ├── TableImg.css
│ │ ├── TableImg.vue_vue_type_style_index_0_lang.js
│ │ ├── TermsOfService.css
│ │ ├── TermsOfService.js
│ │ ├── ThemeColorPicker.css
│ │ ├── ThemeColorPicker.js
│ │ ├── ThemeConfigForm.js
│ │ ├── ThemeConfigForm.vue_vue_type_script_setup_true_lang.js
│ │ ├── ThemeConfigModal.js
│ │ ├── ThemeConfigModal.vue_vue_type_script_setup_true_lang.js
│ │ ├── ThemeDrawer.css
│ │ ├── ThemeDrawer.js
│ │ ├── ThemeDrawer.vue_vue_type_style_index_0_lang.js
│ │ ├── TransferBox.css
│ │ ├── TransferBox.js
│ │ ├── TransferBox.vue_vue_type_style_index_0_lang.js
│ │ ├── TypePicker.css
│ │ ├── TypePicker.js
│ │ ├── UploadIconHelpModal.js
│ │ ├── UploadIconHelpModal.vue_vue_type_script_setup_true_lang.js
│ │ ├── UploadIconHelpModal.vue_vue_type_script_setup_true_lang2.js
│ │ ├── UploadIconHelpModal2.js
│ │ ├── VisitAnalysis.js
│ │ ├── VisitAnalysis.vue_vue_type_script_setup_true_lang.js
│ │ ├── VisitAnalysisBar.js
│ │ ├── VisitAnalysisBar.vue_vue_type_script_setup_true_lang.js
│ │ ├── VisitRadar.js
│ │ ├── VisitRadar.vue_vue_type_script_setup_true_lang.js
│ │ ├── VisitSource.js
│ │ ├── VisitSource.vue_vue_type_script_setup_true_lang.js
│ │ ├── WorkbenchHeader.js
│ │ ├── WorkbenchHeader.vue_vue_type_script_setup_true_lang.js
│ │ ├── WorkbenchHeader.vue_vue_type_script_setup_true_lang2.js
│ │ ├── WorkbenchHeader2.js
│ │ ├── app-antd-dark-theme-style.e3b0c442.css
│ │ ├── app-theme-style.e3b0c442.css
│ │ ├── appInfo.js
│ │ ├── base64Conver.js
│ │ ├── common.js
│ │ ├── construction.png
│ │ ├── data.js
│ │ ├── data2.js
│ │ ├── data3.js
│ │ ├── download.js
│ │ ├── en.js
│ │ ├── esm.js
│ │ ├── guoba.js
│ │ ├── header.jpg
│ │ ├── header.js
│ │ ├── hooks.js
│ │ ├── illustration.js
│ │ ├── illustration.svg
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── index10.css
│ │ ├── index10.js
│ │ ├── index11.css
│ │ ├── index11.js
│ │ ├── index12.css
│ │ ├── index12.js
│ │ ├── index13.css
│ │ ├── index13.js
│ │ ├── index14.css
│ │ ├── index14.js
│ │ ├── index15.css
│ │ ├── index15.js
│ │ ├── index16.css
│ │ ├── index16.js
│ │ ├── index17.css
│ │ ├── index17.js
│ │ ├── index18.css
│ │ ├── index18.js
│ │ ├── index19.css
│ │ ├── index19.js
│ │ ├── index2.css
│ │ ├── index2.js
│ │ ├── index20.css
│ │ ├── index21.css
│ │ ├── index21.js
│ │ ├── index22.css
│ │ ├── index22.js
│ │ ├── index23.css
│ │ ├── index23.js
│ │ ├── index24.js
│ │ ├── index25.js
│ │ ├── index26.js
│ │ ├── index27.js
│ │ ├── index28.js
│ │ ├── index29.js
│ │ ├── index3.css
│ │ ├── index3.js
│ │ ├── index30.js
│ │ ├── index31.js
│ │ ├── index32.js
│ │ ├── index33.js
│ │ ├── index34.js
│ │ ├── index35.js
│ │ ├── index36.js
│ │ ├── index4.css
│ │ ├── index4.js
│ │ ├── index5.css
│ │ ├── index5.js
│ │ ├── index6.css
│ │ ├── index6.js
│ │ ├── index7.css
│ │ ├── index7.js
│ │ ├── index8.css
│ │ ├── index8.js
│ │ ├── index9.css
│ │ ├── index9.js
│ │ ├── lock.js
│ │ ├── lodash.default.js
│ │ ├── logo.png
│ │ ├── merge.js
│ │ ├── miao.api.js
│ │ ├── miao.data.js
│ │ ├── net-error.svg
│ │ ├── no-data.svg
│ │ ├── onMountedOrActivated.js
│ │ ├── plugins.data.js
│ │ ├── props.js
│ │ ├── scrollTo.js
│ │ ├── siteSetting.js
│ │ ├── sortable.esm.js
│ │ ├── svg
│ │ │ ├── login-bg-dark.svg
│ │ │ └── login-bg.svg
│ │ ├── throttle.js
│ │ ├── transButton.js
│ │ ├── tttgbnumber.woff
│ │ ├── uniqBy.js
│ │ ├── upperFirst.js
│ │ ├── useContentViewHeight.js
│ │ ├── useECharts.js
│ │ ├── useFormItem.js
│ │ ├── useSelectModal.js
│ │ ├── useTable.js
│ │ ├── useWindowSizeFn.js
│ │ ├── yunzai-right.png
│ │ └── zh_CN.js
│ ├── favicon.ico
│ ├── index.html
│ └── resource
│ │ ├── img
│ │ ├── 21ae6624.webp
│ │ ├── logo.png
│ │ ├── pwa-192x192.png
│ │ └── pwa-512x512.png
│ │ └── tinymce
│ │ ├── langs
│ │ ├── en.js
│ │ └── zh_CN.js
│ │ └── skins
│ │ └── ui
│ │ ├── oxide-dark
│ │ ├── content.inline.min.css
│ │ ├── content.min.css
│ │ ├── content.mobile.min.css
│ │ ├── skin.min.css
│ │ └── skin.mobile.min.css
│ │ └── oxide
│ │ ├── content.inline.min.css
│ │ ├── content.min.css
│ │ ├── content.mobile.min.css
│ │ ├── fonts
│ │ └── tinymce-mobile.woff
│ │ ├── skin.min.css
│ │ └── skin.mobile.min.css
└── utils
│ └── pluginUtils.js
└── utils
├── adapter
├── check.js
├── common.js
├── initV2.js
├── initV3.js
└── loadV2.js
├── botActions.js
├── cfg.js
├── common.js
├── git.js
├── guobaImport.js
├── hotLoad.js
├── package.js
└── paths.js
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # 1.0.0
2 |
3 | * 嗨害嗨,这是第一个版本呢
4 | * 哦吼吼`吼吼吼`吼吼吼
--------------------------------------------------------------------------------
/adapter/index.js:
--------------------------------------------------------------------------------
1 | export * from './yunzai/index.js'
2 | export * from './yunzai/version.js'
3 |
--------------------------------------------------------------------------------
/adapter/yunzai/index.js:
--------------------------------------------------------------------------------
1 | import {isV3, isV4} from './version.js'
2 |
3 | let V
4 |
5 | if (isV4) {
6 | V = await import('./v4.js')
7 | } else if (isV3) {
8 | V = await import('./v3.js')
9 | } else {
10 | // 不支持的版本
11 | V = {
12 | ...(await import('./mock/genshin/mys.js')),
13 | }
14 | }
15 |
16 | export const {Restart, MysInfo, MysUser} = V
17 |
--------------------------------------------------------------------------------
/adapter/yunzai/mock/genshin/mys.js:
--------------------------------------------------------------------------------
1 | /**
2 | * mock MysInfo
3 | */
4 | export class MysInfo {
5 | static async getBingCkUid() {
6 | log()
7 | return {}
8 | }
9 |
10 | static async initCache() {
11 | log()
12 | return {}
13 | }
14 | }
15 |
16 | /**
17 | * mock MysUser
18 | */
19 | export class MysUser {
20 | static async getStatData() {
21 | log()
22 | return {
23 | count: {
24 | total: -1
25 | }
26 | }
27 | }
28 | }
29 |
30 | let logged = false
31 |
32 | function log() {
33 | if (logged) {
34 | return
35 | }
36 | logged = true
37 | logger.warn('[Guoba] 由于没有安装 genshin 插件,所以无法使用相关功能')
38 | }
39 |
--------------------------------------------------------------------------------
/adapter/yunzai/mock/system/apps.js:
--------------------------------------------------------------------------------
1 | /**
2 | * mock Restart
3 | */
4 | export class Restart {
5 | constructor(e) {
6 | this.e = e
7 | }
8 |
9 | restart(e) {
10 | logger.warn('[Guoba] 由于没有安装 system 插件,所以无法使用重启功能,请手动进行重启')
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/adapter/yunzai/v3.js:
--------------------------------------------------------------------------------
1 | import {hasGenshin, isTRSS} from './version.js'
2 |
3 | let Restart
4 | try {
5 | Restart = (await import('../../../other/restart.js')).Restart
6 | } catch {
7 | Restart = (await import('./mock/system/apps.js')).Restart
8 | }
9 |
10 | let MysInfo, MysUser;
11 |
12 | const importMys = async () => {
13 | MysInfo = (await import('../../../genshin/model/mys/mysInfo.js')).default
14 | MysUser = (await import('../../../genshin/model/mys/MysUser.js')).default
15 | }
16 |
17 | if (isTRSS) {
18 | if (hasGenshin) {
19 | await importMys()
20 | } else {
21 | const mys = (await import('./mock/genshin/mys.js'))
22 | MysInfo = mys.MysInfo
23 | MysUser = mys.MysUser
24 | }
25 | } else {
26 | await importMys()
27 | }
28 |
29 | export {
30 | Restart,
31 | MysInfo,
32 | MysUser,
33 | }
34 |
--------------------------------------------------------------------------------
/adapter/yunzai/v4.js:
--------------------------------------------------------------------------------
1 | let Restart
2 | try {
3 | Restart = (await import('../../../system/apps/restart.js')).Restart
4 | } catch {
5 | Restart = (await import('./mock/system/apps.js')).Restart
6 | }
7 |
8 | export {
9 | Restart
10 | }
11 |
12 | export const {MysInfo, MysUser} = await import('@yunzaijs/mys/runtime')
13 |
--------------------------------------------------------------------------------
/adapter/yunzai/version.js:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 |
3 | export const yunzaiPackage = JSON.parse(fs.readFileSync('./package.json', 'utf8'))
4 |
5 | // 检查yunzai版本
6 | export const {
7 | isV2,
8 | isV3,
9 | isV4,
10 | isTRSS,
11 | noSupport,
12 | yunzaiVersion,
13 |
14 | hasGenshin,
15 | } = checkVersion()
16 |
17 | // 是否开发模式
18 | export const isDev = (process.argv || []).includes('dev')
19 |
20 | function checkVersion() {
21 | let isV2 = false, isV3 = false, isV4 = false, noSupport = false
22 |
23 | let {name, version} = yunzaiPackage ?? {}
24 |
25 | if (version) {
26 | if (version.startsWith('2')) {
27 | isV2 = true
28 | } else if (version.startsWith('3')) {
29 | isV3 = true
30 | } else if (version.startsWith('4')) {
31 | isV4 = true
32 | } else {
33 | noSupport = true
34 | }
35 | }
36 |
37 | const isTRSS = yunzaiPackage.name === 'trss-yunzai'
38 |
39 | // v4 need check genshin
40 | const hasGenshin = fs.existsSync('./plugins/genshin')
41 |
42 | return {
43 | isV2,
44 | isV3,
45 | isV4,
46 | noSupport,
47 | isTRSS,
48 | yunzaiVersion: version,
49 |
50 | hasGenshin,
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/apps/helper.js:
--------------------------------------------------------------------------------
1 | import path from 'path'
2 | import {cfg, _paths} from "#guoba.platform";
3 | import {sendToMaster} from '#guoba.utils'
4 |
5 | export class GuobaHelp extends plugin {
6 |
7 | constructor(e) {
8 | super({
9 | name: '锅巴帮助',
10 | dsc: '锅巴插件帮助',
11 | event: 'message',
12 | priority: 100,
13 | rule: [
14 | {
15 | reg: '^#?锅巴(帮助|菜单|说明|功能|指令|命令|使用说明|help)$',
16 | fnc: 'getHelp',
17 | permission: 'master',
18 | },
19 | // 可通过`#锅巴重启`重载`guoba.support.js`
20 | {
21 | reg: '^#锅巴重启$',
22 | fnc: 'restart',
23 | permission: 'master',
24 | },
25 | ],
26 | })
27 | }
28 |
29 | async init() {
30 | // 引导用户进行配置
31 | this.firstGuide()
32 |
33 | }
34 |
35 | async getHelp() {
36 | let msg = [
37 | '锅巴帮助:\n' +
38 | 'https://gitee.com/guoba-yunzai/guoba-plugin/wikis/Home'
39 | ]
40 |
41 | if(this.e?.platform) {
42 | msg.push('[请在后台查看地址]')
43 | for(const item of msg){
44 | console.log(item)
45 | this.e.reply(item)
46 | }
47 | return
48 | }
49 |
50 | return this.e.reply(msg)
51 | }
52 |
53 | async restart() {
54 | if (Guoba && Guoba.reload) {
55 | await Guoba.reload()
56 | return this.e.reply('锅巴重启成功~')
57 | } else {
58 | return this.e.reply('奇怪,服务似乎并没有启动……')
59 | }
60 | }
61 |
62 | // 首次安装锅巴时的引导
63 | async firstGuide() {
64 | if (!cfg.get('base.guide')) {
65 | return
66 | }
67 | cfg.set('base.guide', false)
68 | sendToMaster([
69 | segment.image(path.join(_paths.pluginResources, 'images/help.jpg'))
70 | ])
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/apps/v2-adapter.js:
--------------------------------------------------------------------------------
1 | import lodash from 'lodash'
2 | import {v2Apps} from '../utils/adapter/loadV2.js'
3 |
4 | /**
5 | * 锅巴兼容V2
6 | */
7 | export class GuobaV2Adapter extends plugin {
8 | constructor(e) {
9 | super({
10 | name: '锅巴:兼容V2',
11 | dsc: '兼容V2的单JS插件',
12 | event: 'message',
13 | priority: 0,
14 | rule: [],
15 | // log: false,
16 | })
17 | }
18 |
19 | async accept(e) {
20 | for (const v2App of v2Apps) {
21 | let noCheck = !v2App.reg || v2App.reg === 'noCheck'
22 | let doLog = () => logger.mark(`[Guoba_V2][${v2App.key}] ${lodash.truncate(e.msg, {length: 12})}`)
23 | if (noCheck || new RegExp(v2App.reg, 'i').test(e.msg)) {
24 | noCheck || doLog()
25 | let res = await v2App.handler(e)
26 | if (res) {
27 | noCheck && doLog()
28 | return 'return'
29 | }
30 | }
31 | }
32 | }
33 |
34 | }
--------------------------------------------------------------------------------
/components/Changelog.js:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import path from 'path'
3 | import lodash from 'lodash'
4 | import {_paths} from '#guoba.platform'
5 |
6 | const _logPath = path.join(_paths.pluginRoot, 'CHANGELOG.md')
7 |
8 | let logs = {}
9 | let changelogs = []
10 | let currentVersion
11 | let versionCount = 4
12 |
13 | const getLine = function (line) {
14 | line = line.replace(/(^\s*\*|\r)/g, '')
15 | line = line.replace(/\s*`([^`]+`)/g, '$1')
16 | line = line.replace(/`\s*/g, '')
17 | line = line.replace(/\s*\*\*([^\*]+\*\*)/g, '$1')
18 | line = line.replace(/\*\*\s*/g, '')
19 | line = line.replace(/ⁿᵉʷ/g, '')
20 | return line
21 | }
22 |
23 | try {
24 | if (fs.existsSync(_logPath)) {
25 | logs = fs.readFileSync(_logPath, 'utf8') || ''
26 | logs = logs.split('\n')
27 |
28 | let temp = {}
29 | let lastLine = {}
30 | lodash.forEach(logs, (line) => {
31 | if (versionCount <= -1) {
32 | return false
33 | }
34 | let versionRet = /^#\s*([0-9\\.~\s]+?)\s*$/.exec(line)
35 | if (versionRet && versionRet[1]) {
36 | let v = versionRet[1].trim()
37 | if (!currentVersion) {
38 | currentVersion = v
39 | } else {
40 | changelogs.push(temp)
41 | if (/0\s*$/.test(v) && versionCount > 0) {
42 | versionCount = 0
43 | } else {
44 | versionCount--
45 | }
46 | }
47 |
48 | temp = {
49 | version: v,
50 | logs: [],
51 | }
52 | } else {
53 | if (!line.trim()) {
54 | return
55 | }
56 | if (/^\*/.test(line)) {
57 | lastLine = {
58 | title: getLine(line),
59 | logs: [],
60 | }
61 | temp.logs.push(lastLine)
62 | } else if (/^\s{2,}\*/.test(line)) {
63 | lastLine.logs.push(getLine(line))
64 | }
65 | }
66 | })
67 | }
68 | } catch (e) {
69 | // do nth
70 | }
71 |
72 | export {currentVersion, changelogs}
--------------------------------------------------------------------------------
/defSet/application.yaml:
--------------------------------------------------------------------------------
1 | # 基础设置
2 | base:
3 | # 获取天气的城市
4 | city: 北京
5 | guide: true
6 | # 是否要自动检查更新
7 | checkUpdate: true
8 | # 是否允许群聊登录
9 | loginInGroup: false
10 | # 是否只发送自定义地址
11 | onlyCustomAddress: false
12 | # 是否启用Github反代
13 | githubReverseProxy: false
14 | # Github反代地址
15 | githubProxyUrl: ""
16 | # 服务器配置
17 | server:
18 | # 启动地址(仅用于控制台输出)
19 | # auto 为自动获取IP地址
20 | host: auto
21 | # 启动端口号(修改完需要重启)
22 | port: 50831
23 | # 项目部署路径(修改完需要重启)
24 | mountPrefix: "/"
25 | # 是否需要拼接端口号
26 | splicePort: true
27 | # 网站ICP备案号
28 | ICPNo: ''
29 | # 是否整合trss,若开启则会和trss共享端口号,并且默认挂载到 /guoba 路径下
30 | helloTRSS: true
31 |
32 | # jwt配置
33 | jwt:
34 | # JWT 秘钥(随机生成,非必要请勿修改!)
35 | secret: ""
36 |
--------------------------------------------------------------------------------
/framework/README.md:
--------------------------------------------------------------------------------
1 | ## Guoba Framework 说明
2 |
3 | * nodejs 后端开发框架
4 | * 基于 express 框架
5 | * 写法及命名参考 spring boot
6 |
--------------------------------------------------------------------------------
/framework/index.js:
--------------------------------------------------------------------------------
1 | /* -------------- 公共常量 -------------- */
2 |
3 | /* -------------- 公共组件 -------------- */
4 | export {autowired, instancesMap} from './src/helper/injection.js';
5 | export {default as Result} from './src/components/Result.js';
6 | export {default as Pager} from './src/components/Pager.js'
7 | export {default as YamlReader} from './src/components/YamlReader.js'
8 | export {default as GitTools} from './src/components/GitTools.js'
9 | export {default as GuobaError} from './src/components/GuobaError.js'
10 |
11 | /* -------------- 框架核心 -------------- */
12 | export {default as Service} from './src/core/Service.js'
13 | export {default as Preload} from './src/core/Preload.js'
14 | export {default as Controller} from './src/core/Controller.js'
15 | export {default as RestController} from './src/core/RestController.js'
16 | export {default as Decorator} from './src/core/Decorator.js'
17 | export {default as Interceptor} from './src/core/Interceptor.js'
18 | export {default as GuobaApplication} from './src/GuobaApplication.js'
19 |
--------------------------------------------------------------------------------
/framework/src/components/GuobaError.js:
--------------------------------------------------------------------------------
1 | /** 全局错误处理 */
2 | export default class GuobaError extends Error {
3 |
4 | constructor(message) {
5 | // 允许返回特殊消息,需传递数组,例如 [segment.image()]
6 | if (Array.isArray(message)) {
7 | super()
8 | this._message = message
9 | } else {
10 | super(message);
11 | }
12 | }
13 |
14 | get message() {
15 | return this._message ? this._message : super.message;
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/framework/src/components/Pager.js:
--------------------------------------------------------------------------------
1 | /** 分页器 */
2 | export default class Pager {
3 |
4 | constructor(list, pageNum, pageSize) {
5 | this.$list = list
6 | this.$pageNum = pageNum
7 | this.$pageSize = pageSize
8 | }
9 |
10 | get pageNum() {
11 | return this.$pageNum
12 | }
13 |
14 | set pageNum(pageNum) {
15 | this.$pageNum = pageNum
16 | }
17 |
18 | get pageSize() {
19 | return this.$pageSize
20 | }
21 |
22 | set pageSize(pageSize) {
23 | this.$pageSize = pageSize
24 | }
25 |
26 | /** 根据当前分页条件,计算出的数据 */
27 | get records() {
28 | return [...this.$list].splice(this.offset, this.$pageSize)
29 | }
30 |
31 | /** 计算当前分页偏移量 */
32 | get offset() {
33 | let current = this.$pageNum
34 | if (current <= 1) {
35 | return 0
36 | }
37 | return Math.max((current - 1) * this.$pageSize, 0)
38 | }
39 |
40 | /** 最大页码 */
41 | get maxNum() {
42 | return Math.ceil(this.total / this.$pageSize)
43 | }
44 |
45 | /** 总行数 */
46 | get total() {
47 | return this.$list.length
48 | }
49 |
50 | toJSON() {
51 | return {
52 | pageNum: this.$pageNum,
53 | pageSize: this.$pageSize,
54 | total: this.total,
55 | maxNum: this.maxNum,
56 | records: this.records,
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/framework/src/core/Controller.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 控制器基类
3 | */
4 | export default class Controller {
5 | /**
6 | * @param {GuobaApplication} guobaApp
7 | */
8 | constructor(guobaApp) {
9 | this.guobaApp = guobaApp
10 | this.app = this.guobaApp.app
11 | this.created()
12 | }
13 |
14 | created() {
15 | }
16 |
17 | /** 加载优先级 */
18 | static priority = 1000
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/framework/src/core/Decorator.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 装饰器(伪)基类
3 | */
4 | export default class Decorator {
5 |
6 | constructor(config) {
7 | this.config = config
8 | }
9 |
10 | execute() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/framework/src/core/Interceptor.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 拦截器基类
3 | */
4 | export default class Interceptor {
5 | /**
6 | * @param {GuobaApplication} guobaApp
7 | */
8 | constructor(guobaApp) {
9 | this.guobaApp = guobaApp
10 | this.app = this.guobaApp.app
11 | this.app.use(this.handler.bind(this))
12 | }
13 |
14 | handler() {
15 |
16 | }
17 |
18 | /** 加载优先级 */
19 | static priority = 1000
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/framework/src/core/Preload.js:
--------------------------------------------------------------------------------
1 | /**
2 | * preload:预加载js
3 | */
4 | export default class Preload {
5 | /**
6 | *
7 | * @param {GuobaApplication} guobaApp
8 | * @param preloadName
9 | * @param scriptSrc
10 | */
11 | constructor(guobaApp, preloadName, scriptSrc) {
12 | this.guobaApp = guobaApp
13 | this.app = this.guobaApp.app
14 | this.preloadName = preloadName
15 | this.scriptSrc = scriptSrc
16 | this.created()
17 | }
18 |
19 | created() {
20 | }
21 |
22 | contentCache = null
23 |
24 | async getPreloadContent() {
25 | if (this.contentCache) {
26 | return this.contentCache
27 | }
28 | return await this.regenerateContent()
29 | }
30 |
31 | async regenerate() {
32 | this.contentCache = this.regenerateContent();
33 | }
34 |
35 | async regenerateContent() {
36 | this.contentCache = `(function(){try{${await this.generateContent()}}`
37 | + `catch(e){console.warn('[Guoba] preload "${this.preloadName}" error',e)}})()`
38 | return this.contentCache
39 | }
40 |
41 | createScriptTag() {
42 | return ``
43 | }
44 |
45 | /**
46 | * 生成预加载内容
47 | *
48 | * @returns {Promise | string}
49 | */
50 | async generateContent() {
51 | return '/* TODO: 请重写 generateContent 方法 */'
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/framework/src/core/Service.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 服务基类
3 | */
4 | export default class Service {
5 | /**
6 | * @param {GuobaApplication} guobaApp
7 | */
8 | constructor(guobaApp) {
9 | this.guobaApp = guobaApp
10 | this.app = this.guobaApp.app
11 | }
12 |
13 | static priority = 1000
14 | }
--------------------------------------------------------------------------------
/framework/src/helper/injection.js:
--------------------------------------------------------------------------------
1 | export const instancesMap = new Map()
2 |
3 | const proxyMap = new Map()
4 |
5 | /**
6 | * 自动注入
7 | * @param instanceName
8 | */
9 | export function autowired(instanceName) {
10 | if (!instanceName) {
11 | throw new Error('instanceName is required')
12 | }
13 | if (!proxyMap.has(instanceName)) {
14 | proxyMap.set(instanceName, createProxy(instanceName))
15 | }
16 | return proxyMap.get(instanceName)
17 | }
18 |
19 | /**
20 | * 创建只读代理对象
21 | * @param instanceName
22 | */
23 | function createProxy(instanceName) {
24 | return new Proxy({}, {
25 | get(target, propKey) {
26 | let instance = instancesMap.get(instanceName)
27 | if (instance) {
28 | let prop = instance[propKey]
29 | if (typeof prop === 'function') {
30 | return prop.bind(instance)
31 | }
32 | return prop
33 | }
34 | throw new Error(`${instanceName} is not found`)
35 | },
36 | })
37 | }
38 |
--------------------------------------------------------------------------------
/framework/src/loader/loadComponents.js:
--------------------------------------------------------------------------------
1 | import lodash from 'lodash'
2 | import {Controller, instancesMap, Interceptor, Service} from "../../index.js"
3 | import {instanceOf, loadClasses} from "../utils/common.js"
4 |
5 | /**
6 | * 加载所有组件
7 | * @param {GuobaApplication} guobaApp
8 | * @return {Promise}
9 | */
10 | export async function useComponents(guobaApp) {
11 | const {_args: {componentPaths}} = guobaApp
12 | if (!Array.isArray(componentPaths) && componentPaths.length === 0) {
13 | return
14 | }
15 | // 加载所有class
16 | const classes = {}
17 | for (const componentPath of componentPaths) {
18 | await loadClasses(componentPath, Object, classes);
19 | }
20 | const entries = Object.entries(classes).sort((a, b) => a[1].priority - b[1].priority)
21 | // 数组顺序即为加载优先级
22 | const componentsTypes = [
23 | // 拦截器
24 | Interceptor,
25 | // 服务
26 | Service,
27 | // 控制器
28 | Controller
29 | ];
30 | for (const type of componentsTypes) {
31 | let i = 0
32 | while (i < entries.length) {
33 | const [name, clazz] = entries[i];
34 | if (instanceOf(clazz, type)) {
35 | instancesMap.set(lodash.camelCase(name), new clazz(guobaApp))
36 | entries.splice(i, 1);
37 | } else {
38 | i++
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/framework/src/loader/loadDecorator.js:
--------------------------------------------------------------------------------
1 | import path from "path";
2 | import chalk from "chalk";
3 | import Decorator from "../core/Decorator.js";
4 | import {loadClass} from "../utils/common.js";
5 |
6 | /**
7 | * 加载全局装饰器
8 | * @param {GuobaApplication} guobaApp
9 | * @return {Promise<*[]>}
10 | */
11 | export async function useDecorator(guobaApp) {
12 | const {_args: {decorators}} = guobaApp
13 | if (!Array.isArray(decorators) || decorators.length === 0) {
14 | return []
15 | }
16 | const instances = []
17 | for (const item of decorators) {
18 | const importItem = await loadClass(item.path, Decorator, true);
19 | if (importItem == null) {
20 | continue;
21 | }
22 | try {
23 | instances.push(new importItem(...(item.args ?? [])));
24 | } catch (e) {
25 | logger.error(`[Guoba] load decorator error: ${chalk.red(path.basename(item.path))}`, e)
26 | }
27 | }
28 | guobaApp.globalDecorators = instances
29 | return instances
30 | }
--------------------------------------------------------------------------------
/framework/src/loader/loadHelper.js:
--------------------------------------------------------------------------------
1 | import express from "express";
2 | import multer from 'multer'
3 | import bodyParser from 'body-parser'
4 |
5 | /**
6 | * 一些辅助工具
7 | * @param {GuobaApplication} guobaApp
8 | */
9 | export function useHelper(guobaApp) {
10 | const {app, _args} = guobaApp
11 | if (_args.staticPath) {
12 | // 静态资源
13 | app.set('views', _args.staticPath)
14 | app.use(_args.prefix, express.static(_args.staticPath))
15 | }
16 | // parse application/json
17 | app.use(bodyParser.json({limit: '50mb'}))
18 | app.use(bodyParser.urlencoded({limit: '50mb', extended: true}))
19 | // 上传文件
20 | const upload = multer({dest: 'data/upload_tmp/'})
21 | app.post('*', upload.any(), function (req, res, next) {
22 | next()
23 | })
24 | }
25 |
--------------------------------------------------------------------------------
/framework/src/loader/loadPreload.js:
--------------------------------------------------------------------------------
1 | import fs from "fs";
2 | import path from 'path'
3 | import chalk from 'chalk'
4 | import {Preload} from "../../index.js";
5 | import {loadClass} from "../utils/common.js";
6 |
7 | /**
8 | * 依次创建页面预加载
9 | * @param {GuobaApplication} guobaApp
10 | */
11 | export async function usePreload(guobaApp) {
12 | const {_args: {preloads}} = guobaApp
13 | for (const item of preloads) {
14 | await hookAppPreloads(guobaApp, item)
15 | }
16 | }
17 |
18 | /**
19 | * @param {GuobaApplication} guobaApp
20 | * @param {PreloadType} preload
21 | */
22 | async function hookAppPreloads(guobaApp, preload) {
23 | const importItem = await loadClass(preload.path, Preload, true);
24 | if (importItem == null) {
25 | return
26 | }
27 | let instance = null
28 | try {
29 | // noinspection JSValidateTypes
30 | instance = new importItem(guobaApp)
31 | } catch (e) {
32 | logger.error(`[Guoba] load preload error: ${chalk.red(path.basename(preload.path))}`, e)
33 | return
34 | }
35 | const reg = new RegExp('');
36 | guobaApp.app.use(async (req, res, next) => {
37 | const flag = await preload.hook(req)
38 | if (flag) {
39 | // 替换tag
40 | const tag = instance.createScriptTag()
41 | const content = fs.readFileSync(preload.staticPath, 'utf8').replace(reg, tag)
42 | res.send(content)
43 | } else if (req.path === instance.scriptSrc) {
44 | const content = await instance.getPreloadContent()
45 | res.setHeader('Content-Type', 'text/javascript; charset=utf-8')
46 | res.send(content)
47 | } else {
48 | next();
49 | }
50 | })
51 | }
52 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | if (!global.segment) {
2 | global.segment = (await import("oicq")).segment
3 | }
4 | import {isV3, isV4} from '#guoba.adapter'
5 | import {checkPackage} from './utils/adapter/check.js'
6 | import {createImport, GI, GID} from './utils/guobaImport.js'
7 |
8 | let passed = await checkPackage()
9 |
10 | if (!passed) {
11 | throw 'Missing necessary dependencies'
12 | }
13 |
14 | global.Guoba = {GI, GID, createImport}
15 |
16 | const apps = {}, rule = {}
17 |
18 | let appRouter = null
19 |
20 | if (isV3 || isV4) {
21 | await (await import('./utils/adapter/initV3.js')).init(apps)
22 | } else {
23 | appRouter = await (await import('./utils/adapter/initV2.js')).init(rule)
24 | }
25 |
26 | export {apps, rule, appRouter}
27 |
--------------------------------------------------------------------------------
/lib/v2-js/目录说明.txt:
--------------------------------------------------------------------------------
1 | 1. 本目录用于兼容V2的插件(单JS)
2 | 2. 将V2的插件放置到本目录下即可。
3 | 3. 并不能保证完全兼容,有不兼容的写法将会拒绝执行。
4 | 4. 不支持热部署,新增、修改或删除插件后需要重启。
5 |
--------------------------------------------------------------------------------
/main.js:
--------------------------------------------------------------------------------
1 | import { createApps } from 'alemonjs'
2 | import { apps } from './index.js'
3 | const app = createApps(import.meta.url)
4 | app.setCharacter('#')
5 | app.component(apps)
6 | app.mount()
7 |
--------------------------------------------------------------------------------
/models/libs.js:
--------------------------------------------------------------------------------
1 | export * as diskInfo from '../lib/diskinfo.js';
2 | export * as compareVersions from '../lib/compareVersions.js';
--------------------------------------------------------------------------------
/models/platform.js:
--------------------------------------------------------------------------------
1 | export {_paths} from '../utils/paths.js'
2 | export {_version, pluginName, pluginPackage} from '../utils/package.js';
3 |
4 | export {default as cfg} from '../utils/cfg.js'
5 |
6 | export {default as Constant} from '../server/constant/Constant.js'
7 | export {default as ApiController} from '../server/core/ApiController.js'
8 |
9 | /** 安装了哪些插件 */
10 | export const PluginsMap = new Map()
11 | /** 哪些插件支持Guoba */
12 | export const GuobaSupportMap = new Map()
13 | /** git仓库工具类 */
14 | export const GitRepoMap = new Map()
15 |
--------------------------------------------------------------------------------
/models/utils.js:
--------------------------------------------------------------------------------
1 | export * from '../utils/package.js'
2 | export * from '../utils/common.js';
3 | export * as GitUtils from '../utils/git.js'
4 |
5 | export * as AdapterCheck from '../utils/adapter/check.js';
6 |
7 | export * as BotActions from '../utils/botActions.js';
8 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "guoba-plugin",
3 | "version": "1.4.1",
4 | "description": "Yunzai-Bot插件。兼容Miao-Yunzai(V3、V4)、TRSS-Yunzai",
5 | "type": "module",
6 | "module": "index.js",
7 | "main": "index.js",
8 | "scripts": {},
9 | "imports": {
10 | "#guoba.platform": "./models/platform.js",
11 | "#guoba.utils": "./models/utils.js",
12 | "#guoba.libs": "./models/libs.js",
13 | "#guoba.adapter": "./adapter/index.js",
14 | "#guoba.framework": "./framework/index.js",
15 | "#guoba.framework.utils": "./framework/src/utils/common.js"
16 | },
17 | "dependencies": {
18 | "body-parser": "^1.20.3",
19 | "express": "^4.19.2",
20 | "jsonwebtoken": "^9.0.2",
21 | "multer": "1.4.5-lts.1",
22 | "socket.io": "^4.7.5"
23 | },
24 | "keywords": [
25 | "锅巴",
26 | "Guoba",
27 | "Guoba-Plugin",
28 | "喵崽",
29 | "Miao-Yunzai",
30 | "TRSS-Yunzai",
31 | "云崽",
32 | "Yunzai-Bot",
33 | "原神",
34 | "Genshin"
35 | ],
36 | "author": "zolay",
37 | "license": "GPL-3.0-or-later"
38 | }
39 |
--------------------------------------------------------------------------------
/resources/images/help.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/resources/images/help.jpg
--------------------------------------------------------------------------------
/resources/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/resources/images/icon.png
--------------------------------------------------------------------------------
/resources/images/no-miao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/resources/images/no-miao.png
--------------------------------------------------------------------------------
/resources/images/readme/001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/resources/images/readme/001.png
--------------------------------------------------------------------------------
/resources/images/readme/002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/resources/images/readme/002.png
--------------------------------------------------------------------------------
/resources/images/readme/003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/resources/images/readme/003.png
--------------------------------------------------------------------------------
/resources/images/readme/004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/resources/images/readme/004.png
--------------------------------------------------------------------------------
/resources/images/readme/005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/resources/images/readme/005.png
--------------------------------------------------------------------------------
/server/constant/Constant.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 一些公用常量
3 | */
4 | export default {
5 | // header中传递的TokenKey
6 | TOKEN_KEY: 'guoba-access-token',
7 |
8 | // redis前缀
9 | REDIS_PREFIX: 'Yz:Guoba:',
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/server/controller/ErrorController.js:
--------------------------------------------------------------------------------
1 | import {RestController, Result} from '#guoba.framework'
2 |
3 | /** 错误处理 */
4 | export default class ErrorController extends RestController {
5 | constructor(app) {
6 | super('', app)
7 | }
8 |
9 | registerRouters() {
10 | this.all('*', this.handle404)
11 | }
12 |
13 | handle404(req, res) {
14 | return Result.notFound()
15 | }
16 |
17 | /** 加载优先级 */
18 | static priority = 99999
19 |
20 | }
--------------------------------------------------------------------------------
/server/controller/HelperController.js:
--------------------------------------------------------------------------------
1 | import {autowired, Result} from '#guoba.framework'
2 | import {ApiController, cfg} from '#guoba.platform'
3 |
4 | const RedisDecorator = await Guoba.GID('#/decorator/RedisDecorator.js')
5 |
6 | /**
7 | * 工具类Controller
8 | */
9 | export default class HelperController extends ApiController {
10 |
11 | helperService = autowired('helperService')
12 |
13 | constructor(guobaApp) {
14 | super('/helper', guobaApp)
15 | }
16 |
17 | registerRouters() {
18 | // 中转请求,绕过跨域和防盗链
19 | this.all('/transit', this.transitRequest)
20 | // 获取天气信息(缓存6小时)
21 | this.get('/city_weather', this.getCityWeather, [
22 | new RedisDecorator('city_weather:${config.getCity()}', {EX: 60 * 60 * 6, getCity: this.getCity}),
23 | ])
24 | // 本地尝试释放端口
25 | // 假设用户关闭yunzai时,没有关干净,导致端口号被异常占用
26 | // 此时另一方启动的锅巴可以尝试调用此接口,来关闭当前的端口占用
27 | // 安全性:仅限 localhost 访问
28 | this.delete('/release_port', this.tryReleasePort)
29 | }
30 |
31 | transitRequest(req, res) {
32 | return this.helperService.transitRequest(req, res)
33 | }
34 |
35 | getCity() {
36 | return cfg.get('base.city')
37 | }
38 |
39 | async getCityWeather() {
40 | try {
41 | let city = this.getCity()
42 | return Result.ok({
43 | weather: await this.helperService.getWeather(city),
44 | })
45 | } catch (e) {
46 | logger.error(e)
47 | let msg = e.message || e
48 | return Result.error(msg)
49 | }
50 | }
51 |
52 | tryReleasePort(req) {
53 | if (req.hostname !== 'localhost') {
54 | return Result.noAuth()
55 | }
56 | logger.mark('[Guoba] 服务已在另一处启动,正在尝试停止当前服务……')
57 | setTimeout(() => {
58 | Guoba.server.close(err => {
59 | if (err) {
60 | logger.mark('[Guoba] 服务停止失败')
61 | logger.error(err)
62 | } else {
63 | logger.mark('[Guoba] 已停止当前服务,您如果想要多开锅巴,请更改不同的端口号~')
64 | }
65 | })
66 | }, 10)
67 | return Result.ok()
68 | }
69 | }
--------------------------------------------------------------------------------
/server/controller/biz/BotController.js:
--------------------------------------------------------------------------------
1 | import {Result} from '#guoba.framework'
2 | import {ApiController} from '#guoba.platform'
3 | import {BotActions} from '#guoba.utils'
4 |
5 | /** Bot相关操作 */
6 | export class BotController extends ApiController {
7 |
8 | constructor(guobaApp) {
9 | super('/bot', guobaApp)
10 | }
11 |
12 | registerRouters() {
13 | this.post('/restart', this.doRestart)
14 | }
15 |
16 | async doRestart() {
17 | await BotActions.doRestart()
18 | return Result.ok({}, '重启成功~')
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/server/controller/biz/ConfigController.js:
--------------------------------------------------------------------------------
1 | import {autowired, Result} from '#guoba.framework'
2 | import {ApiController} from '#guoba.platform'
3 |
4 | export default class ConfigController extends ApiController {
5 |
6 | configService = autowired('configServiceImpl')
7 |
8 | constructor(guobaApp) {
9 | super('/config', guobaApp)
10 | }
11 |
12 | registerRouters() {
13 | this.get('/tabs', this.tabs)
14 | this.get('/data', this.getData)
15 | this.post('/data', this.setData)
16 | this.delete('/card-Form', this.removeCardForm)
17 | }
18 |
19 | async tabs() {
20 | let config = await this.configService.getConfigTabs()
21 | return Result.ok(config)
22 | }
23 |
24 | async getData(req) {
25 | let {key} = req.query
26 | let data = await this.configService.getConfigData(key)
27 | return Result.ok(data)
28 | }
29 |
30 | async setData(req) {
31 | let {key, data} = req.body
32 | await this.configService.setConfigData(key, data)
33 | return Result.ok('保存成功~')
34 | }
35 |
36 | async removeCardForm(req) {
37 | let {formKey, cardKey} = req.body
38 | await this.configService.removeCardForm(formKey, cardKey)
39 | return Result.ok('删除成功~')
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/server/controller/other/v2/child/.ignored_loader:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/controller/other/v2/child/.ignored_loader
--------------------------------------------------------------------------------
/server/controller/other/v2/child/constant.js:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import path from 'path'
3 | import {_paths} from '#guoba.platform'
4 |
5 | // 资源Set
6 | export const RES_SET = {
7 | git: {
8 | gitee: 'https://gitee.com/Le-niao/Yunzai-Bot.git',
9 | github: 'https://github.com/Le-niao/Yunzai-Bot.git'
10 | }
11 | }
12 |
13 | // 操作状态
14 | export const ACTION_CODE = {wait: 0, ing: 1, success: 2, fail: 3}
15 |
16 | export const examplePath = path.join(_paths.root, '/lib/example')
17 |
18 | // 检查JS兼容性
19 | export const checkJsCompatibility = (dirPath) => {
20 | let passed = []
21 | let noPass = []
22 | if (fs.existsSync(dirPath)) {
23 | let fileList = fs.readdirSync(dirPath)
24 | .filter(i => path.extname(i) === '.js')
25 | .map((i) => path.join(dirPath, i))
26 | for1: for (let filePath of fileList) {
27 | let body = fs.readFileSync(filePath, {encoding: 'utf-8'})
28 | let lines = body.split(/\r\n|\n/)
29 | // 检查是否存在不兼容的写法
30 | for (let i = 0; i < lines.length; i++) {
31 | let line = lines[i]
32 | let lineNum = i + 1
33 | // 不兼容:相对路径
34 | if (/\sfrom\s+['"]\.{1,2}\//i.test(line)) {
35 | addCheckJsItem(noPass, filePath, {line, lineNum, reason: '使用“相对路径”写法,无法保证兼容性'})
36 | continue for1
37 | }
38 | // 不兼容:BotConfig
39 | if (/BotConfig\./.test(line)) {
40 | addCheckJsItem(noPass, filePath, {line, lineNum, reason: '使用“BotConfig”写法,V3中已不兼容'})
41 | continue for1
42 | }
43 | // 不兼容:YunzaiApps
44 | if (/YunzaiApps\./.test(line)) {
45 | addCheckJsItem(noPass, filePath, {line, lineNum, reason: '使用“YunzaiApps”写法,V3中已不兼容'})
46 | continue for1
47 | }
48 | }
49 | addCheckJsItem(passed, filePath)
50 | }
51 | }
52 | return {passed, noPass}
53 | }
54 |
55 | function addCheckJsItem(arr, filePath, o) {
56 | arr.push({file: path.basename(filePath), ...o})
57 | return arr
58 | }
59 |
--------------------------------------------------------------------------------
/server/controller/system/PermissionController.js:
--------------------------------------------------------------------------------
1 | import {autowired, Result} from '#guoba.framework'
2 | import {ApiController} from '#guoba.platform'
3 |
4 | export class PermissionController extends ApiController {
5 |
6 | systemService = autowired('systemService')
7 |
8 | constructor(guobaApp) {
9 | super('', guobaApp)
10 | }
11 |
12 | registerRouters() {
13 | this.get('/getPermCode', this.getPermCode)
14 | this.get('/getMenuList', this.getMenuList)
15 | }
16 |
17 | // 获取用户权限
18 | async getPermCode(req) {
19 | return Result.ok({
20 | permCode: ['sa'],
21 | liteToken: this.systemService.getLiteToken(),
22 | })
23 | }
24 |
25 | async getMenuList() {
26 | let menus = await this.systemService.queryMenus()
27 | return Result.ok(menus)
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/server/controller/system/SystemController.js:
--------------------------------------------------------------------------------
1 | import {autowired, Result} from '#guoba.framework'
2 | import {ApiController} from '#guoba.platform'
3 | import {sleep} from '#guoba.utils'
4 |
5 | /**
6 | * 系统相关
7 | */
8 | export class SystemController extends ApiController {
9 |
10 | systemService = autowired('systemService')
11 |
12 | constructor(guobaApp) {
13 | super('/sys', guobaApp)
14 | }
15 |
16 | registerRouters() {
17 | this.post('/restart-guoba', this.doRestartGuoba)
18 |
19 | this.put('/fs/create-dir', this.putCreateDir)
20 | this.get('/fs/tree/root', this.getFsTreeRoot)
21 | this.get('/fs/tree/children', this.getFsTreeChildren)
22 | }
23 |
24 | async doRestartGuoba() {
25 | if (Guoba && Guoba.reload) {
26 | await Promise.any([Guoba.reload(), sleep(500)])
27 | return Result.ok({}, '锅巴重启成功~')
28 | } else {
29 | return Result.error({}, '锅巴服务异常,请手动重启!')
30 | }
31 | }
32 |
33 | async putCreateDir(req) {
34 | let {path, name} = req.body
35 | let result = await this.systemService.createDir(path, name)
36 | return Result.ok(result)
37 | }
38 |
39 | async getFsTreeRoot() {
40 | let result = await this.systemService.getFsTreeRoot()
41 | return Result.ok(result)
42 | }
43 |
44 | async getFsTreeChildren(req) {
45 | let {path} = req.query
46 | let result = await this.systemService.getFsTreeChildren(path)
47 | return Result.ok(result)
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/server/controller/system/UserController.js:
--------------------------------------------------------------------------------
1 | import {Result} from '#guoba.framework'
2 | import {ApiController} from '#guoba.platform'
3 |
4 | export class UserController extends ApiController {
5 | constructor(guobaApp) {
6 | super('/user', guobaApp)
7 | }
8 |
9 | registerRouters() {
10 | this.get('/getLoginUser', this.getLoginUser)
11 | }
12 |
13 | // 获取登录用户
14 | async getLoginUser(req) {
15 | return Result.ok({
16 | userId: Bot.uin,
17 | username: Bot.uin,
18 | realName: Bot.nickname,
19 | avatar: '',
20 | desc: '',
21 | homePath: '/home',
22 | roles: [
23 | {roleName: '超级管理员', value: 'sa'},
24 | ],
25 | })
26 | }
27 | }
--------------------------------------------------------------------------------
/server/core/ApiController.js:
--------------------------------------------------------------------------------
1 | import {RestController} from '#guoba.framework'
2 |
3 | export default class ApiController extends RestController {
4 | constructor(prefix, ...args) {
5 | prefix = prefix ? prefix : ''
6 | // noinspection JSCheckFunctionSignatures
7 | super(`/api${prefix}`, ...args)
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/server/decorator/RedisDecorator.js:
--------------------------------------------------------------------------------
1 | import {Result, Decorator} from "#guoba.framework";
2 | import {Constant} from "#guoba.platform";
3 |
4 | export default class RedisDecorator extends Decorator {
5 | constructor(cacheKey, config) {
6 | super(config)
7 | this.cacheKey = cacheKey
8 | }
9 |
10 | // TODO 待完善
11 | async execute(pjp, req, res) {
12 | // 装饰器
13 | if (!this.cacheKey) {
14 | return
15 | }
16 | let redisKey = Constant.REDIS_PREFIX + this.cacheKey
17 | // 替换 ${...}
18 | redisKey = redisKey.replace(/\${([^}]+)}/g, ($0, $1) => {
19 | let code = `(query, params, body, config) => ${$1}`
20 | return new Function(`return ${code}`)()(req.query, req.params, req.body, this.config)
21 | })
22 | let data = await redis.get(redisKey)
23 | if (data) {
24 | data = JSON.parse(data)
25 | return new Result(data.code, data.result, data.message, data.httpStatus)
26 | }
27 | let ret = await pjp.proceed()
28 | if (ret instanceof Result) {
29 | if (!ret.isOk) {
30 | return ret
31 | }
32 | }
33 | redis.set(redisKey, JSON.stringify(ret), {...this.config})
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/server/decorator/ReqDecorator.js:
--------------------------------------------------------------------------------
1 | import jwt from 'jsonwebtoken'
2 | import {Decorator, GuobaError} from '#guoba.framework'
3 | import {Constant} from '#guoba.platform'
4 |
5 | /**
6 | * 请求装饰器,解析token等操作
7 | */
8 | export default class ReqDecorator extends Decorator {
9 | constructor() {
10 | super({})
11 | }
12 |
13 | async execute(pjp, req, res) {
14 | // 从headers中获取token
15 | req.getToken = function () {
16 | return req.headers[Constant.TOKEN_KEY]
17 | }
18 | // 解码token
19 | req.decodeToken = function () {
20 | let token = req.getToken()
21 | if (token) {
22 | return jwt.decode(token)
23 | }
24 | }
25 | // TODO 获取当前登录用户信息
26 | req.getUser = function () {
27 | let token = req.getToken()
28 | if (!token) throw new GuobaError('登录态失效')
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/server/helper/listen.js:
--------------------------------------------------------------------------------
1 | import fetch from 'node-fetch'
2 | import {sleep} from '#guoba.utils'
3 | import {_paths} from '#guoba.platform'
4 |
5 | export function listen(app, port) {
6 | return new Promise((resolve, reject) => {
7 | let server = app.listen(port)
8 | // 重试次数
9 | let left = 3, num = 1
10 | // 重试间隔
11 | let duration = 1000
12 | server.on('listening', () => {
13 | resolve(server)
14 | })
15 | server.on('error', async (error) => {
16 | // 系统非监听端口操作报错
17 | if (error.code !== 'EADDRINUSE') {
18 | throw error
19 | }
20 | if (num <= left) {
21 | logger.mark(`[Guoba] 端口号 ${port} 已被占用,正在进行第 ${num++} 次重试…`)
22 | try {
23 | await Promise.race([
24 | fetch(`http://localhost:${port}${_paths.server.realMountPrefix}/api/helper/release_port`, {method: 'DELETE'}),
25 | sleep(8000),
26 | ]).catch(() => 0)
27 | await sleep(duration)
28 | } finally {
29 | server.listen(port)
30 | }
31 | } else {
32 | reject(`[Guoba] 启动失败,端口号 ${port} 被占用,请尝试关闭该端口或更换锅巴的端口号`)
33 | }
34 | })
35 | })
36 | }
37 |
--------------------------------------------------------------------------------
/server/preload/ConfigPreload.js:
--------------------------------------------------------------------------------
1 | import lodash from "lodash";
2 | import {Preload} from "#guoba.framework";
3 | import {cfg, _version, Constant, _paths} from "#guoba.platform";
4 | import {isV3, isV4, yunzaiVersion} from '#guoba.adapter'
5 |
6 | // noinspection JSUnusedGlobalSymbols
7 | export default class ConfigPreload extends Preload {
8 | constructor(app) {
9 | const preloadName = '_app.guoba.preload.js'
10 | const scriptSrc = `${_paths.server.realMountPrefix}/preload/${preloadName}`
11 | super(app, preloadName, scriptSrc);
12 | this.watchDynamicCfg()
13 | }
14 |
15 | getDynamicCfg() {
16 | return {
17 | serverICPNo: cfg.get('server.ICPNo')
18 | }
19 | }
20 |
21 | /** 监听 cfg 变化,并重新加载 */
22 | watchDynamicCfg() {
23 | this.dynamicCfg = this.getDynamicCfg()
24 | // 监听配置文件变化
25 | cfg.config.reader.watcher.on('change', () => {
26 | const current = this.getDynamicCfg()
27 | if (!lodash.isEqual(this.dynamicCfg, current)) {
28 | this.dynamicCfg = current;
29 | this.regenerate();
30 | }
31 | })
32 | }
33 |
34 | generateContent() {
35 | const content = [
36 | this.__YUNZAI_BOT_CONF__,
37 | this.__GUOBA_CONF__
38 | ]
39 | return `${content.join(';')}`;
40 | }
41 |
42 | get __YUNZAI_BOT_CONF__() {
43 | return `window["__YUNZAI_BOT_CONF__"] = ${JSON.stringify({
44 | VERSION: yunzaiVersion,
45 | GUOBA_VERSION: _version,
46 | API_PREFIX: (isV3 || isV4) ? '/v3' : '/v2',
47 | TOKEN_KEY: Constant.TOKEN_KEY,
48 | })}`
49 | }
50 |
51 | get __GUOBA_CONF__() {
52 | return `window["__GUOBA_CONF__"] = ${JSON.stringify({
53 | VERSION: _version,
54 | ICP_NO: this.dynamicCfg.serverICPNo,
55 | })}`
56 | }
57 |
58 | }
--------------------------------------------------------------------------------
/server/service/both/OicqService.js:
--------------------------------------------------------------------------------
1 | import {Service} from '#guoba.framework';
2 | import {toPairsMap} from '#guoba.utils'
3 |
4 | export class OicqService extends Service {
5 | constructor(app) {
6 | super(app)
7 | }
8 |
9 | /** 获取一个QQ用户信息 */
10 | async pickUser(userId) {
11 | userId = Number(userId) || userId
12 | const user = Bot.pickUser(userId)
13 | return {
14 | userId,
15 | simpleInfo: user.info || await user.getInfo?.() || await user.getSimpleInfo?.(),
16 | }
17 | }
18 |
19 | /** 获取一个QQ群组信息 */
20 | async pickGroup(groupId) {
21 | groupId = Number(groupId) || groupId
22 | const group = Bot.pickGroup(groupId)
23 | return {
24 | groupId,
25 | info: group.info || await group.getInfo?.(),
26 | }
27 | }
28 |
29 | getFriendList() {
30 | return toPairsMap(Bot.getFriendMap?.() || Bot.getFriendList())
31 | }
32 |
33 | getFriendCount() {
34 | return (Bot.getFriendMap?.() || Bot.getFriendList()).size
35 | }
36 |
37 | getGroupList() {
38 | return toPairsMap(Bot.getGroupMap?.() || Bot.getGroupList())
39 | }
40 |
41 | getGroupCount() {
42 | return (Bot.getGroupMap?.() || Bot.getGroupList()).size
43 | }
44 | }
--------------------------------------------------------------------------------
/server/service/both/system/model/.ignored_loader:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/service/both/system/model/.ignored_loader
--------------------------------------------------------------------------------
/server/service/both/system/model/menus/index.js:
--------------------------------------------------------------------------------
1 | import {isV2} from '#guoba.adapter'
2 |
3 | const {GI} = Guoba.createImport(import.meta.url)
4 | const {SystemMenus} = await GI('./systemMenus.js')
5 | const {usePluginsMenu} = await GI('./pluginMenus.js')
6 |
7 | // noinspection JSUnusedGlobalSymbols
8 | export async function useMenuList() {
9 | if (isV2) return useMenuListV2()
10 | const menus = []
11 | menus.push(SystemMenus.home)
12 | menus.push(SystemMenus.config)
13 | menus.push(...(await usePluginsMenu()))
14 | menus.push(SystemMenus.account)
15 | menus.push(SystemMenus.about)
16 | return menus
17 | }
18 |
19 | async function useMenuListV2() {
20 | return []
21 | }
22 |
--------------------------------------------------------------------------------
/server/service/both/system/model/menus/systemMenus.js:
--------------------------------------------------------------------------------
1 | // noinspection JSUnusedGlobalSymbols
2 | export const SystemMenus = {
3 | // 首页菜单
4 | home: {
5 | path: '/home',
6 | name: 'Home',
7 | component: '/guoba/home/index',
8 | meta: {
9 | title: '首页',
10 | icon: 'bx:bx-home',
11 | },
12 | },
13 | // 账号管理
14 | account: {
15 | path: '/account',
16 | name: 'Account',
17 | component: '/guoba/system/account/index',
18 | meta: {
19 | title: '账号管理',
20 | icon: 'ant-design:user-outlined',
21 | },
22 | },
23 | // 配置管理
24 | config: {
25 | path: '/config',
26 | name: 'Config',
27 | component: '/guoba/config/index',
28 | meta: {
29 | title: '配置管理',
30 | icon: 'ion:settings-outline',
31 | },
32 | },
33 | // 关于
34 | about: {
35 | path: '/about',
36 | name: 'about',
37 | component: '/guoba/about/index',
38 | meta: {
39 | title: '关于',
40 | icon: 'cib:about-me',
41 | },
42 | },
43 | }
--------------------------------------------------------------------------------
/server/service/both/system/model/tokens.js:
--------------------------------------------------------------------------------
1 | import {randomString} from '#guoba.utils'
2 |
3 | export const liteToken = randomString(8)
4 |
--------------------------------------------------------------------------------
/server/service/interface/IBotService.js:
--------------------------------------------------------------------------------
1 | import {Result, Service} from '#guoba.framework';
2 |
3 | export default class IBotService extends Service {
4 | constructor(app) {
5 | super(app)
6 | }
7 |
8 | /** 获取全部用户cookie */
9 | getUserCookies() {
10 | throw Result.ERR_CODE_501
11 | }
12 |
13 | }
--------------------------------------------------------------------------------
/server/service/interface/IConfigService.js:
--------------------------------------------------------------------------------
1 | import {Result, Service} from '#guoba.framework';
2 |
3 | export default class IConfigService extends Service {
4 | constructor(app) {
5 | super(app)
6 | }
7 |
8 | /**
9 | * 获取所有配置,以tabs格式返回
10 | * @return {Promise}
11 | */
12 | async getConfigTabs() {
13 | throw Result.ERR_CODE_501
14 | }
15 |
16 | /**
17 | * 获取配置数据
18 | * @param key
19 | * @return {Promise}
20 | */
21 | async getConfigData(key) {
22 | throw Result.ERR_CODE_501
23 | }
24 |
25 | /**
26 | * 设置配置数据
27 | * @param key
28 | * @param data
29 | * @return {Promise}
30 | */
31 | async setConfigData(key, data) {
32 | throw Result.ERR_CODE_501
33 | }
34 |
35 | /**
36 | * 删除卡片表单
37 | * @param formKey
38 | * @param cardKey
39 | * @return {Promise}
40 | */
41 | async removeCardForm(formKey, cardKey) {
42 | throw Result.ERR_CODE_501
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/server/service/v2/PluginService.js:
--------------------------------------------------------------------------------
1 | import path from 'path'
2 | import {_paths} from "#guoba.platform";
3 |
4 | const IPluginService = await Guoba.GID('#/service/interface/IPluginService.js')
5 |
6 | export default class PluginService extends IPluginService {
7 | constructor(app) {
8 | super(app)
9 | this.exclude = []
10 | this.pluginsPath = path.join(_paths.root, 'plugins')
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/server/service/v3/config/model/.ignored_loader:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/service/v3/config/model/.ignored_loader
--------------------------------------------------------------------------------
/server/service/v3/config/utils/.ignored_loader:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/service/v3/config/utils/.ignored_loader
--------------------------------------------------------------------------------
/server/service/v3/config/utils/ConfigUtils.js:
--------------------------------------------------------------------------------
1 | import path from 'path'
2 | import {YamlReader, GuobaError} from "#guoba.framework";
3 | import {_paths} from "#guoba.platform";
4 |
5 | export const configReader = new Map()
6 |
7 | export function getConfigReader(key, configFile) {
8 | let reader = configReader.get(key)
9 | if (!reader) {
10 | let filePath = configFile[key]
11 | if (filePath) {
12 | filePath = path.join(_paths.root, filePath)
13 | reader = new YamlReader(filePath, true)
14 | configReader.set(key, reader)
15 | } else {
16 | throw new GuobaError(`没有找到配置文件:${key}`)
17 | }
18 | }
19 | return reader
20 | }
21 |
--------------------------------------------------------------------------------
/server/service/v3/config/utils/MiaoConfigUtils.js:
--------------------------------------------------------------------------------
1 | import {YamlReader} from "#guoba.framework"
2 |
3 | export function handleConfigData(action, key, field, value) {
4 | return {field, value};
5 | }
6 |
7 | /**
8 | * 处理 group 配置
9 | */
10 | export function handleGroupConfig(action, data) {
11 | for (const key of Object.keys(data)) {
12 | if (action === 'get') {
13 | // 判断是否带 :
14 | let groupId = key
15 | if (groupId === 'default') {
16 | continue
17 | }
18 | if (typeof groupId === 'string') {
19 | if (groupId.startsWith(YamlReader.CONFIG_INTEGER_KEY)) {
20 | groupId = groupId.replace(YamlReader.CONFIG_INTEGER_KEY, '')
21 | }
22 | }
23 | groupId = Number(groupId) || String(groupId)
24 | const groupName = Bot.pickGroup(groupId)?.info?.group_name
25 | if (!groupName) {
26 | continue
27 | }
28 | data[key]['__GROUP_TIP_TEXT__'] = `${groupName} (${groupId})`
29 | } else {
30 | delete data[key]['__GROUP_TIP_TEXT__']
31 | }
32 | }
33 | return data
34 | }
35 |
--------------------------------------------------------------------------------
/server/service/v3/system/BotService.js:
--------------------------------------------------------------------------------
1 | import { MysInfo, MysUser } from '#guoba.adapter'
2 |
3 | const IBotService = await Guoba.GID('#/service/interface/IBotService.js')
4 |
5 | export class BotService extends IBotService {
6 | constructor(app) {
7 | super(app)
8 | }
9 |
10 | async getUserCookies() {
11 | return await MysInfo.getBingCkUid()
12 | }
13 |
14 | /** 获取 cookie 用户数量 */
15 | async getCookieCount() {
16 | let err
17 | // 新版获取方式(调用用户统计)
18 | try {
19 | err = null
20 | await MysInfo.initCache()
21 | const stat = await MysUser.getStatData()
22 | return stat.count.total
23 | } catch (e) {
24 | err = e
25 | }
26 | try {
27 | err = null
28 | // 旧版获取方式
29 | let cookies = await MysInfo.getBingCkUid()
30 | return cookies ? Object.keys(cookies).length : '-1'
31 | } catch (e) {
32 | err = e
33 | }
34 | if (err) {
35 | console.error(err)
36 | }
37 | return '-1'
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/server/service/v3/system/PluginService.js:
--------------------------------------------------------------------------------
1 | import path from 'path'
2 | import {_paths} from "#guoba.platform";
3 |
4 | const IPluginService = await Guoba.GID('#/service/interface/IPluginService.js')
5 |
6 | export default class PluginService extends IPluginService {
7 | constructor(app) {
8 | super(app)
9 | this.exclude = [
10 | 'example',
11 | 'genshin',
12 | 'other',
13 | 'system',
14 | ]
15 | this.pluginsPath = path.join(_paths.root, 'plugins')
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/server/static/_app.config.js:
--------------------------------------------------------------------------------
1 | window.__PRODUCTION__GUOBAPLUGINWEB__CONF__={"VITE_GLOB_APP_TITLE":"GuobaAdmin","VITE_GLOB_APP_SHORT_NAME":"GuobaPluginWeb","VITE_GLOB_API_URL":"/guoba-plugin-mock-root/api","VITE_GLOB_UPLOAD_URL":"/guoba-plugin-mock-root/upload","VITE_GLOB_API_URL_PREFIX":""};Object.freeze(window.__PRODUCTION__GUOBAPLUGINWEB__CONF__);Object.defineProperty(window,"__PRODUCTION__GUOBAPLUGINWEB__CONF__",{configurable:false,writable:false,});
--------------------------------------------------------------------------------
/server/static/assets/21ae6624.js:
--------------------------------------------------------------------------------
1 | const _imports_0="/guoba-plugin-mock-root/resource/img/21ae6624.webp";export{_imports_0 as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/ArrayForm.css:
--------------------------------------------------------------------------------
1 | .guoba-array-form,.guoba-array-form .array-box{margin-bottom:12px}.guoba-array-form .array-box .array-item{display:flex;margin-top:8px;align-items:center}.guoba-array-form .array-box .array-item .ant-btn{margin-left:8px}
2 |
--------------------------------------------------------------------------------
/server/static/assets/ArrowLeftOutlined.js:
--------------------------------------------------------------------------------
1 | import{j as createVNode,I as Icon}from"./index.js";var ArrowLeftOutlined$1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};function _objectSpread(target){for(var i=1;i(openBlock(),createBlock(unref(BasicModal),mergeProps({width:800,title:unref(t)("sys.errorLog.tableActionDesc")},_ctx.$attrs),{default:withCtx((()=>[createVNode(unref(Description),{data:__props.info,onRegister:unref(register)},null,8,["data","onRegister"])])),_:1},16,["title"]))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/DropMenuItem.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,ab as Menu,a4 as Icon,p as propTypes,A as computed,aq as getCurrentInstance,b as _export_sfc,c as resolveComponent,o as openBlock,h as createBlock,i as withCtx,E as createBaseVNode,j as createVNode,m as toDisplayString}from"./index.js";const _sfc_main=defineComponent({name:"DropdownMenuItem",components:{MenuItem:Menu.Item,Icon:Icon},props:{key:propTypes.string,text:propTypes.string,icon:propTypes.string},setup(props){const instance=getCurrentInstance();return{itemKey:computed((()=>{var _a,_b;return props.key||(null==(_b=null==(_a=null==instance?void 0:instance.vnode)?void 0:_a.props)?void 0:_b.key)}))}}}),_hoisted_1={class:"flex items-center"};const DropMenuItem=_export_sfc(_sfc_main,[["render",function(_ctx,_cache,$props,$setup,$data,$options){const _component_Icon=resolveComponent("Icon"),_component_MenuItem=resolveComponent("MenuItem");return openBlock(),createBlock(_component_MenuItem,{key:_ctx.itemKey},{default:withCtx((()=>[createBaseVNode("span",_hoisted_1,[createVNode(_component_Icon,{icon:_ctx.icon,class:"mr-1"},null,8,["icon"]),createBaseVNode("span",null,toDisplayString(_ctx.text),1)])])),_:1})}]]);export{DropMenuItem as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/DynamicInfo.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./DynamicInfo.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./data2.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/DynamicInfo.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,bk as List,c as resolveComponent,o as openBlock,h as createBlock,i as withCtx,j as createVNode,k as createTextVNode,D as unref,m as toDisplayString,E as createBaseVNode,a4 as Icon,H as mergeProps,bd as Card}from"./index.js";import{d as dynamicInfoItems}from"./data2.js";const _hoisted_1=["innerHTML"],_sfc_main=defineComponent({__name:"DynamicInfo",setup(__props){const ListItem=List.Item,ListItemMeta=List.Item.Meta;return(_ctx,_cache)=>{const _component_a_button=resolveComponent("a-button");return openBlock(),createBlock(unref(Card),mergeProps({title:"最新动态"},_ctx.$attrs),{extra:withCtx((()=>[createVNode(_component_a_button,{type:"link",size:"small"},{default:withCtx((()=>[createTextVNode("更多")])),_:1})])),default:withCtx((()=>[createVNode(unref(List),{"item-layout":"horizontal","data-source":unref(dynamicInfoItems)},{renderItem:withCtx((({item:item})=>[createVNode(unref(ListItem),null,{default:withCtx((()=>[createVNode(unref(ListItemMeta),null,{description:withCtx((()=>[createTextVNode(toDisplayString(item.date),1)])),title:withCtx((()=>[createTextVNode(toDisplayString(item.name)+" ",1),createBaseVNode("span",{innerHTML:item.desc},null,8,_hoisted_1)])),avatar:withCtx((()=>[createVNode(unref(Icon),{icon:item.avatar,size:30},null,8,["icon"])])),_:2},1024)])),_:2},1024)])),_:1},8,["data-source"])])),_:1},16)}}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/DynamicInfo.vue_vue_type_script_setup_true_lang2.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,bk as List,c as resolveComponent,o as openBlock,h as createBlock,i as withCtx,j as createVNode,k as createTextVNode,D as unref,m as toDisplayString,E as createBaseVNode,a4 as Icon,H as mergeProps,bd as Card}from"./index.js";import{d as dynamicInfoItems}from"./data3.js";const _hoisted_1=["innerHTML"],_sfc_main=defineComponent({__name:"DynamicInfo",setup(__props){const ListItem=List.Item,ListItemMeta=List.Item.Meta;return(_ctx,_cache)=>{const _component_a_button=resolveComponent("a-button");return openBlock(),createBlock(unref(Card),mergeProps({title:"最新动态"},_ctx.$attrs),{extra:withCtx((()=>[createVNode(_component_a_button,{type:"link",size:"small"},{default:withCtx((()=>[createTextVNode("更多")])),_:1})])),default:withCtx((()=>[createVNode(unref(List),{"item-layout":"horizontal","data-source":unref(dynamicInfoItems)},{renderItem:withCtx((({item:item})=>[createVNode(unref(ListItem),null,{default:withCtx((()=>[createVNode(unref(ListItemMeta),null,{description:withCtx((()=>[createTextVNode(toDisplayString(item.date),1)])),title:withCtx((()=>[createTextVNode(toDisplayString(item.name)+" ",1),createBaseVNode("span",{innerHTML:item.desc},null,8,_hoisted_1)])),avatar:withCtx((()=>[createVNode(unref(Icon),{icon:item.avatar,size:30},null,8,["icon"])])),_:2},1024)])),_:2},1024)])),_:1},8,["data-source"])])),_:1},16)}}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/DynamicInfo2.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./DynamicInfo.vue_vue_type_script_setup_true_lang2.js";import"./index.js";import"./data3.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/EasyCronInput.css:
--------------------------------------------------------------------------------
1 | .guoba-easy-cron-inner .content .ant-checkbox-wrapper+.ant-checkbox-wrapper{margin-left:0}.guoba-easy-cron-inner-config-list{text-align:left;margin:0 10px 10px}.guoba-easy-cron-inner-config-list .item{margin-top:5px;font-size:14px}.guoba-easy-cron-inner-config-list .item span{padding:0 2px}.guoba-easy-cron-inner-config-list .choice{padding:5px 8px}.guoba-easy-cron-inner-config-list .w60{width:60px;min-width:60px}.guoba-easy-cron-inner-config-list .w80{width:80px;min-width:80px}.guoba-easy-cron-inner-config-list .list{margin:0 20px}.guoba-easy-cron-inner-config-list .list-check-item{padding:1px 3px;width:4em}.guoba-easy-cron-inner-config-list .list-cn .list-check-item{width:5em}.guoba-easy-cron-inner-config-list .tip-info{color:#999}.guoba-easy-cron-inner .allow-click{cursor:pointer}.guoba-easy-cron-input,.guoba-easy-cron-input .input-row .left{width:100%}.guoba-easy-cron-input .input-row .right{width:46px}.guoba-easy-cron-input .input-row.multiple-mode{margin-bottom:8px}.guoba-easy-cron-input .input-row.multiple-mode .left{margin-right:8px;width:calc(100% - 54px)}.guoba-easy-cron-input a.open-btn{cursor:pointer}.guoba-easy-cron-input a.open-btn .app-iconify{position:relative;top:1px;right:2px}
2 |
--------------------------------------------------------------------------------
/server/static/assets/EditBodyModal.css:
--------------------------------------------------------------------------------
1 | .tip[data-v-df9d6de2]{font-size:12px;color:#888}.icon[data-v-df9d6de2]{margin:0 auto 16px;border-radius:5px;width:80px;height:80px;box-shadow:0 0 15px #f0f1f5;transition:all .2s}.icon[data-v-df9d6de2]:hover{cursor:pointer;box-shadow:0 0 15px #4ebaee}.row[data-v-df9d6de2]{padding-right:30px;padding-bottom:16px;display:flex;justify-content:flex-start;align-items:center}.row>div[data-v-df9d6de2]:first-child{width:80px;display:flex;justify-content:flex-end}.row>div[data-v-df9d6de2]:first-child:after{content:":";margin:0 6px 0 2px;position:relative;top:-.5px}
2 |
--------------------------------------------------------------------------------
/server/static/assets/EditBodyModal2.css:
--------------------------------------------------------------------------------
1 | .tip[data-v-e740d3a6]{font-size:12px;color:#888}.icon[data-v-e740d3a6]{margin:0 auto 16px;border-radius:5px;width:80px;height:80px;box-shadow:0 0 15px #f0f1f5;transition:all .2s}.icon[data-v-e740d3a6]:hover{cursor:pointer;box-shadow:0 0 15px #4ebaee}.row[data-v-e740d3a6]{padding-right:30px;padding-bottom:16px;display:flex;justify-content:flex-start;align-items:center}.row>div[data-v-e740d3a6]:first-child{width:80px;display:flex;justify-content:flex-end}.row>div[data-v-e740d3a6]:first-child:after{content:":";margin:0 6px 0 2px;position:relative;top:-.5px}.move-buttons[data-v-e740d3a6] .ant-btn.warn:not(.is-disabled){color:#fff;background:#dc9d29;border-color:#dc9d29}
2 |
--------------------------------------------------------------------------------
/server/static/assets/ErrorAction.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,a4 as Icon,as as Tooltip,ah as useRouter,be as useErrorLogStore,A as computed,aa as useI18n,fo as PageEnum,b as _export_sfc,c as resolveComponent,o as openBlock,h as createBlock,i as withCtx,j as createVNode}from"./index.js";import{B as Badge}from"./index33.js";const ErrorAction=_export_sfc(defineComponent({name:"ErrorAction",components:{Icon:Icon,Tooltip:Tooltip,Badge:Badge},setup(){const{t:t}=useI18n(),{push:push}=useRouter(),errorLogStore=useErrorLogStore();return{t:t,getCount:computed((()=>errorLogStore.getErrorLogListCount)),handleToErrorList:function(){push(PageEnum.ERROR_LOG_PAGE).then((()=>{errorLogStore.setErrorLogListCount(0)}))}}}}),[["render",function(_ctx,_cache,$props,$setup,$data,$options){const _component_Icon=resolveComponent("Icon"),_component_Badge=resolveComponent("Badge"),_component_Tooltip=resolveComponent("Tooltip");return openBlock(),createBlock(_component_Tooltip,{title:_ctx.t("layout.header.tooltipErrorLog"),placement:"bottom",mouseEnterDelay:.5,onClick:_ctx.handleToErrorList},{default:withCtx((()=>[createVNode(_component_Badge,{count:_ctx.getCount,offset:[0,10],overflowCount:99},{default:withCtx((()=>[createVNode(_component_Icon,{icon:"ion:bug-outline"})])),_:1},8,["count"])])),_:1},8,["title","onClick"])}]]);export{ErrorAction as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/Exception.css:
--------------------------------------------------------------------------------
1 | .ant-result{padding:48px 32px}.ant-result-success .ant-result-icon>.anticon{color:#55d187}.ant-result-error .ant-result-icon>.anticon{color:#ed6f6f}.ant-result-info .ant-result-icon>.anticon{color:#6495ed}.ant-result-warning .ant-result-icon>.anticon{color:#efbd47}.ant-result-image{width:250px;height:295px;margin:auto}.ant-result-icon{margin-bottom:24px;text-align:center}.ant-result-icon>.anticon{font-size:72px}.ant-result-title{color:#000000d9;font-size:24px;line-height:1.8;text-align:center}.ant-result-subtitle{color:#00000073;font-size:14px;line-height:1.6;text-align:center}.ant-result-extra{margin:24px 0 0;text-align:center}.ant-result-extra>*{margin-right:8px}.ant-result-extra>*:last-child{margin-right:0}.ant-result-content{margin-top:24px;padding:24px 40px;background-color:#fafafa}.ant-result-rtl{direction:rtl}.ant-result-rtl .ant-result-extra>*{margin-right:0;margin-left:8px}.ant-result-rtl .ant-result-extra>*:last-child{margin-left:0}.guoba-app-exception-page{display:flex;align-items:center;flex-direction:column}.guoba-app-exception-page .ant-result-icon img{max-width:400px;max-height:300px}
2 |
--------------------------------------------------------------------------------
/server/static/assets/Exception.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./Exception.vue_vue_type_style_index_0_lang.js";import"./index.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/ForgetPasswordForm.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./ForgetPasswordForm.vue_vue_type_script_setup_true_lang.js";import"./LoginFormTitle.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./index24.js";import"./useFormItem.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/FrameBlank.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,b as _export_sfc,o as openBlock,e as createElementBlock}from"./index.js";const FrameBlank=_export_sfc(defineComponent({name:"FrameBlank"}),[["render",function(_ctx,_cache,$props,$setup,$data,$options){return openBlock(),createElementBlock("div")}]]);export{FrameBlank as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/GButtons.css:
--------------------------------------------------------------------------------
1 | .guoba-g-buttons .error-tip{color:red;margin-bottom:8px}
2 |
--------------------------------------------------------------------------------
/server/static/assets/GSelectBiz.css:
--------------------------------------------------------------------------------
1 | .g-select-row .left[data-v-1ba1528e]{width:calc(100% - 90px)}.g-select-row .right[data-v-1ba1528e]{width:82px}.g-select-row .full[data-v-1ba1528e]{width:100%}.g-select-row[data-v-1ba1528e] .ant-select-search__field{display:none!important}
2 |
--------------------------------------------------------------------------------
/server/static/assets/GSelectFriend.css:
--------------------------------------------------------------------------------
1 | .j-select-row .left[data-v-8aadf2f4]{width:calc(100% - 90px)}.j-select-row .right[data-v-8aadf2f4]{width:82px}.j-select-row .full[data-v-8aadf2f4]{width:100%}.j-select-row[data-v-8aadf2f4] .ant-select-search__field{display:none!important}
2 |
--------------------------------------------------------------------------------
/server/static/assets/GSelectGroup.css:
--------------------------------------------------------------------------------
1 | .j-select-row .left[data-v-63144066]{width:calc(100% - 90px)}.j-select-row .right[data-v-63144066]{width:82px}.j-select-row .full[data-v-63144066]{width:100%}.j-select-row[data-v-63144066] .ant-select-search__field{display:none!important}
2 |
--------------------------------------------------------------------------------
/server/static/assets/GithubFilled.js:
--------------------------------------------------------------------------------
1 | import{j as createVNode,I as Icon}from"./index.js";var GithubFilled$1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"}}]},name:"github",theme:"filled"};function _objectSpread(target){for(var i=1;i{var _a,_b;const colCount=props.colCount,start=props.rowIndex*colCount,nodes=[];for(let i=0;ionClick(cell,idx)},[createVNode("span",{class:"help-icon",style:iconStyle},null),createVNode("strong",{class:"help-title"},[cell.title]),createVNode("span",{class:"help-desc"},[cell.desc])]))}else nodes.push(createVNode("div",{class:"td empty",key:cellKey},null))}return nodes}))}},render(){return createVNode("div",{class:"tr"},[this.tdNodes])}}),HelpTable=defineComponent({name:"HelpTable",props:{list:{type:Array,required:!0},colCount:{type:Number,required:!0},iconB64List:{type:Array,required:!0},modelData:{type:Object,required:!0}},emits:["open"],setup(props,{emit:emit}){function onOpen(cell,cellIndex){emit("open",cell,cellIndex)}return{trNodes:computed((()=>{const nodes=[];for(let i=0;inew Promise(((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}));import{d as defineComponent,ao as onMounted,o as openBlock,e as createElementBlock,x as defHttp}from"./index.js";const _hoisted_1={id:"load-gist"},gistUrl="https://gist.github.com/sjlei/7edba626fed9201a87b0a48b363a59f6.js",_sfc_main=defineComponent({__name:"LoadGist",setup(__props){const url="/helper/transit?url="+encodeURIComponent(gistUrl);let _resolve,mounted=new Promise((r=>_resolve=r));function load(){return __async(this,null,(function*(){let body=yield defHttp.get({url:url},{isTransformResponse:!1});if(!body)return;let lines=body.split("\n"),html=[];for(let i=0;i_resolve())),load(),(_ctx,_cache)=>(openBlock(),createElementBlock("div",_hoisted_1))}});export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/LoadGitee.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./LoadGitee.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./MarkdownViewer.vue_vue_type_script_setup_true_lang.js";import"./onMountedOrActivated.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/LoadGitee.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,r as ref,c as resolveComponent,o as openBlock,e as createElementBlock,h as createBlock,B as createCommentVNode,x as defHttp}from"./index.js";import{_ as _sfc_main$1}from"./MarkdownViewer.vue_vue_type_script_setup_true_lang.js";const _sfc_main=defineComponent({__name:"LoadGitee",setup(__props){const url="/helper/transit?url="+encodeURIComponent("https://gitee.com/guoba-yunzai/resources/raw/master/other/TODO.md");let _resolve,mounted=new Promise((r=>_resolve=r));const loading=ref(!1),readmeText=ref("");function onInitOk(){_resolve()}return function(){return __this=this,__arguments=null,generator=function*(){loading.value=!0,readmeText.value=yield defHttp.get({url:url},{isTransformResponse:!1}),yield mounted,loading.value=!1},new Promise(((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}));var __this,__arguments,generator}(),(_ctx,_cache)=>{const _component_a_skeleton=resolveComponent("a-skeleton");return openBlock(),createElementBlock("div",null,[loading.value?(openBlock(),createBlock(_component_a_skeleton,{key:0,active:""})):createCommentVNode("",!0),readmeText.value?(openBlock(),createBlock(_sfc_main$1,{key:1,value:readmeText.value,onInitOk:onInitOk},null,8,["value"])):createCommentVNode("",!0)])}}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/LockModal.css:
--------------------------------------------------------------------------------
1 | .guoba-header-lock-modal__entry{position:relative;padding:130px 30px 30px;border-radius:10px}.guoba-header-lock-modal__header{position:absolute;top:0;left:calc(50% - 45px);width:auto;text-align:center}.guoba-header-lock-modal__header-img{width:70px;border-radius:50%}.guoba-header-lock-modal__header-name{margin-top:5px}.guoba-header-lock-modal__footer{text-align:center}
2 |
--------------------------------------------------------------------------------
/server/static/assets/LockPage.css:
--------------------------------------------------------------------------------
1 | .guoba-lock-page[data-v-2e6de2fa]{z-index:3000}.guoba-lock-page__unlock[data-v-2e6de2fa]{transform:translate(-50%)}.guoba-lock-page__hour[data-v-2e6de2fa],.guoba-lock-page__minute[data-v-2e6de2fa]{display:flex;font-weight:700;color:#bababa;background-color:#141313;border-radius:30px;justify-content:center;align-items:center}@media screen and (max-width: 768px){.guoba-lock-page__hour span[data-v-2e6de2fa]:not(.meridiem),.guoba-lock-page__minute span[data-v-2e6de2fa]:not(.meridiem){font-size:160px}}@media screen and (min-width: 768px){.guoba-lock-page__hour span[data-v-2e6de2fa]:not(.meridiem),.guoba-lock-page__minute span[data-v-2e6de2fa]:not(.meridiem){font-size:160px}}@media screen and (max-width: 576px){.guoba-lock-page__hour span[data-v-2e6de2fa]:not(.meridiem),.guoba-lock-page__minute span[data-v-2e6de2fa]:not(.meridiem){font-size:90px}}@media screen and (min-width: 992px){.guoba-lock-page__hour span[data-v-2e6de2fa]:not(.meridiem),.guoba-lock-page__minute span[data-v-2e6de2fa]:not(.meridiem){font-size:220px}}@media screen and (min-width: 1200px){.guoba-lock-page__hour span[data-v-2e6de2fa]:not(.meridiem),.guoba-lock-page__minute span[data-v-2e6de2fa]:not(.meridiem){font-size:260px}}@media screen and (min-width: 1600px){.guoba-lock-page__hour span[data-v-2e6de2fa]:not(.meridiem),.guoba-lock-page__minute span[data-v-2e6de2fa]:not(.meridiem){font-size:320px}}.guoba-lock-page-entry[data-v-2e6de2fa]{position:absolute;top:0;left:0;display:flex;width:100%;height:100%;background-color:#00000080;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);justify-content:center;align-items:center}.guoba-lock-page-entry-content[data-v-2e6de2fa]{width:260px}.guoba-lock-page-entry__header[data-v-2e6de2fa]{text-align:center}.guoba-lock-page-entry__header-img[data-v-2e6de2fa]{width:70px;margin:0 auto;border-radius:50%}.guoba-lock-page-entry__header-name[data-v-2e6de2fa]{margin-top:5px;font-weight:500;color:#bababa}.guoba-lock-page-entry__err-msg[data-v-2e6de2fa]{display:inline-block;margin-top:10px;color:#ed6f6f}.guoba-lock-page-entry__footer[data-v-2e6de2fa]{display:flex;justify-content:space-between}
2 |
--------------------------------------------------------------------------------
/server/static/assets/Login.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./Login.vue_vue_type_style_index_0_lang.js";import"./index.js";import"./GuobaLoginForm.vue_vue_type_script_setup_true_lang.js";import"./common.js";import"./ForgetPasswordForm.vue_vue_type_script_setup_true_lang.js";import"./LoginFormTitle.vue_vue_type_script_setup_true_lang.js";import"./index24.js";import"./useFormItem.js";import"./RegisterForm.vue_vue_type_script_setup_true_lang.js";import"./index23.js";import"./MobileForm.vue_vue_type_script_setup_true_lang.js";import"./QrCodeForm.vue_vue_type_script_setup_true_lang.js";import"./download.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/LoginFormTitle.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./LoginFormTitle.vue_vue_type_script_setup_true_lang.js";import"./index.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/MasterLogin.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,A as computed,a5 as useUserStore,a6 as router,x as defHttp,n as nextTick,b as _export_sfc,e as createElementBlock,o as openBlock}from"./index.js";const MasterLogin=_export_sfc(defineComponent({name:"MasterLogin",setup(){let code=computed((()=>router.currentRoute.value.params.code));const userStore=useUserStore();return function(){return __this=this,__arguments=null,generator=function*(){let{ok:ok,result:result}=yield defHttp.post({url:"/login/quick",params:{code:code.value}},{retryRequest:{isOpenRetry:!1},isTransformResponse:!1});ok&&result&&result.token&&(userStore.setToken(result.token),yield nextTick()),router.replace("/login")},new Promise(((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}));var __this,__arguments,generator}(),{}}}),[["render",function(_ctx,_cache,$props,$setup,$data,$options){return openBlock(),createElementBlock("div",null," 登录中…… ")}]]);export{MasterLogin as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/MiaoHeader.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./MiaoHeader.vue_vue_type_script_setup_true_lang.js";import"./index.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/MiaoHeader.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,c as resolveComponent,o as openBlock,e as createElementBlock,E as createBaseVNode,j as createVNode,i as withCtx,k as createTextVNode}from"./index.js";const _hoisted_1={class:"lg:flex justify-between"},_hoisted_2=createBaseVNode("div",{class:"text-lg text-md m-1"},null,-1),_sfc_main=defineComponent({__name:"MiaoHeader",emits:["save","rollback","backup"],setup(__props,{emit:__emit}){const emits=__emit,save=()=>{emits("save")},rollback=()=>{emits("rollback")},backup=()=>{emits("backup")};return(_ctx,_cache)=>{const _component_a_button=resolveComponent("a-button");return openBlock(),createElementBlock("div",_hoisted_1,[_hoisted_2,createBaseVNode("div",null,[createVNode(_component_a_button,{class:"mr-2",type:"primary",preIcon:"ant-design:undo",danger:"",onClick:rollback},{default:withCtx((()=>[createTextVNode("回滚")])),_:1}),createVNode(_component_a_button,{class:"mr-2",type:"primary",preIcon:"dashicons:backup",onClick:backup},{default:withCtx((()=>[createTextVNode("备份")])),_:1}),createVNode(_component_a_button,{class:"",type:"success",preIcon:"ant-design:save",onClick:save},{default:withCtx((()=>[createTextVNode("保存")])),_:1})])])}}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/MiaoHeader.vue_vue_type_script_setup_true_lang2.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,c as resolveComponent,o as openBlock,e as createElementBlock,E as createBaseVNode,j as createVNode,i as withCtx,k as createTextVNode}from"./index.js";const _hoisted_1={class:"lg:flex justify-between"},_hoisted_2=createBaseVNode("div",{class:"text-lg text-md m-1"},null,-1),_sfc_main=defineComponent({__name:"MiaoHeader",emits:["save","rollback","backup","theme"],setup(__props,{emit:__emit}){const emit=__emit,save=()=>{emit("save")},rollback=()=>{emit("rollback")},backup=()=>{emit("backup")};function onTheme(){emit("theme")}return(_ctx,_cache)=>{const _component_a_button=resolveComponent("a-button");return openBlock(),createElementBlock("div",_hoisted_1,[_hoisted_2,createBaseVNode("div",null,[createVNode(_component_a_button,{class:"mr-2",type:"primary",preIcon:"ant-design:undo",danger:"",onClick:rollback},{default:withCtx((()=>[createTextVNode(" 回滚 ")])),_:1}),createVNode(_component_a_button,{class:"mr-2",type:"primary",preIcon:"icon-park-outline:theme",onClick:onTheme},{default:withCtx((()=>[createTextVNode(" 皮肤 ")])),_:1}),createVNode(_component_a_button,{class:"mr-2",type:"primary",preIcon:"dashicons:backup",onClick:backup},{default:withCtx((()=>[createTextVNode(" 备份 ")])),_:1}),createVNode(_component_a_button,{class:"",type:"success",preIcon:"ant-design:save",onClick:save},{default:withCtx((()=>[createTextVNode("保存")])),_:1})])])}}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/MiaoHeader2.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./MiaoHeader.vue_vue_type_script_setup_true_lang2.js";import"./index.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/MobileForm.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./MobileForm.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./index24.js";import"./useFormItem.js";import"./LoginFormTitle.vue_vue_type_script_setup_true_lang.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/ModeBox.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./ModeBox.vue_vue_type_script_setup_true_lang.js";import"./index.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/ModeBox.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,o as openBlock,e as createElementBlock,F as Fragment,f as renderList,C as normalizeClass,E as createBaseVNode,m as toDisplayString}from"./index.js";const _hoisted_1={class:"mode-box"},_hoisted_2=["onClick"],_hoisted_3={class:"title"},_hoisted_4={class:"desc"},_sfc_main=defineComponent({__name:"ModeBox",props:{active:{type:[Number,String],default:""},modeList:{type:Array,default:()=>[]},allowCancel:Boolean},emits:["update:active"],setup(__props,{emit:__emit}){const props=__props,emit=__emit;return(_ctx,_cache)=>(openBlock(),createElementBlock("div",_hoisted_1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(__props.modeList,(item=>(openBlock(),createElementBlock("div",{key:item.key,class:normalizeClass(["mode-item",{recommended:item.recommended,active:__props.active===item.key}]),onClick:$event=>function(item){item.key===props.active?props.allowCancel&&emit("update:active",""):emit("update:active",item.key)}(item)},[createBaseVNode("div",_hoisted_3,toDisplayString(item.title),1),createBaseVNode("div",_hoisted_4,toDisplayString(item.desc),1)],10,_hoisted_2)))),128))]))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/NZBZ.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/assets/NZBZ.woff
--------------------------------------------------------------------------------
/server/static/assets/PathSelect.css:
--------------------------------------------------------------------------------
1 | .file-select-input[data-v-27df1fd4]{width:100%}
2 |
--------------------------------------------------------------------------------
/server/static/assets/PluginIcon.css:
--------------------------------------------------------------------------------
1 | .guoba-g-plugin-icon-img{width:16px;height:16px;display:inline-block}
2 |
--------------------------------------------------------------------------------
/server/static/assets/PluginIcon.vue_vue_type_style_index_0_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,z as useDesign,A as computed,o as openBlock,e as createElementBlock,C as normalizeClass,D as unref,Y as normalizeStyle,h as createBlock,a4 as Icon}from"./index.js";const _hoisted_1=["src"],_sfc_main=defineComponent({__name:"PluginIcon",props:{plugin:{type:Object,required:!0},size:{type:Number,default:16}},setup(__props){const{prefixCls:prefixCls}=useDesign("g-plugin-icon"),props=__props,imgStyle=computed((()=>({width:`${props.size}px`,height:`${props.size}px`})));return(_ctx,_cache)=>__props.plugin.iconPath?(openBlock(),createElementBlock("img",{key:0,class:normalizeClass([`${unref(prefixCls)}-img`]),src:__props.plugin.iconPath,alt:"",style:normalizeStyle(imgStyle.value)},null,14,_hoisted_1)):__props.plugin.icon?(openBlock(),createBlock(unref(Icon),{key:1,icon:__props.plugin.icon,color:__props.plugin.iconColor,size:__props.size},null,8,["icon","color","size"])):(openBlock(),createBlock(unref(Icon),{key:2,icon:"clarity:plugin-line",size:__props.size},null,8,["size"]))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/PluginsCard.css:
--------------------------------------------------------------------------------
1 | .ellipsis[data-v-e3472f64]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plugin-item[data-v-e3472f64]{cursor:pointer}
2 |
--------------------------------------------------------------------------------
/server/static/assets/ProjectCard.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,bd as Card,a4 as Icon,b as _export_sfc,c as resolveComponent,o as openBlock,h as createBlock,i as withCtx,j as createVNode,k as createTextVNode,e as createElementBlock,F as Fragment,f as renderList,E as createBaseVNode,m as toDisplayString,H as mergeProps}from"./index.js";import{g as groupItems}from"./data2.js";const _sfc_main=defineComponent({components:{Card:Card,CardGrid:Card.Grid,Icon:Icon},setup:()=>({items:groupItems})}),_hoisted_1={class:"flex"},_hoisted_2={class:"text-lg ml-4"},_hoisted_3={class:"flex mt-2 h-10 text-secondary"},_hoisted_4={class:"flex justify-between text-secondary"};const ProjectCard=_export_sfc(_sfc_main,[["render",function(_ctx,_cache,$props,$setup,$data,$options){const _component_a_button=resolveComponent("a-button"),_component_Icon=resolveComponent("Icon"),_component_CardGrid=resolveComponent("CardGrid"),_component_Card=resolveComponent("Card");return openBlock(),createBlock(_component_Card,mergeProps({title:"项目"},_ctx.$attrs),{extra:withCtx((()=>[createVNode(_component_a_button,{type:"link",size:"small"},{default:withCtx((()=>[createTextVNode("更多")])),_:1})])),default:withCtx((()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.items,(item=>(openBlock(),createBlock(_component_CardGrid,{key:item,class:"!md:w-1/3 !w-full"},{default:withCtx((()=>[createBaseVNode("span",_hoisted_1,[createVNode(_component_Icon,{icon:item.icon,color:item.color,size:"30"},null,8,["icon","color"]),createBaseVNode("span",_hoisted_2,toDisplayString(item.title),1)]),createBaseVNode("div",_hoisted_3,toDisplayString(item.desc),1),createBaseVNode("div",_hoisted_4,[createBaseVNode("span",null,toDisplayString(item.group),1),createBaseVNode("span",null,toDisplayString(item.date),1)])])),_:2},1024)))),128))])),_:1},16)}]]);export{ProjectCard as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/QrCodeForm.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./QrCodeForm.vue_vue_type_script_setup_true_lang.js";import"./LoginFormTitle.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./download.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/QuickNav.css:
--------------------------------------------------------------------------------
1 | .quick-nav-item[data-v-e6dece49]{cursor:pointer;padding:0}.quick-nav-item>a[data-v-e6dece49]{padding:24px;color:#000000d9}
2 |
--------------------------------------------------------------------------------
/server/static/assets/QuickNav.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./QuickNav.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./data2.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/QuickNav.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,bd as Card,o as openBlock,h as createBlock,i as withCtx,e as createElementBlock,F as Fragment,f as renderList,D as unref,E as createBaseVNode,j as createVNode,a4 as Icon,m as toDisplayString,H as mergeProps}from"./index.js";import{n as navItems}from"./data2.js";const _hoisted_1={class:"flex flex-col items-center"},_hoisted_2={class:"text-md mt-2"},_sfc_main=defineComponent({__name:"QuickNav",setup(__props){const CardGrid=Card.Grid;return(_ctx,_cache)=>(openBlock(),createBlock(unref(Card),mergeProps({title:"快捷导航"},_ctx.$attrs),{default:withCtx((()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(navItems),(item=>(openBlock(),createBlock(unref(CardGrid),{key:item},{default:withCtx((()=>[createBaseVNode("span",_hoisted_1,[createVNode(unref(Icon),{icon:item.icon,color:item.color,size:"20"},null,8,["icon","color"]),createBaseVNode("span",_hoisted_2,toDisplayString(item.title),1)])])),_:2},1024)))),128))])),_:1},16))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/QuickNav2.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,bd as Card,c as resolveComponent,o as openBlock,h as createBlock,i as withCtx,e as createElementBlock,F as Fragment,f as renderList,D as unref,j as createVNode,a4 as Icon,E as createBaseVNode,m as toDisplayString,H as mergeProps,b as _export_sfc}from"./index.js";import{n as navItems}from"./data3.js";const _hoisted_1={class:"text-md mt-2"},QuickNav=_export_sfc(defineComponent({__name:"QuickNav",setup(__props){const CardGrid=Card.Grid;return(_ctx,_cache)=>{const _component_router_link=resolveComponent("router-link");return openBlock(),createBlock(unref(Card),mergeProps({title:"快捷导航"},_ctx.$attrs),{default:withCtx((()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(navItems),(item=>(openBlock(),createBlock(unref(CardGrid),{class:"quick-nav-item",key:item},{default:withCtx((()=>[createVNode(_component_router_link,{to:item.path,class:"flex flex-col items-center"},{default:withCtx((()=>[createVNode(unref(Icon),{icon:item.icon,color:item.color,size:"20"},null,8,["icon","color"]),createBaseVNode("span",_hoisted_1,toDisplayString(item.title),1)])),_:2},1032,["to"])])),_:2},1024)))),128))])),_:1},16)}}}),[["__scopeId","data-v-e6dece49"]]);export{QuickNav as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/RedoOutlined.js:
--------------------------------------------------------------------------------
1 | import{j as createVNode,I as Icon}from"./index.js";var RedoOutlined$1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"}}]},name:"redo",theme:"outlined"};function _objectSpread(target){for(var i=1;iprops.loading),(()=>{props.loading||setOptions({legend:{bottom:0,data:["Visits","Sales"]},tooltip:{},radar:{radius:"60%",splitNumber:8,indicator:[{name:"2017"},{name:"2017"},{name:"2018"},{name:"2019"},{name:"2020"},{name:"2021"}]},series:[{type:"radar",symbolSize:0,areaStyle:{shadowBlur:0,shadowColor:"rgba(0,0,0,.2)",shadowOffsetX:0,shadowOffsetY:10,opacity:1},data:[{value:[90,50,86,40,50,20],name:"Visits",itemStyle:{color:"#b6a2de"}},{value:[70,75,70,76,20,85],name:"Sales",itemStyle:{color:"#67e0e3"}}]}]})}),{immediate:!0}),(_ctx,_cache)=>(openBlock(),createBlock(unref(Card),{title:"销售统计",loading:__props.loading},{default:withCtx((()=>[createBaseVNode("div",{ref_key:"chartRef",ref:chartRef,style:normalizeStyle({width:__props.width,height:__props.height})},null,4)])),_:1},8,["loading"]))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/SaleRadar.vue_vue_type_style_index_0_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,r as ref,A as computed,c as resolveComponent,o as openBlock,h as createBlock,i as withCtx,j as createVNode,E as createBaseVNode,Y as normalizeStyle,D as unref,bd as Card,x as defHttp}from"./index.js";const _sfc_main=defineComponent({__name:"SaleRadar",setup(__props){const imgSrc=ref(""),loading=ref(!1),imgHeight=ref(500),divStyle=computed((()=>{let style={};return style.backgroundImage=`url(${imgSrc.value})`,style.height=`${imgHeight.value}px`,style}));return function(){return __this=this,__arguments=null,generator=function*(){try{loading.value=!0;let res=yield defHttp.get({url:"/home/random-image",responseType:"blob"},{isTransformResponse:!1,isReturnNativeResponse:!0}),img=new Image;imgSrc.value=URL.createObjectURL(res.data),img.src=imgSrc.value,yield new Promise((resolve=>img.onload=resolve)),imgHeight.value=500}finally{loading.value=!1}},new Promise(((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}));var __this,__arguments,generator}(),(_ctx,_cache)=>{const _component_a_spin=resolveComponent("a-spin");return openBlock(),createBlock(unref(Card),{class:"random-iamge-card",title:"随机美图",style:{"min-height":"300px"}},{default:withCtx((()=>[createVNode(_component_a_spin,{spinning:loading.value,style:{"min-height":"150px"}},{default:withCtx((()=>[createBaseVNode("div",{class:"img",style:normalizeStyle(divStyle.value)},null,4)])),_:1},8,["spinning"])])),_:1})}}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/SaleRadar2.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./SaleRadar.vue_vue_type_style_index_0_lang.js";import"./index.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/SalesProductPie.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./SalesProductPie.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./useECharts.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/SalesProductPie.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,r as ref,w as watch,o as openBlock,h as createBlock,i as withCtx,E as createBaseVNode,Y as normalizeStyle,D as unref,bd as Card}from"./index.js";import{u as useECharts}from"./useECharts.js";const _sfc_main=defineComponent({__name:"SalesProductPie",props:{loading:Boolean,width:{type:String,default:"100%"},height:{type:String,default:"300px"}},setup(__props){const props=__props,chartRef=ref(null),{setOptions:setOptions}=useECharts(chartRef);return watch((()=>props.loading),(()=>{props.loading||setOptions({tooltip:{trigger:"item"},series:[{name:"访问来源",type:"pie",radius:"80%",center:["50%","50%"],color:["#5ab1ef","#b6a2de","#67e0e3","#2ec7c9"],data:[{value:500,name:"电子产品"},{value:310,name:"服装"},{value:274,name:"化妆品"},{value:400,name:"家居"}].sort((function(a,b){return a.value-b.value})),roseType:"radius",animationType:"scale",animationEasing:"exponentialInOut",animationDelay:function(){return 400*Math.random()}}]})}),{immediate:!0}),(_ctx,_cache)=>(openBlock(),createBlock(unref(Card),{title:"成交占比",loading:__props.loading},{default:withCtx((()=>[createBaseVNode("div",{ref_key:"chartRef",ref:chartRef,style:normalizeStyle({width:__props.width,height:__props.height})},null,4)])),_:1},8,["loading"]))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/SelectIconModal.css:
--------------------------------------------------------------------------------
1 | .add-icon[data-v-4754d4fb]{flex-grow:1;display:flex;flex-direction:row-reverse}.tip[data-v-4754d4fb]{font-size:12px;color:#888}.icon-view-wrap[data-v-4754d4fb]{width:410px;max-width:calc(100vw - 52px);margin:10px;z-index:100}.icon-view[data-v-4754d4fb]{display:flex;justify-content:left;flex-wrap:wrap;align-items:center}.medium-icon[data-v-4754d4fb],.edit-icon[data-v-4754d4fb]{width:40px;height:40px;display:block;border-radius:5px;cursor:pointer;transition:all .2s}.edit-icon[data-v-4754d4fb]{box-shadow:2px 2px 8px -4px #4ebaee}.medium-icon[data-v-4754d4fb]:hover{transform:scale(1.1);box-shadow:0 0 10px #4ebaee}.edit-icon[data-v-4754d4fb]:hover{transform:scale(1.1);box-shadow:0 0 10px red}
2 |
--------------------------------------------------------------------------------
/server/static/assets/SelectIconModal2.css:
--------------------------------------------------------------------------------
1 | .add-icon[data-v-93ef1b23]{flex-grow:1;display:flex;flex-direction:row-reverse}.tip[data-v-93ef1b23]{font-size:12px;color:#888}.icon-view-wrap[data-v-93ef1b23]{width:410px;max-width:calc(100vw - 52px);margin:10px;z-index:100}.icon-view[data-v-93ef1b23]{display:flex;justify-content:left;flex-wrap:wrap;align-items:center}.medium-icon[data-v-93ef1b23],.edit-icon[data-v-93ef1b23]{width:40px;height:40px;display:block;border-radius:5px;cursor:pointer;transition:all .2s}.edit-icon[data-v-93ef1b23]{box-shadow:2px 2px 8px -4px #4ebaee}.medium-icon[data-v-93ef1b23]:hover{transform:scale(1.1);box-shadow:0 0 10px #4ebaee}.edit-icon[data-v-93ef1b23]:hover{transform:scale(1.1);box-shadow:0 0 10px red}
2 |
--------------------------------------------------------------------------------
/server/static/assets/SelectItem.css:
--------------------------------------------------------------------------------
1 | .guoba-setting-select-item[data-v-7ddad110]{display:flex;justify-content:space-between;margin:16px 0}.guoba-setting-select-item-select[data-v-7ddad110]{width:126px}
2 |
--------------------------------------------------------------------------------
/server/static/assets/SelectItem.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,bU as Select,z as useDesign,A as computed,b as _export_sfc,c as resolveComponent,o as openBlock,e as createElementBlock,E as createBaseVNode,m as toDisplayString,j as createVNode,H as mergeProps,C as normalizeClass}from"./index.js";import{b as baseHandler}from"./index36.js";import"./index35.js";import"./index29.js";import"./ArrowLeftOutlined.js";import"./index2.js";import"./PluginIcon.vue_vue_type_style_index_0_lang.js";import"./FullscreenOutlined.js";import"./index17.js";import"./useWindowSizeFn.js";import"./useContentViewHeight.js";import"./uniqBy.js";import"./RedoOutlined.js";import"./lock.js";const SelectItem=_export_sfc(defineComponent({name:"SelectItem",components:{Select:Select},props:{event:{type:Number},disabled:{type:Boolean},title:{type:String},def:{type:[String,Number]},initValue:{type:[String,Number]},options:{type:Array,default:()=>[]}},setup(props){const{prefixCls:prefixCls}=useDesign("setting-select-item");return{prefixCls:prefixCls,handleChange:function(e){props.event&&baseHandler(props.event,e)},getBindValue:computed((()=>props.def?{value:props.def,defaultValue:props.initValue||props.def}:{}))}}}),[["render",function(_ctx,_cache,$props,$setup,$data,$options){const _component_Select=resolveComponent("Select");return openBlock(),createElementBlock("div",{class:normalizeClass(_ctx.prefixCls)},[createBaseVNode("span",null,toDisplayString(_ctx.title),1),createVNode(_component_Select,mergeProps(_ctx.getBindValue,{class:`${_ctx.prefixCls}-select`,onChange:_ctx.handleChange,disabled:_ctx.disabled,size:"small",options:_ctx.options}),null,16,["class","onChange","disabled","options"])],2)}],["__scopeId","data-v-7ddad110"]]);export{SelectItem as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/SessionTimeoutLogin.css:
--------------------------------------------------------------------------------
1 | .guoba-st-login[data-v-7566bb4f]{position:fixed;z-index:9999999;width:100%;height:100%;background:#fff}
2 |
--------------------------------------------------------------------------------
/server/static/assets/SessionTimeoutLogin.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,z as useDesign,a5 as useUserStore,aC as usePermissionStore,aO as useAppStore,r as ref,ao as onMounted,cj as onBeforeUnmount,o as openBlock,h as createBlock,i as withCtx,E as createBaseVNode,j as createVNode,C as normalizeClass,D as unref,aW as Transition,g6 as PermissionModeEnum,b as _export_sfc}from"./index.js";import{_ as _sfc_main$1}from"./Login.vue_vue_type_style_index_0_lang.js";import"./GuobaLoginForm.vue_vue_type_script_setup_true_lang.js";import"./common.js";import"./ForgetPasswordForm.vue_vue_type_script_setup_true_lang.js";import"./LoginFormTitle.vue_vue_type_script_setup_true_lang.js";import"./index24.js";import"./useFormItem.js";import"./RegisterForm.vue_vue_type_script_setup_true_lang.js";import"./index23.js";import"./MobileForm.vue_vue_type_script_setup_true_lang.js";import"./QrCodeForm.vue_vue_type_script_setup_true_lang.js";import"./download.js";const SessionTimeoutLogin=_export_sfc(defineComponent({__name:"SessionTimeoutLogin",setup(__props){const{prefixCls:prefixCls}=useDesign("st-login"),userStore=useUserStore(),permissionStore=usePermissionStore(),appStore=useAppStore(),userId=ref(0);return onMounted((()=>{var _a;userId.value=null==(_a=userStore.getUserInfo)?void 0:_a.userId,console.log("Mounted",userStore.getUserInfo)})),onBeforeUnmount((()=>{(userId.value&&userId.value!==userStore.getUserInfo.userId||appStore.getProjectConfig.permissionMode===PermissionModeEnum.BACK&&0===permissionStore.getLastBuildMenuTime)&&document.location.reload()})),(_ctx,_cache)=>(openBlock(),createBlock(Transition,null,{default:withCtx((()=>[createBaseVNode("div",{class:normalizeClass(unref(prefixCls))},[createVNode(_sfc_main$1,{sessionTimeout:""})],2)])),_:1}))}}),[["__scopeId","data-v-7566bb4f"]]);export{SessionTimeoutLogin as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/SettingDrawer.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./SettingDrawer.vue_vue_type_script_setup_true_lang.js";import"./BasicForm.js";import"./index.js";import"./BasicForm.vue_vue_type_style_index_0_lang.js";import"./index21.js";import"./index22.js";import"./useFormItem.js";/* empty css */import"./DeleteOutlined.js";import"./transButton.js";import"./index19.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";import"./upperFirst.js";import"./download.js";import"./index23.js";import"./index24.js";import"./uniqBy.js";import"./index35.js";import"./index29.js";import"./ArrowLeftOutlined.js";import"./miao.data.js";import"./lodash.default.js";import"./throttle.js";import"./merge.js";import"./ThemeConfigForm.vue_vue_type_script_setup_true_lang.js";import"./miao.api.js";import"./base64Conver.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/SettingFooter.css:
--------------------------------------------------------------------------------
1 | .guoba-setting-footer[data-v-27b3c6cc]{display:flex;flex-direction:column;align-items:center}
2 |
--------------------------------------------------------------------------------
/server/static/assets/SiderTrigger.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,gf as DoubleRightOutlined,gg as DoubleLeftOutlined,ac as useMenuSetting,b as _export_sfc,c as resolveComponent,o as openBlock,e as createElementBlock,h as createBlock,at as withModifiers}from"./index.js";const SiderTrigger=_export_sfc(defineComponent({name:"SiderTrigger",components:{DoubleRightOutlined:DoubleRightOutlined,DoubleLeftOutlined:DoubleLeftOutlined},setup(){const{getCollapsed:getCollapsed,toggleCollapsed:toggleCollapsed}=useMenuSetting();return{getCollapsed:getCollapsed,toggleCollapsed:toggleCollapsed}}}),[["render",function(_ctx,_cache,$props,$setup,$data,$options){const _component_DoubleRightOutlined=resolveComponent("DoubleRightOutlined"),_component_DoubleLeftOutlined=resolveComponent("DoubleLeftOutlined");return openBlock(),createElementBlock("div",{onClick:_cache[0]||(_cache[0]=withModifiers(((...args)=>_ctx.toggleCollapsed&&_ctx.toggleCollapsed(...args)),["stop"]))},[_ctx.getCollapsed?(openBlock(),createBlock(_component_DoubleRightOutlined,{key:0})):(openBlock(),createBlock(_component_DoubleLeftOutlined,{key:1}))])}]]);export{SiderTrigger as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/SiteAnalysis.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./SiteAnalysis.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./VisitAnalysis.vue_vue_type_script_setup_true_lang.js";import"./useECharts.js";import"./props.js";import"./VisitAnalysisBar.vue_vue_type_script_setup_true_lang.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/SiteAnalysis.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,r as ref,o as openBlock,h as createBlock,i as withCtx,e as createElementBlock,j as createVNode,B as createCommentVNode,H as mergeProps,D as unref,bd as Card}from"./index.js";import{_ as _sfc_main$1}from"./VisitAnalysis.vue_vue_type_script_setup_true_lang.js";import{_ as _sfc_main$2}from"./VisitAnalysisBar.vue_vue_type_script_setup_true_lang.js";const _hoisted_1={key:0},_hoisted_2={key:1},_sfc_main=defineComponent({__name:"SiteAnalysis",setup(__props){const activeKey=ref("tab1"),tabListTitle=[{key:"tab1",tab:"流量趋势"},{key:"tab2",tab:"访问量"}];function onTabChange(key){activeKey.value=key}return(_ctx,_cache)=>(openBlock(),createBlock(unref(Card),mergeProps({"tab-list":tabListTitle},_ctx.$attrs,{"active-tab-key":activeKey.value,onTabChange:onTabChange}),{default:withCtx((()=>["tab1"===activeKey.value?(openBlock(),createElementBlock("p",_hoisted_1,[createVNode(_sfc_main$1)])):createCommentVNode("",!0),"tab2"===activeKey.value?(openBlock(),createElementBlock("p",_hoisted_2,[createVNode(_sfc_main$2)])):createCommentVNode("",!0)])),_:1},16,["active-tab-key"]))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/Step1-1.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./Step1-1.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./hooks.js";import"./BasicForm.vue_vue_type_style_index_0_lang.js";import"./index21.js";import"./index22.js";import"./useFormItem.js";/* empty css */import"./DeleteOutlined.js";import"./transButton.js";import"./index19.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";import"./upperFirst.js";import"./download.js";import"./index23.js";import"./index24.js";import"./lodash.default.js";import"./throttle.js";import"./merge.js";import"./uniqBy.js";/* empty css */import"./ModeBox.vue_vue_type_script_setup_true_lang.js";import"./StepBtn.vue_vue_type_script_setup_true_lang.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/Step1-2.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./Step1-2.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./hooks.js";import"./BasicForm.vue_vue_type_style_index_0_lang.js";import"./index21.js";import"./index22.js";import"./useFormItem.js";/* empty css */import"./DeleteOutlined.js";import"./transButton.js";import"./index19.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";import"./upperFirst.js";import"./download.js";import"./index23.js";import"./index24.js";import"./lodash.default.js";import"./throttle.js";import"./merge.js";import"./uniqBy.js";import"./ModeBox.vue_vue_type_script_setup_true_lang.js";import"./StepBtn.vue_vue_type_script_setup_true_lang.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/Step1-2.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,a as reactive,o as openBlock,e as createElementBlock,j as createVNode,i as withCtx,D as unref,aW as Transition,dk as TransitionGroup,E as createBaseVNode}from"./index.js";import{a as useStep}from"./hooks.js";import{_ as _sfc_main$1}from"./ModeBox.vue_vue_type_script_setup_true_lang.js";import{_ as _sfc_main$2}from"./StepBtn.vue_vue_type_script_setup_true_lang.js";const _hoisted_1={class:"step-box"},_hoisted_2=createBaseVNode("div",{class:"step-tip"},"请选择迁移模式",-1),_hoisted_3={key:0,class:"s-tip"},_hoisted_5=[createBaseVNode("span",null,"全量迁移会完整复制“data”文件夹,以及redis中用户uid的绑定关系。",-1)],_hoisted_6={key:1,class:"s-tip"},_hoisted_9=[createBaseVNode("span",{style:{color:"red"}},"[不推荐] ",-1),createBaseVNode("span",null," 选择迁移可选择迁移哪些项目。由于plugin可能会将数据存放到data文件夹, 如果使用选择迁移,锅巴无法考虑到所有插件,极有可能导致数据丢失! ",-1)],_hoisted_10={key:2},_sfc_main=defineComponent({__name:"Step1-2",emits:["prev","next"],setup(__props,{emit:__emit}){const emit=__emit,[onStepBtnRegister,{models:models}]=useStep({},{emit:emit}),modeList=reactive({mode:[{key:"full",title:"全量迁移",desc:"完整复制“data”文件夹",recommended:!0},{key:"choose",title:"选择迁移",desc:"选择要迁移的项目"}]});return(_ctx,_cache)=>(openBlock(),createElementBlock("div",_hoisted_1,[_hoisted_2,createVNode(TransitionGroup,{name:"fade-slide",mode:"out-in",appear:""},{default:withCtx((()=>[createVNode(_sfc_main$1,{active:unref(models).mode,"onUpdate:active":_cache[0]||(_cache[0]=$event=>unref(models).mode=$event),modeList:modeList.mode,key:"trans-mode"},null,8,["active","modeList"]),createVNode(Transition,{name:"fade-slide",mode:"out-in",appear:"",key:"trans-1"},{default:withCtx((()=>["full"===unref(models).mode?(openBlock(),createElementBlock("div",_hoisted_3,_hoisted_5)):"choose"===unref(models).mode?(openBlock(),createElementBlock("div",_hoisted_6,_hoisted_9)):(openBlock(),createElementBlock("span",_hoisted_10))])),_:1})])),_:1}),createVNode(_sfc_main$2,{onRegister:unref(onStepBtnRegister)},null,8,["onRegister"])]))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/Step1-3.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./Step1-3.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./BasicForm.js";import"./BasicForm.vue_vue_type_style_index_0_lang.js";import"./index21.js";import"./index22.js";import"./useFormItem.js";/* empty css */import"./DeleteOutlined.js";import"./transButton.js";import"./index19.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";import"./upperFirst.js";import"./download.js";import"./index23.js";import"./index24.js";import"./uniqBy.js";import"./hooks.js";import"./lodash.default.js";import"./throttle.js";import"./merge.js";import"./StepBtn.vue_vue_type_script_setup_true_lang.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/Step1-4.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./Step1-4.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./BasicForm.js";import"./BasicForm.vue_vue_type_style_index_0_lang.js";import"./index21.js";import"./index22.js";import"./useFormItem.js";/* empty css */import"./DeleteOutlined.js";import"./transButton.js";import"./index19.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";import"./upperFirst.js";import"./download.js";import"./index23.js";import"./index24.js";import"./uniqBy.js";import"./hooks.js";import"./lodash.default.js";import"./throttle.js";import"./merge.js";import"./StepBtn.vue_vue_type_script_setup_true_lang.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/Step1.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./Step1.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./hooks.js";import"./BasicForm.vue_vue_type_style_index_0_lang.js";import"./index21.js";import"./index22.js";import"./useFormItem.js";/* empty css */import"./DeleteOutlined.js";import"./transButton.js";import"./index19.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";import"./upperFirst.js";import"./download.js";import"./index23.js";import"./index24.js";import"./lodash.default.js";import"./throttle.js";import"./merge.js";import"./uniqBy.js";import"./Step1-1.vue_vue_type_script_setup_true_lang.js";/* empty css */import"./ModeBox.vue_vue_type_script_setup_true_lang.js";import"./StepBtn.vue_vue_type_script_setup_true_lang.js";import"./Step1-2.vue_vue_type_script_setup_true_lang.js";import"./Step1-3.vue_vue_type_script_setup_true_lang.js";import"./BasicForm.js";import"./Step1-4.vue_vue_type_script_setup_true_lang.js";import"./common.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/Step2.css:
--------------------------------------------------------------------------------
1 | .footer-btn .ant-btn[data-v-3c2d06c4]{padding:0}
2 |
--------------------------------------------------------------------------------
/server/static/assets/StepBtn.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./StepBtn.vue_vue_type_script_setup_true_lang.js";import"./lodash.default.js";import"./index.js";import"./upperFirst.js";import"./throttle.js";import"./merge.js";import"./uniqBy.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/StepBtn.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{l as lodash}from"./lodash.default.js";import{d as defineComponent,a as reactive,A as computed,c as resolveComponent,o as openBlock,h as createBlock,i as withCtx,j as createVNode,E as createBaseVNode,m as toDisplayString}from"./index.js";const _sfc_main=defineComponent({__name:"StepBtn",props:{prevBtn:Object,nextBtn:Object},emits:["register"],setup(__props,{emit:__emit}){const props=__props,emit=__emit,innerProps=reactive({prevBtn:{text:"上一步"},nextBtn:{text:"下一步"}}),getProps=computed((()=>lodash.merge({},props,innerProps)));function onClickCommon(btnName){let item=getProps.value[btnName];"function"==typeof(null==item?void 0:item.onClick)&&item.onClick()}return emit("register",{setProps:function(props2){lodash.merge(innerProps,props2)}}),(_ctx,_cache)=>{const _component_a_button=resolveComponent("a-button"),_component_a_space=resolveComponent("a-space");return openBlock(),createBlock(_component_a_space,{class:"step-action"},{default:withCtx((()=>[createVNode(_component_a_button,{preIcon:"ant-design:arrow-left",disabled:getProps.value.prevBtn.disabled,onClick:_cache[0]||(_cache[0]=()=>onClickCommon("prevBtn"))},{default:withCtx((()=>[createBaseVNode("span",null,toDisplayString(getProps.value.prevBtn.text),1)])),_:1},8,["disabled"]),createVNode(_component_a_button,{type:"primary",postIcon:"ant-design:arrow-right",disabled:getProps.value.nextBtn.disabled,onClick:_cache[1]||(_cache[1]=()=>onClickCommon("nextBtn"))},{default:withCtx((()=>[createBaseVNode("span",null,toDisplayString(getProps.value.nextBtn.text),1)])),_:1},8,["disabled"])])),_:1})}}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/SubForm.css:
--------------------------------------------------------------------------------
1 | .guoba-g-sub-form-card{padding:10px;width:100%;margin:0 0 10px;position:relative;border-radius:3px;background-color:#fff;cursor:pointer;border:1px transparent solid;box-shadow:#0000001f 0 1px 4px,#0000001f 0 0 2px}.guoba-g-sub-form-card:hover{background-color:#f5f7fa}.guoba-g-sub-form-card:hover .remove{display:block}.guoba-g-sub-form-card .card-item{display:flex;flex-direction:row;font-size:12px;line-height:28px}.guoba-g-sub-form-card .card-item .label{max-width:160px;color:#9e9e9e;padding-right:1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guoba-g-sub-form-card .card-item .value{flex:1 1 0;height:28px;overflow:hidden;white-space:nowrap}.guoba-g-sub-form-card .remove{position:absolute;top:-10px;right:-8px;color:#9e9e9e;font-size:18px;cursor:pointer;display:none}.guoba-g-sub-form-card .remove:hover{color:#bfbfbf}.guoba-g-sub-form .multiple-mode,.guoba-g-sub-form .multiple-mode .ant-input{cursor:pointer}
2 |
--------------------------------------------------------------------------------
/server/static/assets/SwitchItem.css:
--------------------------------------------------------------------------------
1 | .guoba-setting-switch-item[data-v-6a9c2d6c]{display:flex;justify-content:space-between;margin:16px 0}
2 |
--------------------------------------------------------------------------------
/server/static/assets/SwitchItem.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,z as useDesign,A as computed,aa as useI18n,b as _export_sfc,c as resolveComponent,o as openBlock,e as createElementBlock,E as createBaseVNode,m as toDisplayString,j as createVNode,H as mergeProps,C as normalizeClass}from"./index.js";import{S as Switch}from"./index22.js";import{b as baseHandler}from"./index36.js";import"./index35.js";import"./index29.js";import"./ArrowLeftOutlined.js";import"./index2.js";import"./PluginIcon.vue_vue_type_style_index_0_lang.js";import"./FullscreenOutlined.js";import"./index17.js";import"./useWindowSizeFn.js";import"./useContentViewHeight.js";import"./uniqBy.js";import"./RedoOutlined.js";import"./lock.js";const SwitchItem=_export_sfc(defineComponent({name:"SwitchItem",components:{Switch:Switch},props:{event:{type:Number},disabled:{type:Boolean},title:{type:String},def:{type:Boolean}},setup(props){const{prefixCls:prefixCls}=useDesign("setting-switch-item"),{t:t}=useI18n();return{prefixCls:prefixCls,t:t,handleChange:function(e){props.event&&baseHandler(props.event,e)},getBindValue:computed((()=>props.def?{checked:props.def}:{}))}}}),[["render",function(_ctx,_cache,$props,$setup,$data,$options){const _component_Switch=resolveComponent("Switch");return openBlock(),createElementBlock("div",{class:normalizeClass(_ctx.prefixCls)},[createBaseVNode("span",null,toDisplayString(_ctx.title),1),createVNode(_component_Switch,mergeProps(_ctx.getBindValue,{onChange:_ctx.handleChange,disabled:_ctx.disabled,checkedChildren:_ctx.t("layout.setting.on"),unCheckedChildren:_ctx.t("layout.setting.off")}),null,16,["onChange","disabled","checkedChildren","unCheckedChildren"])],2)}],["__scopeId","data-v-6a9c2d6c"]]);export{SwitchItem as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/TableBatchDropdown.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./TableBatchDropdown.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./DeleteOutlined.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/TableBatchDropdown.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,c as resolveComponent,o as openBlock,e as createElementBlock,E as createBaseVNode,m as toDisplayString,F as Fragment,j as createVNode,i as withCtx,k as createTextVNode,D as unref,ab as Menu,db as DownOutlined,dc as Dropdown,B as createCommentVNode}from"./index.js";import{D as DeleteOutlined}from"./DeleteOutlined.js";const _sfc_main=defineComponent({__name:"TableBatchDropdown",props:{text:{type:String,default:""},showBatch:{type:Boolean,default:!1}},emits:["clear","menuClick"],setup(__props,{emit:__emit}){const emit=__emit;return(_ctx,_cache)=>{const _component_a_button=resolveComponent("a-button");return openBlock(),createElementBlock("div",null,[createBaseVNode("span",null,toDisplayString(__props.text),1),__props.showBatch?(openBlock(),createElementBlock(Fragment,{key:0},[createVNode(_component_a_button,{type:"link",onClick:_cache[0]||(_cache[0]=()=>emit("clear"))},{default:withCtx((()=>[createTextVNode(" 取消选择")])),_:1}),createVNode(unref(Dropdown),null,{overlay:withCtx((()=>[createVNode(unref(Menu),{onClick:_cache[1]||(_cache[1]=e=>emit("menuClick",e))},{default:withCtx((()=>[createVNode(unref(Menu).Item,{key:"uninstall-batch"},{default:withCtx((()=>[createVNode(unref(DeleteOutlined)),createTextVNode(" 批量卸载 ")])),_:1})])),_:1})])),default:withCtx((()=>[createVNode(_component_a_button,{type:"link",class:"ant-dropdown-link"},{default:withCtx((()=>[createTextVNode(" 批量操作 "),createVNode(unref(DownOutlined))])),_:1})])),_:1})],64)):createCommentVNode("",!0)])}}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/TermsOfService.css:
--------------------------------------------------------------------------------
1 | .footer[data-v-76fbeecc]{text-align:center;border-top:1px solid #e0e0e0;padding:8px 0}.terms-box[data-v-76fbeecc]{max-height:600px;overflow-y:auto;padding:12px}@media screen and (max-width: 768px){.terms-box[data-v-76fbeecc]{max-height:calc(100% - 48px)}}.terms-box p[data-v-76fbeecc]{text-indent:2em}.terms-box h2[data-v-76fbeecc]{display:block;font-size:1.5em;margin-block-start:.83em;margin-block-end:.83em;margin-inline-start:0px;margin-inline-end:0px;font-weight:700}.terms-box h3[data-v-76fbeecc]{display:block;font-size:1.17em;margin-block-start:1em;margin-block-end:1em;margin-inline-start:0px;margin-inline-end:0px;font-weight:700}.terms-box h4[data-v-76fbeecc]{display:block;margin-block-start:1.33em;margin-block-end:1.33em;margin-inline-start:0px;margin-inline-end:0px;font-weight:700}.terms-box ol[data-v-76fbeecc]{display:block;list-style-type:decimal;margin-block-start:1em;margin-block-end:1em;margin-inline-start:0px;margin-inline-end:0px;padding-inline-start:40px}.terms-box ul[data-v-76fbeecc]{display:block;list-style-type:disc;margin-block-start:1em;margin-block-end:1em;margin-inline-start:0px;margin-inline-end:0px;padding-inline-start:40px}
2 |
--------------------------------------------------------------------------------
/server/static/assets/ThemeColorPicker.css:
--------------------------------------------------------------------------------
1 | .guoba-setting-theme-picker{display:flex;flex-wrap:wrap;margin:16px 0;justify-content:space-around}.guoba-setting-theme-picker__item{width:20px;height:20px;cursor:pointer;border:1px solid #ddd;border-radius:2px}.guoba-setting-theme-picker__item svg{display:none}.guoba-setting-theme-picker__item--active{border:1px solid #92b4f2}.guoba-setting-theme-picker__item--active svg{display:inline-block;margin:0 0 3px 3px;font-size:12px;fill:#fff!important}
2 |
--------------------------------------------------------------------------------
/server/static/assets/ThemeColorPicker.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,cY as CheckOutlined,z as useDesign,b as _export_sfc,c as resolveComponent,o as openBlock,e as createElementBlock,F as Fragment,f as renderList,C as normalizeClass,Y as normalizeStyle,j as createVNode}from"./index.js";import{b as baseHandler}from"./index36.js";import"./index35.js";import"./index29.js";import"./ArrowLeftOutlined.js";import"./index2.js";import"./PluginIcon.vue_vue_type_style_index_0_lang.js";import"./FullscreenOutlined.js";import"./index17.js";import"./useWindowSizeFn.js";import"./useContentViewHeight.js";import"./uniqBy.js";import"./RedoOutlined.js";import"./lock.js";const _sfc_main=defineComponent({name:"ThemeColorPicker",components:{CheckOutlined:CheckOutlined},props:{colorList:{type:Array,defualt:[]},event:{type:Number},def:{type:String}},setup(props){const{prefixCls:prefixCls}=useDesign("setting-theme-picker");return{prefixCls:prefixCls,handleClick:function(color){props.event&&baseHandler(props.event,color)}}}}),_hoisted_1=["onClick"];const ThemeColorPicker=_export_sfc(_sfc_main,[["render",function(_ctx,_cache,$props,$setup,$data,$options){const _component_CheckOutlined=resolveComponent("CheckOutlined");return openBlock(),createElementBlock("div",{class:normalizeClass(_ctx.prefixCls)},[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.colorList||[],(color=>(openBlock(),createElementBlock("span",{key:color,onClick:$event=>_ctx.handleClick(color),class:normalizeClass([`${_ctx.prefixCls}__item`,{[`${_ctx.prefixCls}__item--active`]:_ctx.def===color}]),style:normalizeStyle({background:color})},[createVNode(_component_CheckOutlined)],14,_hoisted_1)))),128))],2)}]]);export{ThemeColorPicker as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/ThemeConfigForm.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./ThemeConfigForm.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./BasicForm.js";import"./BasicForm.vue_vue_type_style_index_0_lang.js";import"./index21.js";import"./index22.js";import"./useFormItem.js";/* empty css */import"./DeleteOutlined.js";import"./transButton.js";import"./index19.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";import"./upperFirst.js";import"./download.js";import"./index23.js";import"./index24.js";import"./uniqBy.js";import"./miao.data.js";import"./lodash.default.js";import"./throttle.js";import"./merge.js";import"./miao.api.js";import"./base64Conver.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/ThemeConfigModal.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./ThemeConfigModal.vue_vue_type_script_setup_true_lang.js";import"./BasicForm.js";import"./index.js";import"./BasicForm.vue_vue_type_style_index_0_lang.js";import"./index21.js";import"./index22.js";import"./useFormItem.js";/* empty css */import"./DeleteOutlined.js";import"./transButton.js";import"./index19.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";import"./upperFirst.js";import"./download.js";import"./index23.js";import"./index24.js";import"./uniqBy.js";import"./miao.api.js";import"./base64Conver.js";import"./miao.data.js";import"./lodash.default.js";import"./throttle.js";import"./merge.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/ThemeDrawer.css:
--------------------------------------------------------------------------------
1 | .guoba-miao-plugin-theme-drawer .theme-desc img{width:150px}
2 |
--------------------------------------------------------------------------------
/server/static/assets/ThemeDrawer.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./ThemeDrawer.vue_vue_type_style_index_0_lang.js";import"./index35.js";import"./index.js";import"./index29.js";import"./ArrowLeftOutlined.js";import"./index19.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";/* empty css *//* empty css */import"./miao.api.js";import"./base64Conver.js";import"./ThemeConfigModal.vue_vue_type_script_setup_true_lang.js";import"./BasicForm.js";import"./BasicForm.vue_vue_type_style_index_0_lang.js";import"./index21.js";import"./index22.js";import"./useFormItem.js";import"./DeleteOutlined.js";import"./transButton.js";import"./upperFirst.js";import"./download.js";import"./index23.js";import"./index24.js";import"./uniqBy.js";import"./miao.data.js";import"./lodash.default.js";import"./throttle.js";import"./merge.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/TransferBox.css:
--------------------------------------------------------------------------------
1 | .guoba-guoba-v2-update .transfer-box{height:600px;overflow-y:auto;padding:12px}.guoba-guoba-v2-update .transfer-box.is-mobile{height:100%}.guoba-guoba-v2-update .transfer-box .step-box{position:absolute;top:120px;left:0;right:0;bottom:0;display:flex;flex-direction:column;justify-content:flex-start;align-items:center}.guoba-guoba-v2-update .transfer-box .step-box .step-tip{font-size:18px;font-weight:700}.guoba-guoba-v2-update .transfer-box .step-box .step-action{margin-top:24px}.guoba-guoba-v2-update .transfer-box .mode-box{display:flex;flex-direction:row;justify-content:center;align-items:center;margin-top:24px}.guoba-guoba-v2-update .transfer-box .mode-box .mode-item{display:flex;flex-direction:column;width:180px;height:100px;border:1px solid #e8e8e8;border-radius:4px;margin:0 12px;cursor:pointer;transition:all .3s;position:relative}.guoba-guoba-v2-update .transfer-box .mode-box .mode-item:hover{border-color:#6495ed}.guoba-guoba-v2-update .transfer-box .mode-box .mode-item.active{color:#fff;background:#6495ed;border-color:#6495ed}.guoba-guoba-v2-update .transfer-box .mode-box .mode-item.active .desc{color:#fff}.guoba-guoba-v2-update .transfer-box .mode-box .mode-item .title{font-size:16px;font-weight:700;padding:12px 0;text-align:center}.guoba-guoba-v2-update .transfer-box .mode-box .mode-item .desc{font-size:14px;text-align:center;color:#999}.guoba-guoba-v2-update .transfer-box .mode-box .mode-item.recommended:after{content:"推荐";position:absolute;top:0;right:0;padding:0 4px;background-color:#6495ed;color:#fff;font-size:12px;border-radius:0 0 0 4px;transform:scale(.8);transform-origin:100% 0}
2 |
--------------------------------------------------------------------------------
/server/static/assets/TransferBox.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./TransferBox.vue_vue_type_style_index_0_lang.js";import"./Step1.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./hooks.js";import"./BasicForm.vue_vue_type_style_index_0_lang.js";import"./index21.js";import"./index22.js";import"./useFormItem.js";/* empty css */import"./DeleteOutlined.js";import"./transButton.js";import"./index19.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";import"./upperFirst.js";import"./download.js";import"./index23.js";import"./index24.js";import"./lodash.default.js";import"./throttle.js";import"./merge.js";import"./uniqBy.js";import"./Step1-1.vue_vue_type_script_setup_true_lang.js";/* empty css */import"./ModeBox.vue_vue_type_script_setup_true_lang.js";import"./StepBtn.vue_vue_type_script_setup_true_lang.js";import"./Step1-2.vue_vue_type_script_setup_true_lang.js";import"./Step1-3.vue_vue_type_script_setup_true_lang.js";import"./BasicForm.js";import"./Step1-4.vue_vue_type_script_setup_true_lang.js";import"./common.js";import"./Step2.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/TransferBox.vue_vue_type_style_index_0_lang.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main$1}from"./Step1.vue_vue_type_script_setup_true_lang.js";import Step2 from"./Step2.js";import{u as useStepStore}from"./hooks.js";import{d as defineComponent,s as inject,r as ref,ao as onMounted,w as watch,c as resolveComponent,o as openBlock,e as createElementBlock,h as createBlock,m as toDisplayString,C as normalizeClass,D as unref}from"./index.js";const _hoisted_1={key:3},_sfc_main=defineComponent({__name:"TransferBox",setup(__props){const isMobile=inject("isMobile",ref(!1)),stepStore=useStepStore(),loading=ref(!0),current=ref(1),stepSize=ref("default");return isMobile.value&&(stepSize.value="small"),onMounted((()=>{return __this=this,__arguments=null,generator=function*(){yield stepStore.updateStatus(),watch((()=>stepStore.status.state),(state=>{current.value=0===state?1:2}),{immediate:!0}),loading.value=!1},new Promise(((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}));var __this,__arguments,generator})),(_ctx,_cache)=>{const _component_a_skeleton=resolveComponent("a-skeleton");return openBlock(),createElementBlock("div",{class:normalizeClass(["transfer-box",{"is-mobile":unref(isMobile)}])},[loading.value?(openBlock(),createBlock(_component_a_skeleton,{key:0,active:""})):1===current.value?(openBlock(),createBlock(_sfc_main$1,{key:1})):2===current.value?(openBlock(),createBlock(Step2,{key:2})):(openBlock(),createElementBlock("span",_hoisted_1,"error step "+toDisplayString(current.value),1))],2)}}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/TypePicker.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,as as Tooltip,z as useDesign,b as _export_sfc,c as resolveComponent,o as openBlock,e as createElementBlock,F as Fragment,f as renderList,C as normalizeClass,h as createBlock,i as withCtx,E as createBaseVNode,R as pushScopeId,T as popScopeId}from"./index.js";const _sfc_main=defineComponent({name:"MenuTypePicker",components:{Tooltip:Tooltip},props:{menuTypeList:{type:Array,defualt:()=>[]},handler:{type:Function,default:()=>({})},def:{type:String,default:""}},setup(){const{prefixCls:prefixCls}=useDesign("setting-menu-type-picker");return{prefixCls:prefixCls}}}),_hoisted_1=["onClick"],_hoisted_3=[(n=>(pushScopeId("data-v-93141be1"),n=n(),popScopeId(),n))((()=>createBaseVNode("div",{class:"mix-sidebar"},null,-1)))];const TypePicker=_export_sfc(_sfc_main,[["render",function(_ctx,_cache,$props,$setup,$data,$options){const _component_Tooltip=resolveComponent("Tooltip");return openBlock(),createElementBlock("div",{class:normalizeClass(_ctx.prefixCls)},[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.menuTypeList||[],(item=>(openBlock(),createBlock(_component_Tooltip,{key:item.title,title:item.title,placement:"bottom"},{default:withCtx((()=>[createBaseVNode("div",{onClick:$event=>_ctx.handler(item),class:normalizeClass([`${_ctx.prefixCls}__item`,`${_ctx.prefixCls}__item--${item.type}`,{[`${_ctx.prefixCls}__item--active`]:_ctx.def===item.type}])},_hoisted_3,10,_hoisted_1)])),_:2},1032,["title"])))),128))],2)}],["__scopeId","data-v-93141be1"]]);export{TypePicker as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/UploadIconHelpModal.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./UploadIconHelpModal.vue_vue_type_script_setup_true_lang.js";import"./21ae6624.js";import"./index19.js";import"./index.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/UploadIconHelpModal2.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./UploadIconHelpModal.vue_vue_type_script_setup_true_lang2.js";import"./21ae6624.js";import"./index19.js";import"./index.js";import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/VisitAnalysis.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./VisitAnalysis.vue_vue_type_script_setup_true_lang.js";import"./useECharts.js";import"./index.js";import"./props.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/VisitAnalysis.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | var __defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value:value}):obj[key]=value;import{u as useECharts}from"./useECharts.js";import{b as basicProps}from"./props.js";import{d as defineComponent,r as ref,ao as onMounted,o as openBlock,e as createElementBlock,Y as normalizeStyle}from"./index.js";const _sfc_main=defineComponent({__name:"VisitAnalysis",props:((a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a})({},basicProps),setup(__props){const chartRef=ref(null),{setOptions:setOptions}=useECharts(chartRef);return onMounted((()=>{setOptions({tooltip:{trigger:"axis",axisPointer:{lineStyle:{width:1,color:"#019680"}}},xAxis:{type:"category",boundaryGap:!1,data:[...new Array(18)].map(((_item,index)=>`${index+6}:00`)),splitLine:{show:!0,lineStyle:{width:1,type:"solid",color:"rgba(226,226,226,0.5)"}},axisTick:{show:!1}},yAxis:[{type:"value",max:8e4,splitNumber:4,axisTick:{show:!1},splitArea:{show:!0,areaStyle:{color:["rgba(255,255,255,0.2)","rgba(226,226,226,0.2)"]}}}],grid:{left:"1%",right:"1%",top:"2 %",bottom:0,containLabel:!0},series:[{smooth:!0,data:[111,222,4e3,18e3,33333,55555,66666,33333,14e3,36e3,66666,44444,22222,11111,4e3,2e3,500,333,222,111],type:"line",areaStyle:{},itemStyle:{color:"#5ab1ef"}},{smooth:!0,data:[33,66,88,333,3333,5e3,18e3,3e3,1200,13e3,22e3,11e3,2221,1201,390,198,60,30,22,11],type:"line",areaStyle:{},itemStyle:{color:"#019680"}}]})})),(_ctx,_cache)=>(openBlock(),createElementBlock("div",{ref_key:"chartRef",ref:chartRef,style:normalizeStyle({height:_ctx.height,width:_ctx.width})},null,4))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/VisitAnalysisBar.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./VisitAnalysisBar.vue_vue_type_script_setup_true_lang.js";import"./useECharts.js";import"./index.js";import"./props.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/VisitAnalysisBar.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | var __defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value:value}):obj[key]=value;import{u as useECharts}from"./useECharts.js";import{b as basicProps}from"./props.js";import{d as defineComponent,r as ref,ao as onMounted,o as openBlock,e as createElementBlock,Y as normalizeStyle}from"./index.js";const _sfc_main=defineComponent({__name:"VisitAnalysisBar",props:((a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a})({},basicProps),setup(__props){const chartRef=ref(null),{setOptions:setOptions}=useECharts(chartRef);return onMounted((()=>{setOptions({tooltip:{trigger:"axis",axisPointer:{lineStyle:{width:1,color:"#019680"}}},grid:{left:"1%",right:"1%",top:"2 %",bottom:0,containLabel:!0},xAxis:{type:"category",data:[...new Array(12)].map(((_item,index)=>`${index+1}月`))},yAxis:{type:"value",max:8e3,splitNumber:4},series:[{data:[3e3,2e3,3333,5e3,3200,4200,3200,2100,3e3,5100,6e3,3200,4800],type:"bar",barMaxWidth:80}]})})),(_ctx,_cache)=>(openBlock(),createElementBlock("div",{ref_key:"chartRef",ref:chartRef,style:normalizeStyle({height:_ctx.height,width:_ctx.width})},null,4))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/VisitRadar.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./VisitRadar.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./useECharts.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/VisitRadar.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,r as ref,w as watch,o as openBlock,h as createBlock,i as withCtx,E as createBaseVNode,Y as normalizeStyle,D as unref,bd as Card}from"./index.js";import{u as useECharts}from"./useECharts.js";const _sfc_main=defineComponent({__name:"VisitRadar",props:{loading:Boolean,width:{type:String,default:"100%"},height:{type:String,default:"300px"}},setup(__props){const props=__props,chartRef=ref(null),{setOptions:setOptions}=useECharts(chartRef);return watch((()=>props.loading),(()=>{props.loading||setOptions({legend:{bottom:0,data:["访问","购买"]},tooltip:{},radar:{radius:"60%",splitNumber:8,indicator:[{name:"电脑"},{name:"充电器"},{name:"耳机"},{name:"手机"},{name:"Ipad"},{name:"耳机"}]},series:[{type:"radar",symbolSize:0,areaStyle:{shadowBlur:0,shadowColor:"rgba(0,0,0,.2)",shadowOffsetX:0,shadowOffsetY:10,opacity:1},data:[{value:[90,50,86,40,50,20],name:"访问",itemStyle:{color:"#b6a2de"}},{value:[70,75,70,76,20,85],name:"购买",itemStyle:{color:"#5ab1ef"}}]}]})}),{immediate:!0}),(_ctx,_cache)=>(openBlock(),createBlock(unref(Card),{title:"转化率",loading:__props.loading},{default:withCtx((()=>[createBaseVNode("div",{ref_key:"chartRef",ref:chartRef,style:normalizeStyle({width:__props.width,height:__props.height})},null,4)])),_:1},8,["loading"]))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/VisitSource.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./VisitSource.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./useECharts.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/VisitSource.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,r as ref,w as watch,o as openBlock,h as createBlock,i as withCtx,E as createBaseVNode,Y as normalizeStyle,D as unref,bd as Card}from"./index.js";import{u as useECharts}from"./useECharts.js";const _sfc_main=defineComponent({__name:"VisitSource",props:{loading:Boolean,width:{type:String,default:"100%"},height:{type:String,default:"300px"}},setup(__props){const props=__props,chartRef=ref(null),{setOptions:setOptions}=useECharts(chartRef);return watch((()=>props.loading),(()=>{props.loading||setOptions({tooltip:{trigger:"item"},legend:{bottom:"1%",left:"center"},series:[{color:["#5ab1ef","#b6a2de","#67e0e3","#2ec7c9"],name:"访问来源",type:"pie",radius:["40%","70%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:10,borderColor:"#fff",borderWidth:2},label:{show:!1,position:"center"},emphasis:{label:{show:!0,fontSize:"12",fontWeight:"bold"}},labelLine:{show:!1},data:[{value:1048,name:"搜索引擎"},{value:735,name:"直接访问"},{value:580,name:"邮件营销"},{value:484,name:"联盟广告"}],animationType:"scale",animationEasing:"exponentialInOut",animationDelay:function(){return 100*Math.random()}}]})}),{immediate:!0}),(_ctx,_cache)=>(openBlock(),createBlock(unref(Card),{title:"访问来源",loading:__props.loading},{default:withCtx((()=>[createBaseVNode("div",{ref_key:"chartRef",ref:chartRef,style:normalizeStyle({width:__props.width,height:__props.height})},null,4)])),_:1},8,["loading"]))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/WorkbenchHeader.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./WorkbenchHeader.vue_vue_type_script_setup_true_lang.js";import"./index.js";import"./header.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/WorkbenchHeader.vue_vue_type_script_setup_true_lang.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,a5 as useUserStore,A as computed,o as openBlock,e as createElementBlock,j as createVNode,D as unref,fw as Avatar,E as createBaseVNode,m as toDisplayString,dM as createStaticVNode}from"./index.js";import{h as headerImg}from"./header.js";const _hoisted_1={class:"lg:flex"},_hoisted_2={class:"md:ml-6 flex flex-col justify-center md:mt-0 mt-2"},_hoisted_3={class:"md:text-lg text-md"},_hoisted_4=createBaseVNode("span",{class:"text-secondary"}," 今日晴,20℃ - 32℃! ",-1),_hoisted_5=createStaticVNode('',1),_sfc_main=defineComponent({__name:"WorkbenchHeader",setup(__props){const userStore=useUserStore(),userinfo=computed((()=>userStore.getUserInfo));return(_ctx,_cache)=>(openBlock(),createElementBlock("div",_hoisted_1,[createVNode(unref(Avatar),{src:userinfo.value.avatar||unref(headerImg),size:72,class:"!mx-auto !block"},null,8,["src"]),createBaseVNode("div",_hoisted_2,[createBaseVNode("h1",_hoisted_3,"早安, "+toDisplayString(userinfo.value.realName)+", 开始您一天的工作吧!",1),_hoisted_4]),_hoisted_5]))}});export{_sfc_main as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/WorkbenchHeader2.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main}from"./WorkbenchHeader.vue_vue_type_script_setup_true_lang2.js";import"./index.js";import"./common.js";export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/app-theme-style.e3b0c442.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/assets/app-theme-style.e3b0c442.css
--------------------------------------------------------------------------------
/server/static/assets/base64Conver.js:
--------------------------------------------------------------------------------
1 | function dataURLtoBlob(base64Buf){const arr=base64Buf.split(","),mime=arr[0].match(/:(.*?);/)[1],bstr=window.atob(arr[1]);let n=bstr.length;const u8arr=new Uint8Array(n);for(;n--;)u8arr[n]=bstr.charCodeAt(n);return new Blob([u8arr],{type:mime})}function blobToDataUrl(blob){return new Promise((resolve=>{let render=new FileReader;render.readAsDataURL(blob),render.onload=function(e){resolve(e.target.result)}}))}export{blobToDataUrl as b,dataURLtoBlob as d};
2 |
--------------------------------------------------------------------------------
/server/static/assets/common.js:
--------------------------------------------------------------------------------
1 | function timeFix(){const hour=(new Date).getHours();return hour<9?"早上好":hour<=11?"上午好":hour<=13?"中午好":hour<20?"下午好":"晚上好"}function welcome(){const arr=["稍微休息一会儿吧~","准备吃点什么呢?","要不要去打个秘境呢?","要不去刷个地脉花吧?","让我猜猜你现在是不是累了?","别忘记清树脂哦~"];return arr[Math.floor(Math.random()*arr.length)]}function sleep(ms){return __this=this,__arguments=null,generator=function*(){return new Promise((resolve=>setTimeout(resolve,ms)))},new Promise(((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}));var __this,__arguments,generator}function simpleDebounce(fn,delay=100){let timer=null;return function(){let args=arguments;timer&&clearTimeout(timer),timer=setTimeout((()=>{fn.apply(this,args)}),delay)}}function dateFormat(date,block){if(!date)return"";let format=block;const map={M:(date=new Date(date)).getMonth()+1,d:date.getDate(),h:date.getHours(),m:date.getMinutes(),s:date.getSeconds(),q:Math.floor((date.getMonth()+3)/3),S:date.getMilliseconds()};return format=format.replace(/([yMdhmsqS])+/g,((all,t)=>{let v=map[t];return void 0!==v?(all.length>1&&(v=`0${v}`,v=v.substr(v.length-2)),v):"y"===t?date.getFullYear().toString().substr(4-all.length):all})),format}function cssExpand(css,id){let style=document.createElement("style");if(id){let $style=document.getElementById(id);null!=$style&&$style.remove(),style.id=id}style.innerHTML=`@charset "UTF-8";\n\n ${css}`,document.head.appendChild(style)}export{sleep as a,cssExpand as c,dateFormat as d,simpleDebounce as s,timeFix as t,welcome as w};
2 |
--------------------------------------------------------------------------------
/server/static/assets/construction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/assets/construction.png
--------------------------------------------------------------------------------
/server/static/assets/data.js:
--------------------------------------------------------------------------------
1 | import{aa as useI18n,fW as ErrorTypeEnum,j as createVNode,bc as Tag}from"./index.js";const{t:t}=useI18n();function getColumns(){return[{dataIndex:"type",title:t("sys.errorLog.tableColumnType"),width:80,customRender:({text:text})=>{const color=text===ErrorTypeEnum.VUE?"green":text===ErrorTypeEnum.RESOURCE?"cyan":text===ErrorTypeEnum.PROMISE?"blue":ErrorTypeEnum.AJAX?"red":"purple";return createVNode(Tag,{color:color},{default:()=>text})}},{dataIndex:"url",title:"URL",width:200},{dataIndex:"time",title:t("sys.errorLog.tableColumnDate"),width:160},{dataIndex:"file",title:t("sys.errorLog.tableColumnFile"),width:200},{dataIndex:"name",title:"Name",width:200},{dataIndex:"message",title:t("sys.errorLog.tableColumnMsg"),width:300},{dataIndex:"stack",title:t("sys.errorLog.tableColumnStackMsg")}]}function getDescSchema(){return getColumns().map((column=>({field:column.dataIndex,label:column.title})))}export{getColumns,getDescSchema};
2 |
--------------------------------------------------------------------------------
/server/static/assets/data2.js:
--------------------------------------------------------------------------------
1 | const navItems=[{title:"首页",icon:"ion:home-outline",color:"#1fdaca"},{title:"仪表盘",icon:"ion:grid-outline",color:"#bf0c2c"},{title:"组件",icon:"ion:layers-outline",color:"#e18525"},{title:"系统管理",icon:"ion:settings-outline",color:"#3fb27f"},{title:"权限管理",icon:"ion:key-outline",color:"#4daf1bc9"},{title:"图表",icon:"ion:bar-chart-outline",color:"#00d8ff"}],dynamicInfoItems=[{avatar:"dynamic-avatar-1|svg",name:"威廉",date:"刚刚",desc:"在 开源组 创建了项目 Vue"},{avatar:"dynamic-avatar-2|svg",name:"艾文",date:"1个小时前",desc:"关注了 威廉 "},{avatar:"dynamic-avatar-3|svg",name:"克里斯",date:"1天前",desc:"发布了 个人动态 "},{avatar:"dynamic-avatar-4|svg",name:"Vben",date:"2天前",desc:"发表文章 如何编写一个Vite插件 "},{avatar:"dynamic-avatar-5|svg",name:"皮特",date:"3天前",desc:"回复了 杰克 的问题 如何进行项目优化?"},{avatar:"dynamic-avatar-6|svg",name:"杰克",date:"1周前",desc:"关闭了问题 如何运行项目 "},{avatar:"dynamic-avatar-1|svg",name:"威廉",date:"1周前",desc:"发布了 个人动态 "},{avatar:"dynamic-avatar-1|svg",name:"威廉",date:"2021-04-01 20:00",desc:"推送了代码到 Github"}],groupItems=[{title:"Github",icon:"carbon:logo-github",color:"",desc:"不要等待机会,而要创造机会。",group:"开源组",date:"2021-04-01"},{title:"Vue",icon:"ion:logo-vue",color:"#3fb27f",desc:"现在的你决定将来的你。",group:"算法组",date:"2021-04-01"},{title:"Html5",icon:"ion:logo-html5",color:"#e18525",desc:"没有什么才能比努力更重要。",group:"上班摸鱼",date:"2021-04-01"},{title:"Angular",icon:"ion:logo-angular",color:"#bf0c2c",desc:"热情和欲望可以突破一切难关。",group:"UI",date:"2021-04-01"},{title:"React",icon:"bx:bxl-react",color:"#00d8ff",desc:"健康的身体是实目标的基石。",group:"技术牛",date:"2021-04-01"},{title:"Js",icon:"ion:logo-javascript",color:"#4daf1bc9",desc:"路是走出来的,而不是空想出来的。",group:"架构组",date:"2021-04-01"}];export{dynamicInfoItems as d,groupItems as g,navItems as n};
2 |
--------------------------------------------------------------------------------
/server/static/assets/data3.js:
--------------------------------------------------------------------------------
1 | const navItems=[{title:"配置管理",icon:"ion:settings-outline",color:"#E18525",path:"/config"},{title:"插件管理",icon:"clarity:plugin-line",color:"#3FB27F",path:"/plugins"},{title:"账号管理",icon:"ant-design:user-outlined",color:"#BF0C2C",path:"/account"}],dynamicInfoItems=[{avatar:"dynamic-avatar-1|svg",name:"威廉",date:"刚刚",desc:"在 开源组 创建了项目 Vue"},{avatar:"dynamic-avatar-2|svg",name:"艾文",date:"1个小时前",desc:"关注了 威廉 "},{avatar:"dynamic-avatar-3|svg",name:"克里斯",date:"1天前",desc:"发布了 个人动态 "},{avatar:"dynamic-avatar-4|svg",name:"Vben",date:"2天前",desc:"发表文章 如何编写一个Vite插件 "},{avatar:"dynamic-avatar-5|svg",name:"皮特",date:"3天前",desc:"回复了 杰克 的问题 如何进行项目优化?"},{avatar:"dynamic-avatar-6|svg",name:"杰克",date:"1周前",desc:"关闭了问题 如何运行项目 "},{avatar:"dynamic-avatar-1|svg",name:"威廉",date:"1周前",desc:"发布了 个人动态 "},{avatar:"dynamic-avatar-1|svg",name:"威廉",date:"2021-04-01 20:00",desc:"推送了代码到 Github"}];export{dynamicInfoItems as d,navItems as n};
2 |
--------------------------------------------------------------------------------
/server/static/assets/download.js:
--------------------------------------------------------------------------------
1 | import{aA as openWindow}from"./index.js";function downloadByUrl({url:url,target:target="_blank",fileName:fileName}){const isChrome=window.navigator.userAgent.toLowerCase().indexOf("chrome")>-1,isSafari=window.navigator.userAgent.toLowerCase().indexOf("safari")>-1;if(/(iP)/g.test(window.navigator.userAgent))return console.error("Your browser does not support download!"),!1;if(isChrome||isSafari){const link=document.createElement("a");if(link.href=url,link.target=target,void 0!==link.download&&(link.download=fileName||url.substring(url.lastIndexOf("/")+1,url.length)),document.createEvent){const e=document.createEvent("MouseEvents");return e.initEvent("click",!0,!0),link.dispatchEvent(e),!0}}return-1===url.indexOf("?")&&(url+="?download"),openWindow(url,{target:target}),!0}export{downloadByUrl as d};
2 |
--------------------------------------------------------------------------------
/server/static/assets/guoba.js:
--------------------------------------------------------------------------------
1 | import{j as createVNode,k as createTextVNode,c as resolveComponent,bn as isVNode}from"./index.js";function getStatusTags(record,size=4){let status=[];return record.installed?status.push(createVNode(resolveComponent("a-tag"),{color:"green"},{default:()=>[createTextVNode("已安装")]})):status.push(createVNode(resolveComponent("a-tag"),null,{default:()=>[createTextVNode("未安装")]})),record.hasConfig&&status.push(createVNode(resolveComponent("a-tag"),{color:"purple"},{default:()=>[createTextVNode("可配置")]})),record.isV3&&status.push(createVNode(resolveComponent("a-tag"),{color:"blue"},{default:()=>[createTextVNode("V3")]})),record.isV2&&status.push(createVNode(resolveComponent("a-tag"),{color:"orange"},{default:()=>[createTextVNode("V2")]})),record.isDeleted&&status.push(createVNode(resolveComponent("a-tag"),{color:"red"},{default:()=>[createTextVNode("已失效")]})),createVNode(resolveComponent("a-space"),{size:size},"function"==typeof(s=status)||"[object Object]"===Object.prototype.toString.call(s)&&!isVNode(s)?status:{default:()=>[status]});var s}function parseAuthorLink(record){let{author:author,authorLink:authorLink}=record;if(Array.isArray(author)||(author=[author]),authorLink&&!Array.isArray(authorLink)&&(authorLink=[authorLink]),authorLink&&authorLink.length>0){let tags=[];for(let i=0;i[tags]})}var s;return author.join(" ")}export{getStatusTags as g,parseAuthorLink as p};
2 |
--------------------------------------------------------------------------------
/server/static/assets/header.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/assets/header.jpg
--------------------------------------------------------------------------------
/server/static/assets/header.js:
--------------------------------------------------------------------------------
1 | const headerImg="/guoba-plugin-mock-root/assets/header.jpg";export{headerImg as h};
2 |
--------------------------------------------------------------------------------
/server/static/assets/illustration.js:
--------------------------------------------------------------------------------
1 | const _imports_0="/guoba-plugin-mock-root/assets/illustration.svg";export{_imports_0 as _};
2 |
--------------------------------------------------------------------------------
/server/static/assets/index11.css:
--------------------------------------------------------------------------------
1 | .guoba-iframe-page .ant-spin-nested-loading[data-v-0f27fd67]{position:relative;height:100%}.guoba-iframe-page .ant-spin-nested-loading .ant-spin-container[data-v-0f27fd67]{width:100%;height:100%;padding:10px}.guoba-iframe-page__mask[data-v-0f27fd67]{position:absolute;top:0;left:0;width:100%;height:100%}.guoba-iframe-page__main[data-v-0f27fd67]{width:100%;height:100%;overflow:hidden;background-color:#fff;border:0;box-sizing:border-box}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index14.css:
--------------------------------------------------------------------------------
1 | .ant-breadcrumb{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:tnum;color:#00000073;font-size:14px}.ant-breadcrumb .anticon{font-size:14px}.ant-breadcrumb a{color:#00000073;transition:color .3s}.ant-breadcrumb a:hover{color:#91b9fa}.ant-breadcrumb>span:last-child{color:#000000d9}.ant-breadcrumb>span:last-child a{color:#000000d9}.ant-breadcrumb>span:last-child .ant-breadcrumb-separator{display:none}.ant-breadcrumb-separator{margin:0 8px;color:#00000073}.ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-link>.anticon+a{margin-left:4px}.ant-breadcrumb-overlay-link>.anticon{margin-left:4px}.ant-breadcrumb-rtl{direction:rtl}.ant-breadcrumb-rtl:before{display:table;content:""}.ant-breadcrumb-rtl:after{display:table;clear:both;content:""}.ant-breadcrumb-rtl>span{float:right}.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+a{margin-right:4px;margin-left:0}.ant-breadcrumb-rtl .ant-breadcrumb-overlay-link>.anticon{margin-right:4px;margin-left:0}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index16.css:
--------------------------------------------------------------------------------
1 | .fade-enter-active,.fade-leave-active{opacity:1;transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index16.js:
--------------------------------------------------------------------------------
1 | import{b as _export_sfc,o as openBlock,e as createElementBlock,E as createBaseVNode,c as resolveComponent,h as createBlock}from"./index.js";import"./index19.js";/* empty css *//* empty css */import"./useWindowSizeFn.js";import"./FullscreenOutlined.js";const _sfc_main$1={name:"PageCoding",setup:()=>({construction:"/guoba-plugin-mock-root/assets/construction.png"})},_hoisted_1={style:{"margin-top":"80px","text-align":"center"}},_hoisted_2=["src"],_hoisted_3=createBaseVNode("div",{style:{"font-size":"1.2rem",padding:"20px 0","font-weight":"bold"}},[createBaseVNode("span",null,"当前页面正在施工中,敬请期待~")],-1);const index=_export_sfc({name:"Account",components:{PageCoding:_export_sfc(_sfc_main$1,[["render",function(_ctx,_cache,$props,$setup,$data,$options){return openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("img",{src:$setup.construction,alt:"",style:{margin:"0 auto"}},null,8,_hoisted_2),_hoisted_3])}]])},setup(){}},[["render",function(_ctx,_cache,$props,$setup,$data,$options){const _component_PageCoding=resolveComponent("PageCoding");return openBlock(),createBlock(_component_PageCoding)}]]);export{index as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/index17.css:
--------------------------------------------------------------------------------
1 | .guoba-basic-drawer-footer{position:absolute;bottom:0;width:100%;padding:0 12px 0 20px;text-align:right;background-color:#fff;border-top:1px solid #d9d9d9}.guoba-basic-drawer-footer>*{margin-right:8px}.guoba-basic-drawer-header{display:flex;height:100%;align-items:center}.guoba-basic-drawer-header__back{padding:0 12px;cursor:pointer}.guoba-basic-drawer-header__back:hover{color:#6495ed}.guoba-basic-drawer-header__twrap{flex:1}.guoba-basic-drawer-header__toolbar{padding-right:50px}.guoba-basic-drawer .ant-drawer-wrapper-body{overflow:hidden}.guoba-basic-drawer .ant-drawer-close:hover{color:#ed6f6f}.guoba-basic-drawer .ant-drawer-body{height:calc(100% - 48px);padding:0;background-color:#fff}.guoba-basic-drawer .ant-drawer-body .scrollbar__wrap{padding:16px!important;margin-bottom:0!important}.guoba-basic-drawer .ant-drawer-body>.scrollbar>.scrollbar__bar.is-horizontal{display:none}.guoba-basic-drawer__detail{position:absolute}.guoba-basic-drawer__detail .ant-drawer-header{width:100%;height:40px;padding:0;border-top:1px solid #d9d9d9;box-sizing:border-box}.guoba-basic-drawer__detail .ant-drawer-title{height:100%}.guoba-basic-drawer__detail .ant-drawer-close{height:40px;line-height:40px}.guoba-basic-drawer__detail .scrollbar__wrap{padding:0!important}.guoba-basic-drawer__detail .ant-drawer-body{height:calc(100% - 40px)}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index17.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,p as propTypes,r as ref,z as useDesign,A as computed,o as openBlock,e as createElementBlock,j as createVNode,i as withCtx,E as createBaseVNode,C as normalizeClass,D as unref,Y as normalizeStyle,ft as Spin,b as _export_sfc}from"./index.js";import{u as useWindowSizeFn}from"./useWindowSizeFn.js";import{a as useLayoutHeight}from"./useContentViewHeight.js";const _hoisted_1=["src"],FramePage=_export_sfc(defineComponent({__name:"index",props:{frameSrc:propTypes.string.def("")},setup(__props){const loading=ref(!0),topRef=ref(50),heightRef=ref(window.innerHeight),frameRef=ref(),{headerHeightRef:headerHeightRef}=useLayoutHeight(),{prefixCls:prefixCls}=useDesign("iframe-page");useWindowSizeFn(calcHeight,150,{immediate:!0});const getWrapStyle=computed((()=>({height:`${unref(heightRef)}px`})));function calcHeight(){const iframe=unref(frameRef);if(!iframe)return;const top=headerHeightRef.value;topRef.value=top,heightRef.value=window.innerHeight-top;const clientHeight=document.documentElement.clientHeight-top;iframe.style.height=`${clientHeight}px`}function hideLoading(){loading.value=!1,calcHeight()}return(_ctx,_cache)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(prefixCls)),style:normalizeStyle(getWrapStyle.value)},[createVNode(unref(Spin),{spinning:loading.value,size:"large",style:normalizeStyle(getWrapStyle.value)},{default:withCtx((()=>[createBaseVNode("iframe",{src:__props.frameSrc,class:normalizeClass(`${unref(prefixCls)}__main`),ref_key:"frameRef",ref:frameRef,onLoad:hideLoading},null,42,_hoisted_1)])),_:1},8,["spinning","style"])],6))}}),[["__scopeId","data-v-0f27fd67"]]);export{FramePage as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/index18.css:
--------------------------------------------------------------------------------
1 | .guoba-edit-miao-help .ant-page-header{padding-right:8px;padding-bottom:8px}@media screen and (max-width: 800px){.guoba-edit-miao-help .size{height:0;padding-top:15.16%;position:relative}}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index18.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,A as computed,o as openBlock,h as createBlock,i as withCtx,B as createCommentVNode,aW as Transition}from"./index.js";import LockPage from"./LockPage.js";import{u as useLockStore}from"./lock.js";import"./header.js";const _sfc_main=defineComponent({__name:"index",setup(__props){const lockStore=useLockStore(),getIsLock=computed((()=>{var _a,_b;return null!=(_b=null==(_a=null==lockStore?void 0:lockStore.getLockInfo)?void 0:_a.isLock)&&_b}));return(_ctx,_cache)=>(openBlock(),createBlock(Transition,{name:"fade-bottom",mode:"out-in"},{default:withCtx((()=>[getIsLock.value?(openBlock(),createBlock(LockPage,{key:0})):createCommentVNode("",!0)])),_:1}))}});export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/index19.css:
--------------------------------------------------------------------------------
1 | .guoba-plugin-detail .plugin-title *{vertical-align:middle}.guoba-plugin-detail .plugin-title .title-name{margin-left:8px}.guoba-plugin-detail .plugin-title a:not(:hover){color:#000000d9}.guoba-plugin-detail .plugin-content .content-desc{width:100%}.guoba-plugin-detail .ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index2.css:
--------------------------------------------------------------------------------
1 | .guoba-guoba-v2-update.ant-spin-nested-loading,.guoba-guoba-v2-update>.ant-spin-container{width:100%;height:100%}.guoba-guoba-v2-update .transfer-container{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:#f5f5f5}.guoba-guoba-v2-update .box-card{width:100%;max-width:800px}.guoba-guoba-v2-update .box-card .ant-card-body{padding:0}.guoba-guoba-v2-update .box-card .s-tip,.guoba-guoba-v2-update .box-card .lite-form,.guoba-guoba-v2-update .box-card .basic-form{margin:8px auto 0;width:380px;max-height:480px;overflow:auto}.guoba-guoba-v2-update .box-card .s-tip{font-size:12px;color:#666}.guoba-guoba-v2-update .box-card .lite-form{text-align:center}@media screen and (max-width: 768px){.guoba-guoba-v2-update .box-card{height:100%}.guoba-guoba-v2-update .box-card .ant-card-body{height:calc(100% - 60px)}}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index20.css:
--------------------------------------------------------------------------------
1 | .ant-back-top{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:tnum;position:fixed;right:100px;bottom:50px;z-index:10;width:40px;height:40px;cursor:pointer}.ant-back-top:empty{display:none}.ant-back-top-rtl{right:auto;left:100px;direction:rtl}.ant-back-top-content{width:40px;height:40px;overflow:hidden;color:#fff;text-align:center;background-color:#00000073;border-radius:20px;transition:all .3s}.ant-back-top-content:hover{background-color:#000000d9;transition:all .3s}.ant-back-top-icon{font-size:24px;line-height:40px}@media screen and (max-width: 768px){.ant-back-top{right:60px}}@media screen and (max-width: 480px){.ant-back-top{right:20px}}.guoba-setting-drawer-feature{position:absolute;top:45%;right:0;z-index:10;display:flex;padding:10px;color:#fff;cursor:pointer;background-color:#6495ed;border-radius:6px 0 0 6px;justify-content:center;align-items:center}.guoba-setting-drawer-feature svg{width:1em;height:1em}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index21.css:
--------------------------------------------------------------------------------
1 | .guoba-layout-footer[data-v-dcef2a47]{color:#00000073;text-align:center}.guoba-layout-footer__links[data-v-dcef2a47]{margin-bottom:8px}.guoba-layout-footer__links a[data-v-dcef2a47]{color:#00000073}.guoba-layout-footer__links a[data-v-dcef2a47]:hover{color:#000000d9}.guoba-layout-footer__github[data-v-dcef2a47]{margin:0 30px}.guoba-layout-footer__github[data-v-dcef2a47]:hover{color:#000000d9}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index22.css:
--------------------------------------------------------------------------------
1 | .guoba-header-user-dropdown{height:48px;padding:0 10px;overflow:hidden;font-size:12px;cursor:pointer;align-items:center}.guoba-header-user-dropdown img{width:24px;height:24px;margin-right:12px}.guoba-header-user-dropdown__header{border-radius:50%}.guoba-header-user-dropdown__header.ant-avatar{margin-right:8px}.guoba-header-user-dropdown__name{font-size:14px}.guoba-header-user-dropdown--dark:hover{background-color:var(--header-bg-hover-color)}.guoba-header-user-dropdown--light:hover{background-color:#f6f6f6}.guoba-header-user-dropdown--light .guoba-header-user-dropdown__name{color:#000000d9}.guoba-header-user-dropdown--light .guoba-header-user-dropdown__desc{color:#7c8087}.guoba-header-user-dropdown-dropdown-overlay .ant-dropdown-menu-item{min-width:160px}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index34.js:
--------------------------------------------------------------------------------
1 | import{dN as defineStore,g0 as pluginApi}from"./index.js";const useGuobaStore=defineStore({id:"guoba",state:()=>({plugins:null}),getters:{},actions:{getPlugins(force=!1){return __this=this,__arguments=null,generator=function*(){if(force||null==this.plugins){let plugins=yield pluginApi.getPlugins(force);return this.plugins=plugins,plugins}return this.plugins||[]},new Promise(((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}));var __this,__arguments,generator}}});export{useGuobaStore as u};
2 |
--------------------------------------------------------------------------------
/server/static/assets/index4.css:
--------------------------------------------------------------------------------
1 | .fullscreen-modal{overflow:hidden}.fullscreen-modal .ant-modal{top:0!important;right:0!important;bottom:0!important;left:0!important;margin:0!important;width:100%!important;max-width:100%!important;height:100%}.fullscreen-modal .ant-modal-content{height:100%}.ant-modal{width:520px;padding-bottom:0}.ant-modal .ant-modal-body>.scrollbar{padding:14px}.ant-modal-title{font-size:16px;font-weight:700}.ant-modal-title .base-title{cursor:move!important}.ant-modal .ant-modal-body{padding:0}.ant-modal .ant-modal-body>.scrollbar>.scrollbar__bar.is-horizontal{display:none}.ant-modal-large{top:60px}.ant-modal-large--mini{top:16px}.ant-modal-header{padding:16px}.ant-modal-header.modal-allow-drag,.ant-modal-header.modal-allow-drag .guoba-basic-title{cursor:move}.ant-modal-content{box-shadow:0 4px 8px #0003,0 6px 20px #00000030}.ant-modal-footer button+button{margin-left:10px}.ant-modal-close{font-weight:400;outline:none}.ant-modal-close-x{display:inline-block;width:96px;height:56px;line-height:56px}.ant-modal-confirm-body .ant-modal-confirm-content>*{color:#909399}.ant-modal-confirm-confirm.error .ant-modal-confirm-body>.anticon{color:#ed6f6f}.ant-modal-confirm-btns .ant-btn:last-child{margin-right:0}.ant-modal-confirm-info .ant-modal-confirm-body>.anticon{color:#efbd47}.ant-modal-confirm-confirm.success .ant-modal-confirm-body>.anticon{color:#55d187}.ant-modal-confirm .ant-modal-body{padding:24px!important}@media screen and (max-height: 600px){.ant-modal{top:60px}}@media screen and (max-height: 540px){.ant-modal{top:30px}}@media screen and (max-height: 480px){.ant-modal{top:10px}}.guoba-basic-modal-close{display:flex;height:95%;align-items:center}.guoba-basic-modal-close>span{margin-left:48px;font-size:16px}.guoba-basic-modal-close--can-full>span{margin-left:12px}.guoba-basic-modal-close:not(.guoba-basic-modal-close--can-full)>span:nth-child(1):hover{font-weight:700}.guoba-basic-modal-close span:nth-child(1){display:inline-block;padding:10px}.guoba-basic-modal-close span:nth-child(1):hover{color:#6495ed}.guoba-basic-modal-close span:last-child:hover{color:#ed6f6f}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index4.js:
--------------------------------------------------------------------------------
1 | import{_ as _sfc_main$1}from"./GrowCard.vue_vue_type_script_setup_true_lang.js";import{_ as _sfc_main$2}from"./SiteAnalysis.vue_vue_type_script_setup_true_lang.js";import{_ as _sfc_main$4}from"./VisitSource.vue_vue_type_script_setup_true_lang.js";import{_ as _sfc_main$3}from"./VisitRadar.vue_vue_type_script_setup_true_lang.js";import{_ as _sfc_main$5}from"./SalesProductPie.vue_vue_type_script_setup_true_lang.js";import{d as defineComponent,r as ref,o as openBlock,e as createElementBlock,j as createVNode,E as createBaseVNode}from"./index.js";import"./VisitAnalysis.vue_vue_type_script_setup_true_lang.js";import"./useECharts.js";import"./props.js";import"./VisitAnalysisBar.vue_vue_type_script_setup_true_lang.js";const _hoisted_1={class:"p-4"},_hoisted_2={class:"md:flex enter-y"},_sfc_main=defineComponent({__name:"index",setup(__props){const loading=ref(!0);return setTimeout((()=>{loading.value=!1}),1500),(_ctx,_cache)=>(openBlock(),createElementBlock("div",_hoisted_1,[createVNode(_sfc_main$1,{loading:loading.value,class:"enter-y"},null,8,["loading"]),createVNode(_sfc_main$2,{class:"!my-4 enter-y",loading:loading.value},null,8,["loading"]),createBaseVNode("div",_hoisted_2,[createVNode(_sfc_main$3,{class:"md:w-1/3 w-full",loading:loading.value},null,8,["loading"]),createVNode(_sfc_main$4,{class:"md:w-1/3 !md:mx-4 !md:my-0 !my-4 w-full",loading:loading.value},null,8,["loading"]),createVNode(_sfc_main$5,{class:"md:w-1/3 w-full",loading:loading.value},null,8,["loading"])])]))}});export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/index5.js:
--------------------------------------------------------------------------------
1 | import{_ as _imports_0}from"./illustration.js";import{d as defineComponent,r as ref,o as openBlock,h as createBlock,i as withCtx,j as createVNode,E as createBaseVNode,D as unref,bd as Card}from"./index.js";import{P as PageWrapper}from"./index30.js";import{_ as _sfc_main$1}from"./WorkbenchHeader.vue_vue_type_script_setup_true_lang.js";import ProjectCard from"./ProjectCard.js";import{_ as _sfc_main$3}from"./QuickNav.vue_vue_type_script_setup_true_lang.js";import{_ as _sfc_main$2}from"./DynamicInfo.vue_vue_type_script_setup_true_lang.js";import{_ as _sfc_main$4}from"./SaleRadar.vue_vue_type_script_setup_true_lang.js";import"./index32.js";import"./onMountedOrActivated.js";import"./useWindowSizeFn.js";import"./useContentViewHeight.js";import"./ArrowLeftOutlined.js";import"./transButton.js";import"./header.js";import"./data2.js";import"./useECharts.js";const _hoisted_1={class:"lg:flex"},_hoisted_2={class:"lg:w-7/10 w-full !mr-4 enter-y"},_hoisted_3={class:"lg:w-3/10 w-full enter-y"},_hoisted_4=createBaseVNode("img",{class:"xl:h-50 h-30 mx-auto",src:_imports_0},null,-1),_sfc_main=defineComponent({__name:"index",setup(__props){const loading=ref(!0);return setTimeout((()=>{loading.value=!1}),1500),(_ctx,_cache)=>(openBlock(),createBlock(unref(PageWrapper),null,{headerContent:withCtx((()=>[createVNode(_sfc_main$1)])),default:withCtx((()=>[createBaseVNode("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[createVNode(ProjectCard,{loading:loading.value,class:"enter-y"},null,8,["loading"]),createVNode(_sfc_main$2,{loading:loading.value,class:"!my-4 enter-y"},null,8,["loading"])]),createBaseVNode("div",_hoisted_3,[createVNode(_sfc_main$3,{loading:loading.value,class:"enter-y"},null,8,["loading"]),createVNode(unref(Card),{class:"!my-4 enter-y",loading:loading.value},{default:withCtx((()=>[_hoisted_4])),_:1},8,["loading"]),createVNode(_sfc_main$4,{loading:loading.value,class:"enter-y"},null,8,["loading"])])])])),_:1}))}});export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/index6.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,ah as useRouter,D as unref,o as openBlock,e as createElementBlock}from"./index.js";const _sfc_main=defineComponent({__name:"index",setup(__props){const{currentRoute:currentRoute,replace:replace}=useRouter(),{params:params,query:query}=unref(currentRoute),{path:path,_redirect_type:_redirect_type="path"}=params;Reflect.deleteProperty(params,"_redirect_type"),Reflect.deleteProperty(params,"path");const _path=Array.isArray(path)?path.join("/"):path;return replace("name"===_redirect_type?{name:_path,query:query,params:params}:{path:_path.startsWith("/")?_path:"/"+_path,query:query}),(_ctx,_cache)=>(openBlock(),createElementBlock("div"))}});export{_sfc_main as default};
2 |
--------------------------------------------------------------------------------
/server/static/assets/index8.css:
--------------------------------------------------------------------------------
1 | .guoba-strength-meter-bar[data-v-765a9999]{position:relative;height:6px;margin:10px auto 6px;background-color:#00000040;border-radius:6px}.guoba-strength-meter-bar[data-v-765a9999]:before,.guoba-strength-meter-bar[data-v-765a9999]:after{position:absolute;z-index:10;display:block;width:20%;height:inherit;background-color:transparent;border-color:#fff;border-style:solid;border-width:0 5px;content:""}.guoba-strength-meter-bar[data-v-765a9999]:before{left:20%}.guoba-strength-meter-bar[data-v-765a9999]:after{right:20%}.guoba-strength-meter-bar--fill[data-v-765a9999]{position:absolute;width:0;height:inherit;background-color:transparent;border-radius:inherit;transition:width .5s ease-in-out,background .25s}.guoba-strength-meter-bar--fill[data-score="0"][data-v-765a9999]{width:20%;background-color:#e74242}.guoba-strength-meter-bar--fill[data-score="1"][data-v-765a9999]{width:40%;background-color:#ed6f6f}.guoba-strength-meter-bar--fill[data-score="2"][data-v-765a9999]{width:60%;background-color:#efbd47}.guoba-strength-meter-bar--fill[data-score="3"][data-v-765a9999]{width:80%;background-color:#55d18780}.guoba-strength-meter-bar--fill[data-score="4"][data-v-765a9999]{width:100%;background-color:#55d187}
2 |
--------------------------------------------------------------------------------
/server/static/assets/index9.css:
--------------------------------------------------------------------------------
1 | .guoba-countdown-input .ant-input-group-addon{padding-right:0;background-color:transparent;border:none}.guoba-countdown-input .ant-input-group-addon button{font-size:14px}
2 |
--------------------------------------------------------------------------------
/server/static/assets/lock.js:
--------------------------------------------------------------------------------
1 | var __async=(__this,__arguments,generator)=>new Promise(((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}));import{dN as defineStore,fp as Persistent,fq as LOCK_INFO_KEY,a5 as useUserStore}from"./index.js";const useLockStore=defineStore({id:"app-lock",state:()=>({lockInfo:Persistent.getLocal(LOCK_INFO_KEY)}),getters:{getLockInfo(){return this.lockInfo}},actions:{setLockInfo(info){this.lockInfo=Object.assign({},this.lockInfo,info),Persistent.setLocal(LOCK_INFO_KEY,this.lockInfo,!0)},resetLockInfo(){Persistent.removeLocal(LOCK_INFO_KEY,!0),this.lockInfo=null},unLock(password){return __async(this,null,(function*(){var _a;const userStore=useUserStore();if((null==(_a=this.lockInfo)?void 0:_a.pwd)===password)return this.resetLockInfo(),!0;return yield(()=>__async(this,null,(function*(){var _a2;try{const username=null==(_a2=userStore.getUserInfo)?void 0:_a2.username,res=yield userStore.login({username:username,password:password,goHome:!1,mode:"none"});return res&&this.resetLockInfo(),res}catch(error){return!1}})))()}))}}});export{useLockStore as u};
2 |
--------------------------------------------------------------------------------
/server/static/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/assets/logo.png
--------------------------------------------------------------------------------
/server/static/assets/onMountedOrActivated.js:
--------------------------------------------------------------------------------
1 | import{ao as onMounted,n as nextTick,d4 as onActivated}from"./index.js";function onMountedOrActivated(hook){let mounted;onMounted((()=>{hook(),nextTick((()=>{mounted=!0}))})),onActivated((()=>{mounted&&hook()}))}export{onMountedOrActivated as o};
2 |
--------------------------------------------------------------------------------
/server/static/assets/plugins.data.js:
--------------------------------------------------------------------------------
1 | import{p as parseAuthorLink,g as getStatusTags}from"./guoba.js";import{j as createVNode}from"./index.js";const columns=[{title:"插件标题",dataIndex:"title",width:200,slots:{customRender:"plugin-title"}},{title:"插件名称",dataIndex:"name",width:200,customRender:({record:record})=>record.link?createVNode("a",{href:record.link,target:"_blank"},[record.name]):record.name},{title:"插件作者",dataIndex:"author",width:180,customRender:({record:record})=>parseAuthorLink(record)},{title:"插件说明",dataIndex:"description",align:"left"},{title:"状态",dataIndex:"installed",align:"left",width:240,customRender:({record:record})=>getStatusTags(record,8)}];export{columns};
2 |
--------------------------------------------------------------------------------
/server/static/assets/props.js:
--------------------------------------------------------------------------------
1 | const basicProps={width:{type:String,default:"100%"},height:{type:String,default:"280px"}};export{basicProps as b};
2 |
--------------------------------------------------------------------------------
/server/static/assets/scrollTo.js:
--------------------------------------------------------------------------------
1 | import{ch as wrapperRaf}from"./index.js";function isWindow(obj){return null!=obj&&obj===obj.window}function getScroll(target,top){if("undefined"==typeof window)return 0;var _documentElement,result=0;(isWindow(target)?result=target.pageYOffset:target instanceof Document?result=target.documentElement.scrollTop:target&&(result=target.scrollTop),target&&!isWindow(target)&&"number"!=typeof result)&&(result=null===(_documentElement=(target.ownerDocument||target).documentElement)||void 0===_documentElement?void 0:_documentElement.scrollTop);return result}function scrollTo(y){var options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},_options$getContainer=options.getContainer,getContainer=void 0===_options$getContainer?function(){return window}:_options$getContainer,callback=options.callback,_options$duration=options.duration,duration=void 0===_options$duration?450:_options$duration,container=getContainer(),scrollTop=getScroll(container),startTime=Date.now();wrapperRaf((function frameFunc2(){var t,b,cc,time=Date.now()-startTime,nextScrollTop=(t=time>duration?duration:time,cc=y-(b=scrollTop),(t/=duration/2)<1?cc/2*t*t*t+b:cc/2*((t-=2)*t*t+2)+b);isWindow(container)?container.scrollTo(window.pageXOffset,nextScrollTop):container instanceof HTMLDocument||"HTMLDocument"===container.constructor.name?container.documentElement.scrollTop=nextScrollTop:container.scrollTop=nextScrollTop,time
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/server/static/assets/svg/login-bg.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/server/static/assets/throttle.js:
--------------------------------------------------------------------------------
1 | import{dK as isObject,$ as debounce}from"./index.js";function throttle(func,wait,options){var leading=!0,trailing=!0;if("function"!=typeof func)throw new TypeError("Expected a function");return isObject(options)&&(leading="leading"in options?!!options.leading:leading,trailing="trailing"in options?!!options.trailing:trailing),debounce(func,wait,{leading:leading,maxWait:wait,trailing:trailing})}export{throttle as t};
2 |
--------------------------------------------------------------------------------
/server/static/assets/transButton.js:
--------------------------------------------------------------------------------
1 | import{d as defineComponent,r as ref,ao as onMounted,ct as _objectWithoutProperties,_ as _objectSpread2,j as createVNode,cg as KeyCode}from"./index.js";var _excluded=["noStyle","disabled"],inlineStyle={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},TransButton=defineComponent({compatConfig:{MODE:3},name:"TransButton",inheritAttrs:!1,props:{noStyle:{type:Boolean,default:void 0},onClick:Function,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0}},setup:function(props,_ref){var slots=_ref.slots,emit=_ref.emit,attrs=_ref.attrs,expose=_ref.expose,domRef=ref(),onKeyDown=function(event){event.keyCode===KeyCode.ENTER&&event.preventDefault()},onKeyUp=function(event){event.keyCode===KeyCode.ENTER&&emit("click",event)},onClick=function(e){emit("click",e)},focus=function(){domRef.value&&domRef.value.focus()};return onMounted((function(){props.autofocus&&focus()})),expose({focus:focus,blur:function(){domRef.value&&domRef.value.blur()}}),function(){var _slots$default,noStyle=props.noStyle,disabled=props.disabled,restProps=_objectWithoutProperties(props,_excluded),mergedStyle={};return noStyle||(mergedStyle=_objectSpread2({},inlineStyle)),disabled&&(mergedStyle.pointerEvents="none"),createVNode("div",_objectSpread2(_objectSpread2(_objectSpread2({role:"button",tabindex:0,ref:domRef},restProps),attrs),{},{onClick:onClick,onKeydown:onKeyDown,onKeyup:onKeyUp,style:_objectSpread2(_objectSpread2({},mergedStyle),attrs.style||{})}),[null===(_slots$default=slots.default)||void 0===_slots$default?void 0:_slots$default.call(slots)])}}});export{TransButton as T};
2 |
--------------------------------------------------------------------------------
/server/static/assets/tttgbnumber.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/assets/tttgbnumber.woff
--------------------------------------------------------------------------------
/server/static/assets/uniqBy.js:
--------------------------------------------------------------------------------
1 | import{dJ as baseUniq,dG as baseIteratee}from"./index.js";function uniqBy(array,iteratee){return array&&array.length?baseUniq(array,baseIteratee(iteratee)):[]}export{uniqBy as u};
2 |
--------------------------------------------------------------------------------
/server/static/assets/useContentViewHeight.js:
--------------------------------------------------------------------------------
1 | import{am as createContext,r as ref,A as computed,D as unref}from"./index.js";import{u as useWindowSizeFn}from"./useWindowSizeFn.js";const key=Symbol();const headerHeightRef=ref(0),footerHeightRef=ref(0);function useLayoutHeight(){return{headerHeightRef:headerHeightRef,footerHeightRef:footerHeightRef,setHeaderHeight:function(val){headerHeightRef.value=val},setFooterHeight:function(val){footerHeightRef.value=val}}}function useContentViewHeight(){const contentHeight=ref(window.innerHeight),pageHeight=ref(window.innerHeight),getViewHeight=computed((()=>unref(contentHeight)-unref(headerHeightRef)-unref(footerHeightRef)||0));useWindowSizeFn((()=>{contentHeight.value=window.innerHeight}),100,{immediate:!0}),createContext({contentHeight:getViewHeight,setPageHeight:function(height){return __this=this,__arguments=null,generator=function*(){pageHeight.value=height},new Promise(((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}));var __this,__arguments,generator},pageHeight:pageHeight},key,{native:!0})}export{useLayoutHeight as a,useContentViewHeight as u};
2 |
--------------------------------------------------------------------------------
/server/static/assets/useFormItem.js:
--------------------------------------------------------------------------------
1 | import{a as reactive,dA as readonly,N as watchEffect,A as computed,bt as isEqual,n as nextTick,ae as toRaw,D as unref,aq as getCurrentInstance}from"./index.js";function useRuleFormItem(props,key="value",changeEvent="change",emitData){const instance=getCurrentInstance(),emit=null==instance?void 0:instance.emit,innerState=reactive({value:props[key]}),defaultState=readonly(innerState);watchEffect((()=>{innerState.value=props[key]}));return[computed({get:()=>innerState.value,set(value){isEqual(value,defaultState.value)||(innerState.value=value,nextTick((()=>{null==emit||emit(changeEvent,value,...toRaw(unref(emitData))||[])})))}}),val=>{innerState.value=val},defaultState]}export{useRuleFormItem as u};
2 |
--------------------------------------------------------------------------------
/server/static/assets/useWindowSizeFn.js:
--------------------------------------------------------------------------------
1 | import{bx as tryOnMounted,bw as tryOnUnmounted,ay as useDebounceFn}from"./index.js";function useWindowSizeFn(fn,wait=150,options){let handler=()=>{fn()};const handleSize=useDebounceFn(handler,wait);handler=handleSize;const start=()=>{options&&options.immediate&&handler(),window.addEventListener("resize",handler)},stop=()=>{window.removeEventListener("resize",handler)};return tryOnMounted((()=>{start()})),tryOnUnmounted((()=>{stop()})),[start,stop]}export{useWindowSizeFn as u};
2 |
--------------------------------------------------------------------------------
/server/static/assets/yunzai-right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/assets/yunzai-right.png
--------------------------------------------------------------------------------
/server/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/favicon.ico
--------------------------------------------------------------------------------
/server/static/resource/img/21ae6624.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/resource/img/21ae6624.webp
--------------------------------------------------------------------------------
/server/static/resource/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/resource/img/logo.png
--------------------------------------------------------------------------------
/server/static/resource/img/pwa-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/resource/img/pwa-192x192.png
--------------------------------------------------------------------------------
/server/static/resource/img/pwa-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/resource/img/pwa-512x512.png
--------------------------------------------------------------------------------
/server/static/resource/tinymce/skins/ui/oxide-dark/content.mobile.min.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3 | * Licensed under the LGPL or a commercial license.
4 | * For LGPL see License.txt in the project root for license information.
5 | * For commercial licenses see https://www.tiny.cloud/
6 | */
7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{position: absolute;display: inline-block;background-color: green;opacity: .5;}
8 |
9 | body{-webkit-text-size-adjust: none;}
10 |
11 | body img{max-width: 96vw;}
12 |
13 | body table img{max-width: 95%;}
14 |
15 | body{font-family: sans-serif;}
16 |
17 | table{border-collapse: collapse;}
18 |
--------------------------------------------------------------------------------
/server/static/resource/tinymce/skins/ui/oxide/content.mobile.min.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3 | * Licensed under the LGPL or a commercial license.
4 | * For LGPL see License.txt in the project root for license information.
5 | * For commercial licenses see https://www.tiny.cloud/
6 | */
7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{position: absolute;display: inline-block;background-color: green;opacity: .5;}
8 |
9 | body{-webkit-text-size-adjust: none;}
10 |
11 | body img{max-width: 96vw;}
12 |
13 | body table img{max-width: 95%;}
14 |
15 | body{font-family: sans-serif;}
16 |
17 | table{border-collapse: collapse;}
18 |
--------------------------------------------------------------------------------
/server/static/resource/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guoba-yunzai/guoba-plugin/52824cc41b568c03c7f053f9fa9fdd23875d831d/server/static/resource/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff
--------------------------------------------------------------------------------
/server/utils/pluginUtils.js:
--------------------------------------------------------------------------------
1 | import {_paths} from '#guoba.platform'
2 |
3 | /**
4 | * 判断插件是否显示在菜单中
5 | * @param supportObject
6 | * @return {boolean}
7 | */
8 | export function parseShowInMenu(supportObject) {
9 | let showInMenu = supportObject.pluginInfo?.showInMenu ?? 'auto'
10 | if (showInMenu === false || showInMenu === 'false') {
11 | return false
12 | }
13 | if (showInMenu === true || showInMenu === 'true') {
14 | return true
15 | }
16 | if (showInMenu === 'auto') {
17 | return supportObject.configInfo?.schemas?.length >= 3
18 | && typeof supportObject.configInfo?.getConfigData === 'function'
19 | }
20 | return false
21 | }
22 |
23 | /**
24 | * 获取插件图标路径
25 | * @param pluginInfo
26 | * @return {string|*}
27 | */
28 | export function getPluginIconPath(pluginInfo) {
29 | return pluginInfo?.iconPath ? `${_paths.server.realMountPrefix}/api/plugin/s/${pluginInfo.name}/icon` : void 0
30 | }
31 |
--------------------------------------------------------------------------------
/utils/adapter/check.js:
--------------------------------------------------------------------------------
1 | import chalk from 'chalk'
2 | import {isV3, isV4} from '#guoba.adapter'
3 |
4 | export const needPackage = [
5 | 'yaml',
6 | 'express',
7 | 'body-parser',
8 | 'multer',
9 | 'jsonwebtoken',
10 | ]
11 |
12 | export async function checkPackage() {
13 | for (let pkgName of needPackage) {
14 | try {
15 | await import(pkgName)
16 | } catch (e) {
17 | packageTips(e)
18 | return false
19 | }
20 | }
21 | return true
22 | }
23 |
24 | export function packageTips(error) {
25 | logger.mark('---- 锅巴启动失败 ----')
26 | let pack = error.stack.match(/'(.+?)'/g)[0].replace(/'/g, '')
27 | logger.mark(`缺少依赖:${chalk.red(pack)}`)
28 | let cmd = (isV3 || isV4) ? 'pnpm add $s -w' : 'npm install $s'
29 | logger.mark(`请执行安装依赖命令:${chalk.red(cmd.replace('$s', pack))}`)
30 | logger.mark('---------------------')
31 | }
32 |
--------------------------------------------------------------------------------
/utils/adapter/common.js:
--------------------------------------------------------------------------------
1 | import {GI, incrVersion} from '../guobaImport.js'
2 | import {packageTips} from './check.js'
3 |
4 | let isInit = true
5 |
6 | export async function reload() {
7 | if (!isInit) {
8 | incrVersion()
9 | }
10 | // 首先关闭服务器
11 | let isClosed = await new Promise((resolve) => {
12 | if (!Guoba.server) {
13 | resolve(true)
14 | return
15 | }
16 | Guoba.server.close(err => {
17 | if (err) {
18 | logger.error('[Guoba] 重载失败', err)
19 | resolve(false)
20 | } else {
21 | resolve(true)
22 | }
23 | })
24 | })
25 | if (isClosed) {
26 | delete Guoba.app
27 | delete Guoba.server
28 | // 创建服务器
29 | let newServer
30 | try {
31 | let {createServer} = await GI('#/index.js')
32 | newServer = await createServer({isInit})
33 | } catch (error) {
34 | if (error?.stack && error.stack.includes('Cannot find package')) {
35 | packageTips(error)
36 | } else {
37 | if (error.stack) {
38 | logger.error(`[Guoba] 服务锅巴启动失败`)
39 | logger.error(decodeURI(error.stack))
40 | } else {
41 | logger.error(error)
42 | }
43 | }
44 | return
45 | }
46 | let {app, server} = newServer
47 | Guoba.app = app
48 | Guoba.server = server
49 | Guoba.reload = reload
50 | if (!isInit) {
51 | logger.mark('[Guoba] 服务重载成功~')
52 | }
53 | isInit = false
54 | }
55 | }
56 |
57 | /** 退出事件 */
58 | process.on('exit', async (code) => {
59 | if (Guoba && Guoba.server) {
60 | Guoba.server.close()
61 | }
62 | })
63 |
--------------------------------------------------------------------------------
/utils/adapter/initV2.js:
--------------------------------------------------------------------------------
1 | import {reload} from './common.js'
2 | import {pluginPackage} from '../package.js'
3 |
4 | const apps = []
5 |
6 | export async function init(rule) {
7 | await reload()
8 |
9 | rule['appRouter'] = {
10 | reg: '^#?锅巴',
11 | priority: 50,
12 | describe: '#锅巴插件'
13 | }
14 | apps.push((await import('../../apps/login.js')).GuobaLogin)
15 |
16 | logger.mark(`[Guoba] 欢迎使用锅巴插件,当前版本:${pluginPackage.version}`)
17 | logger.warn(`[Guoba] 检测到您使用的是V2版本的云崽,当前版本的锅巴仅支持“迁移至V3”功能!`)
18 | return appRouter
19 | }
20 |
21 | global.plugin = class GlobalPlugin {
22 | constructor(data, e) {
23 | this.e = e
24 | this.reply = e.reply
25 | this.rules = data.rule || []
26 | }
27 | }
28 |
29 | async function appRouter(e) {
30 | for (let clazz of apps) {
31 | let app = new clazz(e)
32 | for (let rule of app.rules) {
33 | if (new RegExp(rule.reg).test(e.msg)) {
34 | e.logFnc = `[${app.name}][${rule.fnc}]`
35 | try {
36 | let res = await (app[rule.fnc] && app[rule.fnc](e))
37 | if (res !== false) {
38 | return true
39 | }
40 | } catch (error) {
41 | logger.error(`${e.logFnc}`)
42 | logger.error(error.stack)
43 | return true
44 | }
45 | }
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/utils/adapter/initV3.js:
--------------------------------------------------------------------------------
1 | import path from 'path'
2 | import {loadClasses} from '#guoba.framework.utils'
3 | import {_version, _paths} from '#guoba.platform'
4 | import {isDev} from '#guoba.adapter'
5 | import {GitUtils} from '#guoba.utils'
6 | import {createHotLoad} from '../hotLoad.js'
7 | import {reload} from './common.js'
8 | import {loadV2Apps} from './loadV2.js'
9 |
10 | export async function init(apps) {
11 | let appsPath = path.join(_paths.pluginRoot, 'apps')
12 | // 初始化 git 仓库
13 | GitUtils.initRepos()
14 | // 加载 apps 下的所有类
15 | await loadClasses(appsPath, plugin, apps)
16 | // 加载 v2 插件
17 | await loadV2Apps()
18 | // dev 模式下,监听文件变化,自动重启服务器
19 | if (isDev) {
20 | let skip = true
21 | let staticPath = path.join(_paths.pluginRoot, 'server/static')
22 | createHotLoad(path.join(_paths.pluginRoot, 'server'), {
23 | wait: 100,
24 | immediate: true,
25 | filter: (type, p) => {
26 | if (type === 'immediate') {
27 | return true
28 | }
29 | if (skip) return false
30 | if (p.startsWith(staticPath)) {
31 | return false
32 | }
33 | return /\.c?js$/.test(p)
34 | },
35 | handler: () => reload().then(() => setTimeout(() => skip = false, 1000)),
36 | })
37 | } else {
38 | await reload()
39 | }
40 | logger.mark(`[Guoba] 欢迎使用锅巴插件,当前版本:${_version}`)
41 | }
42 |
--------------------------------------------------------------------------------
/utils/adapter/loadV2.js:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import path from 'path'
3 | import lodash from 'lodash'
4 | import {_paths} from '#guoba.platform'
5 |
6 | let v2Apps = []
7 |
8 | const v2JsPath = path.join(_paths.pluginRoot, 'lib/v2-js')
9 |
10 | // 加载V2单JS文件插件
11 | export async function loadV2Apps() {
12 | let checkReg = /.js$/i
13 | let fileList = fs.readdirSync(v2JsPath)
14 | fileList = fileList.filter((i) => checkReg.test(i))
15 | if (fileList.length === 0) {
16 | return
17 | }
18 | let count = 0
19 | for (let fileName of fileList) {
20 | try {
21 | let filePath = path.join(v2JsPath, fileName)
22 | let module = await import('file:///' + filePath)
23 | if (!module.rule) continue
24 | let name = fileName.replace(checkReg, '')
25 | for (let [ruleName, rule] of Object.entries(module.rule)) {
26 | let ruleKey = `${name}:${ruleName}`
27 | let handler = module[ruleName]
28 | if (typeof handler !== 'function') {
29 | throw new Error(`请先export该方法:${ruleName}`)
30 | }
31 | v2Apps.push({...rule, key: ruleKey, handler})
32 | count++
33 | }
34 | } catch (error) {
35 | logger.error(`[Guoba] 载入V2插件报错:${fileName}`)
36 | console.error(error)
37 | }
38 | }
39 | logger.info(`[Guoba] 成功载入了${count}个V2插件`)
40 | v2Apps = lodash.orderBy(v2Apps, ['priority'], ['asc'])
41 | }
42 |
43 | export {
44 | v2Apps
45 | }
46 |
--------------------------------------------------------------------------------
/utils/botActions.js:
--------------------------------------------------------------------------------
1 | import {isV3, isV4, Restart} from '#guoba.adapter'
2 |
3 | /**
4 | * 执行重启
5 | */
6 | export function doRestart() {
7 | const e = {
8 | reply: (msg) => logger.info(msg),
9 | bot: {
10 | uin: 'stdin'
11 | },
12 | logFnc: '[Guoba]'
13 | }
14 | if (isV3) {
15 | return new Restart(e).restart()
16 | } else if (isV4) {
17 | const ins = new Restart(e)
18 | ins.e = e
19 | return ins.restart()
20 | } else {
21 | logger.error('[Guoba] doRestart 执行失败,原因是版本不兼容')
22 | return false
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/utils/git.js:
--------------------------------------------------------------------------------
1 | import path from 'path'
2 | import {GitTools} from '#guoba.framework'
3 | import {_paths, GitRepoMap} from '#guoba.platform'
4 | import {mkdirSync} from './common.js'
5 |
6 | const repos = [
7 | {name: 'PluginsIndex', url: 'https://gitee.com/yhArcadia/Yunzai-Bot-plugins-index.git'},
8 | {name: 'GuobaResources', url: 'https://gitee.com/guoba-yunzai/resources.git'},
9 |
10 | // {name: 'GuobaTest', url: 'https://gitee.com/guoba-yunzai/test.git'},
11 | ]
12 |
13 | export const repoPath = path.join(_paths.pluginRoot, 'data/repo')
14 |
15 | export function initRepos() {
16 | mkdirSync(repoPath)
17 | for (let {name, url} of repos) {
18 | const directory = path.join(repoPath, name)
19 | const tools = new GitTools(directory, url, {
20 | strictMode: true,
21 | immediateClone: true,
22 | })
23 | GitRepoMap.set(name, tools)
24 | }
25 | }
26 |
27 | /**
28 | *
29 | * @param key
30 | * @return {Promise}
31 | */
32 | export async function get(key) {
33 | const repo = GitRepoMap.get(key)
34 | if (repo?.initPromise) {
35 | await repo.initPromise
36 | }
37 | return repo
38 | }
39 |
40 | export function getPluginsIndex() {
41 | return get('PluginsIndex')
42 | }
43 |
--------------------------------------------------------------------------------
/utils/hotLoad.js:
--------------------------------------------------------------------------------
1 | import lodash from 'lodash'
2 | import chokidar from 'chokidar'
3 |
4 | const hotLoadMap = new Map()
5 |
6 | /**
7 | * 热加载
8 | * @param paths 路径
9 | * @param options 选项
10 | * @param options.filter
11 | * @param options.handler
12 | * @param options.wait 防抖时间, 0 = 不防抖
13 | * @param options.watchOptions 监听选项
14 | * @returns {*}
15 | */
16 | export function createHotLoad(paths, options) {
17 | let {wait = 100, immediate = false, watchOptions} = options
18 | let id = lodash.uniqueId('guoba-hot-load-')
19 | let handler = wait === 0 ? watchHandler : lodash.debounce(watchHandler, wait)
20 | let bindHandler = handler.bind(options)
21 | if (immediate) watchHandler.call(options, 'immediate', paths)
22 | let watcher = chokidar.watch(paths, watchOptions).on('all', bindHandler)
23 | hotLoadMap.set(id, {watcher})
24 | return {
25 | id,
26 | destroy: destroyHotLoad.bind(null, id),
27 | }
28 | }
29 |
30 | // 取消热加载
31 | function destroyHotLoad(id) {
32 | let instance = hotLoadMap.get(id)
33 | if (instance) {
34 | instance.watcher.close()
35 | hotLoadMap.delete(id)
36 | }
37 | }
38 |
39 | function watchHandler(eventName, path, stats) {
40 | if (this.filter && !this.filter(eventName, path, stats)) {
41 | return
42 | }
43 | this.handler(eventName, path, stats)
44 | }
45 |
--------------------------------------------------------------------------------
/utils/package.js:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import path from 'path'
3 |
4 | // 三种获取插件名的方式
5 | // console.log('pluginName 1:', path.basename(path.join(import.meta.url, '../../')))
6 | // console.log('pluginName 2:', import.meta.url.match(/[\/\\](GUOBA-PLUGIN)[\/\\]/i)[1])
7 | // console.log('pluginName 3:', path.basename(path.dirname(path.dirname(import.meta.url))))
8 |
9 | /** Guoba实际所在的目录名 */
10 | export const pluginName = path.basename(path.join(import.meta.url, '../../'))
11 |
12 | export const pluginPackage = JSON.parse(fs.readFileSync(`./plugins/${pluginName}/package.json`, 'utf8'))
13 |
14 | /** Guoba当前版本 */
15 | export const _version = pluginPackage.version
--------------------------------------------------------------------------------
/utils/paths.js:
--------------------------------------------------------------------------------
1 | import path from 'path'
2 | import {pluginName} from './package.js'
3 |
4 | const _path = process.cwd()
5 | export const _paths = initPaths()
6 |
7 | function initPaths() {
8 | // BotData目录
9 | const data = path.join(_path, 'data')
10 | // Bot资源目录
11 | const resources = path.join(_path, 'resources')
12 | // Guoba插件根目录
13 | const pluginRoot = path.join(_path, 'plugins', pluginName)
14 | // Guoba静态资源路径
15 | const staticPath = path.join(pluginRoot, 'server/static')
16 | // 插件资源目录
17 | const pluginResources = path.join(pluginRoot, 'resources')
18 |
19 | return {
20 | // Bot根目录
21 | root: _path,
22 | data,
23 | resources,
24 | pluginRoot,
25 | staticPath,
26 | pluginResources,
27 |
28 | server: {
29 | // 真实挂载路径前缀
30 | realMountPrefix: "/guoba-plugin-mock-root"
31 | },
32 | }
33 | }
34 |
--------------------------------------------------------------------------------