+16
-12
lines changedFilter options
+16
-12
lines changed Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import {
12
12
} from '../Operations'
13
13
import { DropdownItem } from "../Components/DropdownItem";
14
14
import { UncontrolledTooltip } from "../Components/Tooltip";
15
+
import { IconProp } from "@fortawesome/fontawesome-svg-core";
15
16
16
17
export function getConstructFromManyContextualItems(ctx: ContextualItemsContext<Entity>): Promise<MenuItemBlock | undefined> | undefined {
17
18
if (ctx.lites.length == 0)
@@ -195,7 +196,7 @@ export namespace MenuItemConstructor { //To allow monkey patching
195
196
simplifyName(coc.operationInfo.niceName);
196
197
197
198
const color = coc.settings && coc.settings.color || coc.entityOperationSettings && coc.entityOperationSettings.color || Defaults.getColor(coc.operationInfo);
198
-
const icon = coc.settings && coc.settings.icon || coc.entityOperationSettings && coc.entityOperationSettings.icon;
199
+
const icon = coalesceIcon(coc.settings && coc.settings.icon, coc.entityOperationSettings && coc.entityOperationSettings.icon);
199
200
const iconColor = coc.settings && coc.settings.iconColor || coc.entityOperationSettings && coc.entityOperationSettings.iconColor;
200
201
201
202
const disabled = !!coc.canExecute;
@@ -215,7 +216,7 @@ export namespace MenuItemConstructor { //To allow monkey patching
215
216
data-operation={coc.operationInfo.key}>
216
217
{icon ? <FontAwesomeIcon icon={icon} className="icon" color={iconColor} fixedWidth /> :
217
218
color ? <span className={classes("icon", "empty-icon", "btn-" + color)}></span> : undefined}
218
-
{(icon || color) && " "}
219
+
{(icon != null || color != null) && " "}
219
220
{text}
220
221
</DropdownItem>,
221
222
coc.canExecute ? <UncontrolledTooltip placement="right" target={() => innerRef!}>{coc.canExecute}</UncontrolledTooltip> : undefined
@@ -273,5 +274,15 @@ export function defaultContextualClick(coc: ContextualOperationContext<any>, ...
273
274
}
274
275
}).done();
275
276
277
+
278
+
279
+
}
280
+
281
+
282
+
export function coalesceIcon(icon: IconProp | undefined, icon2: IconProp | undefined): IconProp | undefined{ //Till the error is fixed
283
+
if (icon != null)
284
+
return icon;
285
+
286
+
return icon2;
276
287
}
277
288
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
1
-
<Project Sdk="Microsoft.NET.Sdk.Web">
1
+
<Project Sdk="Microsoft.NET.Sdk.Web">
2
2
3
3
<PropertyGroup>
4
4
<TargetFramework>netcoreapp2.2</TargetFramework>
5
-
<TypeScriptToolsVersion>3.3</TypeScriptToolsVersion>
5
+
<TypeScriptToolsVersion>3.4</TypeScriptToolsVersion>
6
6
<LangVersion>latest</LangVersion>
7
7
<OutputType>Library</OutputType>
8
8
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
@@ -12,7 +12,7 @@
12
12
13
13
<ItemGroup>
14
14
<PackageReference Include="Microsoft.AspNetCore.App" />
15
-
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="3.3.1">
15
+
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="3.4.0">
16
16
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
17
17
<PrivateAssets>all</PrivateAssets>
18
18
</PackageReference>
@@ -42,12 +42,5 @@
42
42
<TypeScriptCompile Include="**\*.ts" />
43
43
</ItemGroup>
44
44
45
-
<ItemGroup>
46
-
<Content Remove="package.json" />
47
-
</ItemGroup>
48
-
49
-
<ItemGroup>
50
-
<None Include="package.json" />
51
-
</ItemGroup>
52
45
53
46
</Project>
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4