first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>夜色社区Api调试工具</title><style>textarea,
input,
button,
.el-popover--plain{
-webkit-app-region: no-drag;
}</style><link href=./static/css/app.926d2c721d951ea0fd744c2204f0d754.css rel=stylesheet></head><body style="-webkit-app-region: drag"><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.9171202457a637e0497a.js></script><script type=text/javascript src=./static/js/app.d188f0af736e0d308107.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
!function(r){var n=window.webpackJsonp;window.webpackJsonp=function(e,u,c){for(var f,i,p,a=0,l=[];a<e.length;a++)i=e[a],o[i]&&l.push(o[i][0]),o[i]=0;for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(r[f]=u[f]);for(n&&n(e,u,c);l.length;)l.shift()();if(c)for(a=0;a<c.length;a++)p=t(t.s=c[a]);return p};var e={},o={2:0};function t(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=r,t.c=e,t.d=function(r,n,e){t.o(r,n)||Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:e})},t.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,"a",n),n},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.p="./",t.oe=function(r){throw console.error(r),r}}([]);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,53 @@
const { app, BrowserWindow } = require('electron')
// 保持对window对象的全局引用如果不这么做的话当JavaScript对象被
// 垃圾回收的时候window对象将会自动的关闭
let win
function createWindow () {
// 创建浏览器窗口。
win = new BrowserWindow({
title: 'YeSeApiTest',
width: 955,
height: 620,
resizable: false,
titleBarStyle: 'hidden',
allowRunningInsecureContent: true
})
// 然后加载应用的 index.html。
win.loadFile('dist/index.html')
// 当 window 被关闭,这个事件会被触发。
win.on('closed', () => {
// 取消引用 window 对象,如果你的应用支持多窗口的话,
// 通常会把多个 window 对象存放在一个数组里面,
// 与此同时,你应该删除相应的元素。
win = null
})
}
require('./menu');
// Electron 会在初始化后并准备
// 创建浏览器窗口时,调用这个函数。
// 部分 API 在 ready 事件触发后才能使用。
app.on('ready', createWindow)
// 当全部窗口关闭时退出。
app.on('window-all-closed', () => {
// 在 macOS 上,除非用户用 Cmd + Q 确定地退出,
// 否则绝大部分应用及其菜单栏会保持激活。
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
// 在macOS上当单击dock图标并且没有其他窗口打开时
// 通常在应用程序中重新创建一个窗口。
if (win === null) {
createWindow()
}
})

View File

@@ -0,0 +1,88 @@
const { app, Menu } = require('electron')
const template = [
{
label: '编辑',
submenu: [
{ role: 'undo' },
{ role: 'redo' },
{ type: 'separator' },
{ role: 'cut' },
{ role: 'copy' },
{ role: 'paste' },
{ role: 'delete' },
{ role: 'selectall' }
]
},
{
label: '视图',
submenu: [
{ role: 'reload' },
{ role: 'forcereload' },
{ type: 'separator' },
{ type: 'separator' },
{ role: 'togglefullscreen' }
]
},
{
label: '窗口',
submenu: [
{ role: 'minimize' },
{ role: 'close' }
]
},
{
label: '帮助',
submenu: [
{
label: '接口文档',
click () { require('electron').shell.openExternal('https://geekhelp.cn/docs/index.html') }
},
{
label: 'Github',
click () { require('electron').shell.openExternal('https://github.com/helpcode') }
}
]
}
]
if (process.platform === 'darwin') {
template.unshift({
label: app.getName(),
submenu: [
{ role: 'about' },
{ type: 'separator' },
{ role: 'services' },
{ type: 'separator' },
{ role: 'hide' },
{ role: 'hideothers' },
{ role: 'unhide' },
{ type: 'separator' },
{ role: 'quit' }
]
})
// Edit menu
template[1].submenu.push(
{ type: 'separator' },
{
label: 'Speech',
submenu: [
{ role: 'startspeaking' },
{ role: 'stopspeaking' }
]
}
)
// Window menu
template[3].submenu = [
{ role: 'close' },
{ role: 'minimize' },
{ role: 'zoom' },
{ type: 'separator' },
{ role: 'front' }
]
}
const menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)

View File

@@ -0,0 +1,17 @@
{
"name": "ApiTest-Mac",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "electron .",
"win": "electron-packager ./ 'YeSeApiTest' --platform=win32 --arch=x64 --electron-version=7.1.3 --icon=logo.icns --out=./build --asar --overwrite",
"build": "electron-packager . 'YeSeApiTest' --electronVersion=7.1.3 --platform=darwin --arch=x64 --icon=logo.icns --out=./build --asar --app-version=1.2.1 --ignore='(src|docs|.gitignore|LICENSE|README.md|webpack.config*|node_modules)' --overwrite"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"electron-packager": "^13.0.1"
}
}