Skip to content

Commit

Permalink
fix(SFT-700): Slight adjustments to diagnostics page pt2
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmartens committed Dec 14, 2023
1 parent 9a83c59 commit be4be86
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 28 deletions.

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

14 changes: 7 additions & 7 deletions packages/plugin/src/Services/DiagnosticsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ function ($value) {
}

$bytes = $number * $multiplier;
$min256M = 512 * 1024 ** 2; // 256M in bytes
$min512M = 512 * 1024 ** 2; // 512M in bytes

if ($bytes >= $min256M) {
return true; // At least 256M
if ($bytes >= $min512M) {
return true; // At least 512M
}

return false;
Expand Down Expand Up @@ -303,7 +303,7 @@ public function getFreeformIntegrations()
$count = $integration['count'];

$plural = 1 != $count ? 's' : '';
$label = "{$name}{$version} : <b>{$count} form{$plural}</b>";
$label = "{$name}{$version}: <b>{$count}</b> form{$plural}";

$diagnosticItems[] = new DiagnosticItem($label, ['value' => $integration]);
}
Expand All @@ -319,11 +319,11 @@ public function getFreeformFormType()
if ($freeform->isPro()) {
return [
new DiagnosticItem(
'Regular: <b>{{ value }} form{{ value != 1 ? "s" : "" }}</b>',
'Regular: <b>{{ value }}</b> form{{ value != 1 ? "s" : "" }}',
$statistics->totals->regularForm
),
new DiagnosticItem(
'Payments: <b>{{ value }} form{{ value != 1 ? "s" : "" }}</b>',
'Payments: <b>{{ value }}</b> form{{ value != 1 ? "s" : "" }}',
$statistics->totals->payment
),
];
Expand Down Expand Up @@ -495,7 +495,7 @@ function ($value) {
return !$value;
},
'{{ extra.count }} Errors logged in the Freeform Error Log',
'Please check the <a href="{{ extra.url }}">error log </a> to see if there any serious issues.',
'Please check the <a href="{{ extra.url }}">error log </a> to see if there are any serious issues.',
[
'url' => UrlHelper::cpUrl('freeform/settings/error-log'),
'count' => Freeform::getInstance()->logger->getLogReader()->count(),
Expand Down
1 change: 0 additions & 1 deletion packages/plugin/src/templates/settings/_diagnostics.twig
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
{% endmacro %}

{% block content %}
<h2 class="first">{{ "Diagnostics"|t('freeform') }}</h2>

{% if not warnings|length %}
<div class="banner banner-check">
Expand Down
44 changes: 25 additions & 19 deletions packages/styles/src/cp/settings/diagnostics.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

.banner {
margin-bottom: 20px;
margin-bottom: 10px;
position: relative;
border-radius: 6px;
border-style: solid;
Expand Down Expand Up @@ -61,11 +61,11 @@
}

&-check {
border-color: #60aa55;
border-color: var(--enabled-color);

h2,
svg {
color: #60aa55;
color: var(--enabled-color);
}
}

Expand All @@ -92,44 +92,50 @@
}

&-warnings {
border-color: #f28d03;
border-color: var(--warning-color);

h2,
svg {
color: #f28d03;
color: var(--warning-color);
}
}

&-suggestions {
border-color: #009adb;
border-color: var(--notice-color);

h2,
svg {
color: #009adb;
color: var(--notice-color);
}
}
}

.gridy {
display: grid;
gap: 40px;
grid-template-columns: 35% auto;
gap: 50px;
grid-template-columns: 40% auto;
margin-top: 20px;

@media (max-width: 750px) {
@media (max-width: 1050px) {
grid-template-columns: 1fr;
}
}

.diag {
display: flex;
flex-direction: column;
gap: 30px;
gap: 20px;
}

.diag-list {

> h2 {
margin: 6px 0;
}

> ul {
> li {
padding: 1px 0;
padding: 2px 0;

svg {
position: relative;
Expand Down Expand Up @@ -162,14 +168,14 @@
font-size: 12px;

&.suggestionvalidator {
color: #009adb;
color: var(--notice-color);
}

&.warningvalidator {
color: #f28d03;
color: var(--warning-color);

> a {
color: #f28d03;
color: var(--warning-color);
text-decoration: underline;
}
}
Expand Down Expand Up @@ -198,18 +204,18 @@
}

&-warnings {
color: #f28d03;
color: var(--warning-color);

svg {
color: #f28d03;
color: var(--warning-color);
}
}

&-suggestions {
color: #009adb;
color: var(--notice-color);

svg {
color: #009adb;
color: var(--notice-color);
}
}
}
Expand Down

0 comments on commit be4be86

Please sign in to comment.