(updates)
| 25 | * @param {Array<object>} updates |
| 26 | */ |
| 27 | export default function PluginsInclude(updates) { |
| 28 | const $page = Page(strings["plugins"]); |
| 29 | const $search = <span className="icon search" data-action="search"></span>; |
| 30 | const $add = <span className="icon add" data-action="add-source"></span>; |
| 31 | const $filter = <span className="icon tune" data-action="filter"></span>; |
| 32 | const List = () => ( |
| 33 | <div |
| 34 | id="plugin-list" |
| 35 | className="list scroll" |
| 36 | empty-msg={strings["loading..."]} |
| 37 | ></div> |
| 38 | ); |
| 39 | const $list = { |
| 40 | all: <List />, |
| 41 | installed: <List />, |
| 42 | owned: <List />, |
| 43 | }; |
| 44 | const plugins = { |
| 45 | all: [], |
| 46 | installed: [], |
| 47 | owned: [], |
| 48 | }; |
| 49 | let $currList = $list.installed; |
| 50 | let currSection = "installed"; |
| 51 | let hideSearchBar = () => {}; |
| 52 | let currentPage = 1; |
| 53 | let isLoading = false; |
| 54 | let hasMore = true; |
| 55 | let isSearching = false; |
| 56 | let currentFilter = null; |
| 57 | const LIMIT = 50; |
| 58 | |
| 59 | function withSupportedEditor(url) { |
| 60 | const separator = url.includes("?") ? "&" : "?"; |
| 61 | return `${url}${separator}supported_editor=${config.SUPPORTED_EDITOR}`; |
| 62 | } |
| 63 | |
| 64 | Contextmenu({ |
| 65 | toggler: $add, |
| 66 | top: "8px", |
| 67 | right: "8px", |
| 68 | items: [ |
| 69 | [strings.remote, "remote"], |
| 70 | [strings.local, "local"], |
| 71 | ], |
| 72 | onselect(item) { |
| 73 | addSource(item); |
| 74 | }, |
| 75 | }); |
| 76 | |
| 77 | const verifiedLabel = strings["verified publisher"]; |
| 78 | const authorLabel = strings.author || strings.name; |
| 79 | const keywordsLabel = strings.keywords; |
| 80 | |
| 81 | const filterOptions = { |
| 82 | "orderBy:top_rated": { |
| 83 | type: "orderBy", |
| 84 | value: "top_rated", |
nothing calls this directly
no test coverage detected