Lots of changes and restructuring, more to come...

- Started on submodules and utility stuff.
- Replaced Discord's console logs
- Rewrote own logger code into a module
- Added color utility functions
- Added user settings utility functions
pull/2/head
BakedPVP 4 years ago
parent fabc7e237b
commit 4605357952

@ -71,7 +71,6 @@
"no-empty-function": [ "warn" ],
"no-empty-pattern": [ "warn" ],
"no-eq-null": [ "warn" ],
"no-eval": [ "warn" ],
"no-extend-native": [ "warn" ],
"no-extra-bind": [ "warn" ],
"no-extra-label": [ "warn" ],
@ -119,7 +118,6 @@
"no-shadow-restricted-names": [ "warn" ],
"no-undef": [ "warn" ],
"no-undef-init": [ "warn" ],
"no-undefined": [ "warn" ],
"no-unused-vars": [ "warn" ],
"no-use-before-define": [ "warn" ],
"callback-return": [ "warn" ],
@ -155,7 +153,6 @@
"multiline-ternary": [ "warn", "always-multiline" ],
"new-parens": [ "warn" ],
"no-array-constructor": [ "warn" ],
"no-mixed-operators": [ "warn" ],
"no-mixed-spaces-and-tabs": [ "warn" ],
"no-multiple-empty-lines": [ "warn" ],
"no-new-object": [ "warn" ],
@ -175,7 +172,7 @@
}],
"padded-blocks": [ "warn", "never" ],
"quote-props": [ "warn", "as-needed" ],
"quotes": [ "warn", "single" ],
"quotes": [ "warn", "single"/*, { "allowTemplateLiterals": true }*/ ],
"semi": [ "warn", "always" ],
"semi-spacing": [ "warn", {
"before": false,
@ -197,7 +194,6 @@
}],
"template-tag-spacing": [ "warn", "always" ],
"wrap-regex": [ "warn" ],
"arrow-body-style": [ "warn", "as-needed" ],
"arrow-spacing": [ "warn", {
"before": true,
"after": true

7
.gitignore vendored

@ -1,7 +1,5 @@
.idea
.vscode
/.cache
/src/.cache/
/.logs
node_modules
package-lock.json
@ -13,6 +11,11 @@ src/Vizality/plugins/*
src/Vizality/plugins/vz-react-dev-tools/rdt.crx
src/Vizality/plugins/vz-react-dev-tools/react-dev-tools/*
# temporary
src/Vizality/plugins/vz-translate
src/Vizality/vizality_modules/google-translate-api
src/Vizality/themes/*
# !src/Vizality/themes/twitchcord
!src/Vizality/themes/.exists

@ -0,0 +1,71 @@
{
"eslint.format.enable": true,
"editor.codeActionsOnSave": { "source.fixAll.eslint": true },
"editor.tabSize": 2,
"editor.wordWrap": "on",
"todo-tree.tree.showScanModeButton": false,
"todo-tree.regex.regex" : "((//|#|<!--|;|\\*)\\s*($TAGS)|^\\s*- \\[ \\])",
"todo-tree.general.tags": [
"@bug",
"@deprecated",
"@hack",
"@i18n",
"@note",
"@powercord",
"@todo",
"@warning"
],
"todo-tree.highlights.defaultHighlight": {
"gutterIcon": true
},
"todo-tree.highlights.customHighlight": {
"@bug": {
"icon": "bug",
"foreground": "#daaa4e",
"background": "#daaa4e",
"opacity": 0
},
"@deprecated": {
"icon": "hubot",
"foreground": "#dad24e",
"background": "#dad24e",
"opacity": 0
},
"@hack": {
"icon": "beaker",
"foreground": "#4ea4da",
"background": "#4ea4da",
"opacity": 0
},
"@i18n": {
"icon": "globe",
"foreground": "#46d6af",
"background": "#46d6af",
"opacity": 0
},
"@note": {
"icon": "pencil",
"foreground": "#a868f7",
"background": "#a868f7",
"opacity": 0
},
"@powercord": {
"icon": "zap",
"foreground": "#ec0ddf",
"background": "#ec0ddf",
"opacity": 0
},
"@todo": {
"icon": "checklist",
"foreground": "#89da4e",
"background": "#89da4e",
"opacity": 0
},
"@warning": {
"icon": "alert",
"foreground": "#da4e4e",
"background": "#da4e4e",
"opacity": 0
}
}
}

@ -76,8 +76,6 @@
"VIZALITY_SETTINGS_DISCORD_EXPERIMENTS_DESC": "****VAROVÁNÍ:**** Povolení tohoto nastavení ti zpřístupní funkce, které mohou být detekovány Discordem a mohou vyústit ve ****zrušení účtu****. Vizality **nezodpovídá** za to, co s touto funkcí uděláš. Nech toto vyplé, pokud si nejsi jist. Tým Vizality **nebude** poskytovat jakoukoli pomoc s jakýmkoliv experimentem.",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Experimentální funkce webové platformy",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM_DESC": "Povolí experimentální funkce webové platformy v Chromiu, které jsou ve vývoji, např. CSS \"backdrop-filter\". Protože jsou funkce ve vývoji, můžeš se kdykoli setkat s problémy a změnami API. **Vyžaduje restart**.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Nechat token uložený",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Zabrání Discordu odstranění tvého tokenu z localStorage, což snižuje počet nevyžádaných odhlášení.",
"VIZALITY_SETTINGS_NO_CLYDE": "Vyměnit Clyde",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Zamění [Clyde]({discordiaUrl}) v příkazech Vizality za bohatou nabídku avatarů a uživatelských jmen vybranou vývojáři plug-inů - ve výchozím nastavení \"Vizality\".",
"VIZALITY_SETTINGS_OVERLAY": "Nástroje pro vývojáře v překrytí",

@ -76,8 +76,6 @@
"VIZALITY_SETTINGS_DISCORD_EXPERIMENTS_DESC": "****WARNUNG:**** Wenn du dies aktivierst erhältst du Zugriff zu Funktionen, die von Discord erkannt werden können. Dies kann dazu führen, dass dein ****Account gelöscht wird****. Vizality ist hierbei **nicht verantwortlich** für was du tust. Wenn du dir unsicher bist, lass diese Einstellung lieber deaktiviert. Das Vizality-Team stellt auch **keinen** Support für Probleme, die im Rahmen dieser Experimenten auftreten können.",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Experimentelle Web-Plattform-Funktionen",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM_DESC": "Aktiviert Chromiums experimentelle Web-Plattform-Erweiterungen, welche noch in der Entwicklung sind. Beispiel: CSS \"backdrop-filter\". Da diese Erweiterungen noch aktiv entwickelt werden kann es zu Problemen kommen und APIs können sich zu jeder Zeit verändern. **Neustart erforderlich**.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Speichere deinen Discord (Anmelde) Token",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Hindert Discord daran, deinen (Anmelde) Token aus dem localStorage zu löschen. Dadurch wirst du selterner ungewollt abgemeldet.",
"VIZALITY_SETTINGS_NO_CLYDE": "Clyde auslöschen",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Ersetzt [Clyde]({discordiaUrl}) in Vizality Befehlen mit einer Variation an Avataren und Nutzernamen, welche von Plugin-Entwicklern angegeben werden können - fällt standardmäßig auf \"Vizality\" zurück.",
"VIZALITY_SETTINGS_OVERLAY": "Overlay DevTools",

@ -76,8 +76,6 @@
"VIZALITY_SETTINGS_DISCORD_EXPERIMENTS_DESC": "****WARNING:**** Enabling this gives you access to features that can be detected by Discord and may result in an ****account termination****. Vizality is **not responsible** for what you do with this feature. Leave it disabled if you are unsure. The Vizality Team will **not** provide any support regarding any experiment.",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Experimental Web Platform features",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM_DESC": "Enables Chromium's experimental Web Platform features that are in development, such as CSS \"backdrop-filter\". Since features are in development you may encounter issues and APIs may change at any time. **Requires restart**.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Keep token stored",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Prevents Discord from removing your token from localStorage, reducing the number of unwanted logouts.",
"VIZALITY_SETTINGS_NO_CLYDE": "Eradicate Clyde",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Replaces [Clyde]({discordiaUrl}) in Vizality commands with a mixed range of avatars and usernames selected by plug-in developers - fallbacks to \"Vizality\" by default.",
"VIZALITY_SETTINGS_OVERLAY": "Overlay DevTools",

@ -76,8 +76,6 @@
"VIZALITY_SETTINGS_DISCORD_EXPERIMENTS_DESC": "****ADVERTENCIA:**** Habilitar esto le da acceso a funciones que Discord puede detectar y que pueden provocar la ****cancelación de una cuenta****. Vizality **no es responsable** de lo que haces con esta función. Déjelo desactivado si no está seguro. El equipo de Vizality **no brindará asistencia** con respecto a cualquier experimento.",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Características experimentales de la plataforma web",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM_DESC": "Habilita las características experimentales de la plataforma web de Chromium que están en desarrollo, como CSS \"backdrop-filter\". Como las características están en desarrollo, puede encontrar problemas y las API pueden cambiar en cualquier momento. **Requiere reinicio**.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Mantener token almacenado",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Evita que Discord elimine su token de localStorage, reduciendo el número de cierres de sesión no deseados.",
"VIZALITY_SETTINGS_NO_CLYDE": "Erradicar Clyde",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Reemplaza a [Clyde]({discordiaUrl}) en los comandos de Vizality con una gama mixta de avatares y nombres de usuario seleccionados por los desarrolladores de complementos; retrocede a \"Vizality\" de forma predeterminada.",
"VIZALITY_SETTINGS_OVERLAY": "Herramientas de desarrollo de superposición",

@ -76,8 +76,6 @@
"VIZALITY_SETTINGS_DISCORD_EXPERIMENTS_DESC": "****ATTENTION:**** L'activation de cette option vous donne accès à des fonctionnalités qui peuvent être détectées par Discord et peuvent entraîner la ****fermeture de votre compte****. Vizality n'est **pas responsable** pour ce que vous faites avec cette fonctionnalité. Laissez-la désactivée si vous n'êtes pas sûr. L'équipe de Vizality ne fournira **aucune** aide concernant ces fonctionnalités.",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Fonctionnalités expérimentales de la plateforme Web",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM_DESC": "Active les fonctionnalités expérimentales de la plateforme Web de Chromium qui sont en cours de développement, telles que CSS \"backdrop-filter\". Étant donné que les fonctionnalités sont en cours de développement, vous pouvez rencontrer des problèmes et les API peuvent changer à tout moment. **Nécessite un redémarrage**.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Conserver votre Token",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Empêche Discord de supprimer votre Token du stockage local, cela réduira le nombre de déconnexions indésirables.",
"VIZALITY_SETTINGS_NO_CLYDE": "Éradiquer Clyde",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Remplace [Clyde]({discordiaUrl}) dans les commandes Vizality par divers avatars et noms d'utilisateurs choisis par les développeurs de plugins - Redirige vers \"Vizality\" par défaut.",
"VIZALITY_SETTINGS_OVERLAY": "Overlay DevTools",

@ -12,8 +12,6 @@
"VIZALITY_SETTINGS_ADVANCED_DESC": "Non toccare impostazioni qui se non sai cosa stai facendo. Cose inaspettate possono accadere al tuo gatto.",
"VIZALITY_SETTINGS_DEBUG_LOGS": "Log di Debug",
"VIZALITY_SETTINGS_DEBUG_LOGS_DESC": "Salva i contenuti della console in un file. Utile per fare debug se Discord sta crashando inaspettatamente.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Mantieni il token memorizzato",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Impedisce a Discord di rimuovere il tuo token dal localStorage, riducendo i numeri di logout non voluti.",
"VIZALITY_SETTINGS_NO_CLYDE": "Eradica Clyde",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Rimpiazza [Clyde]({discordiaUrl}) nei comandi Vizality con una gamma di avatar e nomi utente misti selezionati dagli sviluppatori di plug-in - ricade a \"Vizality\" come predefinito.",
"VIZALITY_SETTINGS_OVERLAY": "DevTools Overlay",

@ -63,8 +63,6 @@
"VIZALITY_SETTINGS_DISCORD_EXPERIMENTS_DESC": "****ADVARSEL**** Å ta i bruk dette gir deg tilgang til funksjoner som kan bli oppdaget av Discord og kan ende med at ****kontoen din blir terminert****. Vizality er **ikke ansvarlig** for hva du gjør med denne funksjonen. La den stå deaktivert hvis du er usikker. Vizality vil **ikke** gi noen støtte når det gjelder noen eksperimenter.",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Eksperimentale Web Platform funksjoner",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM_DESC": "Aktiverer Chromium sine eksperimentale Web Platform funksjoner som er under utvikling, som CSS \"backdrop-filter\". Siden funksjonene er under utvikling så kan det hende at du møter på problemer, og APIer kan endres når som helst.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Behold token lagret",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Hindrer Discord fra å fjerne din token fra localStorage, reduserer antallet uønskede ut-logginger.",
"VIZALITY_SETTINGS_NO_CLYDE": "Utrydd Clyde",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Erstatter [Clyde]({discordiaUrl}) i Vizality kommandoer med forskjellige bilder og navn valgt av plug-in utviklere - tilbakestilles til \"Vizality\" automatisk.",
"VIZALITY_SETTINGS_OVERLAY": "Overlay DevTools",

@ -76,8 +76,6 @@
"VIZALITY_SETTINGS_DISCORD_EXPERIMENTS_DESC": "****UWAGA:**** Włączenie tego daje dostęp do funkcji wykrywanych przez Discorda i może skutkować ****usunięciem konta****. Vizality **nie ponosi odpowiedzialności** za to, co zrobisz z tą funkcją. Pozostaw to wyłączone, jeśli nie masz pewności że tego potrzebujesz. Zespół Vizalitya **nie** zapewni żadnego wsparcia dotyczącego jakiegokolwiek eksperymentu.",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Eksperymentalne funkcje Chromium",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM_DESC": "Włącza eksperymentalne funkcje Chromium, które są w fazie rozwoju, takie jak \"backdrop-fliter\" w CSS. Ponieważ te funkcje są w fazie rozwoju, mogą występować problemy, a interfejsy API mogą ulec zmianie w dowolnym momencie. **Wymaga ponownego uruchomienia Discorda**.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Zatrzymaj token w pamięci",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Zapobiega usuwaniu tokena przez Discorda z localStorage, zmniejszając liczbę niechcianych wylogowań.",
"VIZALITY_SETTINGS_NO_CLYDE": "Zastąp Clyde",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Zamienia [Clyde]({discordiaUrl}) w komendach Vizalitya z mieszanym zakresem awatarów i nazw użytkowników wybranych przez twórców pluginów - domyślnie jest to \"Vizality\".",
"VIZALITY_SETTINGS_OVERLAY": "Narzędzia deweloperskie nakładki",

@ -74,8 +74,6 @@
"VIZALITY_SETTINGS_DISCORD_EXPERIMENTS_DESC": "****AVISO:**** A ativação desta opção fornece acesso a recursos que podem ser detetados pelo Discord e podem resultar no ****encerramento da sua conta****. O Vizality **não é responsável** por o que você faz com este recurso. Deixe-o desativado se não tiver certeza. A equipe do Vizality **não** oferecerá suporte para qualquer experimento.",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Recursos Experimentais da Plataforma Web",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM_DESC": "Ativa os recursos experimentais da Plataforma Web do Chromium que estão em desenvolvimento, como CSS \"backdrop-filter\". Como estes recursos estão em desenvolvimento, você poderá encontrar problemas e APIs poderão mudar a qualquer momento. **Requer reinicialização**.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Manter token armazenado",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Impede que o Discord remova o seu token do localStorage, reduzindo o número de logouts indesejados.",
"VIZALITY_SETTINGS_NO_CLYDE": "Erradicar Clyde",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Substitui [Clyde]({discordiaUrl}) nos comandos do Vizality por uma variedade de avatares e nomes de usuários selecionados pelos desenvolvedores de plug-ins - \"Vizality\" por padrão.",
"VIZALITY_SETTINGS_OVERLAY": "DevTools no Overlay",

@ -30,8 +30,6 @@
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Recursos Experimentais da Web Platform",
"VIZALITY_SETTINGS_TRANSPARENT_DESC": "Faz com que qualquer janela aberta pelo Discord fique transparente, útil para temas.\n****AVISO:**** Isto irá quebrar \"**window snapping**\" no Windows. A **aceleração do hardware** terá de ser **desligada** no Linux. Poderás encontrar problemas e ter um fundo preto em alguns casos, como quando a janela fica cortada de fora na parte superior, ou inferior devido à resolução do teu monitor ou quando as devtools estão abertas e preparadas. **Requer reinicialização**.",
"VIZALITY_SETTINGS_TRANSPARENT": "Janela Transparente",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Impede o Discord de remover o teu token no localStorage, reduzindo o número de logouts indesejados.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Manter token armazenado",
"VIZALITY_SETTINGS_OVERLAY": "DevTools no Overlay",
"VIZALITY_SETTINGS_ADVANCED_DESC": "Não mexas em coisas aqui se não sabes o que estás a fazer. Coisas inesperadas podem acontecer ao teu gato.",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Substitui [Clyde]({discordiaUrl}) em comandos de Vizality com uma variedade de avatares e nomes selecionados por desenvolvedores de plug-ins - \"Vizality\" por definição.",

@ -76,8 +76,6 @@
"VIZALITY_SETTINGS_DISCORD_EXPERIMENTS_DESC": "****ПРЕДУПРЕЖДЕНИЕ:**** Включая это вы получаете доступ к функциям, которые могут быть обнаружены Discord и могут привести к ****удалению аккаунта****. Vizality **не отвечает** за то что вы используете эту фунцию. Оставьте его отключенным, если вы не уверены. Команда Vizality **не будет** оказывать какую-либо поддержку в отношении любого эксперимента.",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Экспериментальные возможности веб-платформы",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM_DESC": "Включает экспериментальные функции Chromium Web Platform, которые находятся в разработке, такие как CSS \"backdrop-filter\". Поскольку функции находятся в разработке, вы можете столкнуться с проблемами, и API могут измениться в любое время. **Требуется перезагрузка**.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Хранить токен",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Предотвращает Discord от удаления вашего токена из локального хранилища, уменьшая количество нежелательных выходов.",
"VIZALITY_SETTINGS_NO_CLYDE": "Заменить Clyde",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Заменяет имя и аватар [Clyde]({discordiaUrl}) в командах Vizality на выбранные разработчиками плагинов (По умолчанию \"Vizality\").",
"VIZALITY_SETTINGS_OVERLAY": "Инструменты разработчика для оверлея",

@ -100,8 +100,6 @@
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Experimentala Webbplattform funktioner",
"VIZALITY_SETTINGS_TRANSPARENT_DESC": "Gör alla fönster öppnat av Discord genomskinligt, användbart för att göra teman.\n****VARNING:**** Detta kommer att göra så att **fönsterknäppning** slutar fungera på Windows. **Maskinvaruacceleration** måste vara avstängt på Linux. Du kan stöta på problem och ha svart bakgrund i vissa fall, till exempel när fönstret är avklippt på toppen eller botten på grund av skärmupplösning eller när devtools är öppna och dockade. **Kräver omstart**.",
"VIZALITY_SETTINGS_TRANSPARENT": "Genomskinligt Fönster",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Förhindrar Discord från att ta bort din token från localStorage, minska antalet oönskade utloggningar.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Förvara token",
"VIZALITY_SETTINGS_ADVANCED_DESC": "Ändra ingenting här om du inte vet vad du gör. Oväntade saker kan hända med din katt.",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Byter ut [Clyde]({discordiaURL}) i Vizality kommandon med ett blandat antal avatarer och användarnamn som valts av plugin-utvecklare. Kommer visa \"Vizality\" om inte innstält av plugin-utvecklaren.",
"VIZALITY_SETTINGS_NO_CLYDE": "Utrota Clyde",

@ -76,8 +76,6 @@
"VIZALITY_SETTINGS_DISCORD_EXPERIMENTS_DESC": "****DİKKAT:**** Bunu etkinleştirdiğinizde Discord tarafından algılanabilen ve ****hesabının sonlandırılması**** ile sonuçlanabilecek özelliklere erişebilirsiniz. Vizality bu özelliklerle yaptıklarınızdan **sorumlu değildir**. Emin değilseniz devre dışı bırakın. Vizality Ekibi herhangi bir deneyle ilgili herhangi bir destek **vermeyecektir**.",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Deneysel Web Platformu özellikleri",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM_DESC": "Chromium'un geliştirilmekte olan deneysel Web Platformu özelliklerini aktif hale getirir, \"backdrop-filter\" gibi. Özellikler geliştirilmekte olduğundan, sorunlarla karşılaşabilirsiniz ve API'ler her zaman değişebilir. **Yeniden başlatma gerektirir**.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Token'i saklı tut",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Discord'un token'inizi localStorage'dan kaldırmasını engeller, istenmeyen çıkışların sayısını azaltır.",
"VIZALITY_SETTINGS_NO_CLYDE": "Clyde'i Ortadan Kaldır",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "[Clyde'i]({discordiaUrl}) eklenti geliştiricilerinin şeçtiği avatar ve isimlerle değiştirir - varsayılan olarak \"Vizality\" seçeneğine geri döner.",
"VIZALITY_SETTINGS_OVERLAY": "Overlay DevTools",

@ -76,8 +76,6 @@
"VIZALITY_SETTINGS_DISCORD_EXPERIMENTS_DESC": "****ПОПЕРЕДЖЕННЯ:**** Включаючи це ви отримуєте доступ до функцій, які можуть бути виявлені Discord і можуть привести до ****видалення облікового запису****. Vizality **не відповідає** за те що ви використовуєте цю фунцию. Залиште його відключеним, якщо ви не впевнені. Команда Vizality **НЕ буде** надавати будь-яку підтримку щодо будь-якого експерименту.",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM": "Експериментальні можливості веб-платформи",
"VIZALITY_SETTINGS_EXP_WEB_PLATFORM_DESC": "Включає експериментальні функції Chromium Web Platform, які знаходяться в розробці, такі як CSS \"backdrop-filter\". Оскільки функції знаходяться в розробці, ви можете зіткнутися з проблемами, і API можуть змінитися в будь-який час. **Потрібне перезавантаження**.",
"VIZALITY_SETTINGS_KEEP_TOKEN": "Зберігати токен",
"VIZALITY_SETTINGS_KEEP_TOKEN_DESC": "Запобігає Discord від видалення вашого токена з localStorage, зменшуючи кількість небажаних виходів.",
"VIZALITY_SETTINGS_NO_CLYDE": "Замінити Clyde",
"VIZALITY_SETTINGS_NO_CLYDE_DESC": "Замінює [Clyde] ({discordiaUrl}) в командах Vizality.",
"VIZALITY_SETTINGS_OVERLAY": "Інструменти розробника для накладення",

@ -3,7 +3,7 @@
"compilerOptions": {
"baseUrl": "./src/",
"paths": {
"vizality/*": [ "./fake_node_modules/vizality/*" ]
"vizality/*": [ "./Vizality/vizality_modules/*" ]
}
}
}

@ -17,7 +17,6 @@
"homepage": "https://vizality.com",
"dependencies": {
"codemirror": "^5.54.0",
"fibers": "^5.0.0",
"js-convert-case": "^4.0.1",
"less": "^3.11.1",
"node-watch": "^0.6.4",

@ -0,0 +1,16 @@
const coremods = require('./registry');
const unloadFuncs = [];
module.exports = {
async load () {
for (const mod of coremods) {
const unload = await mod();
if (typeof unload === 'function') {
unloadFuncs.push(unload);
}
}
},
unload () {
return Promise.all(unloadFuncs.map(f => f()));
}
};

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
!function(e){var n={};function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(n){return e[n]}.bind(null,r));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=89)}({89:function(e,n,t){"use strict";var o={},r=navigator.userAgent.indexOf("Firefox")>=0;function i(e,n){chrome.browserAction.setIcon({tabId:n,path:{16:"icons/16-"+e+".png",32:"icons/32-"+e+".png",48:"icons/48-"+e+".png",128:"icons/128-"+e+".png"}}),chrome.browserAction.setPopup({tabId:n,popup:"popups/"+e+".html"})}chrome.runtime.onConnect.addListener((function(e){var n,t,r=null,i=null;+(t=e.name)+""===t?(r=e.name,i="devtools",n=+e.name,chrome.tabs.executeScript(n,{file:"/build/contentScript.js"},(function(){}))):(r=e.sender.tab.id,i="content-script"),o[r]||(o[r]={devtools:null,"content-script":null}),o[r][i]=e,o[r].devtools&&o[r]["content-script"]&&function(e,n){function t(e){n.postMessage(e)}function o(n){e.postMessage(n)}function r(){e.onMessage.removeListener(t),n.onMessage.removeListener(o),e.disconnect(),n.disconnect()}e.onMessage.addListener(t),n.onMessage.addListener(o),e.onDisconnect.addListener(r),n.onDisconnect.addListener(r)}(o[r].devtools,o[r]["content-script"])})),r&&chrome.tabs.onUpdated.addListener((function(e,n,t){t.active&&"loading"===n.status&&i("disabled",e)})),chrome.runtime.onMessage.addListener((function(e,n){if(n.tab&&e.hasDetectedReact){var t=e.reactBuildType;-1!==n.url.indexOf("facebook.github.io/react")&&(t="production"),i(t,n.tab.id)}}))}});

@ -0,0 +1 @@
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({90:function(e,t,n){"use strict";var o=!1,r=!1;function a(){window.postMessage({source:"react-devtools-content-script",hello:!0},"*")}function c(e){e.source===window&&e.data&&"react-devtools-bridge"===e.data.source&&(r=!0,s.postMessage(e.data.payload))}var s=chrome.runtime.connect({name:"content-script"});if(s.onMessage.addListener((function(e){window.postMessage({source:"react-devtools-content-script",payload:e},"*")})),s.onDisconnect.addListener((function(){o=!0,window.removeEventListener("message",c),window.postMessage({source:"react-devtools-content-script",payload:{type:"event",event:"shutdown"}},"*")})),window.addEventListener("message",c),a(),!r)var i=setInterval((function(){r||o?clearInterval(i):a()}),500)}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=158)}({158:function(e,t){window.container=document.getElementById("container");var n=!1;window.injectStyles=function(e){if(!n){n=!0;var t=e(),r=!0,o=!1,u=void 0;try{for(var i,l=t[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var a=i.value;document.head.appendChild(a)}}catch(e){o=!0,u=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw u}}}}}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1 @@
<svg id="Development" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><defs><style>.cls-1{fill:#d94a38;}.cls-2{fill:#fff;}.cls-3{fill:#231f20;}.cls-4{font-size:12px;font-family:MyriadPro-Regular, Myriad Pro;}</style></defs><title>development</title><g id="Background"><rect class="cls-1" width="1024" height="1024" rx="96" ry="96"/></g><g id="Rings"><g id="Ring-2" data-name="Ring"><path class="cls-2" d="M959,509c0-62-74-117-189-150,27-115,17-207-37-238s-139,6-224,88c-86-81-171-118-224-87s-64,123-36,239C135,394,61,449,61,511s74,117,189,150c-27,115-17,207,37,238s139-6,224-88c86,81,171,118,224,87s64-123,36-239C885,626,959,571,959,509ZM713,157c40,23,45,97,21,193a900,900,0,0,0-121-19,900,900,0,0,0-78-94C606,166,673,133,713,157ZM635,583c-14,24-28,47-43,69-27,2-54,3-83,3l-81-3c-15-22-30-46-44-70s-27-48-38-72c12-24,24-49,39-73s28-47,43-69c27-2,54-3,83-3l81,3c15,22,30,46,44,70s27,48,38,72C662,534,649,558,635,583Zm60-27c11,26,21,52,29,77-25,6-52,10-81,14l26-44ZM511,757c-17-19-35-40-52-63H563C546,716,528,738,511,757ZM378,647c-29-3-56-8-81-13,8-25,17-50,28-77l25,45ZM325,464c-11-26-21-52-29-77,25-6,52-10,81-14l-26,44ZM509,263c17,19,35,40,52,63H457C474,304,492,282,509,263ZM670,418l-28-45c29,3,56,8,81,13-8,25-17,50-28,77ZM305,158c40-23,106,9,177,78a900,900,0,0,0-77,95,900,900,0,0,0-120,20C260,255,265,181,305,158ZM102,511c0-46,61-88,156-114a900,900,0,0,0,44,114,900,900,0,0,0-43,114C164,599,102,558,102,511ZM307,863c-40-23-45-97-21-193a900,900,0,0,0,121,19,900,900,0,0,0,78,94C414,854,347,887,307,863Zm408-1c-40,23-106-9-177-78a900,900,0,0,0,77-95,900,900,0,0,0,120-20C760,765,755,839,715,862Zm46-239a900,900,0,0,0-44-114,900,900,0,0,0,43-114c96,26,157,67,157,114S856,597,761,623Z"/></g></g><g id="Ring_Blockers" data-name="Ring Blockers"><circle class="cls-1" cx="417" cy="672" r="45"/><circle class="cls-1" cx="699" cy="513" r="45"/><circle class="cls-1" cx="797" cy="634" r="45"/><circle class="cls-1" cx="479" cy="818" r="45"/><g id="Layer_14" data-name="Layer 14"><rect class="cls-1" x="420" y="621" width="377" height="188"/><rect class="cls-1" x="500" y="530" width="312" height="405"/></g></g><g id="Bug"><g id="Legs"><path class="cls-3" d="M702,496a17,17,0,0,0-21,13l-19,78,34,8,19-78A17,17,0,0,0,702,496Z"/><text class="cls-4" transform="translate(512 512)">780</text><text class="cls-4" transform="translate(512 512)">780</text><path class="cls-3" d="M813,626a17,17,0,0,0-23-9l-73,32,14,32,73-32A17,17,0,0,0,813,626Z"/><path class="cls-3" d="M834,756l-77-20-9,34,77,20a18,18,0,0,0,9-34Z"/><path class="cls-3" d="M425,656a17,17,0,1,0-10,33l76,23,10-33Z"/><path class="cls-3" d="M532,756l-64,48a18,18,0,1,0,21,28l64-48Z"/><path class="cls-3" d="M584,836l-21,77a17,17,0,1,0,34,9l21-77Z"/></g><g id="Body"><path class="cls-3" d="M762,690h0l-51-92h0A125,125,0,0,0,492,721h0l51,92h0A125,125,0,0,0,762,690Z"/></g><g id="Line"><path class="cls-1" d="M613,649h0a17,17,0,0,0-30,18h0L711,887l30-18Z"/></g><g id="Head_Ring" data-name="Head Ring"><circle class="cls-1" cx="511" cy="509" r="113"/></g><g id="Head"><circle class="cls-3" cx="512" cy="512" r="80"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -0,0 +1 @@
<svg id="Development" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><defs><style>.cls-1{fill:#d94a38;}.cls-2{fill:#fff;}.cls-3{fill:#231f20;}.cls-4{font-size:12px;font-family:MyriadPro-Regular, Myriad Pro;}</style></defs><title>development</title><g id="Background"><rect class="cls-1" width="1024" height="1024" rx="96" ry="96"/></g><g id="Rings"><g id="Ring-2" data-name="Ring"><path class="cls-2" d="M959,509c0-62-74-117-189-150,27-115,17-207-37-238s-139,6-224,88c-86-81-171-118-224-87s-64,123-36,239C135,394,61,449,61,511s74,117,189,150c-27,115-17,207,37,238s139-6,224-88c86,81,171,118,224,87s64-123,36-239C885,626,959,571,959,509ZM713,157c40,23,45,97,21,193a900,900,0,0,0-121-19,900,900,0,0,0-78-94C606,166,673,133,713,157ZM635,583c-14,24-28,47-43,69-27,2-54,3-83,3l-81-3c-15-22-30-46-44-70s-27-48-38-72c12-24,24-49,39-73s28-47,43-69c27-2,54-3,83-3l81,3c15,22,30,46,44,70s27,48,38,72C662,534,649,558,635,583Zm60-27c11,26,21,52,29,77-25,6-52,10-81,14l26-44ZM511,757c-17-19-35-40-52-63H563C546,716,528,738,511,757ZM378,647c-29-3-56-8-81-13,8-25,17-50,28-77l25,45ZM325,464c-11-26-21-52-29-77,25-6,52-10,81-14l-26,44ZM509,263c17,19,35,40,52,63H457C474,304,492,282,509,263ZM670,418l-28-45c29,3,56,8,81,13-8,25-17,50-28,77ZM305,158c40-23,106,9,177,78a900,900,0,0,0-77,95,900,900,0,0,0-120,20C260,255,265,181,305,158ZM102,511c0-46,61-88,156-114a900,900,0,0,0,44,114,900,900,0,0,0-43,114C164,599,102,558,102,511ZM307,863c-40-23-45-97-21-193a900,900,0,0,0,121,19,900,900,0,0,0,78,94C414,854,347,887,307,863Zm408-1c-40,23-106-9-177-78a900,900,0,0,0,77-95,900,900,0,0,0,120-20C760,765,755,839,715,862Zm46-239a900,900,0,0,0-44-114,900,900,0,0,0,43-114c96,26,157,67,157,114S856,597,761,623Z"/></g></g><g id="Ring_Blockers" data-name="Ring Blockers"><circle class="cls-1" cx="417" cy="672" r="45"/><circle class="cls-1" cx="699" cy="513" r="45"/><circle class="cls-1" cx="797" cy="634" r="45"/><circle class="cls-1" cx="479" cy="818" r="45"/><g id="Layer_14" data-name="Layer 14"><rect class="cls-1" x="420" y="621" width="377" height="188"/><rect class="cls-1" x="500" y="530" width="312" height="405"/></g></g><g id="Bug"><g id="Legs"><path class="cls-3" d="M702,496a17,17,0,0,0-21,13l-19,78,34,8,19-78A17,17,0,0,0,702,496Z"/><text class="cls-4" transform="translate(512 512)">780</text><text class="cls-4" transform="translate(512 512)">780</text><path class="cls-3" d="M813,626a17,17,0,0,0-23-9l-73,32,14,32,73-32A17,17,0,0,0,813,626Z"/><path class="cls-3" d="M834,756l-77-20-9,34,77,20a18,18,0,0,0,9-34Z"/><path class="cls-3" d="M425,656a17,17,0,1,0-10,33l76,23,10-33Z"/><path class="cls-3" d="M532,756l-64,48a18,18,0,1,0,21,28l64-48Z"/><path class="cls-3" d="M584,836l-21,77a17,17,0,1,0,34,9l21-77Z"/></g><g id="Body"><path class="cls-3" d="M762,690h0l-51-92h0A125,125,0,0,0,492,721h0l51,92h0A125,125,0,0,0,762,690Z"/></g><g id="Line"><path class="cls-1" d="M613,649h0a17,17,0,0,0-30,18h0L711,887l30-18Z"/></g><g id="Head_Ring" data-name="Head Ring"><circle class="cls-1" cx="511" cy="509" r="113"/></g><g id="Head"><circle class="cls-3" cx="512" cy="512" r="80"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -0,0 +1 @@
<svg id="Disabled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><defs><style>.cls-1{fill:#aaa;}.cls-2{fill:#fff;}</style></defs><title>disabled</title><g id="Background"><rect class="cls-1" width="1024" height="1024" rx="96" ry="96"/></g><g id="Rings"><path class="cls-2" d="M959,509c0-62-74-117-189-150,27-115,17-207-37-238s-139,6-224,88c-86-81-171-118-224-87s-64,123-36,239C135,394,61,449,61,511s74,117,189,150c-27,115-17,207,37,238s139-6,224-88c86,81,171,118,224,87s64-123,36-239C885,626,959,571,959,509ZM713,157c40,23,45,97,21,193a900,900,0,0,0-121-19,900,900,0,0,0-78-94C606,166,673,133,713,157ZM635,583c-14,24-28,47-43,69-27,2-54,3-83,3l-81-3c-15-22-30-46-44-70s-27-48-38-72c12-24,24-49,39-73s28-47,43-69c27-2,54-3,83-3l81,3c15,22,30,46,44,70s27,48,38,72C662,534,649,558,635,583Zm60-27c11,26,21,52,29,77-25,6-52,10-81,14l26-44ZM511,757c-17-19-35-40-52-63H563C546,716,528,738,511,757ZM378,647c-29-3-56-8-81-13,8-25,17-50,28-77l25,45ZM325,464c-11-26-21-52-29-77,25-6,52-10,81-14l-26,44ZM509,263c17,19,35,40,52,63H457C474,304,492,282,509,263ZM670,418l-28-45c29,3,56,8,81,13-8,25-17,50-28,77ZM305,158c40-23,106,9,177,78a900,900,0,0,0-77,95,900,900,0,0,0-120,20C260,255,265,181,305,158ZM102,511c0-46,61-88,156-114a900,900,0,0,0,44,114,900,900,0,0,0-43,114C164,599,102,558,102,511ZM307,863c-40-23-45-97-21-193a900,900,0,0,0,121,19,900,900,0,0,0,78,94C414,854,347,887,307,863Zm408-1c-40,23-106-9-177-78a900,900,0,0,0,77-95,900,900,0,0,0,120-20C760,765,755,839,715,862Zm46-239a900,900,0,0,0-44-114,900,900,0,0,0,43-114c96,26,157,67,157,114S856,597,761,623Z"/></g><g id="Circle"><circle class="cls-2" cx="510" cy="510" r="80"/></g></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1 @@
<svg id="Outdated" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><defs><style>.cls-1{fill:#202020;}.cls-2{fill:#fff;}.cls-3{fill:#f9f453;}</style></defs><title>outdated</title><g id="Background"><rect class="cls-1" width="1024" height="1024" rx="96" ry="96"/></g><g id="Rings"><path class="cls-2" d="M510,325C261,325,60,408,60,510S261,695,510,695s450-83,450-185S759,325,510,325Zm0,330c-225,0-407-65-407-145S285,365,510,365s408,65,408,145S735,655,510,655Z"/><path class="cls-2" d="M670,417C546,202,373,69,285,120s-59,267,65,482S647,951,735,900,794,633,670,417ZM384,583C272,388,237,197,306,157s217,86,329,280,148,385,78,425S497,777,384,583Z"/><g id="BLOCKER"><rect class="cls-1" x="564" y="572" width="315" height="397.12" transform="translate(652 -283) rotate(39)"/><rect class="cls-1" x="685" y="369" width="283" height="360.81" transform="translate(255 -262) rotate(21)"/></g><path class="cls-2" d="M670,603c124-215,153-431,65-482S474,202,350,417,197,849,285,900,546,818,670,603ZM384,437C497,243,644,117,714,157s34,231-78,425S376,903,306,863,272,632,384,437Z"/></g><g id="Circle"><circle class="cls-2" cx="512" cy="512" r="80"/></g><g id="Shield"><path class="cls-3" d="M960,887a24,24,0,0,0-5-15h0L807,605h0v-2h0a25,25,0,0,0-43,3h0L613,876h0a24,24,0,0,0-3,11,25,25,0,0,0,24,25H936A25,25,0,0,0,960,887ZM810,848a15,15,0,0,1-15,15H775a15,15,0,0,1-15-15V828a15,15,0,0,1,15-15h20a15,15,0,0,1,15,15Zm0-74a15,15,0,0,1-15,15H775a15,15,0,0,1-15-15V705a15,15,0,0,1,15-15h20a15,15,0,0,1,15,15Z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1 @@
<svg id="Production" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><defs><style>.cls-1{fill:#202020;}.cls-2{fill:#59c9f1;}</style></defs><title>production</title><g id="Background"><rect class="cls-1" width="1024" height="1024" rx="96" ry="96"/></g><g id="Rings"><path class="cls-2" d="M959,509c0-62-74-117-189-150,27-115,17-207-37-238s-139,6-224,88c-86-81-171-118-224-87s-64,123-36,239C135,394,61,449,61,511s74,117,189,150c-27,115-17,207,37,238s139-6,224-88c86,81,171,118,224,87s64-123,36-239C885,626,959,571,959,509ZM713,157c40,23,45,97,21,193a900,900,0,0,0-121-19,900,900,0,0,0-78-94C606,166,673,133,713,157ZM635,583c-14,24-28,47-43,69-27,2-54,3-83,3l-81-3c-15-22-30-46-44-70s-27-48-38-72c12-24,24-49,39-73s28-47,43-69c27-2,54-3,83-3l81,3c15,22,30,46,44,70s27,48,38,72C662,534,649,558,635,583Zm60-27c11,26,21,52,29,77-25,6-52,10-81,14l26-44ZM511,757c-17-19-35-40-52-63H563C546,716,528,738,511,757ZM378,647c-29-3-56-8-81-13,8-25,17-50,28-77l25,45ZM325,464c-11-26-21-52-29-77,25-6,52-10,81-14l-26,44ZM509,263c17,19,35,40,52,63H457C474,304,492,282,509,263ZM670,418l-28-45c29,3,56,8,81,13-8,25-17,50-28,77ZM305,158c40-23,106,9,177,78a900,900,0,0,0-77,95,900,900,0,0,0-120,20C260,255,265,181,305,158ZM102,511c0-46,61-88,156-114a900,900,0,0,0,44,114,900,900,0,0,0-43,114C164,599,102,558,102,511ZM307,863c-40-23-45-97-21-193a900,900,0,0,0,121,19,900,900,0,0,0,78,94C414,854,347,887,307,863Zm408-1c-40,23-106-9-177-78a900,900,0,0,0,77-95,900,900,0,0,0,120-20C760,765,755,839,715,862Zm46-239a900,900,0,0,0-44-114,900,900,0,0,0,43-114c96,26,157,67,157,114S856,597,761,623Z"/></g><g id="Circle"><circle class="cls-2" cx="510" cy="510" r="80"/></g></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,9 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="./build/main.js"></script>
</head>
<body>
</body>
</html>

@ -0,0 +1,55 @@
{
"update_url": "https://clients2.google.com/service/update2/crx",
"manifest_version": 2,
"name": "React Developer Tools",
"description": "Adds React debugging tools to the Chrome Developer Tools.\n\nCreated from revision 23309eb38 on 5/18/2020.",
"version": "4.7.0",
"version_name": "4.7.0 (5/18/2020)",
"minimum_chrome_version": "49",
"icons": {
"16": "icons/16-production.png",
"32": "icons/32-production.png",
"48": "icons/48-production.png",
"128": "icons/128-production.png"
},
"browser_action": {
"default_icon": {
"16": "icons/16-disabled.png",
"32": "icons/32-disabled.png",
"48": "icons/48-disabled.png",
"128": "icons/128-disabled.png"
},
"default_popup": "popups/disabled.html"
},
"devtools_page": "main.html",
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
"web_accessible_resources": [
"main.html",
"panel.html",
"build/react_devtools_backend.js",
"build/renderer.js"
],
"background": {
"scripts": [
"build/background.js"
],
"persistent": false
},
"permissions": [
"file:///*",
"http://*/*",
"https://*/*"
],
"content_scripts": [
{
"matches": [
"<all_urls>"
],
"js": [
"build/injectGlobalHook.js"
],
"run_at": "document_start"
}
]
}

