diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f90ba04 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: Build/release + +on: push + +jobs: + release: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + + steps: + - name: Check out Git repository + uses: actions/checkout@v1 + + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm run devInstall + - run: npm run compile + - name: Build/release Electron app + uses: samuelmeuli/action-electron-builder@v1 + with: + # GitHub token, automatically provided to the action + # (No need to define this secret in the repo settings) + github_token: ${{ secrets.github_token }} + + # If the commit is tagged with a version (e.g. "v1.0.0"), + # release the app after building + release: ${{ startsWith(github.ref, 'refs/tags/v') }} \ No newline at end of file diff --git a/BetterDiscordApp/src/loadingIcon.js b/BetterDiscordApp/src/loadingIcon.js index 06e4865..b985c2e 100644 --- a/BetterDiscordApp/src/loadingIcon.js +++ b/BetterDiscordApp/src/loadingIcon.js @@ -1,6 +1,6 @@ export default () => { const v2Loader = document.createElement("div"); v2Loader.className = "bd-loaderv2"; - v2Loader.title = "BandagedBD is loading..."; + v2Loader.title = "LightcordBD is loading..."; document.body.appendChild(v2Loader); }; \ No newline at end of file diff --git a/BetterDiscordApp/src/modules/core.js b/BetterDiscordApp/src/modules/core.js index 8353e97..87f53ec 100644 --- a/BetterDiscordApp/src/modules/core.js +++ b/BetterDiscordApp/src/modules/core.js @@ -54,12 +54,12 @@ Core.prototype.init = async function() { } if (window.ED) { - Utils.alert("Not Supported", "BandagedBD does not work with EnhancedDiscord. Please uninstall one of them."); + Utils.alert("Not Supported", "LightcordBD does not work with EnhancedDiscord. Please uninstall one of them."); return; } if (window.WebSocket && window.WebSocket.name && window.WebSocket.name.includes("Patched")) { - Utils.alert("Not Supported", "BandagedBD does not work with Powercord. Please uninstall one of them."); + Utils.alert("Not Supported", "LightcordBD does not work with Powercord. Please uninstall one of them."); return; } @@ -485,22 +485,52 @@ Core.prototype.patchMessageHeader = function() { if (!children || !author || !author.id)return // if (header && header.className) header.className += " " if (!Array.isArray(children)) return; - if (author.id === "249746236008169473") { // Rauenzi: BandagedBD Developer - children.push( - BDV2.React.createElement(TooltipWrap, {color: "black", side: "top", text: "BandagedBD Developer"}, - BDV2.React.createElement(Anchor, {className: "bd-chat-badge", href: "https://github.com/rauenzi/BetterDiscordApp", title: "BandagedBD", target: "_blank"}, - BDV2.React.createElement(BDLogo, {size: "16px", className: "bd-logo"}) - ) - ) - ); - } else if (author.id === "696481194443014174" || author.id === "696003456611385396"){ // Not Thomiz: Lightcord Developer, Phorcys: Lightcord Developer - children.push( - BDV2.React.createElement(TooltipWrap, {color: "black", side: "top", text: "Lightcord Developer"}, - BDV2.React.createElement(Anchor, {className: "bd-chat-badge", href: "https://github.com/Lightcord/Lightcord", title: "Lightcord", target: "_blank"}, - BDV2.React.createElement(LightcordLogo, {size: "16px", className: "bd-logo"}) - ) - ) - ); + if (author.id === "249746236008169473") { + // Rauenzi: BandagedBD Developer + children.push( + BDV2.React.createElement( + TooltipWrap, + { color: "black", side: "top", text: "BandagedBD Developer" }, + BDV2.React.createElement( + Anchor, + { + className: "bd-chat-badge", + href: "https://github.com/rauenzi/BetterDiscordApp", + title: "BandagedBD", + target: "_blank", + }, + BDV2.React.createElement(BDLogo, { + size: "16px", + className: "bd-logo", + }) + ) + ) + ); //(props.user.id === "696481194443014174" || props.user.id === "363022107753578496"|| props.user.id === "424639027606585356"){ // Not Thomiz: Lightcord Developer, Phorcys: Lightcord Developer, smartfridge: Lightcord Dev + } else if ( + author.id === "696481194443014174" || + author.id === "363022107753578496" || + author.id === "424639027606585356" + ) { + // Not Thomiz: Lightcord Developer, Phorcys: Lightcord Developer + children.push( + BDV2.React.createElement( + TooltipWrap, + { color: "black", side: "top", text: "Lightcord Developer" }, + BDV2.React.createElement( + Anchor, + { + className: "bd-chat-badge", + href: "https://github.com/Lightcord/Lightcord", + title: "Lightcord", + target: "_blank", + }, + BDV2.React.createElement(LightcordLogo, { + size: "16px", + className: "bd-logo", + }) + ) + ) + ); } const id = uuidv4() children.push( diff --git a/BetterDiscordApp/src/modules/pluginCertifier.js b/BetterDiscordApp/src/modules/pluginCertifier.js index 9448fb4..e0211af 100644 --- a/BetterDiscordApp/src/modules/pluginCertifier.js +++ b/BetterDiscordApp/src/modules/pluginCertifier.js @@ -79,6 +79,7 @@ export function checkViruses(hash, data, resultCallback, removeCallback, filenam const scrpt = removeComment === 1 ? no_comments : data if(test.exec(scrpt)){ isHarmful = threats[type] + Utils.showToast(`${hashToUrl[hash].split("/").pop()} failed at test`, test, ". Marked as", threats[type]) console.log(`${hashToUrl[hash].split("/").pop()} failed at test`, test, ". Marked as", threats[type]) break } @@ -93,7 +94,7 @@ export function checkViruses(hash, data, resultCallback, removeCallback, filenam hash: hash, filename } - + Utils.showToast(`Found potentially dangerous ${cache[hash].type.toLowerCase()}: ${cache[hash].name}`) console.log(`Found potentially dangerous ${cache[hash].type.toLowerCase()}: ${cache[hash].name}`) resultCallback(cache[hash]) diff --git a/BetterDiscordApp/src/modules/utils.js b/BetterDiscordApp/src/modules/utils.js index 89b581c..72838a2 100644 --- a/BetterDiscordApp/src/modules/utils.js +++ b/BetterDiscordApp/src/modules/utils.js @@ -54,15 +54,15 @@ export default class Utils { } static log(moduleName, message) { - console.log(`%c[BandagedBD]%c [${moduleName}]%c ${message}`, "color: #3a71c1; font-weight: 700;", "color: #3a71c1;", ""); + console.log(`%c[LightcordBD]%c [${moduleName}]%c ${message}`, "color: #3a71c1; font-weight: 700;", "color: #3a71c1;", ""); } static warn(moduleName, message) { - console.warn(`%c[BandagedBD]%c [${moduleName}]%c ${message}`, "color: #E8A400; font-weight: 700;", "color: #E8A400;", ""); + console.warn(`%c[LightcordBD]%c [${moduleName}]%c ${message}`, "color: #E8A400; font-weight: 700;", "color: #E8A400;", ""); } static err(moduleName, message, error) { - console.log(`%c[BandagedBD]%c [${moduleName}]%c ${message}`, "color: red; font-weight: 700;", "color: red;", ""); + console.log(`%c[LightcordBD]%c [${moduleName}]%c ${message}`, "color: red; font-weight: 700;", "color: red;", ""); if (error) { console.groupCollapsed("%cError: " + error.message, "color: red;"); console.error(error.stack);