Skip to content

Commit

Permalink
fix(UI): Small ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlovicnemanja committed Apr 15, 2024
1 parent 6ae6a83 commit 767f0e3
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 14 deletions.
22 changes: 11 additions & 11 deletions client/components/Dashboard/Tenant.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import PropTypes from "prop-types";

const Tenant = ({ tenant, sessionToken }) => {
const tenant_href = tenant.pwa_config && tenant.pwa_config.url
? tenant.pwa_config.url
: tenant.output_channel
? tenant.output_channel.config.url
: tenant.subdomain
? "https://" + tenant.subdomain + "." + tenant.domain_name
: "https://" + tenant.domain_name;
? tenant.pwa_config.url
: tenant.output_channel
? tenant.output_channel.config.url
: tenant.subdomain
? "https://" + tenant.subdomain + "." + tenant.domain_name
: "https://" + tenant.domain_name;
return (
<React.Fragment>
<div className="sd-grid-item-header">
Expand All @@ -28,21 +28,21 @@ const Tenant = ({ tenant, sessionToken }) => {
</div>
<div className="sd-card sd-card--flex-grow">
<div className="dashboard-content-header sd-shadow--z1">
<div className="big-number-block big-number-block--grow big-number-block--center">
<div className={`
big-number-block big-number-block--grow big-number-block--center
${tenant.articles_count.toString().length > 5 ? 'big-number-block--wrap' : ''}`}>
<div className="big-number-block__number">
{tenant.articles_count}
</div>
<div className="big-number-block__text">
Published
<br />
items
Published <span>items</span>
</div>
</div>
{!tenant.output_channel ? (
<div className="btn-icon-group">
{tenant.pwa_config && tenant.pwa_config.url && (
<a
href={tenant_href+"/page-editor?token="+sessionToken}
href={tenant_href + "/page-editor?token=" + sessionToken}
className="btn btn--icon-only-circle btn--large btn--hollow"
sd-tooltip="Theme Editor"
flow="down"
Expand Down
4 changes: 2 additions & 2 deletions client/components/UI/ArticleStatusLabel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const ArticleStatusLabel = ({ article, style, url }) => {
if (article.status === "published") {
return (
<a
className="label label--success cursorPointer"
className="label label--success cursorPointer sd-margin-r--1"
href={url}
target="_blank"
style={style}
Expand All @@ -18,7 +18,7 @@ const ArticleStatusLabel = ({ article, style, url }) => {
} else {
return (
<span
className={classNames("label", {
className={classNames("label sd-margin-r--1", {
"label--alert": article.status == "unpublished"
})}
style={style}
Expand Down
30 changes: 29 additions & 1 deletion client/styles/_publisher.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
@import "wizardThemeDetails.scss";
@import "iconOnHover.scss";

.sd-list-item-group li + li .sd-list-item {
.sd-list-item-group li+li .sd-list-item {
border-top: 1px solid rgba(123, 123, 123, 0.2);
}

.sd-kanban-list__board--wide {
max-width: 40rem;
}
Expand All @@ -39,9 +40,11 @@
height: 100% !important;
max-width: 100% !important;
}

.modal--kindafullscreen .modal__content {
margin: 0;
}

.modal--kindafullscreen .modal__content .modal__body {
max-width: 100% !important;
}
Expand All @@ -52,3 +55,28 @@
border-top: 2px dashed red;
color: red;
}

.big-number-block__text {
>span {
display: block;
}
}

.big-number-block {
&--wrap {
flex-direction: column;
align-items: flex-start !important;

br {
display: inline-block;
}

.big-number-block__text {
margin-left: 0;

span {
display: inline-block;
}
}
}
}

0 comments on commit 767f0e3

Please sign in to comment.