summaryrefslogtreecommitdiff
path: root/Library/SDK/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Library/SDK/Modules')
-rw-r--r--Library/SDK/Modules/Strawberry.Dialog.js23
-rw-r--r--Library/SDK/Modules/Strawberry.MenuBar.js15
-rw-r--r--Library/SDK/Modules/Strawberry.SystemInfo.js9
3 files changed, 36 insertions, 11 deletions
diff --git a/Library/SDK/Modules/Strawberry.Dialog.js b/Library/SDK/Modules/Strawberry.Dialog.js
index 95b0d9d..c5d2bac 100644
--- a/Library/SDK/Modules/Strawberry.Dialog.js
+++ b/Library/SDK/Modules/Strawberry.Dialog.js
@@ -10,11 +10,11 @@ let self = {
process.stdout.write("\n");
}
- console.log(" ".repeat(horizontal) + color.bgWhite[col]("╭───" + "─".repeat(message.length) + "───╮"));
- console.log(" ".repeat(horizontal) + color.bgWhite[col]("│ " + " ".repeat(message.length) + " │"));
- console.log(" ".repeat(horizontal) + color.bgWhite.black(color[col]("│") + " " + message + " " + color[col]("│")));
- console.log(" ".repeat(horizontal) + color.bgWhite[col]("│ " + " ".repeat(message.length) + " │"));
- console.log(" ".repeat(horizontal) + color.bgWhite[col]("╰───" + "─".repeat(message.length) + "───╯"));
+ console.log(" ".repeat(horizontal) + color.bgWhite[col]("┏━━━" + "━".repeat(message.length) + "━━━┓"));
+ console.log(" ".repeat(horizontal) + color.bgWhite[col]("┃ " + " ".repeat(message.length) + " ┃"));
+ console.log(" ".repeat(horizontal) + color.bgWhite.black(color[col]("┃") + " " + message + " " + color[col]("┃")));
+ console.log(" ".repeat(horizontal) + color.bgWhite[col]("┃ " + " ".repeat(message.length) + " ┃"));
+ console.log(" ".repeat(horizontal) + color.bgWhite[col]("┗━━━" + "─".repeat(message.length) + "━━━┛"));
for (let n = 0; n < (vertical - 3); n++) {
process.stdout.write("\n");
@@ -27,7 +27,7 @@ let self = {
return a.length > b.length ? a : b
}, '');
- global.vertical = Math.round(process.stdout.rows / 2 + 1) - 5;
+ global.vertical = Math.round(process.stdout.rows / 2 + 1) - 5 - (lines.length / 2);
let horizontal = Math.round(process.stdout.columns / 2 - (1 + ((longest.length + 8) / 2)));
for (let n = 0; n < vertical; n++) {
@@ -37,8 +37,15 @@ let self = {
console.log(" ".repeat(horizontal) + color.bgWhite[col]("┏━━━" + "━".repeat(longest.length) + "━━━┓"));
console.log(" ".repeat(horizontal) + color.bgWhite[col]("┃ " + " ".repeat(longest.length) + " ┃"));
+ let index = 0;
for (let line of lines) {
- console.log(" ".repeat(horizontal) + color.bgWhite.black(color[col]("┃") + " " + line + " ".repeat(longest.length - line.length) + " " + color[col]("┃")));
+ if (index === 0) {
+ console.log(" ".repeat(horizontal) + color.bgWhite.black(color[col]("┃") + " " + chalk.underline(line) + " ".repeat(longest.length - line.length) + " " + color[col]("┃")));
+ } else {
+ console.log(" ".repeat(horizontal) + color.bgWhite.black(color[col]("┃") + " " + line + " ".repeat(longest.length - line.length) + " " + color[col]("┃")));
+ }
+
+ index++;
}
console.log(" ".repeat(horizontal) + color.bgWhite[col]("┃ " + " ".repeat(longest.length) + " ┃"));
@@ -46,7 +53,7 @@ let self = {
console.log(" ".repeat(horizontal) + color.bgWhite[col]("┃ " + " ".repeat(longest.length) + " ┃"));
console.log(" ".repeat(horizontal) + color.bgWhite[col]("┗━━━" + "━".repeat(longest.length) + "━━━┛"));
- for (let n = 0; n < (vertical - 3); n++) {
+ for (let n = 0; n < (vertical - 3 - lines.length); n++) {
process.stdout.write("\n");
}
diff --git a/Library/SDK/Modules/Strawberry.MenuBar.js b/Library/SDK/Modules/Strawberry.MenuBar.js
index 957dcf1..35eced6 100644
--- a/Library/SDK/Modules/Strawberry.MenuBar.js
+++ b/Library/SDK/Modules/Strawberry.MenuBar.js
@@ -28,8 +28,13 @@ self = {
},
Reset: () => {
process.stdout.cursorTo(0, 0);
- process.stdout.write(color.reset(color.bgBlue(" " + color.black.bgYellowBright(" O ") + " " + menus + " ".repeat(process.stdout.columns - (15 + Strawberry.App.length + menusText.length)) + new Date().toTimeString().substring(0, 5) + " " + name + " ")))
- process.stdout.cursorTo(0, process.stdout.rows);
+ if (global._STRAWBERRY_DEBUG_MODE) {
+ process.stdout.write(color.reset(color.bgBlue(" " + color.black.bgYellowBright(" O ") + " " + menus + " ".repeat(process.stdout.columns - (15 + Strawberry.App.length + menusText.length + 4)) + new Date().toTimeString().substring(0, 5) + " " + name + " " + color.bgRed.black(" D ") + " ")))
+ process.stdout.cursorTo(0, process.stdout.rows);
+ } else {
+ process.stdout.write(color.reset(color.bgBlue(" " + color.black.bgYellowBright(" O ") + " " + menus + " ".repeat(process.stdout.columns - (15 + Strawberry.App.length + menusText.length)) + new Date().toTimeString().substring(0, 5) + " " + name + " ")))
+ process.stdout.cursorTo(0, process.stdout.rows);
+ }
},
Active: (item) => {
let a = Strawberry.Menus.filter((_, i) => {
@@ -129,7 +134,11 @@ self = {
},
UpdateClock: () => {
- process.stdout.cursorTo(process.stdout.columns - (10 + Strawberry.App.length), 0);
+ if (global._STRAWBERRY_DEBUG_MODE) {
+ process.stdout.cursorTo(process.stdout.columns - (10 + Strawberry.App.length + 4), 0);
+ } else {
+ process.stdout.cursorTo(process.stdout.columns - (10 + Strawberry.App.length), 0);
+ }
process.stdout.write(color.bgBlue(new Date().toTimeString().substring(0, 5)));
process.stdout.cursorTo(0, process.stdout.rows);
}
diff --git a/Library/SDK/Modules/Strawberry.SystemInfo.js b/Library/SDK/Modules/Strawberry.SystemInfo.js
index b52b1c2..cf44c52 100644
--- a/Library/SDK/Modules/Strawberry.SystemInfo.js
+++ b/Library/SDK/Modules/Strawberry.SystemInfo.js
@@ -57,6 +57,9 @@ module.exports = {
if (proc['name'].startsWith(global._STRAWBERRY_SYSTEM_ROOT)) {
proc['name'] = "/System" + proc['name'].substring(global._STRAWBERRY_SYSTEM_ROOT.length);
}
+ if (proc['name'].includes("/node_modules/")) {
+ proc['name'] = chalk.gray(proc['name']);
+ }
if (proc['name'].startsWith("/Strawberry")) {
proc['name'] = proc['name'].substring(11);
}
@@ -107,6 +110,9 @@ module.exports = {
if (child['name'].startsWith("/Strawberry")) {
child['name'] = child['name'].substring(11);
}
+ if (child['name'].includes("/node_modules/")) {
+ child['name'] = chalk.gray(child['name']);
+ }
if (child['name'].startsWith("/System/Library/SDK/")) {
child['name'] = chalk.yellow(child['name']);
}
@@ -157,6 +163,9 @@ module.exports = {
if (child2['name'].startsWith("/Strawberry")) {
child2['name'] = child2['name'].substring(11);
}
+ if (child2['name'].includes("/node_modules/")) {
+ child2['name'] = chalk.gray(child2['name']);
+ }
if (child2['name'].startsWith("/System/Library/SDK/")) {
child2['name'] = chalk.yellow(child2['name']);
}