Skip to content

Commit

Permalink
Add changes on grep block and style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
simosathan9 committed Aug 22, 2024
1 parent 62e74a4 commit 0902bc9
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 14 deletions.
60 changes: 54 additions & 6 deletions public/blocks/grepBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ var grepBlock = {
inverted: '-v',
recursive: '-r',
show_line_nums: '-n',
stop_after_num_matches: '-m ',
multiple_patterns: '-e',
regPattern: '"patt"',
showFiles: '-H'
showFiles: '-H',
print_context_before_match: '-B ',
print_context_after_match: '-A ',
print_context_around_match: '-C '
}
],
message0: '%{BKY_GREP}',
Expand Down Expand Up @@ -72,30 +76,74 @@ var grepBlock = {
checked: false // by default it's disabled
}
],
message8: '%{BKY_GREP_MULTIPLE_PATTERN_SEARCH}',
message8: '%{BKY_GREP_STOP_AFTER_NUM_MATCHES}',
args8: [
{
type: 'field_number',
name: 'stop_after_num_matches',
value: 0
}
],
message9: '%{BKY_GREP_MULTIPLE_PATTERN_SEARCH}',
args9: [
{
type: 'field_checkbox',
name: 'show_line_nums',
checked: false // by default it's disabled
}
],
message9: '%{BKY_GREP_SHOW_FILENAME}',
args9: [
message10: '%{BKY_GREP_SHOW_FILENAME}',
args10: [
{
type: 'field_checkbox',
name: 'showFiles',
checked: false // by default it's disabled
}
],
message10: '%{BKY_GREP_PATTERN_DEFINE}',
args10: [
message11: '%{BKY_GREP_PATTERN_DEFINE}',
args11: [
{
type: 'input_value',
name: 'regPattern',
check: 'String'
}
],
message12: '%{BKY_GREP_PRINT_CONTEXT_BEFORE_MATCH}',
args12: [
{
type: 'field_number',
name: 'print_context_before_match',
value: 0
},
{
type: 'field_checkbox',
checked: false // by default it's disabled
}
],
message13: '%{BKY_GREP_PRINT_CONTEXT_AFTER_MATCH}',
args13: [
{
type: 'field_number',
name: 'print_context_after_match',
value: 0
},
{
type: 'field_checkbox',
checked: false // by default it's disabled
}
],
message14: '%{BKY_GREP_PRINT_CONTEXT_AROUND_MATCH}',
args14: [
{
type: 'field_number',
name: 'print_context_around_match',
value: 0
},
{
type: 'field_checkbox',
checked: false // by default it's disabled
}
],
style: 'Data Processing',
previousStatement: 'Action',
nextStatement: 'Action',
Expand Down
8 changes: 8 additions & 0 deletions public/js/el.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,15 @@ Blockly.Msg['GREP_PATTERN_NEGATION'] =
'εμφάνιση γραμμών που δεν ταιριάζουν στο μοτίβο %1';
Blockly.Msg['GREP_RECURSIVE_SEARCH'] = 'αναζήτηση αναδρομικά %1';
Blockly.Msg['GREP_DISPLAY_LINE_NUMBERS'] = 'εμφάνιση αριθμών γραμμών %1';
Blockly.Msg['GREP_STOP_AFTER_NUM_MATCHES'] =
'σταμάτησε μετά από %1 αντιστοιχίες';
Blockly.Msg['GREP_MULTIPLE_PATTERN_SEARCH'] = 'Αναζήτηση με πολλαπλά μοτίβα %1';
Blockly.Msg['GREP_PRINT_CONTEXT_BEFORE_MATCH'] =
'Εκτύπωση %1 γραμμών πριν από την αντιστοιχία %2';
Blockly.Msg['GREP_PRINT_CONTEXT_AFTER_MATCH'] =
'Εκτύπωση %1 γραμμών μετά την αντιστοιχία %2';
Blockly.Msg['GREP_PRINT_CONTEXT_AROUND_MATCH'] =
'Εκτύπωση %1 γραμμών γύρω από την αντιστοιχία %2';
Blockly.Msg['GREP_SHOW_FILENAME'] = 'Εμφάνιση ονόματος αρχείου %1';
Blockly.Msg['GREP_TOOLTIP'] = 'αναζήτηση σε αρχείο με μοτίβο';
Blockly.Msg['GREP_HELPURL'] = 'https://www.google.com/';
Expand Down
7 changes: 7 additions & 0 deletions public/js/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,16 @@ Blockly.Msg['GREP_COUNT_MATCHES'] = 'count the matches %1';
Blockly.Msg['GREP_PATTERN_NEGATION'] = "show lines that don't match pattern %1";
Blockly.Msg['GREP_RECURSIVE_SEARCH'] = 'search recursively %1';
Blockly.Msg['GREP_DISPLAY_LINE_NUMBERS'] = 'show line numbers %1';
Blockly.Msg['GREP_STOP_AFTER_NUM_MATCHES'] = 'stop after %1 matches';
Blockly.Msg['GREP_MULTIPLE_PATTERN_SEARCH'] =
'Search with multiple patterns %1';
Blockly.Msg['GREP_SHOW_FILENAME'] = 'Show filename %1';
Blockly.Msg['GREP_PRINT_CONTEXT_BEFORE_MATCH'] =
'Print %1 lines of context before match %2';
Blockly.Msg['GREP_PRINT_CONTEXT_AFTER_MATCH'] =
'Print %1 lines of context after match %2';
Blockly.Msg['GREP_PRINT_CONTEXT_AROUND_MATCH'] =
'Print %1 lines of context around match %2';
Blockly.Msg['GREP_TOOLTIP'] = 'search in a file with a pattern';
Blockly.Msg['GREP_HELPURL'] = 'https://www.google.com/';
Blockly.Msg['GZIP_FILE'] = '%1 file';
Expand Down
23 changes: 16 additions & 7 deletions public/styledark.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ body {
height: 25px;
overflow-y: hidden;
border-radius: 8px;
color: rgb(208, 208, 208); /* White text for results area */
color: #fff; /* White text for results area */
}

.blockly-minimap {
Expand All @@ -64,9 +64,18 @@ body {
height: 150px;
top: 50px;
left: 258px;
overflow: hidden;
border-radius: 3px;
background-color: #2a2a2a; /* Dark background for minimap */
background-color: #252526;
}

.blockly-focus-region {
background-color: #252526; /* Applies to HTML elements */
fill: #252526; /* Applies to SVG elements */
border: none; /* Ensures no border is applied */
}

.svg {
fill: #252526; /* Applies to SVG elements */
}

#copyButton {
Expand All @@ -78,7 +87,7 @@ body {
outline: none !important; /* Αφαίρεση του outline (αν υπάρχει) */
box-shadow: none !important; /* Αφαίρεση σκιάς (αν υπάρχει) */
border-radius: 0%; /* Καμία στρογγυλοποίηση στις γωνίες */
color: rgb(208, 208, 208); /* Λευκό χρώμα για το εικονίδιο */
color: #fff; /* Λευκό χρώμα για το εικονίδιο */
}

.icon-button:hover {
Expand All @@ -87,7 +96,7 @@ body {

.icon-button i {
font-size: 16px; /* Icon size */
color: #d0d0d0; /* Light gray for icons */
color: #fff; /* Light gray for icons */
}

#executeButton {
Expand Down Expand Up @@ -152,7 +161,7 @@ button {
border: 1px solid #555; /* Darker border for buttons */
font-size: large;
background-color: #444; /* Dark background for buttons */
color: #d0d0d0; /* Light gray text */
color: #fff; /* Light gray text */
cursor: pointer;
padding: 1px 10px;
margin: 1px 5px;
Expand All @@ -163,7 +172,7 @@ button {
border: 1px solid #555; /* Darker border for dropdown */
font-size: large;
background-color: #444; /* Dark background for dropdown */
color: #d0d0d0; /* Light gray text */
color: #fff; /* Light gray text */
cursor: pointer;
padding: 5px 10px;
margin: 1px 5px;
Expand Down
2 changes: 1 addition & 1 deletion public/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ body {
background: #fff;
height: 25px;
overflow-y: hidden;
border-radius: 8px;
border-radius: 3px;
}

.blockly-minimap {
Expand Down

0 comments on commit 0902bc9

Please sign in to comment.