Add files via upload

This commit is contained in:
hxvy0 2023-01-31 11:14:02 +00:00 committed by GitHub
parent adf35217f1
commit 26c1c16c80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
67 changed files with 14150 additions and 0 deletions

BIN
locales/af.pak Normal file

Binary file not shown.

BIN
locales/am.pak Normal file

Binary file not shown.

BIN
locales/ar.pak Normal file

Binary file not shown.

BIN
locales/bg.pak Normal file

Binary file not shown.

BIN
locales/bn.pak Normal file

Binary file not shown.

BIN
locales/ca.pak Normal file

Binary file not shown.

BIN
locales/cs.pak Normal file

Binary file not shown.

BIN
locales/da.pak Normal file

Binary file not shown.

BIN
locales/de.pak Normal file

Binary file not shown.

BIN
locales/el.pak Normal file

Binary file not shown.

BIN
locales/en-GB.pak Normal file

Binary file not shown.

BIN
locales/en-US.pak Normal file

Binary file not shown.

BIN
locales/es-419.pak Normal file

Binary file not shown.

BIN
locales/es.pak Normal file

Binary file not shown.

BIN
locales/et.pak Normal file

Binary file not shown.

BIN
locales/fa.pak Normal file

Binary file not shown.

BIN
locales/fi.pak Normal file

Binary file not shown.

BIN
locales/fil.pak Normal file

Binary file not shown.

BIN
locales/fr.pak Normal file

Binary file not shown.

BIN
locales/gu.pak Normal file

Binary file not shown.

BIN
locales/he.pak Normal file

Binary file not shown.

BIN
locales/hi.pak Normal file

Binary file not shown.

BIN
locales/hr.pak Normal file

Binary file not shown.

BIN
locales/hu.pak Normal file

Binary file not shown.

BIN
locales/id.pak Normal file

Binary file not shown.

BIN
locales/it.pak Normal file

Binary file not shown.

BIN
locales/ja.pak Normal file

Binary file not shown.

BIN
locales/kn.pak Normal file

Binary file not shown.

BIN
locales/ko.pak Normal file

Binary file not shown.

BIN
locales/lt.pak Normal file

Binary file not shown.

BIN
locales/lv.pak Normal file

Binary file not shown.

BIN
locales/ml.pak Normal file

Binary file not shown.

BIN
locales/mr.pak Normal file

Binary file not shown.

BIN
locales/ms.pak Normal file

Binary file not shown.

BIN
locales/nb.pak Normal file

Binary file not shown.

BIN
locales/nl.pak Normal file

Binary file not shown.

BIN
locales/pl.pak Normal file

Binary file not shown.

BIN
locales/pt-BR.pak Normal file

Binary file not shown.

BIN
locales/pt-PT.pak Normal file

Binary file not shown.

BIN
locales/ro.pak Normal file

Binary file not shown.

BIN
locales/ru.pak Normal file

Binary file not shown.

BIN
locales/sk.pak Normal file

Binary file not shown.

BIN
locales/sl.pak Normal file

Binary file not shown.

BIN
locales/sr.pak Normal file

Binary file not shown.

BIN
locales/sv.pak Normal file

Binary file not shown.

BIN
locales/sw.pak Normal file

Binary file not shown.

BIN
locales/ta.pak Normal file

Binary file not shown.

BIN
locales/te.pak Normal file

Binary file not shown.

BIN
locales/th.pak Normal file

Binary file not shown.

BIN
locales/tr.pak Normal file

Binary file not shown.

BIN
locales/uk.pak Normal file

Binary file not shown.

BIN
locales/ur.pak Normal file

Binary file not shown.

BIN
locales/vi.pak Normal file

Binary file not shown.

BIN
locales/zh-CN.pak Normal file

Binary file not shown.

BIN
locales/zh-TW.pak Normal file

Binary file not shown.

BIN
resources/app/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

11648
resources/app/lib/main.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,108 @@
"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

@ -0,0 +1 @@
{"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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EAAE,MAAM,CAAC,CAAC;YACvC,OAAO,CAAC,MAAM,CAAC,CAAC;SACjB;KACF;IAAC,OAAO,GAAY,EAAE;QACrB,GAAG,CAAC,KAAK,CAAC,qCAAqC,EAAE,GAAG,CAAC,CAAC;KACvD;AACH,CAAC;AAED,SAAS,wBAAwB,CAC/B,KAAa,EACb,GAAwB;IAExB,sBAAW,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;AAC/C,CAAC;AACD,SAAS,uBAAuB;IAC9B,sBAAW,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;AACzC,CAAC;AAED,4EAA4E;AAC5E,uBAAuB,CAAC,wBAAwB,EAAE,uBAAuB,CAAC,CAAC;AAE3E,sBAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAe,EAAE,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

@ -0,0 +1,57 @@
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

@ -0,0 +1,24 @@
<!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

@ -0,0 +1,10 @@
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

@ -0,0 +1 @@
{"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":""}

2275
resources/app/npm-shrinkwrap.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
{
"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"
}
}