Skip to content

Commit

Permalink
me when i fix discord
Browse files Browse the repository at this point in the history
  • Loading branch information
KraXen72 committed Jun 18, 2024
1 parent 1467a12 commit 5421465
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion discord/dist/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion discord/dist/main.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion discord/dist/roseboxUserStyle.user.css

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion discord/modules/_emojiPickers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ $catlist-tr-y: 190px;

// reaction emoji picker
[id^="popout"] {
margin-top: -48px; // temp reaction emoji picker fix
&:has(#emoji-picker-tab-panel) {
margin-top: -48px; // temp reaction emoji picker fix
}
%reactionEmojiPickerContentWrapper {
width: $emoji-picker-width !important;
height: $edit-emoji-picker-height !important;
Expand Down
2 changes: 1 addition & 1 deletion discord/scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rosebox-discord-css",
"version": "3.11.0",
"version": "3.12.0",
"description": "scripts for rosebox scss",
"main": "watcher.js",
"scripts": {
Expand Down
14 changes: 7 additions & 7 deletions discord/scripts/watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ const fs = require('fs');
const path = require('path');
const colors = require('colors')

const dist = __dirname.slice(0, __dirname.length - 7) + "dist"
const pathToOrig = `${dist}/main.css`
const dist = path.resolve(__dirname, "..", "dist")
const compiledCSSPath = path.resolve(dist, "main.css")
const MODES = ["quickcss", "userstyle"] // quickcss || settingsjson || userstyle
const packageJson = JSON.parse(fs.readFileSync('./package.json'))

// const pathToQuickCSSFile = `C:\\Users\\Nex\\AppData\\Roaming\\Vencord\\settings\\quickCss.css`
// const pathToSettingsJSON = `C:\\Users\\Nex\\AppData\\Roaming\\Discord\\settings.json`

const quickCssOutPaths = [
`/home/nex/.config/Vencord/settings/quickCss.css`,
`/home/nex/.config/vesktop/settings/quickCss.css`
]
// const pathToSettingsJSON = `C:\\Users\\Nex\\AppData\\Roaming\\Discord\\settings.json`
const pathToSettingsJSON = `/home/nex/.config/discord/settings.json`
const pathToUserStyle = path.resolve(__dirname, "..", "dist", "roseboxUserStyle.user.css")
const pathToUserStyle = path.resolve(dist, "roseboxUserStyle.user.css")

const userStyleHeader = [
'/* ==UserStyle==',
Expand All @@ -31,7 +32,7 @@ const WAIT_MS = 500
console.log(`${getTimestamp()}watching main.css`.cyan)

function fileWriteCallback() {
let contents = fs.readFileSync(pathToOrig, 'utf8')
let contents = fs.readFileSync(compiledCSSPath, 'utf8')
if (MODES.includes('settingsjson')) {
let settingsJSON = JSON.parse(fs.readFileSync(pathToSettingsJSON))
settingsJSON.openasar.css = contents.replaceAll('"', "\"")
Expand All @@ -49,8 +50,7 @@ function fileWriteCallback() {
console.log(`${getTimestamp()}updated compiled.user.css`.green, `modes: ${MODES.join(", ")}`.cyan)
}

// One-liner for current directory
chokidar.watch(pathToOrig, { ignorePermissionErrors: true }).on('all', (event, eventPath) => {
chokidar.watch(compiledCSSPath, { ignorePermissionErrors: true }).on('all', (event, eventPath) => {
//console.log(event, path);
if (event === "change") {
console.clear();
Expand Down

0 comments on commit 5421465

Please sign in to comment.