Delete resources/app directory

This commit is contained in:
hxvy0 2023-05-12 13:41:17 +03:00 committed by GitHub
parent bab5bcce5d
commit 7efa2c44c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 0 additions and 14150 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,108 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.INJECT_DIR = void 0;
/**
* Preload file that will be executed in the renderer process.
* Note: This needs to be attached **prior to imports**, as imports
* would delay the attachment till after the event has been raised.
*/
document.addEventListener('DOMContentLoaded', () => {
injectScripts(); // eslint-disable-line @typescript-eslint/no-use-before-define
});
const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const electron_1 = require("electron");
// Do *NOT* add 3rd-party imports here in preload (except for webpack `externals` like electron).
// They will work during development, but break in the prod build :-/ .
// Electron doc isn't explicit about that, so maybe *we*'re doing something wrong.
// At any rate, that's what we have now. If you want an import here, go ahead, but
// verify that apps built with a non-devbuild nativefier (installed from tarball) work.
// Recipe to monkey around this, assuming you git-cloned nativefier in /opt/nativefier/ :
// cd /opt/nativefier/ && rm -f nativefier-43.1.0.tgz && npm run build && npm pack && mkdir -p ~/n4310/ && cd ~/n4310/ \
// && rm -rf ./* && npm i /opt/nativefier/nativefier-43.1.0.tgz && ./node_modules/.bin/nativefier 'google.com'
// See https://github.com/nativefier/nativefier/issues/1175
// and https://www.electronjs.org/docs/api/browser-window#new-browserwindowoptions / preload
const log = console; // since we can't have `loglevel` here in preload
exports.INJECT_DIR = path.join(__dirname, '..', 'inject');
/**
* Patches window.Notification to:
* - set a callback on a new Notification
* - set a callback for clicks on notifications
* @param createCallback
* @param clickCallback
*/
function setNotificationCallback(createCallback, clickCallback) {
const OldNotify = window.Notification;
const newNotify = function (title, opt) {
createCallback(title, opt);
const instance = new OldNotify(title, opt);
instance.addEventListener('click', clickCallback);
return instance;
};
newNotify.requestPermission = OldNotify.requestPermission.bind(OldNotify);
Object.defineProperty(newNotify, 'permission', {
get: () => OldNotify.permission,
});
// @ts-expect-error TypeScript says its not compatible, but it works?
window.Notification = newNotify;
}
function injectScripts() {
const needToInject = fs.existsSync(exports.INJECT_DIR);
if (!needToInject) {
return;
}
// Dynamically require scripts
try {
const jsFiles = fs
.readdirSync(exports.INJECT_DIR, { withFileTypes: true })
.filter((injectFile) => injectFile.isFile() && injectFile.name.endsWith('.js'))
.map((jsFileStat) => path.join('..', 'inject', jsFileStat.name));
for (const jsFile of jsFiles) {
log.debug('Injecting JS file', jsFile);
require(jsFile);
}
}
catch (err) {
log.error('Error encoutered injecting JS files', err);
}
}
function notifyNotificationCreate(title, opt) {
electron_1.ipcRenderer.send('notification', title, opt);
}
function notifyNotificationClick() {
electron_1.ipcRenderer.send('notification-click');
}
// @ts-expect-error TypeScript thinks these are incompatible but they aren't
setNotificationCallback(notifyNotificationCreate, notifyNotificationClick);
electron_1.ipcRenderer.on('params', (event, message) => {
log.debug('ipcRenderer.params', { event, message });
const appArgs = JSON.parse(message);
log.info('nativefier.json', appArgs);
});
electron_1.ipcRenderer.on('debug', (event, message) => {
log.debug('ipcRenderer.debug', { event, message });
});
//# sourceMappingURL=preload.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"preload.js","sourceRoot":"","sources":["../src/preload.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,GAAG,EAAE;IACjD,aAAa,EAAE,CAAC,CAAC,8DAA8D;AACjF,CAAC,CAAC,CAAC;AAEH,uCAAyB;AACzB,2CAA6B;AAE7B,uCAAuC;AAGvC,iGAAiG;AACjG,uEAAuE;AACvE,kFAAkF;AAClF,kFAAkF;AAClF,uFAAuF;AACvF,yFAAyF;AACzF,wHAAwH;AACxH,iHAAiH;AACjH,2DAA2D;AAC3D,4FAA4F;AAE5F,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,iDAAiD;AAEzD,QAAA,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AAE/D;;;;;;GAMG;AACH,SAAS,uBAAuB,CAC9B,cAGC,EACD,aAAqE;IAErE,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;IACtC,MAAM,SAAS,GAAG,UAChB,KAAa,EACb,GAAwB;QAExB,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC3B,MAAM,QAAQ,GAAG,IAAI,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC3C,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAClD,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;IACF,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1E,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,YAAY,EAAE;QAC7C,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS,CA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EAAE;IAClD,GAAG,CAAC,KAAK,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IACpD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAkB,CAAC;IACrD,GAAG,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC;AAEH,sBAAW,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE;IACjD,GAAG,CAAC,KAAK,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AACrD,CAAC,CAAC,CAAC"}

