first commit
This commit is contained in:
1
dist/core/.pydio
vendored
Normal file
1
dist/core/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
ee122929-9866-4e3d-b2cb-9866f2479dd9
|
||||
1
dist/core/annotation/.pydio
vendored
Normal file
1
dist/core/annotation/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
39248b24-b5d5-42f2-bf62-d312254ad586
|
||||
68
dist/core/annotation/AutoController.js
vendored
Normal file
68
dist/core/annotation/AutoController.js
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CreateApplicationIpc = exports.CreateTray = exports.CreateTouchbar = exports.CreateApplicationMenu = exports.AutoController = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const index_utils_1 = tslib_1.__importDefault(require("@utils/index.utils"));
|
||||
const ApplicationMenu_interactive_1 = require("@interactive/ApplicationMenu.interactive");
|
||||
const Touchbar_interactive_1 = require("@interactive/Touchbar.interactive");
|
||||
const Tray_interactive_1 = require("@interactive/Tray.interactive");
|
||||
const application_ipc_1 = require("@ipc/application.ipc");
|
||||
function AutoController() {
|
||||
return (_constructor) => {
|
||||
return class extends _constructor {
|
||||
constructor() {
|
||||
new (index_utils_1.default.GetController());
|
||||
super();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
exports.AutoController = AutoController;
|
||||
function CreateApplicationMenu() {
|
||||
return (_constructor) => {
|
||||
return class extends _constructor {
|
||||
constructor() {
|
||||
// 创建顶部菜单
|
||||
new ApplicationMenu_interactive_1.ApplicationMenu();
|
||||
super();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
exports.CreateApplicationMenu = CreateApplicationMenu;
|
||||
function CreateTouchbar() {
|
||||
return (_constructor) => {
|
||||
return class extends _constructor {
|
||||
constructor() {
|
||||
// 创建Touchbar
|
||||
new Touchbar_interactive_1.Touchbar();
|
||||
super();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
exports.CreateTouchbar = CreateTouchbar;
|
||||
function CreateTray() {
|
||||
return (_constructor) => {
|
||||
return class extends _constructor {
|
||||
constructor() {
|
||||
// 创建Mac系统顶部图标
|
||||
new Tray_interactive_1.TrayInteractive();
|
||||
super();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
exports.CreateTray = CreateTray;
|
||||
function CreateApplicationIpc() {
|
||||
return (_constructor) => {
|
||||
return class extends _constructor {
|
||||
constructor() {
|
||||
// 开启应用级ipc监听
|
||||
new application_ipc_1.ApplicationIpc();
|
||||
super();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
exports.CreateApplicationIpc = CreateApplicationIpc;
|
||||
69
dist/core/annotation/Creted.annotation.js
vendored
Normal file
69
dist/core/annotation/Creted.annotation.js
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Render = exports.CreateApplicationIpc = exports.Ipc = void 0;
|
||||
var Index_config_1 = __importDefault(require("@config/Index.config"));
|
||||
var Index_utils_1 = __importDefault(require("@utils/Index.utils"));
|
||||
/**
|
||||
* @Ipc()
|
||||
* 实现居中IPC的注册,用在controller方法上
|
||||
* @param IpcParams 传入需要被注册的ipc类
|
||||
* @constructor
|
||||
*/
|
||||
function Ipc(IpcParams) {
|
||||
return function (target, propertyKey, descriptor) {
|
||||
/**
|
||||
* 因为TS没有提供像java那种可以直接提取某个类中所有方法的系统方法
|
||||
* 这边原本使用 Object.getOwnPropertyNames 能够正常提取类中方法,但是如果类中有被 @Inject() 依赖注入的属性
|
||||
* 那么这个属性也会被 (new IpcParams())[val](),这样是肯定报错的,所以做下面约定!
|
||||
* 在IPC 类中,如果在类的属性上使用 @Inject() 注入。那么请在类的属性名前加上 _,例如:
|
||||
* @Inject()
|
||||
* private readonly _Net!: Http;
|
||||
*/
|
||||
IpcParams.forEach(function (val) {
|
||||
Object.getOwnPropertyNames(val.prototype).splice(1)
|
||||
.filter(function (f) { return !f.includes("_"); })
|
||||
.forEach(function (v) { return (new val())[v](); });
|
||||
});
|
||||
};
|
||||
}
|
||||
exports.Ipc = Ipc;
|
||||
/**
|
||||
* @CreateApplicationIpc()
|
||||
* 实现全局IPC的注册
|
||||
* 能够自动实例化传入的类数组中的所有类,并自动调用类中的所有的方法
|
||||
* @param IpcParams 类数组,实例:[ classIpc1, classIpc2, classIpc3 ]
|
||||
* @constructor
|
||||
*/
|
||||
function CreateApplicationIpc(IpcParams) {
|
||||
return function (_constructor) {
|
||||
IpcParams.forEach(function (val) {
|
||||
Object.getOwnPropertyNames(val.prototype).splice(1)
|
||||
.filter(function (f) { return !f.includes("_"); })
|
||||
.forEach(function (v) { return (new val())[v](); });
|
||||
});
|
||||
};
|
||||
}
|
||||
exports.CreateApplicationIpc = CreateApplicationIpc;
|
||||
/**
|
||||
* @Render()
|
||||
* 创建窗口
|
||||
* @param templateName 要渲染的模板名称
|
||||
* @constructor
|
||||
*/
|
||||
function Render(templateName) {
|
||||
return function (target, propertyKey, descriptor) {
|
||||
/**
|
||||
* 如果被打上注解的类中某个方法是配置文件中的默认启动窗口,那么调用这个方法来创建窗体
|
||||
* 其他的方法一律不管!由js前端渲染进程触发ipc创建
|
||||
*/
|
||||
if (propertyKey.includes((Index_config_1.default.StartPage.split("/"))[1])) {
|
||||
// 如果没有传参数,那么采用方法名来创建窗体!
|
||||
templateName == undefined ? Index_utils_1.default.startWindows(target, propertyKey) : Index_utils_1.default.startWindows(target, templateName);
|
||||
}
|
||||
};
|
||||
}
|
||||
exports.Render = Render;
|
||||
//# sourceMappingURL=Creted.annotation.js.map
|
||||
1
dist/core/annotation/Creted.annotation.js.map
vendored
Normal file
1
dist/core/annotation/Creted.annotation.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Creted.annotation.js","sourceRoot":"","sources":["../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pE;;;WAGG;QACH,IAAI,WAAW,CAAC,QAAQ,CAAC,CAAC,sBAAM,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YACxD,wBAAwB;YACxB,YAAY,IAAI,SAAS,CAAC,CAAC,CAAC,qBAAK,CAAC,YAAY,CAAC,MAAM,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,qBAAK,CAAC,YAAY,CAAC,MAAM,EAAC,YAAY,CAAC,CAAA;SAC/G;IACL,CAAC,CAAA;AACL,CAAC;AAXD,wBAWC"}
|
||||
25
dist/core/annotation/Creted.js
vendored
Normal file
25
dist/core/annotation/Creted.js
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Creted = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const Windows_model_1 = tslib_1.__importDefault(require("@model/Windows.model"));
|
||||
const electron_1 = require("electron");
|
||||
const index_config_1 = tslib_1.__importDefault(require("@config/index.config"));
|
||||
function Creted() {
|
||||
return (_constructor) => {
|
||||
let ControllerName = _constructor.name.split("Controller")[0];
|
||||
let ConfigName = `${ControllerName}Config`;
|
||||
let PathName = `${ControllerName}Path`;
|
||||
try {
|
||||
// @ts-ignore
|
||||
Windows_model_1.default.CurrentBrowserWindow = new electron_1.BrowserWindow(index_config_1.default.PageSize[ConfigName]);
|
||||
// @ts-ignore
|
||||
Windows_model_1.default.CurrentBrowserWindow.loadFile(index_config_1.default.PagePath[PathName]).then(r => { });
|
||||
}
|
||||
catch (e) {
|
||||
console.log("controller不存在,请检查命名,示例:AboutController。");
|
||||
}
|
||||
Windows_model_1.default.CurrentBrowserWindow.show();
|
||||
};
|
||||
}
|
||||
exports.Creted = Creted;
|
||||
93
dist/core/annotation/Http.annotation.js
vendored
Normal file
93
dist/core/annotation/Http.annotation.js
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GET = void 0;
|
||||
var Index_config_1 = __importDefault(require("@config/Index.config"));
|
||||
var Http_net_1 = require("@net/Http.net");
|
||||
/**
|
||||
* @GET()
|
||||
* 用在service类的方法上。
|
||||
* 如果不传参数将自动根据方法名获取接口请求的地址
|
||||
* 如果传参了,那么使用用户传入的地址去发送网络请求
|
||||
*
|
||||
* 如果 useHandle 为 true 那么方法将获得ajax请求的数据
|
||||
* 否则 不会将数据给方法
|
||||
* @param RequestParams
|
||||
* @constructor
|
||||
*/
|
||||
function GET(RequestParams) {
|
||||
return function (target, propertyKey, descriptor) {
|
||||
var _this = this;
|
||||
var url = Index_config_1.default.ApiUrl.ApiList[propertyKey], handle = false, header = {};
|
||||
(RequestParams && RequestParams.url)
|
||||
? url = RequestParams.url
|
||||
: (RequestParams && RequestParams.useHandle)
|
||||
? handle = RequestParams.useHandle
|
||||
: (RequestParams && RequestParams.header)
|
||||
? header = RequestParams.header
|
||||
: '';
|
||||
var OldMethods = descriptor.value;
|
||||
if (handle) {
|
||||
descriptor.value = function (data) { return __awaiter(_this, void 0, void 0, function () { var _a, _b, _c; return __generator(this, function (_d) {
|
||||
switch (_d.label) {
|
||||
case 0:
|
||||
_b = (_a = OldMethods).apply;
|
||||
_c = [target];
|
||||
return [4 /*yield*/, (new Http_net_1.Http).GET({ url: url, data: data, header: header })];
|
||||
case 1: return [4 /*yield*/, _b.apply(_a, _c.concat([[_d.sent()]]))];
|
||||
case 2: return [2 /*return*/, _d.sent()];
|
||||
}
|
||||
}); }); };
|
||||
return descriptor;
|
||||
}
|
||||
else {
|
||||
descriptor.value = function (data) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, (new Http_net_1.Http).GET({ url: url, data: data, header: header })];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
}); }); };
|
||||
return descriptor;
|
||||
}
|
||||
};
|
||||
}
|
||||
exports.GET = GET;
|
||||
//# sourceMappingURL=Http.annotation.js.map
|
||||
1
dist/core/annotation/Http.annotation.js.map
vendored
Normal file
1
dist/core/annotation/Http.annotation.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Http.annotation.js","sourceRoot":"","sources":["../../../src/core/annotation/Http.annotation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAA0C;AAC1C,0CAAmC;AAEnC;;;;;;;;;;GAUG;AACH,SAAgB,GAAG,CAAE,aAAwF;IACzG,OAAO,UAAU,MAAW,EAAE,WAAmB,EAAE,UAA8B;QAA1E,iBAuBN;QAtBG,IAAI,GAAG,GAAW,sBAAM,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAChD,MAAM,GAAY,KAAK,EACvB,MAAM,GAAW,EAAE,CAAC;QAExB,CAAC,aAAa,IAAI,aAAa,CAAC,GAAG,CAAC;YAChC,CAAC,CAAC,GAAG,GAAG,aAAa,CAAC,GAAG;YACzB,CAAC,CAAC,CAAC,aAAa,IAAI,aAAa,CAAC,SAAS,CAAC;gBACxC,CAAC,CAAC,MAAM,GAAG,aAAa,CAAC,SAAS;gBAClC,CAAC,CAAC,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,CAAC;oBACrC,CAAC,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM;oBAC/B,CAAC,CAAC,EAAE,CAAC;QAEjB,IAAI,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC;QAClC,IAAI,MAAM,EAAE;YACR,UAAU,CAAC,KAAK,GAAG,UAAO,IAA2B;;;wBAC3C,KAAA,CAAA,KAAA,UAAU,CAAA,CAAC,KAAK,CAAA;8BAAC,MAAM;wBAAI,qBAAM,CAAC,IAAI,eAAI,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAA;4BAA/F,qBAAM,yBAA2B,SAA8D,IAAG,EAAA;4BAAlG,sBAAA,SAAkG,EAAA;;qBAAA,CAAA;YACtG,OAAO,UAAU,CAAA;SACpB;aAAM;YACH,UAAU,CAAC,KAAK,GAAG,UAAO,IAA2B;;4BACjD,qBAAM,CAAC,IAAI,eAAI,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAA;4BAA9D,sBAAA,SAA8D,EAAA;;qBAAA,CAAA;YAClE,OAAO,UAAU,CAAA;SACpB;IACL,CAAC,CAAA;AACL,CAAC;AAzBD,kBAyBC"}
|
||||
49
dist/core/annotation/Ioc.annotation.js
vendored
Normal file
49
dist/core/annotation/Ioc.annotation.js
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Inject = exports.Injectable = void 0;
|
||||
require("reflect-metadata");
|
||||
var Ioc_model_1 = __importDefault(require("@model/Ioc.model"));
|
||||
/**
|
||||
* 收集类依赖
|
||||
* @constructor
|
||||
*/
|
||||
function Injectable() {
|
||||
return function (_constructor) {
|
||||
if (Ioc_model_1.default.classPool.indexOf(_constructor) !== -1) {
|
||||
throw new Error('无需重复收集类');
|
||||
}
|
||||
else {
|
||||
//注册
|
||||
Ioc_model_1.default.classPool = [_constructor];
|
||||
}
|
||||
};
|
||||
}
|
||||
exports.Injectable = Injectable;
|
||||
/**
|
||||
* 将类依赖实例化然后注入到被装饰的属性中
|
||||
* @constructor
|
||||
*/
|
||||
function Inject() {
|
||||
return function (target, propertyName) {
|
||||
console.log("target: ", target);
|
||||
console.log("propertyName: ", propertyName);
|
||||
/**
|
||||
* 使用 reflect-metadata 提供的内置 类型元数据键 design:type 通过反射拿到被装饰属性的类型
|
||||
* 也就是 类属性要实例化 的 service 类
|
||||
*/
|
||||
var propertyType = Reflect.getMetadata('design:type', target, propertyName);
|
||||
console.log("类属性要实例化 propertyType: ", propertyType);
|
||||
if (Ioc_model_1.default.classPool.indexOf(propertyType) == -1) {
|
||||
throw new Error('被装饰的属性所属的变量类型类,没有被装饰器@Injectable()注入,请检查!');
|
||||
}
|
||||
else {
|
||||
// 从存取器的数组中通过下标取出被装饰属性对应的service类,然后实例化这个类,在放入被装饰的属性中
|
||||
target[propertyName] = new (Ioc_model_1.default.classPool[Ioc_model_1.default.classPool.indexOf(propertyType)])();
|
||||
}
|
||||
};
|
||||
}
|
||||
exports.Inject = Inject;
|
||||
//# sourceMappingURL=Ioc.annotation.js.map
|
||||
1
dist/core/annotation/Ioc.annotation.js.map
vendored
Normal file
1
dist/core/annotation/Ioc.annotation.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Ioc.annotation.js","sourceRoot":"","sources":["../../../src/core/annotation/Ioc.annotation.ts"],"names":[],"mappings":";;;;;;AAAA,4BAA0B;AAC1B,+DAAwC;AAExC;;;GAGG;AACH,SAAgB,UAAU;IACtB,OAAO,UAAC,YAA4C;QAChD,IAAG,mBAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE;YAChD,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;SAC9B;aAAM;YACH,IAAI;YACJ,mBAAQ,CAAC,SAAS,GAAG,CAAC,YAAY,CAAC,CAAA;SACtC;IACL,CAAC,CAAA;AACL,CAAC;AATD,gCASC;AAED;;;GAGG;AACH,SAAgB,MAAM;IAClB,OAAO,UAAU,MAAW,EAAE,YAAoB;QAC9C,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;QAC/B,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAA;QAC3C;;;WAGG;QACH,IAAM,YAAY,GAAQ,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QACnF,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,YAAY,CAAC,CAAA;QAEnD,IAAI,mBAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE;YAChD,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;SAChE;aAAM;YACH,qDAAqD;YACrD,MAAM,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,mBAAQ,CAAC,SAAS,CAAC,mBAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAA;SAC9F;IACL,CAAC,CAAA;AACL,CAAC;AAlBD,wBAkBC"}
|
||||
8
dist/core/annotation/Open.js
vendored
Normal file
8
dist/core/annotation/Open.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
function Open() {
|
||||
// @ts-ignore
|
||||
return (target, propertyKey, descriptor) => {
|
||||
};
|
||||
}
|
||||
exports.default = Open;
|
||||
1
dist/core/annotation/Run.annotation.js.map
vendored
Normal file
1
dist/core/annotation/Run.annotation.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Run.annotation.js","sourceRoot":"","sources":["../../../src/core/annotation/Run.annotation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,mEAAuC;AACvC,wF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AAC9B,gCAAgC;AAChC,oCAAoC;AACpC,2BAA2B;AAC3B,gBAAgB;AAChB,YAAY;AACZ,QAAQ;AACR,IAAI"}
|
||||
114
dist/core/annotation/run.annotation.js
vendored
Normal file
114
dist/core/annotation/run.annotation.js
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CreateTray = exports.CreateTouchbar = exports.CreateApplicationMenu = exports.AutoLoadWindow = void 0;
|
||||
var Index_utils_1 = __importDefault(require("@utils/Index.utils"));
|
||||
var ApplicationMenu_interactive_1 = require("@interactive/ApplicationMenu.interactive");
|
||||
var Touchbar_interactive_1 = require("@interactive/Touchbar.interactive");
|
||||
var Tray_interactive_1 = require("@interactive/Tray.interactive");
|
||||
function AutoLoadWindow() {
|
||||
return function (_constructor) {
|
||||
return /** @class */ (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var _this = this;
|
||||
// 这里只要动态 require 导入类即可,然后类上的装饰器就会运行
|
||||
Index_utils_1.default.GetController();
|
||||
_this = _super.call(this) || this;
|
||||
return _this;
|
||||
}
|
||||
return class_1;
|
||||
}(_constructor));
|
||||
};
|
||||
}
|
||||
exports.AutoLoadWindow = AutoLoadWindow;
|
||||
function CreateApplicationMenu() {
|
||||
return function (_constructor) {
|
||||
return /** @class */ (function (_super) {
|
||||
__extends(class_2, _super);
|
||||
function class_2() {
|
||||
var _this = this;
|
||||
// 创建顶部菜单
|
||||
new ApplicationMenu_interactive_1.ApplicationMenu();
|
||||
_this = _super.call(this) || this;
|
||||
return _this;
|
||||
}
|
||||
return class_2;
|
||||
}(_constructor));
|
||||
};
|
||||
}
|
||||
exports.CreateApplicationMenu = CreateApplicationMenu;
|
||||
function CreateTouchbar() {
|
||||
return function (_constructor) {
|
||||
return /** @class */ (function (_super) {
|
||||
__extends(class_3, _super);
|
||||
function class_3() {
|
||||
var _this = this;
|
||||
/**
|
||||
* 创建Touchbar
|
||||
* 这边做延时300毫秒的原因解释起来有点复杂
|
||||
* 1:因为我设计了 @Inject() 和 @Injectable() 注解,而在 controller 中
|
||||
* 被注解的属性 VideoImplService 存放的是 请求中间层,而请求中间层是调用的Http请求方法GET,而这个方法
|
||||
* 为了拿到返回值,所以设计成async异步的,这就导致使用请求中间层的controller方法也是async。
|
||||
* 2:而使用的方法如果是 async 那么就会导致 注解 @Render() 内部 也就是 startWindows 方法内,在自动调用方法
|
||||
* 获取传递给模板的方法返回数值的时候必须 await,也就变成了:await target[name]()。
|
||||
* 而这个注解 @CreateTouchbar() 运行时间 和 注解 @AutoLoadWindow() 基本同时间跑,
|
||||
* 所以会导致 @CreateTouchbar() 运行的时候太快了,尼玛币 await target[name]() 还没跑完,所以导致
|
||||
* 存取器里面:Windows.CurrentBrowserWindow 没有数值,所以 @CreateTouchbar() 所依赖的 Windows.CurrentBrowserWindow
|
||||
* 为空,所以touchbar菜单无法 setTouchBar 上。
|
||||
* 3:这里等300毫秒,是等 await target[name]() 完成,窗口也创建完成,然后 Windows.CurrentBrowserWindow
|
||||
* 再去创建 touchbar菜单。
|
||||
* 好了,说完了....同学不要睡了!
|
||||
*/
|
||||
setTimeout(function () { return new Touchbar_interactive_1.Touchbar(); }, 3000);
|
||||
_this = _super.call(this) || this;
|
||||
return _this;
|
||||
}
|
||||
return class_3;
|
||||
}(_constructor));
|
||||
};
|
||||
}
|
||||
exports.CreateTouchbar = CreateTouchbar;
|
||||
function CreateTray() {
|
||||
return function (_constructor) {
|
||||
return /** @class */ (function (_super) {
|
||||
__extends(class_4, _super);
|
||||
function class_4() {
|
||||
var _this = this;
|
||||
// 创建Mac系统顶部图标
|
||||
new Tray_interactive_1.TrayInteractive();
|
||||
_this = _super.call(this) || this;
|
||||
return _this;
|
||||
}
|
||||
return class_4;
|
||||
}(_constructor));
|
||||
};
|
||||
}
|
||||
exports.CreateTray = CreateTray;
|
||||
// export function CreateApplicationIpc(): any {
|
||||
// return (_constructor: {new(...args:any[]):{}}) => {
|
||||
// return class extends _constructor {
|
||||
// constructor() {
|
||||
// // 开启应用级ipc监听
|
||||
// new Application()
|
||||
// super();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//# sourceMappingURL=Run.annotation.js.map
|
||||
1
dist/core/config/.pydio
vendored
Normal file
1
dist/core/config/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
69b8c07b-090c-4e32-88e5-bbee314a181b
|
||||
1
dist/core/config/Index.config.js.map
vendored
Normal file
1
dist/core/config/Index.config.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Index.config.js","sourceRoot":"","sources":["../../../src/core/config/Index.config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,qCAAwH;AACxH,6EAAiD;AACzC,IAAA,aAAa,GAAoC,mBAAQ,cAA5C,EAAE,cAAc,GAAoB,mBAAQ,eAA5B,EAAC,cAAc,GAAK,mBAAQ,eAAb,CAAc;AAClE,6BAA4B;AAG5B;IAAA;IAwNA,CAAC;IAvNG;;;;OAIG;IACW,gBAAS,GAAW,sBAAsB,CAAC;IAEzD,QAAQ;IACM,wBAAiB,GAAW,OAAO,CAAC;IAElD,WAAW;IACG,YAAK,GAAY,OAAO,CA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N,aAAC;CAAA,AAxND,IAwNC;kBAxNoB,MAAM"}
|
||||
6
dist/core/config/api.config.js
vendored
Normal file
6
dist/core/config/api.config.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApiConfig = void 0;
|
||||
class ApiConfig {
|
||||
}
|
||||
exports.ApiConfig = ApiConfig;
|
||||
267
dist/core/config/index.config.js
vendored
Normal file
267
dist/core/config/index.config.js
vendored
Normal file
@@ -0,0 +1,267 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var electron_1 = require("electron");
|
||||
var Windows_model_1 = __importDefault(require("@/core/model/Windows.model"));
|
||||
var TouchBarLabel = electron_1.TouchBar.TouchBarLabel, TouchBarButton = electron_1.TouchBar.TouchBarButton, TouchBarSpacer = electron_1.TouchBar.TouchBarSpacer;
|
||||
var path_1 = require("path");
|
||||
var Config = /** @class */ (function () {
|
||||
function Config() {
|
||||
}
|
||||
/**
|
||||
* 启动页面默认为 Home.controller/Home
|
||||
* 程序内部根据这个配置自动载入Home.controller.ts文件,并自动调用类里面的Home()方法实现窗口创建
|
||||
* 可以改成其他,例如 PlayVideo.controller/Theme
|
||||
*/
|
||||
Config.StartPage = 'Home.controller/Home';
|
||||
// 应用版本号
|
||||
Config.CurrentAppVersion = '0.0.1';
|
||||
// 是否为Mac系统
|
||||
Config.isMac = process.platform === 'darwin';
|
||||
Config.LogsPath = "../../../logs/";
|
||||
// ajax 请求地址
|
||||
Config.ApiUrl = {
|
||||
BaseUrl: 'http://www.bmycode.com:3000/api',
|
||||
ApiList: {
|
||||
PlayList: '/list',
|
||||
PalyVideo: '/play',
|
||||
VideoComment: '/CommentList',
|
||||
}
|
||||
};
|
||||
// jade 模板引擎配置,更多参数自行阅读声明文件
|
||||
Config.jadeCompile0ptions = {
|
||||
pretty: true,
|
||||
globals: {
|
||||
css: [
|
||||
'http://mdui-aliyun.cdn.w3cbus.com/source/dist/css/mdui.min.css',
|
||||
'http://at.alicdn.com/t/font_1934749_hhc110df87a.css',
|
||||
],
|
||||
js: [
|
||||
'http://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js',
|
||||
'http://mdui-aliyun.cdn.w3cbus.com/source/dist/js/mdui.min.js'
|
||||
]
|
||||
}
|
||||
};
|
||||
// 应用程序的页面地址,地址为打包后的相对路径
|
||||
Config.PagePath = {
|
||||
Home: path_1.join(__dirname, '../../application/page/Home/Home.html'),
|
||||
PlayVideo: path_1.join(__dirname, '../../application/page/PlayVideo/PlayVideo.html'),
|
||||
};
|
||||
// 所有页面窗体配置
|
||||
Config.PageSize = {
|
||||
Home: {
|
||||
width: 1200,
|
||||
height: 760,
|
||||
frame: false,
|
||||
backgroundColor: '#fff',
|
||||
titleBarStyle: 'hiddenInset',
|
||||
transparent: true,
|
||||
webPreferences: {
|
||||
webSecurity: false,
|
||||
nodeIntegration: true,
|
||||
webviewTag: true,
|
||||
}
|
||||
},
|
||||
PlayVideo: {
|
||||
width: 1084,
|
||||
height: 610,
|
||||
frame: false,
|
||||
backgroundColor: '#000',
|
||||
titleBarStyle: 'hidden',
|
||||
modal: true,
|
||||
show: false,
|
||||
resizable: true,
|
||||
transparent: true,
|
||||
webPreferences: {
|
||||
webSecurity: false,
|
||||
nodeIntegration: true,
|
||||
webviewTag: true
|
||||
}
|
||||
}
|
||||
};
|
||||
// Mac系统顶部全局菜单 右边图标
|
||||
Config.TrayConfig = {
|
||||
TopMenuRightImage: path_1.join(__dirname, '../../application/assets/img/pug.png'),
|
||||
TopMenuRightDropdown: [
|
||||
{
|
||||
label: '显示主窗口',
|
||||
click: function () {
|
||||
Windows_model_1.default.CurrentBrowserWindow.show();
|
||||
}
|
||||
},
|
||||
{
|
||||
icon: path_1.join(__dirname, '../../application/assets/img/pug.png'),
|
||||
label: '下拉菜单测试',
|
||||
type: 'checkbox',
|
||||
checked: true,
|
||||
click: function (menuItem, browserWindow) {
|
||||
console.log("menuItem: ", menuItem);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '菜单',
|
||||
submenu: [
|
||||
{
|
||||
label: '子菜单1'
|
||||
},
|
||||
{
|
||||
label: '子菜单2'
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
role: 'quit',
|
||||
label: '退出'
|
||||
},
|
||||
],
|
||||
TopMenuRightTips: '测试提醒'
|
||||
};
|
||||
// Mac or win 系统顶部全局菜单
|
||||
Config.TemplateMenu = [
|
||||
{
|
||||
label: electron_1.app.name,
|
||||
submenu: [
|
||||
{ label: "\u5173\u4E8E " + electron_1.app.name, role: 'about' },
|
||||
{ type: 'separator' },
|
||||
{ label: '服务', role: 'services' },
|
||||
{ type: 'separator' },
|
||||
{ label: "\u9690\u85CF " + electron_1.app.name, role: 'hide' },
|
||||
{ role: 'hideOthers' },
|
||||
{ label: '隐藏其他', role: 'unhide' },
|
||||
{ type: 'separator' },
|
||||
{ label: "\u9000\u51FA" + electron_1.app.name, role: 'quit' }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '文件',
|
||||
},
|
||||
{
|
||||
label: '编辑',
|
||||
submenu: [
|
||||
{ label: '撤销', role: 'undo' },
|
||||
{ label: '恢复', role: 'redo' },
|
||||
{ type: 'separator' },
|
||||
{ label: '剪切', role: 'cut' },
|
||||
{ label: '复制', role: 'copy' },
|
||||
{ label: '粘贴', role: 'paste' },
|
||||
{ type: 'separator' },
|
||||
{ label: '粘贴保留样式', role: 'pasteAndMatchStyle' },
|
||||
{ label: '删除', role: 'delete' },
|
||||
{ label: '全选', role: 'selectAll' },
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: '听写',
|
||||
submenu: [
|
||||
{ label: '开始听写', role: 'startSpeaking' },
|
||||
{ label: '停止听写', role: 'stopSpeaking' }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '视图',
|
||||
submenu: [
|
||||
{ label: '刷新', role: 'reload' },
|
||||
{ label: '重置', role: 'resetZoom' },
|
||||
{ label: '放大', role: 'zoomIn' },
|
||||
{ label: '缩小', role: 'zoomOut' },
|
||||
{ type: 'separator' },
|
||||
{ label: '全屏', role: 'togglefullscreen' },
|
||||
{ label: '切换开发人员工具', role: 'toggleDevTools' },
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '窗口',
|
||||
submenu: [
|
||||
{ label: '最小化', role: 'minimize' },
|
||||
{ label: '最大化', role: 'zoom' },
|
||||
{ label: '关闭', role: 'close' }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '帮助',
|
||||
role: 'help',
|
||||
submenu: [
|
||||
{
|
||||
label: '了解更多',
|
||||
click: function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, electron_1.shell.openExternal('https://electronjs.org')];
|
||||
case 1:
|
||||
_a.sent();
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
}); }
|
||||
},
|
||||
{
|
||||
label: 'GitHub主页',
|
||||
click: function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
return [2 /*return*/];
|
||||
});
|
||||
}); }
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
// Mac touchbar 菜单
|
||||
Config.TouchBarConfig = {
|
||||
items: [
|
||||
new TouchBarSpacer({ size: 'small' }),
|
||||
new TouchBarButton({
|
||||
label: '测试1',
|
||||
backgroundColor: '#3a3a3c',
|
||||
click: function () { }
|
||||
}),
|
||||
new TouchBarSpacer({ size: 'small' }),
|
||||
new TouchBarButton({
|
||||
label: '测试2',
|
||||
backgroundColor: '#3a3a3c',
|
||||
click: function () { }
|
||||
}),
|
||||
]
|
||||
};
|
||||
return Config;
|
||||
}());
|
||||
exports.default = Config;
|
||||
//# sourceMappingURL=Index.config.js.map
|
||||
1
dist/core/controller/.pydio
vendored
Normal file
1
dist/core/controller/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
47fe2a26-58f5-4ae7-8eac-a0538df067dd
|
||||
125
dist/core/controller/Home.controller.js
vendored
Normal file
125
dist/core/controller/Home.controller.js
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.HomeController = void 0;
|
||||
var Creted_annotation_1 = require("@annotation/Creted.annotation");
|
||||
var Video_impl_service_1 = require("@service/impl/Video.impl.service");
|
||||
var Ioc_annotation_1 = require("@annotation/Ioc.annotation");
|
||||
var File_ipc_1 = require("@ipc/module/File.ipc");
|
||||
var HomeController = /** @class */ (function () {
|
||||
function HomeController() {
|
||||
}
|
||||
HomeController.prototype.Home = function (test) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var res;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, this.VideoImplService.PlayList({})];
|
||||
case 1:
|
||||
res = _a.sent();
|
||||
return [2 /*return*/, {
|
||||
header: true,
|
||||
nav: true,
|
||||
title: '首页页面窗口-测试传给模板的数据',
|
||||
desc: '点我发送ipc,打开窗口,代码实现分别在:src/application/assets/js/page/Home.js 和 src/core/ipc/Application.ipc.ts 和 @CreateApplicationIpc 装饰器中!!!',
|
||||
list: res.data
|
||||
}];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
HomeController.prototype.PlayVideo = function (params) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _a;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
console.log("参数:", params);
|
||||
if (!params.hasOwnProperty("list")) return [3 /*break*/, 1];
|
||||
return [2 /*return*/, {
|
||||
header: false,
|
||||
nav: false,
|
||||
img: true,
|
||||
video: params
|
||||
}];
|
||||
case 1:
|
||||
_a = {
|
||||
header: false,
|
||||
nav: false,
|
||||
img: false
|
||||
};
|
||||
return [4 /*yield*/, this.VideoImplService.PalyVideo(params)];
|
||||
case 2:
|
||||
_a.video = _b.sent();
|
||||
return [4 /*yield*/, this.VideoImplService.VideoComment({ photoId: params.photoId })];
|
||||
case 3: return [2 /*return*/, (_a.Comment = _b.sent(),
|
||||
_a)];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
__decorate([
|
||||
Ioc_annotation_1.Inject(),
|
||||
__metadata("design:type", Video_impl_service_1.VideoImplService)
|
||||
], HomeController.prototype, "VideoImplService", void 0);
|
||||
__decorate([
|
||||
Creted_annotation_1.Render(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], HomeController.prototype, "Home", null);
|
||||
__decorate([
|
||||
Creted_annotation_1.Render(),
|
||||
Creted_annotation_1.Ipc([File_ipc_1.FileIpc]),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], HomeController.prototype, "PlayVideo", null);
|
||||
return HomeController;
|
||||
}());
|
||||
exports.HomeController = HomeController;
|
||||
//# sourceMappingURL=Home.controller.js.map
|
||||
1
dist/core/controller/Home.controller.js.map
vendored
Normal file
1
dist/core/controller/Home.controller.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Home.controller.js","sourceRoot":"","sources":["../../../src/core/controller/Home.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAA4D;AAC5D,uEAAoE;AACpE,6DAAoD;AACpD,iDAA+C;AAE/C;IAAA;IAwCA,CAAC;IAlCgB,6BAAI,GAAjB,UAAkB,IAAY;;;;;4BAChB,qBAAM,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAA;;wBAA9C,GAAG,GAAG,SAAwC;wBAClD,sBAAO;gCACH,MAAM,EAAE,IAAI;gCACZ,GAAG,EAAE,IAAI;gCACT,KAAK,EAAE,kBAAkB;gCACzB,IAAI,EAAE,+HAA+H;gCACrI,IAAI,EAAE,GAAG,CAAC,IAAI;6BACjB,EAAC;;;;KACL;IAMY,kCAAS,GAAtB,UAAuB,MAA6B;;;;;;wBAChD,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;6BACrB,MAAiB,CAAC,cAAc,CAAC,MAAM,CAAC,EAAzC,wBAAyC;wBACzC,sBAAO;gCACH,MAAM,EAAE,KAAK;gCACb,GAAG,EAAE,KAAK;gCACV,GAAG,EAAE,IAAI;gCACT,KAAK,EAAE,MAAM;6BAChB,EAAA;;;4BAGG,MAAM,EAAE,KAAK;4BACb,GAAG,EAAE,KAAK;4BACV,GAAG,EAAE,KAAK;;wBACH,qBAAM,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAA;;wBAApD,QAAK,GAAE,SAA6C;wBAC3C,qBAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE,OAAO,EAAG,MAAc,CAAC,OAAO,EAAE,CAAC,EAAA;4BAL3F,uBAKI,UAAO,GAAE,SAA8E;iCAC1F;;;;KAER;IApCD;QADC,uBAAM,EAAE;kCAC0B,qCAAgB;4DAAC;IAGpD;QADC,0BAAM,EAAE;;;;8CAUR;IAMD;QAJC,0BAAM,EAAE;QACR,uBAAG,CAAC,CAAE,kBAAO,CAAE,CAAC;;;;mDAqBhB;IACL,qBAAC;CAAA,AAxCD,IAwCC;AAxCY,wCAAc"}
|
||||
46
dist/core/controller/Setting.controller.js
vendored
Normal file
46
dist/core/controller/Setting.controller.js
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SettingController = void 0;
|
||||
var Creted_annotation_1 = require("@annotation/Creted.annotation");
|
||||
/**
|
||||
* 首页窗体
|
||||
* @Render() 注解:
|
||||
* 用在类的方法上,注意方法名 和 页面模板名称一致。
|
||||
* 作用:表示使用该方法创建页面窗口,方法返回的数据需要是个对象,返回的数据会传给模板
|
||||
* 用法:
|
||||
* 1:@Render(),不传参数,会根据方法名自动载入对应的jade页面文件来创建窗口
|
||||
* 2:@Render('PlayVideo'),传入参数,会根据传入的参数去寻找对应的jade页面来创建窗口
|
||||
* 注意:传入参数后不仅会使用自定义页面,还会抛弃配置文件中的 StartPage 主窗窗口配置
|
||||
*
|
||||
* @Ipc() 注解:
|
||||
* 用在类的方法上,接受一个未实例化的类作为参数
|
||||
* 作用:Ipc注解会自动运行这个类里面的所有方法,请在方法中放置 ipcMain.on 代码!
|
||||
*/
|
||||
var SettingController = /** @class */ (function () {
|
||||
function SettingController() {
|
||||
}
|
||||
SettingController.prototype.Setting = function () {
|
||||
return {
|
||||
title: '设置页面窗口-测试传给模板的数据',
|
||||
desc: '介绍'
|
||||
};
|
||||
};
|
||||
__decorate([
|
||||
Creted_annotation_1.Render(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", void 0)
|
||||
], SettingController.prototype, "Setting", null);
|
||||
return SettingController;
|
||||
}());
|
||||
exports.SettingController = SettingController;
|
||||
//# sourceMappingURL=Setting.controller.js.map
|
||||
1
dist/core/controller/Setting.controller.js.map
vendored
Normal file
1
dist/core/controller/Setting.controller.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Setting.controller.js","sourceRoot":"","sources":["../../../src/core/controller/Setting.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mEAA4D;AAG5D;;;;;;;;;;;;;GAaG;AACH;IAAA;IAQA,CAAC;IANU,mCAAO,GAAd;QACI,OAAO;YACH,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,IAAI;SACb,CAAC;IACN,CAAC;IALD;QADC,0BAAM,EAAE;;;;oDAMR;IACL,wBAAC;CAAA,AARD,IAQC;AARY,8CAAiB"}
|
||||
1
dist/core/interactive/.pydio
vendored
Normal file
1
dist/core/interactive/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bfe99bde-0c9c-4cd0-af53-b0657c72ceb0
|
||||
20
dist/core/interactive/ApplicationMenu.interactive.js
vendored
Normal file
20
dist/core/interactive/ApplicationMenu.interactive.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApplicationMenu = void 0;
|
||||
var electron_1 = require("electron");
|
||||
var Index_config_1 = __importDefault(require("@config/Index.config"));
|
||||
var ApplicationMenu = /** @class */ (function () {
|
||||
function ApplicationMenu() {
|
||||
this.buildFromTemplate();
|
||||
}
|
||||
ApplicationMenu.prototype.buildFromTemplate = function () {
|
||||
this.AppMenu = electron_1.Menu.buildFromTemplate(Index_config_1.default.TemplateMenu);
|
||||
electron_1.Menu.setApplicationMenu(this.AppMenu);
|
||||
};
|
||||
return ApplicationMenu;
|
||||
}());
|
||||
exports.ApplicationMenu = ApplicationMenu;
|
||||
//# sourceMappingURL=ApplicationMenu.interactive.js.map
|
||||
1
dist/core/interactive/ApplicationMenu.interactive.js.map
vendored
Normal file
1
dist/core/interactive/ApplicationMenu.interactive.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ApplicationMenu.interactive.js","sourceRoot":"","sources":["../../../src/core/interactive/ApplicationMenu.interactive.ts"],"names":[],"mappings":";;;;;;AAAA,qCAAgF;AAChF,sEAA0C;AAE1C;IAEI;QACI,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAED,2CAAiB,GAAjB;QACI,IAAI,CAAC,OAAO,GAAG,eAAI,CAAC,iBAAiB,CAAC,sBAAM,CAAC,YAAY,CAAC,CAAC;QAC3D,eAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IACL,sBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,0CAAe"}
|
||||
96
dist/core/interactive/Dialog.interactive.js
vendored
Normal file
96
dist/core/interactive/Dialog.interactive.js
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Dialog = void 0;
|
||||
var electron_1 = require("electron");
|
||||
var Windows_model_1 = __importDefault(require("@model/Windows.model"));
|
||||
var Dialog = /** @class */ (function () {
|
||||
function Dialog() {
|
||||
}
|
||||
/**
|
||||
* 错误弹窗
|
||||
* @param title
|
||||
* @param content
|
||||
* @constructor
|
||||
*/
|
||||
Dialog.ErrorBox = function (title, content) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, electron_1.dialog.showErrorBox(title, content)];
|
||||
case 1:
|
||||
_a.sent();
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Dialog.showSaveDialog = function (title, message) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var SaveFile;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, electron_1.dialog.showOpenDialog(Windows_model_1.default.CurrentBrowserWindow, {
|
||||
title: title,
|
||||
message: message,
|
||||
buttonLabel: '亲,点我确认选择!',
|
||||
filters: [
|
||||
{ name: 'All', extensions: ['*'] },
|
||||
],
|
||||
properties: [
|
||||
'openDirectory',
|
||||
'createDirectory'
|
||||
]
|
||||
})];
|
||||
case 1:
|
||||
SaveFile = _a.sent();
|
||||
if (!SaveFile.canceled) {
|
||||
return [2 /*return*/, SaveFile.filePaths];
|
||||
}
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return Dialog;
|
||||
}());
|
||||
exports.Dialog = Dialog;
|
||||
//# sourceMappingURL=Dialog.interactive.js.map
|
||||
1
dist/core/interactive/Dialog.interactive.js.map
vendored
Normal file
1
dist/core/interactive/Dialog.interactive.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Dialog.interactive.js","sourceRoot":"","sources":["../../../src/core/interactive/Dialog.interactive.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAgD;AAChD,uEAA0C;AAC1C;IAAA;IA8BA,CAAC;IA5BG;;;;;OAKG;IACiB,eAAQ,GAA5B,UAA6B,KAAa,EAAE,OAAe;;;;4BACvD,qBAAM,iBAAM,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,EAAA;;wBAAzC,SAAyC,CAAA;;;;;KAC5C;IAEmB,qBAAc,GAAlC,UAAmC,KAAa,EAAE,OAAe;;;;;4BAC9C,qBAAM,iBAAM,CAAC,cAAc,CAAC,uBAAO,CAAC,oBAAoB,EAAE;4BACrE,KAAK,EAAE,KAAK;4BACZ,OAAO,EAAE,OAAO;4BAChB,WAAW,EAAE,WAAW;4BACxB,OAAO,EAAE;gCACL,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,EAAE;6BACrC;4BACD,UAAU,EAAE;gCACR,eAAe;gCACf,iBAAiB;6BACpB;yBACJ,CAAC,EAAA;;wBAXE,QAAQ,GAAG,SAWb;wBAEF,IAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE;4BACnB,sBAAO,QAAQ,CAAC,SAAS,EAAA;yBAC5B;;;;;KACJ;IACL,aAAC;AAAD,CAAC,AA9BD,IA8BC;AA9BY,wBAAM"}
|
||||
6
dist/core/interactive/Notification.interactive.js
vendored
Normal file
6
dist/core/interactive/Notification.interactive.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Notification = void 0;
|
||||
class Notification {
|
||||
}
|
||||
exports.Notification = Notification;
|
||||
2
dist/core/interactive/ProgressBar.interactive.js
vendored
Normal file
2
dist/core/interactive/ProgressBar.interactive.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
//# sourceMappingURL=ProgressBar.interactive.js.map
|
||||
1
dist/core/interactive/ProgressBar.interactive.js.map
vendored
Normal file
1
dist/core/interactive/ProgressBar.interactive.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ProgressBar.interactive.js","sourceRoot":"","sources":["../../../src/core/interactive/ProgressBar.interactive.ts"],"names":[],"mappings":""}
|
||||
18
dist/core/interactive/Touchbar.interactive.js
vendored
Normal file
18
dist/core/interactive/Touchbar.interactive.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Touchbar = void 0;
|
||||
var electron_1 = require("electron");
|
||||
var Windows_model_1 = __importDefault(require("@/core/model/Windows.model"));
|
||||
var Index_config_1 = __importDefault(require("@config/Index.config"));
|
||||
var TouchBarLabel = electron_1.TouchBar.TouchBarLabel, TouchBarButton = electron_1.TouchBar.TouchBarButton, TouchBarSpacer = electron_1.TouchBar.TouchBarSpacer;
|
||||
var Touchbar = /** @class */ (function () {
|
||||
function Touchbar() {
|
||||
Windows_model_1.default.CurrentBrowserWindow.setTouchBar(new electron_1.TouchBar(Index_config_1.default.TouchBarConfig));
|
||||
}
|
||||
return Touchbar;
|
||||
}());
|
||||
exports.Touchbar = Touchbar;
|
||||
//# sourceMappingURL=Touchbar.interactive.js.map
|
||||
1
dist/core/interactive/Touchbar.interactive.js.map
vendored
Normal file
1
dist/core/interactive/Touchbar.interactive.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Touchbar.interactive.js","sourceRoot":"","sources":["../../../src/core/interactive/Touchbar.interactive.ts"],"names":[],"mappings":";;;;;;AAAA,qCAAuE;AACvE,6EAAiD;AACjD,sEAA0C;AAClC,IAAA,aAAa,GAAoC,mBAAQ,cAA5C,EAAE,cAAc,GAAoB,mBAAQ,eAA5B,EAAC,cAAc,GAAK,mBAAQ,eAAb,CAAc;AAElE;IACI;QACI,uBAAO,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,mBAAQ,CAAC,sBAAM,CAAC,cAAc,CAAC,CAAC,CAAA;IACjF,CAAC;IACL,eAAC;AAAD,CAAC,AAJD,IAIC;AAJY,4BAAQ"}
|
||||
40
dist/core/interactive/Tray.interactive.js
vendored
Normal file
40
dist/core/interactive/Tray.interactive.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.TrayInteractive = void 0;
|
||||
var electron_1 = require("electron");
|
||||
var Index_config_1 = __importDefault(require("@config/Index.config"));
|
||||
var TrayInteractive = /** @class */ (function () {
|
||||
function TrayInteractive() {
|
||||
this.tray = new electron_1.Tray(this.setTemplateImage());
|
||||
this.buildTrayMenu();
|
||||
this.TrayItemClick();
|
||||
}
|
||||
/**
|
||||
* 全局菜单图标被点击时触发事件
|
||||
* @constructor
|
||||
*/
|
||||
TrayInteractive.prototype.TrayItemClick = function () {
|
||||
this.tray.on('click', function () {
|
||||
console.log("按钮被点击");
|
||||
});
|
||||
};
|
||||
TrayInteractive.prototype.buildTrayMenu = function () {
|
||||
var contextMenu = electron_1.Menu.buildFromTemplate(Index_config_1.default.TrayConfig.TopMenuRightDropdown);
|
||||
this.tray.setToolTip(Index_config_1.default.TrayConfig.TopMenuRightTips);
|
||||
this.tray.setContextMenu(contextMenu);
|
||||
};
|
||||
/**
|
||||
* 创建 NativeImage 图片,图片会随着Mac系统主题的切换而自定变纯黑或纯白
|
||||
*/
|
||||
TrayInteractive.prototype.setTemplateImage = function () {
|
||||
var image = electron_1.nativeImage.createFromPath(Index_config_1.default.TrayConfig.TopMenuRightImage);
|
||||
image.setTemplateImage(true);
|
||||
return image;
|
||||
};
|
||||
return TrayInteractive;
|
||||
}());
|
||||
exports.TrayInteractive = TrayInteractive;
|
||||
//# sourceMappingURL=Tray.interactive.js.map
|
||||
1
dist/core/interactive/Tray.interactive.js.map
vendored
Normal file
1
dist/core/interactive/Tray.interactive.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Tray.interactive.js","sourceRoot":"","sources":["../../../src/core/interactive/Tray.interactive.ts"],"names":[],"mappings":";;;;;;AAAA,qCAAgE;AAChE,sEAA0C;AAE1C;IAII;QACI,IAAI,CAAC,IAAI,GAAG,IAAI,eAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAC9C,IAAI,CAAC,aAAa,EAAE,CAAA;QACpB,IAAI,CAAC,aAAa,EAAE,CAAA;IACxB,CAAC;IAED;;;OAGG;IACK,uCAAa,GAArB;QACI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE;YAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC,CAAC,CAAA;IACN,CAAC;IAEO,uCAAa,GAArB;QACI,IAAI,WAAW,GAAS,eAAI,CAAC,iBAAiB,CAAC,sBAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;QACvF,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,sBAAM,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAA;QACxD,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;IACzC,CAAC;IAED;;OAEG;IACK,0CAAgB,GAAxB;QACI,IAAI,KAAK,GAAgB,sBAAW,CAAC,cAAc,CAAC,sBAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;QACzF,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAA;QAC5B,OAAO,KAAK,CAAA;IAChB,CAAC;IACL,sBAAC;AAAD,CAAC,AAlCD,IAkCC;AAlCY,0CAAe"}
|
||||
2
dist/core/interactive/dock.interactive.js
vendored
Normal file
2
dist/core/interactive/dock.interactive.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
//# sourceMappingURL=dock.interactive.js.map
|
||||
1
dist/core/interactive/dock.interactive.js.map
vendored
Normal file
1
dist/core/interactive/dock.interactive.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dock.interactive.js","sourceRoot":"","sources":["../../../src/core/interactive/dock.interactive.ts"],"names":[],"mappings":""}
|
||||
1
dist/core/ipc/.pydio
vendored
Normal file
1
dist/core/ipc/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
91ca88f0-fda6-4103-956e-6247b54fda70
|
||||
1
dist/core/ipc/Application.ipc.js.map
vendored
Normal file
1
dist/core/ipc/Application.ipc.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Application.ipc.js","sourceRoot":"","sources":["../../../src/core/ipc/Application.ipc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAwC;AACxC,mEAAuC;AACvC,uEAA2C;AAC3C,sEAA0C;AAG1C;IAAA;IA6CA,CAAC;IA5CG;;;;;;;OAOG;IACH,mCAAa,GAAb;QAAA,iBA0BC;QAzBG,kBAAO,CAAC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;;OAEG;IACH,kCAAY,GAAZ;QAAA,iBAIC;QAHG,kBAAO,CAAC,EAAE,CAAC,cAAc,EAAE,UAAO,KAAK,EAAE,GAAO;;;4BAC5C,qBAAM,gBAAK,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAA;;wBAAjC,SAAiC,CAAA;;;;aACpC,CAAC,CAAC;IACP,CAAC;IACL,kBAAC;AAAD,CAAC,AA7CD,IA6CC;AA7CY,kCAAW"}
|
||||
1
dist/core/ipc/Components.ipc.js.map
vendored
Normal file
1
dist/core/ipc/Components.ipc.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Components.ipc.js","sourceRoot":"","sources":["../../../src/core/ipc/Components.ipc.ts"],"names":[],"mappings":""}
|
||||
16
dist/core/ipc/Test.ipc.js
vendored
Normal file
16
dist/core/ipc/Test.ipc.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.TestIpc = void 0;
|
||||
/**
|
||||
* 仅供测试,可以删除!!
|
||||
*/
|
||||
class TestIpc {
|
||||
demos() {
|
||||
return 'demos';
|
||||
}
|
||||
demo2() {
|
||||
return 'demos2';
|
||||
}
|
||||
}
|
||||
exports.TestIpc = TestIpc;
|
||||
//# sourceMappingURL=Test.ipc.js.map
|
||||
1
dist/core/ipc/Test.ipc.js.map
vendored
Normal file
1
dist/core/ipc/Test.ipc.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Test.ipc.js","sourceRoot":"","sources":["../../../src/core/ipc/Test.ipc.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,OAAO;IAChB,KAAK;QACD,OAAO,OAAO,CAAA;IAClB,CAAC;IAED,KAAK;QACD,OAAO,QAAQ,CAAA;IACnB,CAAC;CACJ;AARD,0BAQC"}
|
||||
107
dist/core/ipc/application.ipc.js
vendored
Normal file
107
dist/core/ipc/application.ipc.js
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Application = void 0;
|
||||
var electron_1 = require("electron");
|
||||
var Index_utils_1 = __importDefault(require("@utils/Index.utils"));
|
||||
var Windows_model_1 = __importDefault(require("@model/Windows.model"));
|
||||
var Index_config_1 = __importDefault(require("@config/Index.config"));
|
||||
var Application = /** @class */ (function () {
|
||||
function Application() {
|
||||
}
|
||||
/**
|
||||
* 创建非主窗体之外的窗体,
|
||||
* 在js渲染进程中触发事件
|
||||
* 1:独立窗体
|
||||
* 2:依附在主窗体上的子窗体
|
||||
* 3:依附在独立窗体上的子窗体
|
||||
* @constructor
|
||||
*/
|
||||
Application.prototype.CreatedWindow = function () {
|
||||
var _this = this;
|
||||
electron_1.ipcMain.on('openWindow', function (event, arg) { return __awaiter(_this, void 0, void 0, function () {
|
||||
var ControllerName, MethodsName, data, a, a;
|
||||
return __generator(this, function (_a) {
|
||||
ControllerName = arg.action.split("/")[0], MethodsName = arg.action.split("/")[1], data = arg.data || {};
|
||||
// parent false 创建单独的窗体
|
||||
if (!arg.parent || !arg.hasOwnProperty("parent")) {
|
||||
a = require("../controller/" + ControllerName + ".js");
|
||||
Index_utils_1.default.startWindows(new a[Index_utils_1.default.toUpperCase(ControllerName)](), MethodsName, data);
|
||||
return [2 /*return*/, false];
|
||||
}
|
||||
// parent true 创建默认依附主窗口的子窗口
|
||||
if (arg.hasOwnProperty("parent") || arg.parent) {
|
||||
// @ts-ignore 合并配置参数,注入 parent: 当前默认启动的父类窗口实例
|
||||
Object.assign(Index_config_1.default.PageSize[MethodsName], { parent: Windows_model_1.default.CurrentBrowserWindow });
|
||||
a = require("../controller/" + ControllerName + ".js");
|
||||
Index_utils_1.default.startWindows(new a[Index_utils_1.default.toUpperCase(ControllerName)](), MethodsName, data);
|
||||
return [2 /*return*/, false
|
||||
// 创建默认依附在自定义窗口的子窗口
|
||||
];
|
||||
// 创建默认依附在自定义窗口的子窗口
|
||||
}
|
||||
else {
|
||||
console.log("创建默认依附在自定义窗口的子窗口");
|
||||
}
|
||||
return [2 /*return*/];
|
||||
});
|
||||
}); });
|
||||
};
|
||||
/**
|
||||
* 打开浏览器窗口
|
||||
*/
|
||||
Application.prototype.shellWindows = function () {
|
||||
var _this = this;
|
||||
electron_1.ipcMain.on("openExternal", function (event, arg) { return __awaiter(_this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, electron_1.shell.openExternal(arg.url)];
|
||||
case 1:
|
||||
_a.sent();
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
}); });
|
||||
};
|
||||
return Application;
|
||||
}());
|
||||
exports.Application = Application;
|
||||
//# sourceMappingURL=Application.ipc.js.map
|
||||
2
dist/core/ipc/components.ipc.js
vendored
Normal file
2
dist/core/ipc/components.ipc.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
//# sourceMappingURL=Components.ipc.js.map
|
||||
1
dist/core/ipc/module/.pydio
vendored
Normal file
1
dist/core/ipc/module/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
b6ff0c3a-03a6-4946-bc2f-6f4f75577ecc
|
||||
84
dist/core/ipc/module/File.ipc.js
vendored
Normal file
84
dist/core/ipc/module/File.ipc.js
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FileIpc = void 0;
|
||||
var electron_1 = require("electron");
|
||||
var Dialog_interactive_1 = require("@interactive/Dialog.interactive");
|
||||
var Ioc_annotation_1 = require("@annotation/Ioc.annotation");
|
||||
var Http_net_1 = require("@net/Http.net");
|
||||
var Index_utils_1 = __importDefault(require("@utils/Index.utils"));
|
||||
var FileIpc = /** @class */ (function () {
|
||||
function FileIpc() {
|
||||
}
|
||||
FileIpc.prototype.openFile = function () {
|
||||
var _this = this;
|
||||
electron_1.ipcMain.on('SaveFile', function (event, arg) { return __awaiter(_this, void 0, void 0, function () {
|
||||
var SaveFilePath;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, Dialog_interactive_1.Dialog.showSaveDialog("选择路径", "选择下载路径")];
|
||||
case 1:
|
||||
SaveFilePath = _a.sent();
|
||||
if (SaveFilePath != undefined) {
|
||||
Index_utils_1.default.DownFile(arg.url, SaveFilePath);
|
||||
}
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
}); });
|
||||
};
|
||||
__decorate([
|
||||
Ioc_annotation_1.Inject(),
|
||||
__metadata("design:type", Http_net_1.Http)
|
||||
], FileIpc.prototype, "_Net", void 0);
|
||||
return FileIpc;
|
||||
}());
|
||||
exports.FileIpc = FileIpc;
|
||||
//# sourceMappingURL=File.ipc.js.map
|
||||
1
dist/core/ipc/module/File.ipc.js.map
vendored
Normal file
1
dist/core/ipc/module/File.ipc.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"File.ipc.js","sourceRoot":"","sources":["../../../../src/core/ipc/module/File.ipc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAmC;AACnC,sEAAyD;AACzD,6DAA+D;AAC/D,0CAAqC;AACrC,mEAAuC;AAEvC;IAAA;IAaA,CAAC;IARG,0BAAQ,GAAR;QAAA,iBAOC;QANG,kBAAO,CAAC,EAAE,CAAC,UAAU,EAAE,UAAO,KAAK,EAAE,GAAG;;;;4BACjB,qBAAM,2BAAM,CAAC,cAAc,CAAC,MAAM,EAAC,QAAQ,CAAC,EAAA;;wBAA3D,YAAY,GAAG,SAA4C;wBAC/D,IAAI,YAAY,IAAI,SAAS,EAAE;4BAC3B,qBAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAC,YAAY,CAAC,CAAA;yBACvC;;;;aACJ,CAAC,CAAA;IACN,CAAC;IATD;QADC,uBAAM,EAAE;kCACe,eAAI;yCAAC;IAUjC,cAAC;CAAA,AAbD,IAaC;AAbY,0BAAO"}
|
||||
18
dist/core/ipc/module/Home.ipc.js
vendored
Normal file
18
dist/core/ipc/module/Home.ipc.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.HomeIpc = void 0;
|
||||
const electron_1 = require("electron");
|
||||
class HomeIpc {
|
||||
openFile() {
|
||||
electron_1.ipcMain.on('openFile', async (event, arg) => {
|
||||
console.log("测试openFile");
|
||||
});
|
||||
}
|
||||
TestIpc() {
|
||||
electron_1.ipcMain.on('openFile', async (event, arg) => {
|
||||
console.log("TestIpc");
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.HomeIpc = HomeIpc;
|
||||
//# sourceMappingURL=Home.ipc.js.map
|
||||
1
dist/core/ipc/module/Home.ipc.js.map
vendored
Normal file
1
dist/core/ipc/module/Home.ipc.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Home.ipc.js","sourceRoot":"","sources":["../../../../src/core/ipc/module/Home.ipc.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,MAAa,OAAO;IAChB,QAAQ;QACJ,kBAAO,CAAC,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YACxC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;QAC7B,CAAC,CAAC,CAAA;IACN,CAAC;IAED,OAAO;QACH,kBAAO,CAAC,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YACxC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QAC1B,CAAC,CAAC,CAAA;IACN,CAAC;CACJ;AAZD,0BAYC"}
|
||||
13
dist/core/ipc/module/openBrowser.ipc.js
vendored
Normal file
13
dist/core/ipc/module/openBrowser.ipc.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.openBrowserIpc = void 0;
|
||||
const electron_1 = require("electron");
|
||||
class openBrowserIpc {
|
||||
openDefaultBrowser() {
|
||||
electron_1.ipcMain.on('openBrowser', async (event, arg) => {
|
||||
electron_1.shell.openExternal(arg.url);
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.openBrowserIpc = openBrowserIpc;
|
||||
//# sourceMappingURL=openBrowser.ipc.js.map
|
||||
1
dist/core/ipc/module/openBrowser.ipc.js.map
vendored
Normal file
1
dist/core/ipc/module/openBrowser.ipc.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"openBrowser.ipc.js","sourceRoot":"","sources":["../../../../src/core/ipc/module/openBrowser.ipc.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAE1C,MAAa,cAAc;IACvB,kBAAkB;QACd,kBAAO,CAAC,EAAE,CAAC,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YAC3C,gBAAK,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAC/B,CAAC,CAAC,CAAA;IACN,CAAC;CACJ;AAND,wCAMC"}
|
||||
2
dist/core/ipc/module/openBrowser.js
vendored
Normal file
2
dist/core/ipc/module/openBrowser.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
//# sourceMappingURL=openBrowser.js.map
|
||||
1
dist/core/ipc/module/openBrowser.js.map
vendored
Normal file
1
dist/core/ipc/module/openBrowser.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"openBrowser.js","sourceRoot":"","sources":["../../../../src/core/ipc/module/openBrowser.ts"],"names":[],"mappings":""}
|
||||
1
dist/core/model/.pydio
vendored
Normal file
1
dist/core/model/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
94e8d3d3-68ff-41a3-93a5-e54339a2878a
|
||||
27
dist/core/model/Ioc.model.js
vendored
Normal file
27
dist/core/model/Ioc.model.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
||||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
||||
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
||||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
||||
r[k] = a[j];
|
||||
return r;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var IocModel = /** @class */ (function () {
|
||||
function IocModel() {
|
||||
this._classPool = [];
|
||||
}
|
||||
Object.defineProperty(IocModel.prototype, "classPool", {
|
||||
get: function () {
|
||||
return this._classPool;
|
||||
},
|
||||
set: function (value) {
|
||||
this._classPool = __spreadArrays(value, this._classPool);
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
return IocModel;
|
||||
}());
|
||||
exports.default = new IocModel();
|
||||
//# sourceMappingURL=Ioc.model.js.map
|
||||
1
dist/core/model/Ioc.model.js.map
vendored
Normal file
1
dist/core/model/Ioc.model.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Ioc.model.js","sourceRoot":"","sources":["../../../src/core/model/Ioc.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA;IAAA;QACY,eAAU,GAAyC,EAAE,CAAC;IASlE,CAAC;IAPG,sBAAI,+BAAS;aAAb;YACI,OAAO,IAAI,CAAC,UAAU,CAAC;QAC3B,CAAC;aAED,UAAc,KAAyC;YACnD,IAAI,CAAC,UAAU,kBAAO,KAAK,EAAK,IAAI,CAAC,UAAU,CAAC,CAAA;QACpD,CAAC;;;OAJA;IAKL,eAAC;AAAD,CAAC,AAVD,IAUC;AAED,kBAAe,IAAI,QAAQ,EAAE,CAAC"}
|
||||
1
dist/core/model/Ipc.js
vendored
Normal file
1
dist/core/model/Ipc.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";
|
||||
14
dist/core/model/Ipc.model.js
vendored
Normal file
14
dist/core/model/Ipc.model.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class IpcModel {
|
||||
constructor() {
|
||||
this._saveIpcFunction = {};
|
||||
}
|
||||
get saveIpcFunction() {
|
||||
return this._saveIpcFunction;
|
||||
}
|
||||
set saveIpcFunction(value) {
|
||||
this._saveIpcFunction = value;
|
||||
}
|
||||
}
|
||||
exports.default = new IpcModel();
|
||||
71
dist/core/model/Windows.model.js
vendored
Normal file
71
dist/core/model/Windows.model.js
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var Windows = /** @class */ (function () {
|
||||
function Windows() {
|
||||
}
|
||||
Object.defineProperty(Windows.prototype, "CurrentWindowNew", {
|
||||
get: function () {
|
||||
return this._CurrentWindowNew;
|
||||
},
|
||||
set: function (value) {
|
||||
this._CurrentWindowNew = value;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Windows.prototype, "CurrentBrowserWindow", {
|
||||
get: function () {
|
||||
return this._CurrentBrowserWindow;
|
||||
},
|
||||
set: function (value) {
|
||||
this._CurrentBrowserWindow = value;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Windows.prototype, "HomeBrowserWindow", {
|
||||
get: function () {
|
||||
return this._HomeBrowserWindow;
|
||||
},
|
||||
set: function (value) {
|
||||
this.CurrentBrowserWindow = value;
|
||||
this._HomeBrowserWindow = value;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Windows.prototype, "SettingBrowserWindow", {
|
||||
get: function () {
|
||||
return this._SettingBrowserWindow;
|
||||
},
|
||||
set: function (value) {
|
||||
this.CurrentBrowserWindow = value;
|
||||
this._SettingBrowserWindow = value;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Windows.prototype, "HomeBrowserWindowWebContents", {
|
||||
get: function () {
|
||||
return this._HomeBrowserWindowWebContents;
|
||||
},
|
||||
set: function (value) {
|
||||
this._HomeBrowserWindowWebContents = value;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Windows.prototype, "SettingBrowserWindowWebContents", {
|
||||
get: function () {
|
||||
return this._SettingBrowserWindowWebContents;
|
||||
},
|
||||
set: function (value) {
|
||||
this._SettingBrowserWindowWebContents = value;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
return Windows;
|
||||
}());
|
||||
exports.default = new Windows();
|
||||
//# sourceMappingURL=Windows.model.js.map
|
||||
1
dist/core/model/Windows.model.js.map
vendored
Normal file
1
dist/core/model/Windows.model.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Windows.model.js","sourceRoot":"","sources":["../../../src/core/model/Windows.model.ts"],"names":[],"mappings":";;AAEA;IAAA;IA4DA,CAAC;IAjDG,sBAAI,qCAAgB;aAApB;YACI,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;aAED,UAAqB,KAAU;YAC3B,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QACnC,CAAC;;;OAJA;IAMD,sBAAI,yCAAoB;aAAxB;YACI,OAAO,IAAI,CAAC,qBAAqB,CAAC;QACtC,CAAC;aAED,UAAyB,KAA6B;YAClD,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACvC,CAAC;;;OAJA;IAMD,sBAAI,sCAAiB;aAArB;YACI,OAAO,IAAI,CAAC,kBAAkB,CAAC;QACnC,CAAC;aAED,UAAsB,KAAoB;YACtC,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;YAClC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QACpC,CAAC;;;OALA;IAOD,sBAAI,yCAAoB;aAAxB;YACI,OAAO,IAAI,CAAC,qBAAqB,CAAC;QACtC,CAAC;aAED,UAAyB,KAAoB;YACzC,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;YAClC,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACvC,CAAC;;;OALA;IAOD,sBAAI,iDAA4B;aAAhC;YACI,OAAO,IAAI,CAAC,6BAA6B,CAAC;QAC9C,CAAC;aAED,UAAiC,KAAyB;YACtD,IAAI,CAAC,6BAA6B,GAAG,KAAK,CAAC;QAC/C,CAAC;;;OAJA;IAMD,sBAAI,oDAA+B;aAAnC;YACI,OAAO,IAAI,CAAC,gCAAgC,CAAC;QACjD,CAAC;aAED,UAAoC,KAAyB;YACzD,IAAI,CAAC,gCAAgC,GAAG,KAAK,CAAC;QAClD,CAAC;;;OAJA;IAKL,cAAC;AAAD,CAAC,AA5DD,IA4DC;AAED,kBAAe,IAAI,OAAO,EAAE,CAAC"}
|
||||
1
dist/core/net/.pydio
vendored
Normal file
1
dist/core/net/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
830a4249-498f-4c0e-9913-99b92720b755
|
||||
1
dist/core/net/Http.net.js.map
vendored
Normal file
1
dist/core/net/Http.net.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Http.net.js","sourceRoot":"","sources":["../../../src/core/net/Http.net.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6DAA+D;AAC/D,gDAA8C;AAC9C,gDAA6C;AAC7C,mEAAuC;AASvC;IAII;QACI,eAAK,CAAC,QAAQ,CAAC,OAAO,GAAG,qBAAK,CAAC,YAAY,EAAE,CAAC;IAClD,CAAC;IAKD;;;;OAIG;IACU,kBAAG,GAAhB,UAAiB,MAAqB;;;;;;;wBAE9B,KAAA,IAAI,CAAA;wBAAgB,qBAAM,eAAK,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE;gCAC5C,MAAM,EAAE,MAAM,CAAC,IAAI;gCACnB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC;6BAC5C,CAAC,EAAA;;wBAHF,GAAK,YAAY,GAAG,SAGlB,CAAC;wBACH,sBAAO,IAAI,CAAC,YAAY,CAAC,IAAI,EAAC;;;wBAE9B,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C,EAAA;;wBAHF,GAAK,YAAY,GAAG,SAGlB,CAAA;wBACF,sBAAO,IAAI,CAAC,YAAY,CAAC,IAAI,EAAC;;;wBAE9B,MAAM,IAAI,KAAK,CAAC,0CAAe,GAAC,CAAC,OAAS,CAAC,CAAA;;;;;KAElD;IAjED;QADC,uBAAM,EAAE;kCACW,sBAAS;2CAAC;IATrB,IAAI;QADhB,2BAAU,EAAE;;OACA,IAAI,CA2EhB;IAAD,WAAC;CAAA,AA3ED,IA2EC;AA3EY,oBAAI"}
|
||||
180
dist/core/net/http.net.js
vendored
Normal file
180
dist/core/net/http.net.js
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Http = void 0;
|
||||
var Ioc_annotation_1 = require("@annotation/Ioc.annotation");
|
||||
var logs_utils_1 = require("@utils/logs.utils");
|
||||
var axios_1 = __importDefault(require("axios"));
|
||||
var Index_utils_1 = __importDefault(require("@utils/Index.utils"));
|
||||
var Http = /** @class */ (function () {
|
||||
function Http() {
|
||||
axios_1.default.defaults.baseURL = Index_utils_1.default.CheckAjaxUrl();
|
||||
}
|
||||
/**
|
||||
* GET请求
|
||||
* @param params
|
||||
* @constructor
|
||||
*/
|
||||
Http.prototype.GET = function (params) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _a, e_1;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
_b.trys.push([0, 2, , 3]);
|
||||
_a = this;
|
||||
return [4 /*yield*/, axios_1.default.get(params.url, {
|
||||
params: params.data,
|
||||
headers: Object.assign({}, params.header)
|
||||
})];
|
||||
case 1:
|
||||
_a.ResponseData = _b.sent();
|
||||
return [2 /*return*/, this.ResponseData.data];
|
||||
case 2:
|
||||
e_1 = _b.sent();
|
||||
throw new Error("GET \u8BF7\u6C42\u51FA\u9519\uFF1A" + e_1.message);
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
/**
|
||||
* POST请求
|
||||
* @param params
|
||||
* @constructor
|
||||
*/
|
||||
Http.prototype.POST = function (params) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _a, e_2;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
_b.trys.push([0, 2, , 3]);
|
||||
_a = this;
|
||||
return [4 /*yield*/, axios_1.default.post(params.url, params.data, {
|
||||
headers: Object.assign({}, params.header)
|
||||
})];
|
||||
case 1:
|
||||
_a.ResponseData = _b.sent();
|
||||
return [2 /*return*/, this.ResponseData.data];
|
||||
case 2:
|
||||
e_2 = _b.sent();
|
||||
throw new Error("POST \u8BF7\u6C42\u51FA\u9519\uFF1A" + e_2.message);
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
/**
|
||||
* PUT 请求
|
||||
* @param params
|
||||
* @constructor
|
||||
*/
|
||||
Http.prototype.PUT = function (params) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _a, e_3;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
_b.trys.push([0, 2, , 3]);
|
||||
_a = this;
|
||||
return [4 /*yield*/, axios_1.default.put(params.url, params.data, {
|
||||
headers: Object.assign({}, params.header)
|
||||
})];
|
||||
case 1:
|
||||
_a.ResponseData = _b.sent();
|
||||
return [2 /*return*/, this.ResponseData.data];
|
||||
case 2:
|
||||
e_3 = _b.sent();
|
||||
throw new Error("PUT \u8BF7\u6C42\u51FA\u9519\uFF1A" + e_3.message);
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
/**
|
||||
* DELETE 请求
|
||||
* @param params
|
||||
*/
|
||||
Http.prototype.DELETE = function (params) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _a, e_4;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
_b.trys.push([0, 2, , 3]);
|
||||
_a = this;
|
||||
return [4 /*yield*/, axios_1.default.delete(params.url, {
|
||||
params: params.data,
|
||||
headers: Object.assign({}, params.header)
|
||||
})];
|
||||
case 1:
|
||||
_a.ResponseData = _b.sent();
|
||||
return [2 /*return*/, this.ResponseData.data];
|
||||
case 2:
|
||||
e_4 = _b.sent();
|
||||
throw new Error("DELETE \u8BF7\u6C42\u51FA\u9519\uFF1A" + e_4.message);
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
__decorate([
|
||||
Ioc_annotation_1.Inject(),
|
||||
__metadata("design:type", logs_utils_1.LogsUtils)
|
||||
], Http.prototype, "LogsUtils", void 0);
|
||||
Http = __decorate([
|
||||
Ioc_annotation_1.Injectable(),
|
||||
__metadata("design:paramtypes", [])
|
||||
], Http);
|
||||
return Http;
|
||||
}());
|
||||
exports.Http = Http;
|
||||
//# sourceMappingURL=Http.net.js.map
|
||||
11
dist/core/net/test.js
vendored
Normal file
11
dist/core/net/test.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
const Http_net_1 = tslib_1.__importDefault(require("./Http.net"));
|
||||
let http = new Http_net_1.default();
|
||||
http.GET({
|
||||
methods: 'GET',
|
||||
url: 'http://127.0.0.1:3000/api/list'
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
1
dist/core/run/.pydio
vendored
Normal file
1
dist/core/run/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
8a23012d-0d0c-4c6b-8257-205c11af06a1
|
||||
1
dist/core/run/Init.run.js.map
vendored
Normal file
1
dist/core/run/Init.run.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Init.run.js","sourceRoot":"","sources":["../../../src/core/run/Init.run.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6DACkC;AAClC,mEAAqE;AACrE,wDAAmD;AAGnD;;;;;;;;;GASG;AAMH;IAAA;IAKA,CAAC;IAJI,mBAAK,GAAL,cAAe,CAAC;IAChB,iBAAG,GAAH,cAAa,CAAC;IACd,qBAAO,GAAP,cAAiB,CAAC;IAClB,gBAAE,GAAF,cAAY,CAAC;IAJL,GAAG;QALf,+BAAc,EAAE;QAChB,sCAAqB,EAAE;QACvB,+BAAc,EAAE;QAChB,2BAAU,EAAE;QACZ,wCAAoB,CAAC,CAAE,6BAAW,CAAE,CAAC;OACzB,GAAG,CAKf;IAAD,UAAC;CAAA,AALD,IAKC;AALY,kBAAG"}
|
||||
40
dist/core/run/init.run.js
vendored
Normal file
40
dist/core/run/init.run.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Run = void 0;
|
||||
var Run_annotation_1 = require("@annotation/Run.annotation");
|
||||
var Creted_annotation_1 = require("@annotation/Creted.annotation");
|
||||
var Application_ipc_1 = require("@ipc/Application.ipc");
|
||||
/**
|
||||
* 启动类
|
||||
* 作用:注册全局事件
|
||||
* V2版本开发新的注解支持:
|
||||
* @AutoLoadWindow() 注解 根据 Index.config.ts 中的 StartPage 自动寻找controller文件夹下的ts文件,然后作为主窗体启动
|
||||
* @CreateApplicationMenu() 创建菜单
|
||||
* @CreateTouchbar() 创建mac键盘上的Touchbar
|
||||
* @CreateTray() 创建mac顶部全局菜单图标
|
||||
* @CreateApplicationIpc() 注册全局ipc
|
||||
*/
|
||||
var Run = /** @class */ (function () {
|
||||
function Run() {
|
||||
}
|
||||
Run.prototype.event = function () { };
|
||||
Run.prototype.ipc = function () { };
|
||||
Run.prototype.monitor = function () { };
|
||||
Run.prototype.ui = function () { };
|
||||
Run = __decorate([
|
||||
Run_annotation_1.AutoLoadWindow(),
|
||||
Run_annotation_1.CreateApplicationMenu(),
|
||||
Run_annotation_1.CreateTouchbar(),
|
||||
Run_annotation_1.CreateTray(),
|
||||
Creted_annotation_1.CreateApplicationIpc([Application_ipc_1.Application])
|
||||
], Run);
|
||||
return Run;
|
||||
}());
|
||||
exports.Run = Run;
|
||||
//# sourceMappingURL=Init.run.js.map
|
||||
1
dist/core/service.js
vendored
Normal file
1
dist/core/service.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";
|
||||
1
dist/core/service/.pydio
vendored
Normal file
1
dist/core/service/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
4e5441fc-c0b3-48f5-bb7d-809a57d282ac
|
||||
1
dist/core/service/Video.service.js.map
vendored
Normal file
1
dist/core/service/Video.service.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Video.service.js","sourceRoot":"","sources":["../../../src/core/service/Video.service.ts"],"names":[],"mappings":""}
|
||||
1
dist/core/service/impl/.pydio
vendored
Normal file
1
dist/core/service/impl/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
27e0f22e-e942-4b4a-b906-4418bee114ec
|
||||
1
dist/core/service/impl/Video.impl.service.js.map
vendored
Normal file
1
dist/core/service/impl/Video.impl.service.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Video.impl.service.js","sourceRoot":"","sources":["../../../../src/core/service/impl/Video.impl.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+DAAkD;AAClD,6DAAwD;AAGxD;IAAA;IA2BA,CAAC;IA1BG;;;;;;;;;OASG;IAEU,mCAAQ,GAArB,UAAsB,MAAc;;;gBAChC;;;mBAGG;gBACH,sBAAO,MAAM,EAAA;;;KAChB;IAIY,oCAAS,GAAtB,UAAuB,MAA0B;;;;KAAkB;IAGtD,uCAAY,GAAzB,UAA0B,MAA0B;;;;KAAkB;IAbtE;QADC,qBAAG,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;;;oDAOxB;IAID;QADC,qBAAG,EAAE;;;;qDAC6D;IAGnE;QADC,qBAAG,EAAE;;;;wDACgE;IAzB7D,gBAAgB;QAD5B,2BAAU,EAAE;OACA,gBAAgB,CA2B5B;IAAD,uBAAC;CAAA,AA3BD,IA2BC;AA3BY,4CAAgB"}
|
||||
109
dist/core/service/impl/video.impl.service.js
vendored
Normal file
109
dist/core/service/impl/video.impl.service.js
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.VideoImplService = void 0;
|
||||
var Http_annotation_1 = require("@annotation/Http.annotation");
|
||||
var Ioc_annotation_1 = require("@annotation/Ioc.annotation");
|
||||
var VideoImplService = /** @class */ (function () {
|
||||
function VideoImplService() {
|
||||
}
|
||||
/**
|
||||
* @param params
|
||||
* url: 请求地址(可选参数)
|
||||
* 1:如果不传,方法名将自动作为请求的地址
|
||||
* 2:如果传了,采用传入的地址作为请求地址
|
||||
* useHandle: 是否将注解通过ajax获得的数据还给方法(可选参数)
|
||||
* 1:如果不传,数据将直接返回给页面的方法调用者,service的方法不需要retrun
|
||||
* 2:如果传了,service方法的参数,即是接口的请求参数,在请求完成后将会保存ajax返回结果
|
||||
* 所以根据实际业务可以传入true,对ajax返回的数据做一些数据处理,然后再返回给页面使用
|
||||
*/
|
||||
VideoImplService.prototype.PlayList = function (params) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
/**
|
||||
* useHandle 为 true 的方法会被调用两次,一次是页面调用,params存储的是ajax请求参数
|
||||
* 第二次是注解内部调用,params 存储的是ajax请求到的具体数据
|
||||
*/
|
||||
return [2 /*return*/, params];
|
||||
});
|
||||
});
|
||||
};
|
||||
VideoImplService.prototype.PalyVideo = function (params) {
|
||||
return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) {
|
||||
return [2 /*return*/];
|
||||
}); });
|
||||
};
|
||||
VideoImplService.prototype.VideoComment = function (params) {
|
||||
return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) {
|
||||
return [2 /*return*/];
|
||||
}); });
|
||||
};
|
||||
__decorate([
|
||||
Http_annotation_1.GET({ useHandle: true }),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], VideoImplService.prototype, "PlayList", null);
|
||||
__decorate([
|
||||
Http_annotation_1.GET(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], VideoImplService.prototype, "PalyVideo", null);
|
||||
__decorate([
|
||||
Http_annotation_1.GET(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], VideoImplService.prototype, "VideoComment", null);
|
||||
VideoImplService = __decorate([
|
||||
Ioc_annotation_1.Injectable()
|
||||
], VideoImplService);
|
||||
return VideoImplService;
|
||||
}());
|
||||
exports.VideoImplService = VideoImplService;
|
||||
//# sourceMappingURL=Video.impl.service.js.map
|
||||
3
dist/core/service/video.service.js
vendored
Normal file
3
dist/core/service/video.service.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=Video.service.js.map
|
||||
1
dist/core/types/.pydio
vendored
Normal file
1
dist/core/types/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
b241c49c-6c59-4201-81bd-cbc79ea7791d
|
||||
1
dist/core/types/ApiConfig.js.map
vendored
Normal file
1
dist/core/types/ApiConfig.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ApiConfig.js","sourceRoot":"","sources":["../../../src/core/types/ApiConfig.ts"],"names":[],"mappings":""}
|
||||
3
dist/core/types/BaseController.types.js
vendored
Normal file
3
dist/core/types/BaseController.types.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=BaseController.types.js.map
|
||||
1
dist/core/types/BaseController.types.js.map
vendored
Normal file
1
dist/core/types/BaseController.types.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"BaseController.types.js","sourceRoot":"","sources":["../../../src/core/types/BaseController.types.ts"],"names":[],"mappings":""}
|
||||
3
dist/core/types/PageConfig.types.js
vendored
Normal file
3
dist/core/types/PageConfig.types.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=PageConfig.types.js.map
|
||||
1
dist/core/types/PageConfig.types.js.map
vendored
Normal file
1
dist/core/types/PageConfig.types.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"PageConfig.types.js","sourceRoot":"","sources":["../../../src/core/types/PageConfig.types.ts"],"names":[],"mappings":""}
|
||||
3
dist/core/types/Tray.types.js
vendored
Normal file
3
dist/core/types/Tray.types.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=Tray.types.js.map
|
||||
1
dist/core/types/Tray.types.js.map
vendored
Normal file
1
dist/core/types/Tray.types.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Tray.types.js","sourceRoot":"","sources":["../../../src/core/types/Tray.types.ts"],"names":[],"mappings":""}
|
||||
3
dist/core/types/apiConfig.js
vendored
Normal file
3
dist/core/types/apiConfig.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=ApiConfig.js.map
|
||||
1
dist/core/utils/.pydio
vendored
Normal file
1
dist/core/utils/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
dd493056-ccc8-4a95-89e3-db0fbade657d
|
||||
1
dist/core/utils/Index.utils.js.map
vendored
Normal file
1
dist/core/utils/Index.utils.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Index.utils.js","sourceRoot":"","sources":["../../../src/core/utils/Index.utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA4B;AAC5B,sEAA0C;AAC1C,qCAA4F;AAC5F,yBAAkE;AAClE,6BAAgC;AAChC,uEAA2C;AAE3C;IAAA;IA+GA,CAAC;IA7GiB,kBAAY,GAA1B;QACI,OAAO,sBAAM,CAAC,MAAM,CAAC,OAAO,CAAA;IAChC,CAAC;IAED;;;;OAIG;IACW,iBAAW,GAAzB,UAA0B,IAAY;QAClC,OAAO,WAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;OAGG;IACW,mBAAa,GAA3B;QACI,OAAO,OAAO,CAAC,mBAAiB,CAAC,sBAAM,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAK,CAAC,CAAA;IAC1E,CAAC;IAED;;;OAGG;IACW,iBAAW,GAAzB,UAA0B,IAAY;QAClC,IAAI,UAAU,GAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACjC,OAAO,UAAU,CAAC,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AI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;IAClC,CAAC;IAED;;;;;OAKG;IACW,YAAM,GAApB,UAAqB,IAAY,EAAE,IAAY,EAAE,IAAY;QACzD,kBAAa,CAAI,IAAI,SAAI,IAAI,UAAO,EAAE,IAAI,CAAC,CAAA;IAC/C,CAAC;IAED;;;;OAIG;IACiB,kBAAY,GAAhC,UAAiC,MAAW,EAAE,IAAY,EAAE,MAAe;;;;;4BACpC,qBAAM,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAA;;wBAAzD,IAAI,GAA2B,SAA0B,EACzD,GAAG,GAAW,iBAAU,CACpB,KAAK,CAAC,WAAW,CAAC,mCAAiC,IAAI,SAAI,IAAI,UAAO,CAAC,EACvE,MAAM,CAAC,MAAM,CAAC,sBAAM,CAAC,kBAAkB,EAAE,IAAI,CAAC,CACjD;wBACL,wBAAwB;wBACxB,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;wBACtB,IAAI;4BACA,aAAa;4BACb,uBAAO,CAAC,oBAAoB,GAAG,IAAI,wBAAa,CAAC,sBAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;4BACxE,aAAa;4BACb,uBAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAS,sBAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAA,CAAC,IAAK,CAAC,CAAC,CAAC;4BACnF,uBAAO,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC;yBACvC;wBAAC,OAAO,CAAC,EAAE;4BACR,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;yBACnD;;;;;KACJ;IACL,YAAC;AAAD,CAAC,AA/GD,IA+GC"}
|
||||
159
dist/core/utils/index.utils.js
vendored
Normal file
159
dist/core/utils/index.utils.js
vendored
Normal file
@@ -0,0 +1,159 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var path_1 = require("path");
|
||||
var Index_config_1 = __importDefault(require("@config/Index.config"));
|
||||
var electron_1 = require("electron");
|
||||
var fs_1 = require("fs");
|
||||
var jade_1 = require("jade");
|
||||
var Windows_model_1 = __importDefault(require("@model/Windows.model"));
|
||||
var Utils = /** @class */ (function () {
|
||||
function Utils() {
|
||||
}
|
||||
Utils.CheckAjaxUrl = function () {
|
||||
return Index_config_1.default.ApiUrl.BaseUrl;
|
||||
};
|
||||
/**
|
||||
* 返回相对路径
|
||||
* @param path 路径
|
||||
* @constructor
|
||||
*/
|
||||
Utils.GetFilePath = function (path) {
|
||||
return path_1.join(__dirname, path);
|
||||
};
|
||||
/**
|
||||
* 根据配置返回对应的controller类,require后的类
|
||||
* @constructor
|
||||
*/
|
||||
Utils.GetController = function () {
|
||||
return require("../controller/" + (Index_config_1.default.StartPage.split("/"))[0] + ".js");
|
||||
};
|
||||
/**
|
||||
* Home.controller 拆分为数组,然后controller的首字母C大写
|
||||
* 然后返回 HomeController 的类名
|
||||
*/
|
||||
Utils.toUpperCase = function (cont) {
|
||||
var Controller = cont.split(".");
|
||||
return Controller[0] + Controller[1].charAt(0).toUpperCase() + Controller[1].slice(1);
|
||||
};
|
||||
/**
|
||||
* 系统通知
|
||||
* @param parmas
|
||||
* @constructor
|
||||
*/
|
||||
Utils.Notification = function (parmas) {
|
||||
new electron_1.Notification(parmas).show();
|
||||
};
|
||||
/**
|
||||
* 下载资源
|
||||
* @param url 需要下载的资源地址
|
||||
* @param path 下载后需要保存的路径
|
||||
* @constructor
|
||||
*/
|
||||
Utils.DownFile = function (url, path) {
|
||||
Windows_model_1.default.CurrentBrowserWindow.webContents.downloadURL(url);
|
||||
Windows_model_1.default.CurrentBrowserWindow.webContents.session.on("will-download", function (event, item, webContents) {
|
||||
item.setSavePath(path + "/" + item.getFilename());
|
||||
item.once('done', function (event, state) {
|
||||
if (state === 'completed') {
|
||||
// 下载成功后显示通知
|
||||
Utils.Notification({
|
||||
title: '下载完成',
|
||||
body: "\u60A8\u7684\u89C6\u9891 " + item.getFilename() + " \u5DF2\u6210\u529F\u4E0B\u8F7D\uFF01",
|
||||
silent: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 创建文件夹
|
||||
* @param name 文件夹
|
||||
* @param html html
|
||||
*/
|
||||
Utils.mkdir = function (name, html) {
|
||||
var path = path_1.join(__dirname, "../../application/page/" + name);
|
||||
fs_1.existsSync(path) ? null : fs_1.mkdirSync(path);
|
||||
Utils.mkFile(path, name, html);
|
||||
};
|
||||
/**
|
||||
* 生成文件并写入数据
|
||||
* @param path 路径
|
||||
* @param name html文件名
|
||||
* @param html html数据
|
||||
*/
|
||||
Utils.mkFile = function (path, name, html) {
|
||||
fs_1.writeFileSync(path + "/" + name + ".html", html);
|
||||
};
|
||||
/**
|
||||
* 创建启动窗口
|
||||
* @param target
|
||||
* @param name
|
||||
*/
|
||||
Utils.startWindows = function (target, name, params) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var data, Dom;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, target[name](params)];
|
||||
case 1:
|
||||
data = _a.sent(), Dom = jade_1.renderFile(Utils.GetFilePath("../../../src/application/page/" + name + "/" + name + ".jade"), Object.assign(Index_config_1.default.jadeCompile0ptions, data));
|
||||
// 在dist/ 创建并生成对应的html文件
|
||||
Utils.mkdir(name, Dom);
|
||||
try {
|
||||
// @ts-ignore
|
||||
Windows_model_1.default.CurrentBrowserWindow = new electron_1.BrowserWindow(Index_config_1.default.PageSize[name]);
|
||||
// @ts-ignore
|
||||
Windows_model_1.default.CurrentBrowserWindow.loadFile(Index_config_1.default.PagePath[name]).then(function (r) { });
|
||||
Windows_model_1.default.CurrentBrowserWindow.show();
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error("创建窗体失败,请检查配置文件,窗体的html路径是否正确!");
|
||||
}
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return Utils;
|
||||
}());
|
||||
exports.default = Utils;
|
||||
//# sourceMappingURL=Index.utils.js.map
|
||||
46
dist/core/utils/logs.utils.js
vendored
Normal file
46
dist/core/utils/logs.utils.js
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.LogsUtils = void 0;
|
||||
var moment_1 = __importDefault(require("moment"));
|
||||
var fs_1 = require("fs");
|
||||
var path_1 = require("path");
|
||||
var Index_config_1 = __importDefault(require("@config/Index.config"));
|
||||
var Ioc_annotation_1 = require("@annotation/Ioc.annotation");
|
||||
var os_1 = __importDefault(require("os"));
|
||||
var LogsUtils = /** @class */ (function () {
|
||||
function LogsUtils() {
|
||||
}
|
||||
/**
|
||||
* 返回日志文件名 application_2020-07-16_21-03-21.log
|
||||
* @param level 日志类型
|
||||
* @constructor
|
||||
*/
|
||||
LogsUtils.prototype.GetTime = function (level) {
|
||||
if (level === void 0) { level = "application"; }
|
||||
return level + "_" + moment_1.default().format("YYYY-MM-DD-HH") + ".log";
|
||||
};
|
||||
/**
|
||||
* 传入数据生成日志
|
||||
* @param data 数据
|
||||
* @param level 日志类型
|
||||
*/
|
||||
LogsUtils.prototype.logs = function (data, level) {
|
||||
if (level === void 0) { level = "application"; }
|
||||
fs_1.appendFileSync(path_1.join(__dirname, Index_config_1.default.LogsPath + "/" + this.GetTime(level)), "\u3010" + moment_1.default().format("YYYY/MM/DD HH:mm:ss") + "\u3011" + data + os_1.default.EOL + os_1.default.EOL);
|
||||
};
|
||||
LogsUtils = __decorate([
|
||||
Ioc_annotation_1.Injectable()
|
||||
], LogsUtils);
|
||||
return LogsUtils;
|
||||
}());
|
||||
exports.LogsUtils = LogsUtils;
|
||||
//# sourceMappingURL=logs.utils.js.map
|
||||
1
dist/core/utils/logs.utils.js.map
vendored
Normal file
1
dist/core/utils/logs.utils.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"logs.utils.js","sourceRoot":"","sources":["../../../src/core/utils/logs.utils.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2B;AAC3B,yBAAmC;AACnC,6BAA4B;AAC5B,sEAA0C;AAC1C,6DAAwD;AACxD,0CAAmB;AAGnB;IAAA;IAqBA,CAAC;IAnBG;;;;OAIG;IACI,2BAAO,GAAd,UAAe,KAA6B;QAA7B,sBAAA,EAAA,qBAA6B;QACxC,OAAU,KAAK,SAAI,gBAAM,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,SAAM,CAAC;IAC9D,CAAC;IAED;;;;OAIG;IACI,wBAAI,GAAX,UAAY,IAAY,EAAE,KAA6B;QAA7B,sBAAA,EAAA,qBAA6B;QACnD,mBAAc,CAAC,WAAI,CACf,SAAS,EACN,sBAAM,CAAC,QAAQ,SAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAG,CAAC,EAAE,WAAI,gBAAM,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,cAAI,IAAI,GAAG,YAAE,CAAC,GAAG,GAAG,YAAE,CAAC,GAAK,CAAC,CAAA;IAC7H,CAAC;IApBQ,SAAS;QADrB,2BAAU,EAAE;OACA,SAAS,CAqBrB;IAAD,gBAAC;CAAA,AArBD,IAqBC;AArBY,8BAAS"}
|
||||
Reference in New Issue
Block a user