@ -0,0 +1,32 @@
<!doctype html>
<html style="display: flex">
<head>
<meta charset="utf8">
<style>
html {
display: flex;
}
body {
margin: 0;
padding: 0;
flex: 1;
display: flex;
}
#container {
display: flex;
flex: 1;
width: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
</style>
</head>
<body>
<!-- main react mount point -->
<div id="container">Unable to find React on the page.</div>
<script src="./build/panel.js"></script>
</body>
</html>

@ -0,0 +1,32 @@
<script src="shared.js"></script>
<style>
html, body {
font-size: 14px;
min-width: 460px;
min-height: 133px;
}
body {
margin: 8px;
}
hr {
width: 100%;
}
</style>
<p>
<b>This page includes an extra development build of React. &#x1f6a7;</b>
</p>
<p>
The React build on this page includes both development and production versions because dead code elimination has not been applied correctly.
<br />
<br />
This makes its size larger, and causes React to run slower.
<br />
<br />
Make sure to <a href="https://facebook.github.io/react/docs/optimizing-performance.html#use-the-production-build">set up dead code elimination</a> before deployment.
</p>
<hr />
<p>
Open the developer tools, and "Components" and "Profiler" tabs will appear to the right.
</p>

@ -0,0 +1,28 @@
<script src="shared.js"></script>
<style>
html, body {
font-size: 14px;
min-width: 460px;
min-height: 101px;
}
body {
margin: 8px;
}
hr {
width: 100%;
}
</style>
<p>
<b>This page is using the development build of React. &#x1f6a7;</b>
</p>
<p>
Note that the development build is not suitable for production.
<br />
Make sure to <a href="https://facebook.github.io/react/docs/optimizing-performance.html#use-the-production-build">use the production build</a> before deployment.
</p>
<hr />
<p>
Open the developer tools, and "Components" and "Profiler" tabs will appear to the right.
</p>

