-
-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor tweaks to the configuration documentation. (#2451)
- Loading branch information
Showing
6 changed files
with
185 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,54 @@ | ||
import { html } from 'https://cdn.skypack.dev/lit'; | ||
import { component } from 'https://cdn.skypack.dev/haunted'; | ||
import {html} from 'https://cdn.skypack.dev/lit'; | ||
import {component} from 'https://cdn.skypack.dev/haunted'; | ||
|
||
|
||
function FantomasSettingIcon({ tooltip, type }) { | ||
function FantomasSettingIcon({tooltip, type}) { | ||
let settingType | ||
switch (type) { | ||
case 'green': | ||
settingType = {icon: "bi-check-circle-fill", color: "green-recommendation", tooltip: tooltip?tooltip:"This setting is good to use"} | ||
settingType = { | ||
icon: "bi-check-circle-fill", | ||
color: "green-recommendation", | ||
tooltip: tooltip ? tooltip : "It is ok to change the value of this setting." | ||
} | ||
break; | ||
case 'orange': | ||
settingType = {icon:"bi-exclamation-circle-fill", color:"orange-recommendation", tooltip: tooltip?tooltip:"This setting is not recommended"} | ||
settingType = { | ||
icon: "bi-exclamation-circle-fill", | ||
color: "orange-recommendation", | ||
tooltip: tooltip ? tooltip : "Changing the default of this setting is not recommended." | ||
} | ||
break; | ||
case 'red': | ||
settingType = {icon: "bi-x-circle-fill", color:"red-recommendation", tooltip: tooltip?tooltip:"You shouldn't use this setting"} | ||
settingType = { | ||
icon: "bi-x-circle-fill", | ||
color: "red-recommendation", | ||
tooltip: tooltip ? tooltip : "You shouldn't use this setting." | ||
} | ||
break; | ||
default: | ||
throw "The \"type\" can only be \"green\", \"orange\" or \"red\"" | ||
} | ||
return html`<i class="bi ${settingType.icon} ${settingType.color} me-2" | ||
data-bs-toggle="tooltip" data-bs-custom-class="${type}-tooltip" data-bs-title="${settingType.tooltip}"></i>`; | ||
return html`<i class="bi ${settingType.icon} ${settingType.color} me-2" | ||
data-bs-toggle="tooltip" data-bs-custom-class="${type}-tooltip" | ||
data-bs-title="${settingType.tooltip}"></i>`; | ||
} | ||
|
||
function FantomasSettingIconGResearch({ tooltip }) { | ||
function FantomasSettingIconGResearch({tooltip}) { | ||
const root = document.documentElement.dataset.root | ||
const safeTooltip = | ||
tooltip ? tooltip : "If you use one of these you should use all G-Research settings for consistency reasons"; | ||
|
||
return html`<img class="gresearch-recommendation me-2" data-bs-toggle="tooltip" data-bs-custom-class="gresearch-tooltip" | ||
return html`<img class="gresearch-recommendation me-2" data-bs-toggle="tooltip" data-bs-custom-class="gresearch-tooltip" | ||
data-bs-title="${safeTooltip}" data-bs-custom-class="gresearch-tooltip" src="${root}/images/gresearch.svg" alt="G-Research logo"/>`; | ||
} | ||
|
||
customElements.define('fantomas-setting-icon', component(FantomasSettingIcon, { useShadowDOM: false, | ||
observedAttributes: [ 'tooltip','type'] })); | ||
customElements.define('fantomas-setting-icon', component(FantomasSettingIcon, { | ||
useShadowDOM: false, | ||
observedAttributes: ['tooltip', 'type'] | ||
})); | ||
|
||
customElements.define('fantomas-setting-icon-gresearch', component(FantomasSettingIconGResearch, { useShadowDOM: false, | ||
observedAttributes: [ 'tooltip'] })); | ||
customElements.define('fantomas-setting-icon-gresearch', component(FantomasSettingIconGResearch, { | ||
useShadowDOM: false, | ||
observedAttributes: ['tooltip'] | ||
})); |
Oops, something went wrong.