parent
573adb90b5
commit
3a313eacd8
|
@ -158,6 +158,9 @@
|
|||
"version": "Version",
|
||||
"added": "Date Added",
|
||||
"modified": "Date Modified",
|
||||
"isEnabled": "Enabled",
|
||||
"listView": "List View",
|
||||
"gridView": "Grid View",
|
||||
"search": "Search {{type}}",
|
||||
"editAddon": "Edit",
|
||||
"deleteAddon": "Delete",
|
||||
|
@ -182,7 +185,6 @@
|
|||
"wasUnloaded": "{{name}} was unloaded.",
|
||||
"blankSlateHeader": "You don't have any {{type}}s!",
|
||||
"blankSlateMessage": "Grab some from [this website]({{link}}) and add them to your {{type}} folder.",
|
||||
"isEnabled": "Enabled",
|
||||
"wasLoaded": "{{name}} v{{version}} was loaded."
|
||||
},
|
||||
"CustomCSS": {
|
||||
|
|
|
@ -22,7 +22,7 @@ import EmptyImage from "@ui/blankslates/emptyimage";
|
|||
const {useState, useCallback, useEffect, useReducer, useMemo} = React;
|
||||
|
||||
|
||||
const SORT_OPTIONS = [
|
||||
const buildSortOptions = () => [
|
||||
{label: Strings.Addons.name, value: "name"},
|
||||
{label: Strings.Addons.author, value: "author"},
|
||||
{label: Strings.Addons.version, value: "version"},
|
||||
|
@ -31,7 +31,7 @@ const SORT_OPTIONS = [
|
|||
{label: Strings.Addons.isEnabled, value: "isEnabled"}
|
||||
];
|
||||
|
||||
const DIRECTIONS = [
|
||||
const buildDirectionOptions = () => [
|
||||
{label: Strings.Sorting.ascending, value: true},
|
||||
{label: Strings.Sorting.descending, value: false}
|
||||
];
|
||||
|
@ -172,16 +172,16 @@ export default function AddonList({prefix, type, title, folder, addonList, addon
|
|||
<div className="bd-addon-dropdowns">
|
||||
<div className="bd-select-wrapper">
|
||||
<label className="bd-label">{Strings.Sorting.sortBy}:</label>
|
||||
<Dropdown options={SORT_OPTIONS} value={sort} onChange={changeSort} style="transparent" />
|
||||
<Dropdown options={buildSortOptions()} value={sort} onChange={changeSort} style="transparent" />
|
||||
</div>
|
||||
<div className="bd-select-wrapper">
|
||||
<label className="bd-label">{Strings.Sorting.order}:</label>
|
||||
<Dropdown options={DIRECTIONS} value={ascending} onChange={changeDirection} style="transparent" />
|
||||
<Dropdown options={buildDirectionOptions()} value={ascending} onChange={changeDirection} style="transparent" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="bd-addon-views">
|
||||
{makeControlButton("List View", <ListIcon />, listView, view === "list")}
|
||||
{makeControlButton("Grid View", <GridIcon />, gridView, view === "grid")}
|
||||
{makeControlButton(Strings.Addons.listView, <ListIcon />, listView, view === "list")}
|
||||
{makeControlButton(Strings.Addons.gridView, <GridIcon />, gridView, view === "grid")}
|
||||
</div>
|
||||
</div>
|
||||
</div>,
|
||||
|
|
Loading…
Reference in New Issue