@ -0,0 +1,21 @@
<script src="shared.js"></script>
<style>
html, body {
font-size: 14px;
min-width: 410px;
min-height: 33px;
}
body {
margin: 8px;
}
hr {
width: 100%;
}
</style>
<p>
<b>This page doesn&rsquo;t appear to be using React.</b>
<br />
If this seems wrong, follow the <a href="https://github.com/facebook/react/tree/master/packages/react-devtools#the-react-tab-doesnt-show-up">troubleshooting instructions</a>.
</p>

@ -0,0 +1,29 @@
<script src="shared.js"></script>
<style>
html, body {
font-size: 14px;
min-width: 460px;
min-height: 117px;
}
body {
margin: 8px;
}
hr {
width: 100%;
}
</style>
<p>
<b>This page is using an outdated version of React. &#8987;</b>
</p>
<p>
We recommend updating React to ensure that you receive important bugfixes and performance improvements.
<br />
<br />
You can find the upgrade instructions on the <a href="https://facebook.github.io/react/blog/">React blog</a>.
</p>
<hr />
<p>
Open the developer tools, and "Components" and "Profiler" tabs will appear to the right.
</p>

@ -0,0 +1,21 @@
<script src="shared.js"></script>
<style>
html, body {
font-size: 14px;
min-width: 460px;
min-height: 39px;
}
body {
margin: 8px;
}
hr {
width: 100%;
}
</style>
<p>
<b>This page is using the production build of React. &#x2705;</b>
<br />
Open the developer tools, and "Components" and "Profiler" tabs will appear to the right.
</p>

