first commit
This commit is contained in:
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":""}
|
||||
Reference in New Issue
Block a user