mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
hide Subscribe from main grid to make more room
This commit is contained in:
parent
baaec5b7cb
commit
5adf3c8fa0
4 changed files with 5 additions and 56 deletions
|
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -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)}&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)}&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)}&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>;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -176,7 +176,7 @@ function SubscribeUrl(props: any) {
|
|||
|
||||
function SubscribeUrlPrimary() {
|
||||
return <a href={`abp:subscribe?location=${encodeURIComponent(props.url)}&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)}&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)}&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>;
|
||||
|
|
|
|||
Loading…
Reference in a new issue