mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
add subscribe back to main grid on large screens
per cfecd906c1 (commitcomment-27637294)
This commit is contained in:
parent
5bd34feb76
commit
2268b4b4b2
2 changed files with 21 additions and 0 deletions
|
|
@ -4,5 +4,6 @@ public class FilterListSummaryDto
|
|||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string ViewUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -49,6 +49,16 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
|
|||
Cell: (row: any) => <ListDetailsModal listId={row.value} />,
|
||||
style: { textAlign: "center" },
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
Header: "Subscribe",
|
||||
accessor: "viewUrl",
|
||||
sortable: false,
|
||||
Cell: (row: any) => <SubscribeUrl url={row.value} name={row.value.name} />,
|
||||
style: { textAlign: "center" },
|
||||
width: 100,
|
||||
headerClassName: "hidden-xs",
|
||||
className: "hidden-xs"
|
||||
}
|
||||
]}/>;
|
||||
}
|
||||
|
|
@ -57,4 +67,14 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
|
|||
interface IFilterListSummaryDto {
|
||||
id: number;
|
||||
name: string;
|
||||
viewUrl: string;
|
||||
}
|
||||
|
||||
//TODO: deduplicate function (maybe to a utils.js) also in ListDetailsModal.tsx
|
||||
function SubscribeUrl(props: any) {
|
||||
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:\" protcool (e.g. uBlock Origin, AdBlock Plus)."}>
|
||||
Subscribe
|
||||
</a>;
|
||||
}
|
||||
Loading…
Reference in a new issue