forked from Transparency/kgroad-frontend2
added kg text, removed image from about, added links in descriptions of posts
This commit is contained in:
1 parent
aa4bf468cd
commit
545285f1c3
7 files changed
+3719
-123
No files matched your search
@@ -38,6 +38,12 @@
|
||||
font-weight: 400;
|
||||
line-height: 34px;
|
||||
color: rgb(62, 50, 50);
|
||||
|
||||
a{
|
||||
color: rgb(72, 159, 225);
|
||||
font-size: 20px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
&__author {
|
||||
|
||||
@@ -38,6 +38,12 @@ const ReportInformation: React.FC<IReportInformationProps> = async ({
|
||||
5: t("repaired"),
|
||||
6: t("fixed_local_defects"),
|
||||
};
|
||||
|
||||
const renderDescriptionWithLinks = (description: string) => {
|
||||
const regex = /(?:https?|ftp):\/\/[\n\S]+/g;
|
||||
return description.replace(regex, (match) => `<a href="${match}" target="_blank" rel="noopener noreferrer">${match}</a>`);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="report-information">
|
||||
<RoadType color={ROAD_TYPES_COLORS[category]}>
|
||||
@@ -58,7 +64,7 @@ const ReportInformation: React.FC<IReportInformationProps> = async ({
|
||||
<ReportLike count={total_likes} report_id={id} />
|
||||
</div>
|
||||
|
||||
<p className="report-information__description">{description}</p>
|
||||
<p className="report-information__description" dangerouslySetInnerHTML={{ __html: renderDescriptionWithLinks(description) }} />
|
||||
|
||||
<p className="report-information__author">
|
||||
Автор обращения:{" "}
|
||||
|
||||
@@ -21,10 +21,9 @@
|
||||
tr {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: 100px 320px 210px 213px 222px 92px;
|
||||
align-items: center;
|
||||
grid-template-columns: 80px 300px 300px 200px 180px 200px 150px;
|
||||
|
||||
|
||||
td {
|
||||
display: flex;
|
||||
@@ -52,7 +51,7 @@
|
||||
padding: 0 20px;
|
||||
tr {
|
||||
display: grid;
|
||||
grid-template-columns: 100px 320px 210px 213px 222px 92px;
|
||||
grid-template-columns: 80px 300px 300px 200px 180px 200px 180px;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
@@ -63,6 +62,7 @@
|
||||
font-weight: 500;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
||||
#volunteers-user-cell {
|
||||
color: rgb(72, 159, 225);
|
||||
|
||||
@@ -16,6 +16,7 @@ const VolunteersTable = () => {
|
||||
const params = [
|
||||
{ param: "№" },
|
||||
{ param: "Активист" },
|
||||
{ param: "Фамилия имя"},
|
||||
{
|
||||
param: "Добавлено дорог",
|
||||
handleClick() {
|
||||
@@ -124,6 +125,7 @@ const VolunteersTable = () => {
|
||||
<td id="volunteers-user-cell">
|
||||
{hideEmail(user.username)}
|
||||
</td>
|
||||
<td>{user.username}</td>
|
||||
<td>{user.report_count}</td>
|
||||
<td>{user.likes_received_count}</td>
|
||||
<td>{user.likes_given_count}</td>
|
||||
|
||||
Reference in new issue
Block a user