View file

@ -1,57 +0,0 @@
label, input {
display: block;
}
* {
font-family: Verdana, sans-serif;
}
html, body {
height: 100%;
margin: 0;
-webkit-app-region: drag;
}
.login-form {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.login-form > div {
margin-bottom: 30px;
}
.login-form > div > label {
margin-bottom: 25px;
letter-spacing: 5px;
font-weight: 100;
text-transform: uppercase;
font-size: 18px;
text-align: center;
color: rgba(0, 0, 0, 0.7);
}
.login-form > div > input {
height: 30px;
width: 225px;
font-size: 16px;
-webkit-app-region: no-drag;
}
.login-form > div > button {
border: 0;
font-size: 15px;
font-weight: 100;
text-transform: uppercase;
height: 35px;
width: 225px;
background-color: #2196F3;
color: white;
-webkit-app-region: no-drag;
}
button:hover {
background-color: #0D47A1;
}

View file

@ -1,24 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login</title>
<link rel="stylesheet" type="text/css" href="login.css">
</head>
<body>
<form class="login-form" id="login-form">
<div>
<label for="username-input">Username</label>
<input type="text" id="username-input" autofocus/>
</div>
<div>
<label for="password-input">Password</label>
<input type="password" id="password-input"/>
</div>
<div>
<button id="submit-form-button" type="submit">Login</button>
</div>
</form>
<script src="login.js"></script>
</body>
</html>

View file

@ -1,10 +0,0 @@
const { ipcRenderer } = require('electron');
document.getElementById('login-form').addEventListener('submit', (event) => {
event.preventDefault();
const usernameInput = document.getElementById('username-input');
const username = usernameInput.nodeValue || usernameInput.value;
const passwordInput = document.getElementById('password-input');
const password = passwordInput.nodeValue || passwordInput.value;
ipcRenderer.send('login-message', [username, password]);
});

View file

@ -1 +0,0 @@
{"accessibilityPrompt":true,"alwaysOnTop":false,"arch":"x64","asar":false,"blockExternalUrls":false,"bounce":false,"buildDate":1675157978907,"clearCache":false,"counter":false,"darwinDarkModeSupport":false,"disableContextMenu":false,"disableDevTools":false,"disableGpu":false,"disableOldBuildWarning":false,"electronVersionUsed":"19.1.4","enableEs3Apis":false,"fastQuit":false,"fullScreen":false,"height":800,"hideWindowFrame":false,"ignoreCertificate":false,"ignoreGpuBlacklist":false,"insecure":false,"isUpgrade":false,"maximize":false,"name":"Boocord","nativefierVersion":"50.0.1","portable":false,"quiet":false,"showMenuBar":false,"singleInstance":false,"strictInternalUrls":false,"targetUrl":"https://discord.com/app","tray":"false","userAgentHonest":false,"width":1280,"widevine":false,"win32metadata":{"ProductName":"Boocord","InternalName":"Boocord","FileDescription":"Boocord"},"zoom":1,"oldBuildWarningText":""}

File diff suppressed because it is too large Load diff

View file

@ -1,25 +0,0 @@
{
"name": "boocord-nativefier-18566a",
"version": "1.0.0",
"description": "Placeholder for the nativefier cli to override with a target url",
"main": "lib/main.js",
"author": "Jia Hao",
"license": "MIT",
"keywords": [
"desktop",
"electron",
"placeholder"
],
"scripts": {},
"dependencies": {
"electron-context-menu": "^3.1.1",
"electron-dl": "^3.2.1",
"electron-squirrel-startup": "^1.0.0",
"electron-window-state": "^5.0.3",
"loglevel": "^1.7.1",
"source-map-support": "^0.5.19"
},
"devDependencies": {
"electron": "^19.1.4"
}
}