@ -0,0 +1,24 @@
/* globals chrome */
'use strict';
document.addEventListener('DOMContentLoaded', function() {
// Make links work
const links = document.getElementsByTagName('a');
for (let i = 0; i < links.length; i++) {
(function() {
const ln = links[i];
const location = ln.href;
ln.onclick = function() {
chrome.tabs.create({active: true, url: location});
};
})();
}
// Work around https://bugs.chromium.org/p/chromium/issues/detail?id=428044
document.body.style.opacity = 0;
document.body.style.transition = 'opacity ease-out .4s';
requestAnimationFrame(function() {
document.body.style.opacity = 1;
});
});

@ -0,0 +1,31 @@
<script src="shared.js"></script>
<style>
html, body {
font-size: 14px;
min-width: 460px;
min-height: 133px;
}
body {
margin: 8px;
}
hr {
width: 100%;
}
</style>
<p>
<b>This page is using an unminified build of React. &#x1f6a7;</b>
</p>
<p>
The React build on this page appears to be unminified.
<br />
This makes its size larger, and causes React to run slower.
<br />
<br />
Make sure to <a href="https://facebook.github.io/react/docs/optimizing-performance.html#use-the-production-build">set up minification</a> before deployment.
</p>
<hr />
<p>
Open the developer tools, and "Components" and "Profiler" tabs will appear to the right.
</p>

