Add submitting for highlight category

This commit is contained in:
Ajay Ramachandran
2021-04-05 23:35:05 -04:00
parent edcda31db4
commit a08dbf4da1
11 changed files with 143 additions and 170 deletions

View File

@@ -1,10 +1,13 @@
import * as React from "react";
import Config from "../config"
import { CategorySkipOption } from "../types";
import { Category, CategorySkipOption } from "../types";
import Utils from "../utils";
const utils = new Utils();
export interface CategorySkipOptionsProps {
category: string;
category: Category;
defaultColor?: string;
defaultPreviewColor?: string;
}
@@ -146,10 +149,13 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
const optionNames = ["disable", "showOverlay", "manualSkip", "autoSkip"];
console.log(utils.getCategoryActionType(this.props.category))
for (const optionName of optionNames) {
elements.push(
<option key={optionName} value={optionName}>
{chrome.i18n.getMessage(optionName)}
{chrome.i18n.getMessage(optionName !== "disable" ? optionName + utils.getCategoryActionType(this.props.category)
: optionName)}
</option>
);
}