Skip to content

Commit

Permalink
Improve app interface
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com>
  • Loading branch information
MocioF committed May 4, 2024
1 parent edc662e commit 396b706
Show file tree
Hide file tree
Showing 9 changed files with 485 additions and 343 deletions.
23 changes: 12 additions & 11 deletions admin/class-no-unsafe-inline-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function enqueue_scripts(): void {
wp_enqueue_script(
$this->plugin_name,
plugin_dir_url( __FILE__ ) . "js/no-unsafe-inline-admin$suffix.js",
array( 'jquery', 'jquery-ui-accordion', 'jquery-ui-tabs', 'jquery-ui-spinner', 'wp-i18n' ),
array( 'jquery', 'jquery-ui-dialog', 'jquery-ui-accordion', 'jquery-ui-tabs', 'jquery-ui-spinner', 'jquery-ui-tooltip', 'wp-i18n' ),
$this->version,
false
);
Expand Down Expand Up @@ -1810,13 +1810,14 @@ public function print_endpoints(): void {
// Add a line for each url.
foreach ( $endpoints as $index => $endpoint ) {
printf(
'<li>
<input class="nunil-btn nunil-btn-del-endpoint" type="button" ' .
'id="no-unsafe-inline[del-endpoint][%d]" name="no-unsafe-inline[del-endpoint][%d]" value="&#x2425;">
<span class="nunil-endpoint-string txt-active">%s</span>
<input class="nunil-hidden-endpoint" type="hidden" id="no-unsafe-inline[endpoints][%d]"' .
'name="no-unsafe-inline[endpoints][%d]" value="%s" />
</li>',
'<li>' .
'<button class="nunil-btn nunil-btn-del-endpoint" ' .
'id="no-unsafe-inline[del-endpoint][%d]" name="no-unsafe-inline[del-endpoint][%d]">' .
'<span class="dashicons dashicons-remove"> </span></button>' .
'<span class="nunil-endpoint-string txt-active">%s</span>' .
'<input class="nunil-hidden-endpoint" type="hidden" id="no-unsafe-inline[endpoints][%d]" ' .
'name="no-unsafe-inline[endpoints][%d]" value="%s" />' .
'</li>',
esc_html( $index ),
esc_html( $index ),
esc_html( $endpoint ),
Expand Down Expand Up @@ -1908,7 +1909,7 @@ public function print_capture_enabled(): void {
$enabled = $value ? 'checked' : '';

printf(
'<input class="nunil-ui-toggle" type="checkbox" id="no-unsafe-inline-tools[capture_enabled]"' .
'<input class="nunil-ui-toggle" type="checkbox" id="no-unsafe-inline-tools[capture_enabled]" ' .
'name="no-unsafe-inline-tools[capture_enabled]" %s />
<label for="no-unsafe-inline-tools[capture_enabled]">%s</label>',
esc_html( $enabled ),
Expand All @@ -1929,7 +1930,7 @@ public function print_test_policy(): void {
$enabled = $value ? 'checked' : '';

printf(
'<input class="nunil-ui-toggle" type="checkbox" id="no-unsafe-inline-tools[test_policy]"' .
'<input class="nunil-ui-toggle" type="checkbox" id="no-unsafe-inline-tools[test_policy]" ' .
'name="no-unsafe-inline-tools[test_policy]" %s />
<label for="no-unsafe-inline-tools[test_policy]">%s</label>',
esc_html( $enabled ),
Expand All @@ -1950,7 +1951,7 @@ public function print_enable_protection(): void {
$enabled = $value ? 'checked' : '';

printf(
'<input class="nunil-ui-toggle" type="checkbox" id="no-unsafe-inline-tools[enable_protection]"' .
'<input class="nunil-ui-toggle" type="checkbox" id="no-unsafe-inline-tools[enable_protection]" ' .
'name="no-unsafe-inline-tools[enable_protection]" %s />
<label for="no-unsafe-inline-tools[enable_protection]">%s</label>',
esc_html( $enabled ),
Expand Down
67 changes: 47 additions & 20 deletions admin/css/no-unsafe-inline-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ div.nunil_temp_div {
}

.rwd-table tr {
border-top: 1px solid #ddd;
border-top: 0px;
}

.rwd-table th {
Expand Down Expand Up @@ -386,16 +386,7 @@ div.nunil_temp_div {

.rwd-table {
background: #01263a;
/*
background: #34495E;
*/
/*
background: #7796e6;
*/
color: #fff;
/*
color: #122313;
*/
border-radius: .4em;
overflow: hidden;
}
Expand All @@ -421,9 +412,6 @@ div.nunil_temp_div {
.rwd-table th,
.rwd-table td:before {
color: #dd5;
/*
color: #e68b77;
*/
}

.nunil-tools-wrapper {
Expand Down Expand Up @@ -460,9 +448,6 @@ div.nunil_temp_div {

.nunil-tools-button-wrapper {
margin: 5px;
/*
border: 1px solid #3582ca;
*/
border: 0px;
text-align: center;

Expand Down Expand Up @@ -499,18 +484,23 @@ div.nunil_temp_div {
padding: 1em !important;
border-color: #46637f;
border-bottom: 1px dotted;
border-top: 1px solid #ddd;
border-top: 1px dotted;
font-size: 1.1em;
font-weight: bold;

}
.nunil_tools_operation_report_container {
height: 340px;
height: 380px;
padding: 0px 1em 1em 1em;
background: #01263a;
position: relative;
border-radius: .4em;
display: flex;
flex-direction: column;
}
.nunil_tools_operation_report {
height: 280px;
height: 290px;
max-height: fit-content;
overflow: auto;
background: #01263a;
color: #fff;
Expand All @@ -521,7 +511,7 @@ div.nunil_temp_div {
border: none;
border-radius: 4px;
color: white;
padding: 4px 9px;
padding: 2px 2px;
text-align: center;
text-decoration: none;
display: inline-block;
Expand Down Expand Up @@ -595,3 +585,40 @@ div.nunil_temp_div {
.nunil-new-endpoint:focus {
background-color: LightCyan;
}
.nunil-db-sum-tabs-5 {
position: relative;
}
.nunil_tools_operation_report_buttons {
position: absolute;
bottom: 0.5em;
right:1.4em;
display: flex;
flex-direction: row;
}
.nunil_tools_operation_report_button_clipboard {
background-color: white;
color: #99ccff;
border: 2px solid #99ccff;
}
.nunil_tools_operation_report_button_clipboard:hover:enabled {
background-color: #99ccff;
color: white;
}
.nunil_tools_operation_report_button_clear {
background-color: white;
color: #f44336;
border: 2px solid #f44336;
}
.nunil_tools_operation_report_button_clear:hover:enabled {
background-color: #f44336;
color: white;
}
.copy-notification{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.no-titlebar .ui-dialog-titlebar {
display: none;
}
2 changes: 1 addition & 1 deletion admin/css/no-unsafe-inline-admin.min.css

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions admin/css/no-unsafe-inline-spinner.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,43 @@
}
/* moving styles from inline */
.nunil-spinner-box-1 {
left:38px;
top:38px;
left:0px;
top:0px;
animation-delay:0s;
}
.nunil-spinner-box-2 {
left:80px;
top:38px;
left:42px;
top:0px;
animation-delay:0.125s;
}
.nunil-spinner-box-3 {
left:122px;
top:38px;
left:84px;
top:0px;
animation-delay:0.25s;
}
.nunil-spinner-box-4 {
left:38px;
top:80px;
left:0px;
top:42px;
animation-delay:0.875s!important;;
}
.nunil-spinner-box-5 {
left:122px;
top:80px;
left:84px;
top:42px;
animation-delay:0.375s;
}
.nunil-spinner-box-6 {
left:38px;
top:122px;
left:0px;
top:84px;
animation-delay:0.75s;
}
.nunil-spinner-box-7 {
left:80px;
top:122px;
left:42px;
top:84px;
animation-delay:0.625s;
}
.nunil-spinner-box-8 {
left:122px;
top:122px;
left:84px;
top:84px;
animation-delay:0.5s;
}

Expand All @@ -75,8 +75,8 @@
animation-iteration-count: infinite;
}
.nunil-spinner-tools {
width: 120px;
height: 120px;
width: 124px;
height: 124px;
position: relative;
transform: translateZ(0) scale(1);
backface-visibility: hidden;
Expand Down
Loading

0 comments on commit 396b706

Please sign in to comment.