@ -0,0 +1,41 @@
/**
* The extension is successfully loaded, however it seems like
* the tab tools isn't added appropriately. It *seems* related to a
* chromium issue but I'm really unsure. Needs further investigation.
*
* https://github.com/electron/electron/issues/23662
* https://bugs.chromium.org/p/chromium/issues/detail?id=1093731
*/
const { existsSync, promises: { mkdir, writeFile } } = require('fs');
const { join } = require('path');
const unzip = require('unzip-crx');
const { get } = require('vizality/http');
const { rmdirRf } = require('vizality/util');
const CRX_URL = 'https://clients2.google.com/service/update2/crx?response=redirect&os=win&arch=x86-64&os_arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=unknown&prodversion=83.0.4103.103&acceptformat=crx2&x=id=fmkadmapgofadopljbjfkapdkoienihi%26uc';
const EXT_PATH = join(__dirname, 'ext');
const RDT_PATH = join(EXT_PATH, 'dst');
async function download () {
const crxRes = await get(CRX_URL);
const url = crxRes.headers.location;
const extFile = join(EXT_PATH, url.split('/').pop());
if (existsSync(EXT_PATH)) {
if (existsSync(extFile)) {
// Everything's up to date
return;
}
await rmdirRf(EXT_PATH);
}
await mkdir(EXT_PATH);
const res = await get(url);
await writeFile(extFile, res.raw);
return unzip(extFile, RDT_PATH);
}
let id;
module.exports = () => {
download().then(() => VizalityNative.installExtension(RDT_PATH)).then(eid => id = eid);
return () => id && VizalityNative.uninstallExtension(id);
};

