hide Subscribe from main grid to make more room

This commit is contained in:
Collin M. Barrett 2018-09-03 09:24:35 -05:00
parent 3a09b76635
commit 36d1b5e792
4 changed files with 5 additions and 56 deletions

View file

@ -22,13 +22,6 @@ public ListSummaryDtoMappingProfile() =>
.Select(s => s.CreatedDateUtc)
.OrderByDescending(c => c)
.FirstOrDefault()
: null)))
.ForMember(d => d.ViewUrl,
o => o.MapFrom(l =>
l.Snapshots
.Where(s => s.WasSuccessful)
.OrderByDescending(s => s.CreatedDateUtc)
.FirstOrDefault()
.WaybackUrl ?? l.ViewUrl));
: null)));
}
}

View file

@ -12,6 +12,5 @@ public class ListSummaryDto
public string Name { get; set; }
public IEnumerable<ListTagDto> Tags { get; set; }
public DateTime? UpdatedDate { get; set; }
public string ViewUrl { get; set; }
}
}

View file

@ -157,16 +157,6 @@ export class Home extends React.Component<RouteComponentProps<{}>, IHomeState> {
</div>,
style: { textAlign: "center" },
width: 105
},
{
Header: "Subscribe",
accessor: "viewUrl",
sortable: false,
Cell: (cell: any) => <SubscribeUrl url={cell.value} name={cell.row.name}/>,
style: { textAlign: "center" },
width: 105,
headerClassName: "d-none d-md-block",
className: "d-none d-md-block"
}
]}
SubComponent={(row: any) => {
@ -184,7 +174,6 @@ interface IListDto {
languages: IListLanguageDto[];
tags: IListTagDto[];
updatedDate: string;
viewUrl: string;
}
interface IListLanguageDto {
@ -196,36 +185,4 @@ interface IListTagDto {
name: string;
colorHex: string;
description: string;
}
function SubscribeUrl(props: any) {
return props.url.indexOf("https://") === -1
? SubscribeUrlNotSecure()
: props.url.indexOf("web.archive.org") === -1
? SubscribeUrlPrimary()
: SubscribeUrlWayback();
function SubscribeUrlPrimary() {
return <a href={`abp:subscribe?location=${encodeURIComponent(props.url)}&amp;title=${encodeURIComponent(props.name)}`}
className="btn btn-primary btn-block"
title={`Subscribe to list with browser extension supporting \"abp:\" protocol (e.g. uBlock Origin, AdBlock Plus).`}>
Subscribe
</a>;
}
function SubscribeUrlWayback() {
return <a href={`abp:subscribe?location=${encodeURIComponent(props.url)}&amp;title=${encodeURIComponent(props.name)}`}
className="btn btn-secondary btn-block"
title={`Archive.org Mirror (Original Offline) - Subscribe to list with browser extension supporting \"abp:\" protocol (e.g. uBlock Origin, AdBlock Plus).`}>
Subscribe
</a>;
}
function SubscribeUrlNotSecure() {
return <a href={`abp:subscribe?location=${encodeURIComponent(props.url)}&amp;title=${encodeURIComponent(props.name)}`}
className="btn btn-danger btn-block"
title={`Not Secure - Subscribe to list with browser extension supporting \"abp:\" protocol (e.g. uBlock Origin, AdBlock Plus).`}>
Subscribe
</a>;
}
};
}

View file

@ -176,7 +176,7 @@ function SubscribeUrl(props: any) {
function SubscribeUrlPrimary() {
return <a href={`abp:subscribe?location=${encodeURIComponent(props.url)}&amp;title=${encodeURIComponent(props.name)}`}
className="d-md-none btn btn-primary btn-block fl-btn-details-action"
className="btn btn-primary btn-block fl-btn-details-action"
title={`Subscribe to list with browser extension supporting \"abp:\" protocol (e.g. uBlock Origin, AdBlock Plus).`}>
Subscribe
</a>;
@ -184,7 +184,7 @@ function SubscribeUrl(props: any) {
function SubscribeUrlWayback() {
return <a href={`abp:subscribe?location=${encodeURIComponent(props.url)}&amp;title=${encodeURIComponent(props.name)}`}
className="d-md-none btn btn-secondary btn-block fl-btn-details-action"
className="btn btn-secondary btn-block fl-btn-details-action"
title={`Archive.org Mirror (Original Offline) - Subscribe to list with browser extension supporting \"abp:\" protocol (e.g. uBlock Origin, AdBlock Plus).`}>
Subscribe
</a>;
@ -192,7 +192,7 @@ function SubscribeUrl(props: any) {
function SubscribeUrlNotSecure() {
return <a href={`abp:subscribe?location=${encodeURIComponent(props.url)}&amp;title=${encodeURIComponent(props.name)}`}
className="d-md-none btn btn-danger btn-block fl-btn-details-action"
className="btn btn-danger btn-block fl-btn-details-action"
title={`Not Secure - Subscribe to list with browser extension supporting \"abp:\" protocol (e.g. uBlock Origin, AdBlock Plus).`}>
Subscribe
</a>;