@ -0,0 +1,3 @@
module.exports = [
require('./react-dev-tools')
];

@ -1,7 +1,8 @@
const Webpack = require('vizality/webpack');
const { sleep } = require('vizality/util');
const { sleep, logger } = require('vizality/util');
const { WEBSITE_IMAGES } = require('vizality/constants');
const { Updatable } = require('vizality/entities');
const { inject, uninject } = require('vizality/injector');
const { join } = require('path');
const { promisify } = require('util');
@ -11,6 +12,7 @@ const exec = promisify(cp.exec);
const PluginManager = require('./managers/plugins');
const StyleManager = require('./managers/styles');
const APIManager = require('./managers/apis');
const coremods = require('./coremods');
const modules = require('./modules');
const currentWebContents = require('electron').remote.getCurrentWebContents();
@ -85,13 +87,6 @@ class Vizality extends Updatable {
await this.startup();
this.gitInfos = await this.pluginManager.get('vz-updater').getGitInfos();
// Token manipulation stuff
if (this.settings.get('hideToken', true)) {
const tokenModule = await require('vizality/webpack').getModule([ 'hideToken' ]);
tokenModule.hideToken = () => void 0;
setImmediate(() => tokenModule.showToken()); // just to be sure
}
this.emit('loaded');
}
@ -114,10 +109,33 @@ class Vizality extends Updatable {
this.styleManager.loadThemes();
// Plugins
await coremods.load();
await this.pluginManager.startPlugins();
this.initialized = true;
const Log = await Webpack.getModuleByPrototypes([ '_log' ]);
const insteadObj = {};
function _logInstead (module, orig, replace) {
insteadObj[orig] = insteadObj[orig] || module[orig];
module[orig] = replace;
}
_logInstead(Log.prototype, '_log', function (...originalArgs) {
if (originalArgs[0] === 'info' || originalArgs[0] === 'log') {
logger.log('Discord', this.name, null, originalArgs[1]);
}
if (originalArgs[0] === 'error' || originalArgs[0] === 'trace') {
logger.error('Discord', this.name, null, originalArgs[1]);
}
if (originalArgs[0] === 'warn') {
logger.warn('Discord', this.name, null, originalArgs[1]);
}
});
const navigate = require('vizality/navigate');
// Necessarry to activate on Discord startup
@ -133,8 +151,18 @@ class Vizality extends Updatable {
// Vizality shutdown
async shutdown () {
this.initialized = false;
function _logInsteadUndo (module, orig) {
console.log('this.insteadObj', this.insteadObj);
module[orig] = this.insteadObj[orig];
}
console.log('Log.prototype', this.Log.prototype);
_logInsteadUndo(this.Log.prototype, '_log');
// Plugins
await this.pluginManager.shutdownPlugins();
await coremods.unload();
// Style Manager
this.styleManager.unloadThemes();

@ -8,48 +8,6 @@ module.exports = class PluginManager {
this.plugins = new Map();
this.manifestKeys = [ 'name', 'version', 'description', 'author', 'license' ];
this.baseBadgeStyle =
`color: #fff;
border-radius: 3px;
text-align: center;
display: inline-block;
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
text-transform: uppercase;
font-size: 10px;
font-weight: 700;
line-height: 14px;
margin-right: 3px;
padding: 1px 4px;
`;
this.mainBadgeStyle =
`background-image: url(https://i.imgur.com/QCw3u25.png);
background-repeat: no-repeat;
background-position: center;
background-size: contain;
padding: 2px 16px 5px 0;
border-radius: 5px;
text-align: center;
margin: 0 2px 1px 0;
display: inline-block;
`;
this.descriptorBadgeStyle =
`background: #d021a1;
${this.baseBadgeStyle}
`;
this.warnBadgeStyle =
`color: #000;
background: #fffc00;
${this.baseBadgeStyle}
`;
this.errorBadgeStyle =
`background: #ff0000;
${this.baseBadgeStyle}
`;
}
// Getters
@ -262,34 +220,14 @@ module.exports = class PluginManager {
}
log (...data) {
console.log(
'%c %cPlugin%c',
this.mainBadgeStyle,
this.descriptorBadgeStyle,
'', // clear the styles of the `data`
...data
);
}
warn (...data) {
console.warn(
'%cWarning %c %cPlugin%c',
this.warnBadgeStyle,
this.mainBadgeStyle,
this.descriptorBadgeStyle,
'', // clear the styles of the `data`
...data
);
}
error (...data) {
console.error(
'%cError %c %cPlugin%c',
this.errorBadgeStyle,
this.mainBadgeStyle,
this.descriptorBadgeStyle,
'', // clear the styles of the `data`
...data
);
}
};

@ -4,7 +4,7 @@ const { WEBSITE, REPO_URL } = require('vizality/constants');
const { open: openModal } = require('vizality/modal');
const { Clickable, Tooltip } = require('vizality/components');
const { React, getModule, constants: { Routes } } = require('vizality/webpack');
const { GUILD_ID, DISCORD_INVITE, I18N_WEBSITE } = require('vizality/constants');
const { GUILD_ID, INVITE_CODE, I18N_WEBSITE } = require('vizality/constants');
const DonateModal = require('./DonateModal');
const Badge = require('./Badge');
@ -26,7 +26,7 @@ const badges = {
const { INVITE_BROWSER: { handler: popInvite } } = await getModule([ 'INVITE_BROWSER' ]);
const oldMinimize = windowManager.minimize;
windowManager.minimize = () => void 0;
popInvite({ args: { code: DISCORD_INVITE } });
popInvite({ args: { code: INVITE_CODE } });
windowManager.minimize = oldMinimize;
}
},

@ -1,11 +1,9 @@
const { webContents } = require('electron').remote.getCurrentWindow();
const { React, i18n: { Messages }, typing, getModuleByDisplayName } = require('vizality/webpack');
const { inject } = require('vizality/injector');
const Title = require('./components/Title');
const Command = require('./components/Command');
let state;
module.exports = async function injectAutocomplete () {
const ChannelAutocomplete = await getModuleByDisplayName('ChannelAutocomplete');
@ -66,9 +64,7 @@ module.exports = async function injectAutocomplete () {
inject('vz-commands-autocomplete', ChannelAutocomplete.prototype, 'render', function (_, res) {
const { props: { textValue }, state: { autocompleteOptions } } = this;
const resultFilter = (value) => c => [ c.command, ...(c.aliases || []) ].some(commandName =>
commandName.includes(value)
);
const resultFilter = (value) => c => [ c.command, ...(c.aliases || []) ].some(commandName => commandName.includes(value));
autocompleteOptions.VIZALITY_COMMANDS = {
matches: (prefix, _, isAtStart) => isAtStart && prefix === vizality.api.commands.prefix,
@ -108,10 +104,6 @@ module.exports = async function injectAutocomplete () {
}
},
renderResults: (query, selected, onHover, onClick, autocompletes) => {
if (state) {
return [ null, [] ];
}
if (autocompletes && autocompletes.commands) {
const customHeader = Array.isArray(autocompletes.commands.__header) ? autocompletes.commands.__header : [ autocompletes.commands.__header ];
@ -125,26 +117,8 @@ module.exports = async function injectAutocomplete () {
},
getPlainText: (index, { commands }) => {
if (commands[index].wildcard) {
state = true;
setImmediate(() => {
webContents.sendInputEvent({
type: 'char',
keyCode: '\u000d'
});
state = false;
});
return textValue.split(' ').pop();
} else if (commands[index].instruction) {
setImmediate(() => {
webContents.sendInputEvent({
type: 'keyDown',
keyCode: 'Backspace'
});
});
return '';
}

@ -1,4 +1,4 @@
@use '../../library' as *;
@use '../../sasslib' as *;
.menu-3sdvDG {
.vizality-icon-container {

@ -1,5 +1,5 @@
@use '../../library' as *;
@use '../../sasslib' as *;
.container-Vw8GSP {
padding: 30px;

@ -1,38 +1,30 @@
@use '../../../../library/classes/layout/chat' as Chat;
@use '../../../../library/classes/layout/chat' as chat;
@use '../../../../library' as *;
@use '../../../../library/classes';
@use '../../../../library/classes' as class;
@use '../../../../sasslib/classes/layout/chat' as Chat;
@use '../../../../sasslib/classes/layout/chat' as chat;
@use '../../../../sasslib' as *;
@use '../../../../sasslib/classes';
@use '../../../../sasslib/classes' as class;
@use '../../../../library/icons' as * with (
$announcement: '<svg fill="#fff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.477 2 2 6.477 2 12C2 17.522 6.477 22 12 22C17.523 22 22 17.522 22 12C22 6.477 17.523 2 12 2ZM8 6C9.104 6 10 6.896 10 8C10 9.105 9.104 10 8 10C6.896 10 6 9.105 6 8C6 6.896 6.896 6 8 6ZM18 14C18 16.617 15.14 19 12 19C8.86 19 6 16.617 6 14V13H18V14ZM16 10C14.896 10 14 9.105 14 8C14 6.896 14.896 6 16 6C17.104 6 18 6.896 18 8C18 9.105 17.104 10 16 10Z" /></svg>'
);
// :root {
// --vz-icon-search: #{svg-uri('<svg fill="#fff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 1C19.552 1 20 1.447 20 2V3L23 2V6L20 5V6C20 6.553 19.552 7 19 7H15C14.448 7 14 6.553 14 6V2C14 1.447 14.448 1 15 1H19Z" /><path d="M20 13.5V9H22V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5C2 3.397 2.897 2.5 4 2.5H12V4.5H4V13.5H20Z" /></svg>')};
// }
// @use '../../../../library' as *;
// @use '../../../../sasslib' as *;
#{class('layout.chat.name')} {
color: orange!important;
}
// @use '../../../../library/classes/layout/chat' as Chat;
// @use '../../../../sasslib/classes/layout/chat' as Chat;
#{Chat.$name} {
color: red!important;
}
// @use '../../../../library/classes';
// @use '../../../../sasslib/classes';
#{$layout-chat-name} {
color: teal!important;
}
// @use '../../../../library/classes' as classes;
// @use '../../../../sasslib/classes' as classes;
#{class.$layout-chat-name} {
color: white!important;
}
// @use '../../../../library/classes/layout/chat' as chat;
// @use '../../../../sasslib/classes/layout/chat' as chat;
#{chat.$name} {
color: yellow!important;
}

@ -1,4 +1,4 @@
@use '../../../library' as *;
@use '../../../sasslib' as *;
// @use 'examples';

@ -1,4 +1,4 @@
@use '../../library/index' as *;
@use '../../sasslib/index' as *;
@font-face {
font-family: "Uni Sans Heavy";

@ -52,12 +52,12 @@ module.exports = class ModuleManager extends Plugin {
this._loadQuickCSS();
this._injectSnippets();
this.loadStylesheet('scss/style.scss');
vizality.api.settings.registerSettings('vz-plugins', {
vizality.api.settings.registerSettings('Plugins', {
category: this.entityID,
label: () => Messages.VIZALITY_PLUGINS,
render: Plugins
});
vizality.api.settings.registerSettings('vz-themes', {
vizality.api.settings.registerSettings('Themes', {
category: this.entityID,
label: () => Messages.VIZALITY_THEMES,
render: (props) => React.createElement(Themes, {
@ -89,8 +89,8 @@ module.exports = class ModuleManager extends Plugin {
document.querySelector('#vizality-quickcss').remove();
vizality.api.router.unregisterRoute('/store/plugins');
vizality.api.router.unregisterRoute('/store/themes');
vizality.api.settings.unregisterSettings('vz-plugins');
vizality.api.settings.unregisterSettings('vz-themes');
vizality.api.settings.unregisterSettings('Plugins');
vizality.api.settings.unregisterSettings('Themes');
vizality.api.labs.unregisterExperiment('vz-store');
vizality.api.labs.unregisterExperiment('vz-deeplinks');
Object.values(commands).forEach(cmd => vizality.api.commands.unregisterCommand(cmd.command));
@ -101,17 +101,17 @@ module.exports = class ModuleManager extends Plugin {
async _injectCommunityContent () {
const permissionsModule = await getModule([ 'can' ]);
inject('vz-module-manager-channelItem', permissionsModule, 'can', (args, res) => {
const id = args[1].channelId || args[1].id;
inject('vz-module-manager-channelItem', permissionsModule, 'can', (originalArgs, returnValue) => {
const id = originalArgs[1].channelId || originalArgs[1].id;
if (id === STORE_PLUGINS || id === STORE_THEMES) {
return args[0] === Permissions.VIEW_CHANNEL;
return originalArgs[0] === Permissions.VIEW_CHANNEL;
}
return res;
return returnValue;
});
const { transitionTo } = await getModule([ 'transitionTo' ]);
const ChannelItem = await getModuleByDisplayName('ChannelItem');
inject('vz-module-manager-channelProps', ChannelItem.prototype, 'render', function (args, res) {
inject('vz-module-manager-channelProps', ChannelItem.prototype, 'render', function (originalArgs, returnValue) {
const data = {
[STORE_PLUGINS]: {
icon: PluginIcon,
@ -126,17 +126,17 @@ module.exports = class ModuleManager extends Plugin {
};
if (this.props.channel.id === STORE_PLUGINS || this.props.channel.id === STORE_THEMES) {
res.props.children[1].props.children[1].props.children = data[this.props.channel.id].name;
res.props.children[1].props.children[0] = React.createElement(data[this.props.channel.id].icon, {
className: res.props.children[1].props.children[0].props.className,
returnValue.props.children[1].props.children[1].props.children = data[this.props.channel.id].name;
returnValue.props.children[1].props.children[0] = React.createElement(data[this.props.channel.id].icon, {
className: returnValue.props.children[1].props.children[0].props.className,
width: 24,
height: 24
});
res.props.onClick = () => transitionTo(data[this.props.channel.id].route);
delete res.props.onMouseDown;
delete res.props.onContextMenu;
returnValue.props.onClick = () => transitionTo(data[this.props.channel.id].route);
delete returnValue.props.onMouseDown;
delete returnValue.props.onContextMenu;
}
return res;
return returnValue;
});
const { containerDefault } = await getModule([ 'containerDefault' ]);
@ -156,6 +156,8 @@ module.exports = class ModuleManager extends Plugin {
main: this
})
);
return returnValue;
});
}

@ -1,4 +1,4 @@
@use '../../../../library' as vz;
@use '../../../../sasslib' as vz;
$color: #fff !default;

@ -1,11 +1,11 @@
@use '../../../../library' as vz;
@use '../../../../sasslib' as vz;
$color: #fff !default;
@use 'discord' as discord with ( $fill: $color );
@use 'spotify' as spotify with ( $fill: $color );
@use 'twitter' as twitter with ( $fill: $color );
@use 'xbox' as xbox with ( $fill: $color );
@use 'discord' as discord with ($fill: $color);
@use 'spotify' as spotify with ($fill: $color);
@use 'twitter' as twitter with ($fill: $color);
@use 'xbox' as xbox with ($fill: $color);
$module: (
vz-logo: (

@ -1,4 +1,4 @@
@use '../../../library' as *;
@use '../../../sasslib' as *;
@use 'icons';
@use 'logos';

@ -5,7 +5,7 @@ const { Plugin } = require('vizality/entities');
const { React, getModule, getModuleByDisplayName, constants: { Routes } } = require('vizality/webpack');
const { forceUpdateElement, getOwnerInstance, waitFor } = require('vizality/util');
const { inject, uninject } = require('vizality/injector');
const { GUILD_ID, DISCORD_INVITE } = require('vizality/constants');
const { GUILD_ID, INVITE_CODE } = require('vizality/constants');
const ToastContainer = require('./components/ToastContainer');
const AnnouncementContainer = require('./components/AnnouncementContainer');
@ -65,7 +65,7 @@ module.exports = class Notices extends Plugin {
text: store.getGuilds(GUILD_ID) ? 'Go to Server' : 'Join Server',
onClick: async () => {
const inviteStore = await getModule([ 'acceptInviteAndTransitionToInviteChannel' ]);
inviteStore.acceptInviteAndTransitionToInviteChannel(DISCORD_INVITE);
inviteStore.acceptInviteAndTransitionToInviteChannel(INVITE_CODE);
(await getModule([ 'popLayer' ])).popAllLayers();
}
}

@ -1,6 +1,6 @@
const { join } = require('path');
const { join, dirname } = require('path');
const { format: formatUrl } = require('url');
const { remote: { BrowserWindow, app: remoteApp } } = require('electron');
const { remote: { BrowserWindow } } = require('electron');
const { React } = require('vizality/webpack');
const { Flex, Button } = require('vizality/components');
@ -82,7 +82,7 @@ class SplashScreen extends React.PureComponent {
}
openSplashScreen (keepState) {
const baseAsar = remoteApp.getAppPath();
const baseAsar = dirname(module.paths[0]);
const splashIndex = formatUrl({
protocol: 'file',
slashes: true,
@ -101,11 +101,12 @@ class SplashScreen extends React.PureComponent {
center: true,
show: true,
webPreferences: {
preload: join(__dirname, '../../../../preloadSplash.js'),
preload: join(__dirname, '../../../../preload/splash.js'),
nodeIntegration: true
}
};
// this._window = PowercordNative.openBrowserWindow(windowSettings);
this._window = new BrowserWindow(windowSettings);
this._window.loadURL(splashIndex);
this._window.webContents.openDevTools({ mode: 'detach' });

@ -1,4 +1,3 @@
const { remote } = require('electron');
const { React, getModule, i18n: { Messages } } = require('vizality/webpack');
const { Icons: { FontAwesome } } = require('vizality/components');
const { open: openModal, close: closeModal } = require('vizality/modal');
@ -61,14 +60,6 @@ module.exports = class GeneralSettings extends React.Component {
>
{Messages.VIZALITY_SETTINGS_OVERLAY}
</SwitchItem>}
{/* @todo: remove this and associated things like strings */}
{/* <SwitchItem
note={Messages.VIZALITY_SETTINGS_KEEP_TOKEN_DESC}
value={getSetting('hideToken', true)}
onChange={() => toggleSetting('hideToken', true)}
>
{Messages.VIZALITY_SETTINGS_KEEP_TOKEN}
</SwitchItem> */}
<SwitchItem
disabled={!!window.GlasscordApi}
note={window.GlasscordApi
@ -135,18 +126,20 @@ module.exports = class GeneralSettings extends React.Component {
clearDiscordCache () {
this.setState({ discordCleared: true });
remote.getCurrentWindow().webContents.session.clearCache(() => void 0);
setTimeout(() => {
this.setState({ discordCleared: false });
}, 2500);
VizalityNative.clearCache().then(() => {
setTimeout(() => {
this.setState({ discordCleared: false });
}, 2500);
});
}
clearVizalityCache () {
this.setState({ vizalityCleared: true });
rmdirRf(CACHE_FOLDER);
setTimeout(() => {
this.setState({ vizalityCleared: false });
}, 2500);
rmdirRf(CACHE_FOLDER).then(() => {
setTimeout(() => {
this.setState({ vizalityCleared: false });
}, 2500);
});
}
askRestart () {

@ -15,7 +15,7 @@ module.exports = class Settings extends Plugin {
startPlugin () {
this.loadStylesheet('scss/style.scss');
vizality.api.settings.registerSettings('vz-general', {
vizality.api.settings.registerSettings('Settings', {
category: 'vz-general',
label: () => Messages.VIZALITY_GENERAL_SETTINGS,
render: GeneralSettings
@ -31,7 +31,7 @@ module.exports = class Settings extends Plugin {
}
async pluginWillUnload () {
vizality.api.settings.unregisterSettings('vz-general');
vizality.api.settings.unregisterSettings('Settings');
uninject('vz-settings-items');
uninject('vz-settings-actions');
uninject('vz-settings-errorHandler');

@ -55,7 +55,7 @@ module.exports = class Translate extends Plugin {
const _this = this;
/*
* const HeaderIcon = require('./components/HeaderIcon.jsx');
* const HeaderIcon = require('./components/HeaderIcon');
* const HeaderBarContainer = await getModuleByDisplayName('HeaderBarContainer');
* inject('vz-translate-icon', HeaderBarContainer.prototype, 'renderLoggedIn', function (_, res) {
* if (this.props.toolbar && !this.props.toolbar.props) {
@ -194,7 +194,7 @@ module.exports = class Translate extends Plugin {
textAreaButtons.insertBefore(buttonContainer, textAreaButtons.firstChild);
const ResetButton = require('./components/ResetButton.jsx');
const ResetButton = require('./components/ResetButton');
ReactDOM.render(React.createElement(ResetButton, {
onClick: () => {
(uploadModal !== null ? uploadModal : textArea).setState({

@ -8,7 +8,7 @@ const { promisify } = require('util');
const cp = require('child_process');
const exec = promisify(cp.exec);
const Settings = require('./components/Settings.jsx');
const Settings = require('./components/Settings');
const changelog = require('../../../../changelogs.json');
@ -26,7 +26,7 @@ module.exports = class Updater extends Plugin {
this.settings.set('updating', false);
this.settings.set('awaiting_reload', false);
this.loadStylesheet('style.scss');
vizality.api.settings.registerSettings('vz-updater', {
vizality.api.settings.registerSettings('Updater', {
category: this.entityID,
label: 'Updater', // Note to self: add this string to i18n last :^)
render: Settings
@ -48,7 +48,7 @@ module.exports = class Updater extends Plugin {
}
pluginWillUnload () {
vizality.api.settings.unregisterSettings('vz-updater');
vizality.api.settings.unregisterSettings('Updater');
clearInterval(this._interval);
}

@ -1,11 +1,13 @@
const { inject, uninject } = require('vizality/injector');
const { getModule, i18n } = require('vizality/webpack');
const { getOwnerInstance, waitFor, forceUpdateElement, caseify, classNames } = require('vizality/util');
const { getOwnerInstance, waitFor, forceUpdateElement, string, classNames } = require('vizality/util');
module.exports = async () => {
const channelHeaderButtonClasses = await getModule([ 'iconWrapper', 'toolbar' ]);
const instance = getOwnerInstance(await waitFor(`.${channelHeaderButtonClasses.iconWrapper}`));
if (!instance) return;
inject('vz-utility-classes-channelHeaderButtons', instance.__proto__, 'render', (originalArgs, returnValue) => {
if (!returnValue.props.className) return returnValue;
@ -13,7 +15,7 @@ module.exports = async () => {
if (classes.includes(channelHeaderButtonClasses.iconWrapper)) {
if (returnValue.props['aria-label']) {
const key = Object.keys(i18n._proxyContext.messages).find(key => i18n._proxyContext.messages[key] === returnValue.props['aria-label']);
console.log(key);
// console.log(key);
if (!key) return returnValue;
if (key === 'PINNED_MESSAGES') {
@ -35,7 +37,8 @@ module.exports = async () => {
* return returnValue;
* }
*/
returnValue.props.className = classNames(returnValue.props.className, `vz-${caseify('camel', key)}Button`);
returnValue.props.className = classNames(returnValue.props.className, `vz-${string.camelCase(key)}Button`);
console.log(string.camelCase(key));
}
}

@ -6,7 +6,7 @@ module.exports = async () => {
const Message = await getModule(m => m.default && m.default.displayName === 'Message');
const guildModule = await getModule([ 'getGuild' ]);
const memberModule = await getModule([ 'getMember' ]);
const userId = (await getModule([ 'getId' ])).getId();
const currentUserId = (await getModule([ 'getId' ])).getId();
inject('vz-utility-classes-messages', Message, 'default', (originalArgs, returnValue) => {
const msg = findInReactTree(returnValue, n => n.message);
@ -26,7 +26,7 @@ module.exports = async () => {
returnValue.props.className = classNames(
returnValue.props.className, {
'vz-isBotUser': message.author.bot,
'vz-isCurrentUser': (message.author.id === userId && message.type === 0),
'vz-isCurrentUser': (message.author.id === currentUserId && message.type === 0),
'vz-isGuildOwner': (channel && channel.guild_id && message.author.id === guildModule.getGuild(channel.guild_id) && message.type === 0),
'vz-isGuildMember': (channel && channel.guild_id && memberModule.getMember(channel.guild_id, message.author.id) && message.type === 0),
'vz-hasAttachments': message.attachments.length,

@ -1,6 +1,6 @@
const { inject, uninject } = require('vizality/injector');
const { getModuleByDisplayName } = require('vizality/webpack');
const { caseify, classNames } = require('vizality/util');
const { string, classNames } = require('vizality/util');
/*
* Modifies The TabBar component, which is used in various places throughout
@ -18,7 +18,7 @@ module.exports = async () => {
* We check if the item starts with vz- particularly for settings sidebar items
* for core plugins.
*/
const selected = caseify('camel', this.props.selectedItem.startsWith('vz-') ? this.props.selectedItem.replace('vz-', '') : this.props.selectedItem);
const selected = string.camelCase(this.props.selectedItem.startsWith('vz-') ? this.props.selectedItem.replace('vz-', '') : this.props.selectedItem);
returnValue.props['vz-item-selected'] = `vz-${selected}Item`;
@ -27,7 +27,7 @@ module.exports = async () => {
for (const item of tabBarItems) {
if (!item || !item.props || !item.props.id) continue;
const itemFormatted = caseify('camel', item.props.id.startsWith('vz-') ? item.props.id.replace('vz-', '') : item.props.id);
const itemFormatted = string.camelCase(item.props.id.startsWith('vz-') ? item.props.id.replace('vz-', '') : item.props.id);
item.props.className = classNames(item.props.className, `vz-${itemFormatted}Item`);
}

@ -2,7 +2,7 @@
* This is the file that Plugin/Theme devs should import in their Sass files
* to take advantage of our functions, mixins, classes, etc.
* To include it, simply put the following at the top of your SCSS project file:
* @use '../../library' as *
* @use '../../sasslib' as *
*
* @NOTE: You may need to correct the '../../' portion to be correct for your relative path.
*/

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save