correct UI misspell + rebuild doc components

This commit is contained in:
Jordan Blasenhauer 2024-08-09 10:38:55 +02:00
parent 6e854aa636
commit 61bbcac724
26 changed files with 460 additions and 175 deletions

View file

@ -236,6 +236,40 @@ Case there is already a focused element inside the modal, avoid to focus it agai
Returns **void**;
### Modes.vue
This component is lightweight builder containing only the necessary components to create a service mode page.
#### Parameters
- `builder` **array** Array of containers and widgets
#### Examples
```javascript
[
{
type: "card",
containerColumns: { pc: 12, tablet: 12, mobile: 12 },
widgets: [
{
type: "Title",
data : {
title: "dashboard_global_config",
type: "card"
},
},
{
type: "Raw",
data: {
template: {},
},
},
],
},
];
```
### PLugin.vue
This component is lightweight builder containing only the necessary components to create the plugins page.
@ -650,6 +684,12 @@ Returns **void**;
Returns **void**;
### Feedback.vue
This component will display server feedbacks from the user.
This component is working with flash messages under the hood.
This will display an ephemeral on the bottom right of the page and a sidebar with all the feedbacks.
### Footer.vue
This component is a footer that display essential links.
@ -723,12 +763,31 @@ Toggle menu when we are on mobile device (else always visible).
Returns **void**;
### News.vue
This component will display news from BunkerWeb blog and allow users to subscribe to the newsletter.
Case the news API is not available, it will display a message.
## loadNews
Retrieve blog news from storage or fetch from the API.
Returns **void**;
## Form
### Advanced.vue
This component is used to create a complete advanced form with plugin selection.
#### Parameters
- `template` **object** Template object with plugin and settings data.
- `containerClass` **string** Container
- `operation` **string** Operation type (edit, new, delete). (optional, default `"edit"`)
- `oldServerName` **string** Old server name. This is a server name before any changes. (optional, default `""`)
- `columns` **object** Columns object.
#### Examples
```javascript
@ -814,7 +873,10 @@ This component is used to create a complete easy form with plugin selection.
#### Parameters
- `template` **object** Template object with plugin and settings data.
- `containerClass` **string** Container
- `operation` **string** Operation type (edit, new, delete). (optional, default `"edit"`)
- `oldServerName` **string** Old server name. This is a server name before any changes. (optional, default `""`)
- `columns` **object** Columns object.
#### Examples
@ -846,7 +908,6 @@ This component is used to create a complete easy form with plugin selection.
},
],
}
- @param {object} template - Template object with plugin and settings data.
```
## setValidity
@ -856,6 +917,131 @@ Error will disabled save button and display an error message.
Returns **void**;
## setup
Setup the needed data for the component to work properly.
Returns **void**;
## listenToValidate
Setup the needed data for the component to work properly.
Returns **void**;
### Fields.vue
This component wraps all available fields for a form.
#### Parameters
- `setting` **object** Setting needed to render a field.
#### Examples
```javascript
{
columns : {"pc": 6, "tablet": 12, "mobile": 12},
id:"test-check",
value: "yes",
label: "Checkbox",
name: "checkbox",
required: true,
hideLabel: false,
inpType: "checkbox",
headerClass: "text-red-500"
popovers : [
{
text: "This is a popover text",
iconName: "info",
},
]
}
```
### Raw.vue
This component is used to create a complete raw form with settings as JSON format.
#### Parameters
- `template` **object** Template object with plugin and settings data.
- `operation` **string** Operation type (edit, new, delete). (optional, default `"edit"`)
- `oldServerName` **string** Old server name. This is a server name before any changes. (optional, default `""`)
- `containerClass` **string** Container
- `columns` **object** Columns object.
#### Examples
```javascript
{
"IS_LOADING": "no",
"NGINX_PREFIX": "/etc/nginx/",
"HTTP_PORT": "8080",
"HTTPS_PORT": "8443",
"MULTISITE": "yes"
}
```
## updateRaw
Get the raw data from editor, update the raw store with it and check if it is valid JSON.
#### Parameters
- `v` **string** The raw data to update.
Returns **void**;
## json2raw
Convert a JSON object to a raw string that can be passed to the editor.
This will convert JSON to key value pairs (format key=value).
This is only used at first mount when there is no raw data.
#### Parameters
- `json` **string** The template json to convert
Returns **[string][9]** The raw string
### Templates.vue
This component is used to create a complete settings form with all modes (advanced, raw, easy).
#### Parameters
- `templates` **object** List of advanced templates that contains settings. Must be a dict with mode as key, then the template name as key with a list of data (different for each modes).
- `operation` **string** Operation type (edit, new, delete). (optional, default `"edit"`)
- `oldServerName` **string** Old server name. This is a server name before any changes. (optional, default `""`)
#### Examples
```javascript
{
advanced : {
default : [{SETTING_1}, {SETTING_2}...],
low : [{SETTING_1}, {SETTING_2}...],
},
easy : {
default : [...],
low : [...],
}
}
```
## getFirstTemplateName
Get the first template name from the first mode.
Returns **[string][7]** The first template name
## getFirstTemplateName
Get the first mode name from the first key in props.templates dict.
Returns **[string][7]** The first mode name
## Forms
### Error
@ -914,7 +1100,7 @@ We can used it as a fixed alert or we can use it in a container as a list.
#### Clipboard.vue
This component can be add to some fields to allow to copy the value of the field.
Additionnal clipboardClass and copyClass can be added to fit the parent container.
Additional clipboardClass and copyClass can be added to fit the parent container.
##### Parameters
@ -955,7 +1141,7 @@ It is mainly use in forms.
- `inpType` **string** The type of the field, useful when we have multiple fields in the same container to display the right field (optional, default `"checkbox"`)
- `disabled` **boolean** (optional, default `false`)
- `required` **boolean** (optional, default `false`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12}`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12"}`)
- `hideLabel` **boolean** (optional, default `false`)
- `containerClass` **string** (optional, default `""`)
- `headerClass` **string** (optional, default `""`)
@ -1011,10 +1197,10 @@ We can also add popover to display more information.
- `disabled` **boolean** (optional, default `false`)
- `required` **boolean** (optional, default `false`)
- `requiredValues` **array** values that need to be selected to be valid, works only if required is true (optional, default `[]`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12}`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12"}`)
- `hideLabel` **boolean** (optional, default `false`)
- `onlyDown` **boolean** If the dropdown should check the bottom of the (optional, default `false`)
- `overflowAttrEl` **boolean** Attribut to select the container the element has to check for overflow (optional, default `""`)
- `overflowAttrEl` **boolean** Attribute to select the container the element has to check for overflow (optional, default `""`)
- `containerClass` **string** (optional, default `""`)
- `inpClass` **string** (optional, default `""`)
- `headerClass` **string** (optional, default `""`)
@ -1122,12 +1308,12 @@ It is mainly use in forms.
- `popovers` **array** List of popovers to display more information
- `attrs` **object** Additional attributes to add to the field (optional, default `{}`)
- `inpType` **string** The type of the field, useful when we have multiple fields in the same container to display the right field (optional, default `"datepicker"`)
- `value` **number\<timestamp>** Default date when instanciate (optional, default `""`)
- `value` **number\<timestamp>** Default date when instantiate (optional, default `""`)
- `minDate` **number\<timestamp>** Impossible to pick a date before this date. (optional, default `""`)
- `maxDate` **number\<timestamp>** Impossible to pick a date after this date. (optional, default `""`)
- `isClipboard` **boolean** allow to copy the timestamp value (optional, default `true`)
- `hideLabel` **boolean** (optional, default `false`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12}`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12"}`)
- `disabled` **boolean** (optional, default `false`)
- `required` **boolean** (optional, default `false`)
- `headerClass` **string** (optional, default `""`)
@ -1266,7 +1452,7 @@ It is mainly use in forms.
- `attrs` **object** Additional attributes to add to the field (optional, default `{}`)
- `popovers` **array?** List of popovers to display more information
- `inpType` **string** The type of the field, useful when we have multiple fields in the same container to display the right field (optional, default `"editor"`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12}`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12"}`)
- `pattern` **string** (optional, default `""`)
- `disabled` **boolean** (optional, default `false`)
- `required` **boolean** (optional, default `false`)
@ -1323,7 +1509,7 @@ It is mainly use in forms.
- `attrs` **object** Additional attributes to add to the field (optional, default `{}`)
- `popovers` **array?** List of popovers to display more information
- `inpType` **string** The type of the field, useful when we have multiple fields in the same container to display the right field (optional, default `"input"`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12}`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12"}`)
- `disabled` **boolean** (optional, default `false`)
- `required` **boolean** (optional, default `false`)
- `placeholder` **string** (optional, default `""`)
@ -1379,10 +1565,10 @@ It is mainly use in forms.
- `disabled` **boolean** (optional, default `false`)
- `required` **boolean** (optional, default `false`)
- `requiredValues` **array** values that need to be selected to be valid, works only if required is true (optional, default `[]`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12}`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12"}`)
- `hideLabel` **boolean** (optional, default `false`)
- `onlyDown` **boolean** If the dropdown should check the bottom of the container (optional, default `false`)
- `overflowAttrEl` **boolean** Attribut to select the container the element has to check for overflow (optional, default `""`)
- `overflowAttrEl` **boolean** Attribute to select the container the element has to check for overflow (optional, default `""`)
- `containerClass` **string** (optional, default `""`)
- `inpClass` **string** (optional, default `""`)
- `headerClass` **string** (optional, default `""`)
@ -1485,7 +1671,7 @@ This component under the hood is rendering default fields but by group with poss
##### Parameters
- `multiples` **object<object>** The multiples settings to display. This needs to be a dict of settings using default field format.
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12}`)
- `columns` **object** Field has a grid system. This allow to get multiple field in the same row if needed. (optional, default `{"pc":"12","tablet":"12","mobile":"12"}`)
- `containerClass` **string** Additionnal class to add to the container (optional, default `""`)
- `tadId` **string** The tabindex of the field, by default it is the contentIndex (optional, default `contentIndex`)
@ -2351,9 +2537,9 @@ This component is a svg icon representing no trespassing.
}
```
### Twiiter.vue
### Twitter.vue
This component is a svg icon representing Twiiter.
This component is a svg icon representing Twitter.
#### Parameters
@ -2397,7 +2583,7 @@ This component is a list of items separate on two columns : one for the title, a
- `details` **string** List of details item that contains a text, disabled state, attrs and list of popovers. We can also add a disabled key to disable the item.
- `filters` **array** List of filters to apply on the list of items. (optional, default `[]`)
- `columns` **columns** Determine the position of the items in the grid system. (optional, default `{pc:4,tablet:6,mobile:12}`)
- `columns` **columns** Determine the position of the items in the grid system. (optional, default `{"pc":"4","tablet":"6","mobile":"12"}`)
#### Examples
@ -2451,7 +2637,7 @@ This component is used to display key value information in a list.
#### Parameters
- `pairs` **array** The list of key value information. The key and value can be a translation key or a raw text.
- `columns` **object** Determine the position of the items in the grid system. (optional, default `{pc:12,tablet:12,mobile:12}`)
- `columns` **object** Determine the position of the items in the grid system. (optional, default `{"pc":"12","tablet":"12","mobile":"12"}`)
#### Examples
@ -2469,7 +2655,7 @@ This component is used to display key value information in a list.
### Unmatch.vue
Display a default message "no match" with dedicated icon.
The message text can be overriden by passing a text prop.
The message text can be overridden by passing a text prop.
#### Parameters
@ -2501,10 +2687,10 @@ This component is a standard button.
- `iconColor` **string** Color we want to apply to the icon. If falsy value, default icon color is applied. (optional, default `""`)
- `size` **string** Can be of size sm || normal || lg || xl (optional, default `"normal"`)
- `iconName` **string** Name in lowercase of icons store on /Icons. If falsy value, no icon displayed. (optional, default `""`)
- `attrs` **Object** List of attributs to add to the button. Some attributs will conduct to additionnal script (optional, default `{}`)
- `attrs` **Object** List of attributes to add to the button. Some attributes will conduct to additional script (optional, default `{}`)
- `modal` **(Object | boolean)** We can link the button to a Modal component. We need to pass the widgets inside the modal. Button click will open the modal. (optional, default `false`)
- `tabId` **(string | number)** The tabindex of the field, by default it is the contentIndex (optional, default `contentIndex`)
- `containerClass` **string** Additionnal class to the container (optional, default `""`)
- `containerClass` **string** Additional class to the container (optional, default `""`)
#### Examples
@ -2894,6 +3080,7 @@ This component is a general subtitle wrapper.
- `color` **string** The color of the subtitle between error, success, warning, info or tailwind color (optional, default `""`)
- `bold` **boolean** If the subtitle should be bold or not. (optional, default `false`)
- `uppercase` **boolean** If the subtitle should be uppercase or not. (optional, default `false`)
- `lowercase` **boolean** If the subtitle should be lowercase or not. (optional, default `false`)
- `subtitleClass` **string** Additional class, useful when component is used directly on a grid system (optional, default `""`)
#### Examples
@ -3001,7 +3188,7 @@ This component is used for regular paragraph.
- `uppercase` **boolean** If the text should be uppercase or not. (optional, default `false`)
- `tag` **string** The tag of the text. Can be p, span, div, h1, h2, h3, h4, h5, h6 (optional, default `"p"`)
- `icon` **(boolean | object)** The icon to add before the text. If true, will add a default icon. If object, will add the icon with the name and the color. (optional, default `false`)
- `attrs` **object** List of attributs to add to the text. (optional, default `{}`)
- `attrs` **object** List of attributes to add to the text. (optional, default `{}`)
#### Examples
@ -3024,6 +3211,7 @@ This component is a general title wrapper.
- `tag` **string** The tag of the title. Can be h1, h2, h3, h4, h5, h6 or p. If empty, will be determine by the type of title. (optional, default `""`)
- `color` **string** The color of the title between error, success, warning, info or tailwind color (optional, default `""`)
- `uppercase` **boolean** If the title should be uppercase or not. (optional, default `false`)
- `lowercase` **boolean** If the title should be lowercase or not. (optional, default `false`)
- `titleClass` **string** Additional class, useful when component is used directly on a grid system (optional, default `""`)
#### Examples
@ -3038,47 +3226,6 @@ This component is a general title wrapper.
}
```
## bannerStore
- @name Dashboard/News.vue
- @description This component will display news from BunkerWeb blog and allow users to subscribe to the newsletter.
Case the news API is not available, it will display a message.
## loadNews
Returns **void**;
## feedback
- @name Dashboard/Feedback.vue
- @description This component will display server feedbacks from the user.
This component is working with flash messages under the hood.
This will display an ephemeral on the bottom right of the page and a sidebar with all the feedbacks.
## props
- @name Form/Fields.vue
- @description This component wraps all available fields for a form.
- @example
{
columns : {"pc": 6, "tablet": 12, "mobile": 12},
id:"test-check",
value: "yes",
label: "Checkbox",
name: "checkbox",
required: true,
hideLabel: false,
inpType: "checkbox",
headerClass: "text-red-500"
popovers : \[
{
text: "This is a popover text",
iconName: "info",
},
]
}
- @param {object} setting - Setting needed to render a field.
## props
This component is lightweight builder containing only the necessary components to create the jobs page.
@ -3142,69 +3289,9 @@ This component is lightweight builder containing only the necessary components t
## props
- @name Form/Templates.vue
- @description This component is used to create a complete settings form with all modes (advanced, raw, easy).
- @example
{
advanced : {
default : \[{SETTING\_1}, {SETTING\_2}...],
low : \[{SETTING\_1}, {SETTING\_2}...],
},
easy : {
default : \[...],
low : \[...],
}
}
- @param {object} templates - List of advanced templates that contains settings. Must be a dict with mode as key, then the template name as key with a list of data (different for each modes).
## getFirstTemplateName
- @name getFirstTemplateName
- @description Get the first template name from the first mode.
- @returns {string} - The first template name
## getFirstModeName
- @name getFirstTemplateName
- @description Get the first mode name from the first key in props.templates dict.
- @returns {string} - The first mode name
## rawForm
- @name Form/Raw\.vue
- @description This component is used to create a complete raw form with settings as JSON format.
- @example
{
"IS\_LOADING": "no",
"NGINX\_PREFIX": "/etc/nginx/",
"HTTP\_PORT": "8080",
"HTTPS\_PORT": "8443",
"MULTISITE": "yes"
}
- @param {object} template - Template object with plugin and settings data.
- @param {string} containerClass - Container
- @param {object} columns - Columns object.
## updateRaw
- @name updateRaw
- @description Get the raw data from editor, update the raw store with it and check if it is valid JSON.
- @param {string} v - The raw data to update.
- @returns {void}
This component is lightweight builder containing only the necessary components to create the logs page.
#### Parameters
- `v` ;
- `builder` **array** Array of containers and widgets
## json2raw
- @name json2raw
- @description Convert a JSON object to a raw string that can be passed to the editor.
This will convert JSON to key value pairs (format key=value).
This is only used at first mount when there is no raw data.
- @param {string} json - The template json to convert
- @returns {string} - The raw string
#### Parameters
- `json` ;

View file

@ -15,7 +15,7 @@ outputFile = abspath("../docs")
def run_command(command: List[str]) -> int:
"""Utils to run a subprocess command. This is usefull to run npm commands to build vite project"""
"""Utils to run a subprocess command. This is useful to run npm commands to build vite project"""
print(f"Running command: {command}", flush=True)
try:
process = Popen(command, stdout=PIPE, stderr=PIPE, shell=True, text=True)

View file

@ -164,7 +164,7 @@ def services_action(
operation: str = "",
title: str = "",
subtitle: str = "",
additionnal: str = "",
additional: str = "",
is_draft: Union[bool, None] = None,
service: dict = None,
) -> dict:
@ -229,13 +229,13 @@ def services_action(
},
)
if additionnal:
if additional:
content.append(
{
"type": "Text",
"data": {
"bold": True,
"text": additionnal,
"text": additional,
},
}
)
@ -342,7 +342,7 @@ def get_services_list(services):
operation="edit",
title="services_edit_title",
subtitle="services_edit_subtitle",
additionnal=server_name,
additional=server_name,
),
},
{
@ -359,7 +359,7 @@ def get_services_list(services):
operation="draft",
title="services_draft_title",
subtitle="services_draft_subtitle" if is_draft else "services_online_subtitle",
additionnal="services_draft_switch_subtitle" if is_draft else "services_online_switch_subtitle",
additional="services_draft_switch_subtitle" if is_draft else "services_online_switch_subtitle",
is_draft=is_draft,
),
},

View file

@ -288,7 +288,7 @@ onMounted(() => {
advancedForm.setOperation(props.operation);
advancedForm.setOldServerName(props.oldServerName);
updateStates();
// I want updatInp to access event, data.base and the container attribut
// I want updatInp to access event, data.base and the container attribute
advancedForm.useListenTempFields();
});

View file

@ -172,7 +172,7 @@ const buttonNext = {
onMounted(() => {
setup();
// I want updatInp to access event, data.base and the container attribut
// I want updatInp to access event, data.base and the container attribute
easyForm.useListenTempFields();
window.addEventListener("input", listenToValidate);
});

View file

@ -7,7 +7,7 @@ import { useUUID } from "@utils/global.js";
/**
* @name Forms/Feature/Clipboard.vue
* @description This component can be add to some fields to allow to copy the value of the field.
* Additionnal clipboardClass and copyClass can be added to fit the parent container.
* Additional clipboardClass and copyClass can be added to fit the parent container.
* @example
* {
* id: 'test-input',

View file

@ -54,7 +54,7 @@ import { useUUID } from "@utils/global.js";
* @param {object} [columns={"pc": "12", "tablet": "12", "mobile": "12"}] - Field has a grid system. This allow to get multiple field in the same row if needed.
* @param {boolean} [hideLabel=false]
* @param {boolean} [onlyDown=false] - If the dropdown should check the bottom of the
* @param {boolean} [overflowAttrEl=""] - Attribut to select the container the element has to check for overflow
* @param {boolean} [overflowAttrEl=""] - Attribute to select the container the element has to check for overflow
* @param {string} [containerClass=""]
* @param {string} [inpClass=""]
* @param {string} [headerClass=""]

View file

@ -47,7 +47,7 @@ import "@assets/css/flatpickr.dark.min.css";
* @param {array} popovers - List of popovers to display more information
* @param {object} [attrs={}] - Additional attributes to add to the field
* @param {string} [inpType="datepicker"] - The type of the field, useful when we have multiple fields in the same container to display the right field
* @param {number<timestamp>} [value=""] - Default date when instanciate
* @param {number<timestamp>} [value=""] - Default date when instantiate
* @param {number<timestamp>} [minDate=""] - Impossible to pick a date before this date.
* @param {number<timestamp>} [maxDate=""] - Impossible to pick a date after this date.
* @param {boolean} [isClipboard=true] - allow to copy the timestamp value

View file

@ -53,7 +53,7 @@ import { useUUID } from "@utils/global";
* @param {object} [columns={"pc": "12", "tablet": "12", "mobile": "12"}] - Field has a grid system. This allow to get multiple field in the same row if needed.
* @param {boolean} [hideLabel=false]
* @param {boolean} [onlyDown=false] - If the dropdown should check the bottom of the container
* @param {boolean} [overflowAttrEl=""] - Attribut to select the container the element has to check for overflow
* @param {boolean} [overflowAttrEl=""] - Attribute to select the container the element has to check for overflow
* @param {string} [containerClass=""]
* @param {string} [inpClass=""]
* @param {string} [headerClass=""]

View file

@ -2,8 +2,8 @@
import { defineProps, reactive, onBeforeMount } from "vue";
import { useUUID } from "@utils/global.js";
/**
* @name Icons/Twiiter.vue
* @description This component is a svg icon representing Twiiter.
* @name Icons/Twitter.vue
* @description This component is a svg icon representing Twitter.
* @example
* {
* color: 'info',

View file

@ -5,7 +5,7 @@ import Text from "@components/Widget/Text.vue";
/**
* @name Message/Unmatch.vue
* @description Display a default message "no match" with dedicated icon.
* The message text can be overriden by passing a text prop.
* The message text can be overridden by passing a text prop.
* @example
* {
* text: "dashboard_no_match",

View file

@ -36,10 +36,10 @@ import { useUUID } from "@utils/global.js";
* @param {string} [iconColor=""] - Color we want to apply to the icon. If falsy value, default icon color is applied.
* @param {string} [size="normal"] - Can be of size sm || normal || lg || xl
* @param {string} [iconName=""] - Name in lowercase of icons store on /Icons. If falsy value, no icon displayed.
* @param {Object} [attrs={}] - List of attributs to add to the button. Some attributs will conduct to additionnal script
* @param {Object} [attrs={}] - List of attributes to add to the button. Some attributes will conduct to additional script
* @param {Object|boolean} [modal=false] - We can link the button to a Modal component. We need to pass the widgets inside the modal. Button click will open the modal.
* @param {string|number} [tabId=contentIndex] - The tabindex of the field, by default it is the contentIndex
* @param {string} [containerClass=""] - Additionnal class to the container
* @param {string} [containerClass=""] - Additional class to the container
*/
const props = defineProps({

View file

@ -65,7 +65,7 @@ onMounted(() => {
.getAttribute("data-is")}`
: "button-group-default";
// Additionnal class for modal
// Additional class for modal
if (group.class.includes("modal")) {
// Check if next sibling exists
// Else, this is the last element, we can add a margin top because this is main modal action buttons

View file

@ -207,7 +207,7 @@ function filterMultiplesSettings(filterSettings, template) {
continue;
for (const [multName, multGroups] of Object.entries(plugin.multiples)) {
for (const [groupName, groupSettings] of Object.entries(multGroups)) {
// Check if inpid is mathing a groupSettings key
// Check if inpid is matching a groupSettings key
for (const [key, value] of Object.entries(groupSettings)) {
multiples.push({
...value,

View file

@ -18,7 +18,7 @@ import { onMounted, reactive, ref } from "vue";
* @param {boolean} [uppercase=false] - If the text should be uppercase or not.
* @param {string} [tag="p"] - The tag of the text. Can be p, span, div, h1, h2, h3, h4, h5, h6
* @param {boolean|object} [icon=false] - The icon to add before the text. If true, will add a default icon. If object, will add the icon with the name and the color.
* @param {object} [attrs={}] - List of attributs to add to the text.
* @param {object} [attrs={}] - List of attributes to add to the text.
*/
const props = defineProps({

View file

@ -18,7 +18,7 @@
"dashboard_filter": "filters",
"dashboard_advanced": "advanced",
"dashboard_loading": "loading",
"dashboard_lang_dropdown_button_desc": "Toggle hide/show radio group (dropdown) to change langage.",
"dashboard_lang_dropdown_button_desc": "Toggle hide/show radio group (dropdown) to change language.",
"dashboard_manage_account": "manage account",
"dashboard_home": "home",
"dashboard_instances": "instances",
@ -75,7 +75,7 @@
"dashboard_down": "down",
"dashboard_banner_title_1": "Need premium support ?",
"dashboard_banner_title_2": "Try BunkerWeb on our",
"dashboard_banner_title_3": "All informations about BunkerWeb on our",
"dashboard_banner_title_3": "All information about BunkerWeb on our",
"dashboard_banner_link_1": "https://panel.bunkerweb.io/?utm_campaign=self&utm_source=ui",
"dashboard_banner_link_2": "https://demo.bunkerweb.io/link/?utm_campaign=self&utm_source=ui",
"dashboard_banner_link_3": "https://www.bunkerweb.io/?utm_campaign=self&utm_source=ui",

View file

@ -1,26 +1,33 @@
{
"dashboard_placeholder": "{placeholder}",
"dashboard_details": "details",
"dashboard_logo_alt": "BunkerWeb logo image",
"dashboard_logo_link_label": "Redirect to home page",
"dashboard_bw": "BunkerWeb",
"dashboard_docs": "docs",
"dashboard_blog": "blog",
"dashboard_privacy": "privacy",
"dashboard_pro": "PRO",
"dashboard_license": "license",
"dashboard_sitemap": "sitemap",
"dashboard_default": "default",
"dashboard_success": "success",
"dashboard_error": "error",
"dashboard_warning": "warning",
"dashboard_info": "info",
"dashboard_filter": "filters",
"dashboard_advanced": "advanced",
"dashboard_loading": "loading",
"dashboard_lang_dropdown_button_desc": "Toggle hide/show radio group (dropdown) to change langage.",
"dashboard_lang_dropdown_button_desc": "Toggle hide/show radio group (dropdown) to change language.",
"dashboard_manage_account": "manage account",
"dashboard_home": "accueil",
"dashboard_home": "home",
"dashboard_instances": "instances",
"dashboard_global_config": "global config",
"dashboard_services": "services",
"dashboard_configs": "configs",
"dashboard_plugins": "plugins",
"dashboard_templates": "templates",
"dashboard_modes": "modes",
"dashboard_jobs": "jobs",
"dashboard_bans": "bans",
"dashboard_actions": "actions",
@ -28,8 +35,10 @@
"dashboard_reports": "reports",
"dashboard_cache": "cache",
"dashboard_logs": "logs",
"dashboard_raw": "raw mode",
"dashboard_feedback_toggle_sidebar": "Toggle feedback sidebar.",
"dashboard_feedback_close_sidebar": "Close feedback sidebar.",
"dashboard_feedback_alert_close": "Close feedback alert",
"dashboard_feedback_title": "feedback",
"dashboard_feedback_subtitle": "BunkerWeb actions",
"dashboard_menu_toggle_sidebar": "Toggle menu sidebar.",
@ -66,7 +75,7 @@
"dashboard_down": "down",
"dashboard_banner_title_1": "Need premium support ?",
"dashboard_banner_title_2": "Try BunkerWeb on our",
"dashboard_banner_title_3": "All informations about BunkerWeb on our",
"dashboard_banner_title_3": "All information about BunkerWeb on our",
"dashboard_banner_link_1": "https://panel.bunkerweb.io/?utm_campaign=self&utm_source=ui",
"dashboard_banner_link_2": "https://demo.bunkerweb.io/link/?utm_campaign=self&utm_source=ui",
"dashboard_banner_link_3": "https://www.bunkerweb.io/?utm_campaign=self&utm_source=ui",
@ -77,12 +86,71 @@
"dashboard_status_error": "status inactive or error.",
"dashboard_status_warning": "status warning or alert.",
"dashboard_status_info": "status loading or waiting or unknown.",
"dashboard_raw_mode": "raw mode",
"dashboard_raw_mode_subtitle": "Raw mode shows settings as raw key-value pairs of settings (disabled ones will be shown but not updated on save).",
"dashboard_raw_invalid": "RAW format is invalid",
"dashboard_advanced_mode": "Advanced mode",
"dashboard_advanced_mode_subtitle": "Advanced mode show settings by plugin in dedicated fields.",
"dashboard_advanced_invalid": "{plugin} {setting} is invalid",
"dashboard_advanced_required": "{plugin} {setting} is required",
"dashboard_easy_mode": "Easy mode",
"dashboard_easy_mode_title": "Step {step} of {total} - {name}",
"dashboard_easy_mode_subtitle": "Easy mode will guide you using steps and additional information to help you configure your settings.",
"dashboard_easy_invalid": "{setting} in step {step} is invalid",
"dashboard_easy_required": "{setting} in step {step} is required",
"dashboard_table": "Table element",
"dashboard_no_match": "No match found",
"dashboard_no_match_filter": "No match found with filter",
"dashboard_something_wrong": "Something is wrong",
"inp_input_valid": "input valid",
"inp_input_error_no_match": "No match found",
"inp_input_error_required": "input is required",
"inp_input_error": "input is invalid",
"inp_input_error_taken": "value already taken",
"inp_popover_multisite": "This setting is multisite.",
"inp_popover_global": "This setting is global.",
"inp_popover_method_disabled": "The setting method disabled any change.",
"inp_combobox": "Combobox input for relate select radio group.",
"inp_select_dropdown_button_desc": "Toggle hide/show radio group (dropdown) to change value.",
"inp_select_dropdown_desc": "Radio group (dropdown) to change value.",
"inp_input_password_desc": "Toggle hide/show password.",
"inp_combobox_placeholder": "Search",
"inp_keyword": "keyword",
"inp_search_settings": "Search settings",
"inp_search_settings_desc": "Search within description, setting name or setting id (SETTING_ID)",
"inp_combobox_advanced_desc": "Switch between available plugins.",
"inp_select_plugin_type": "plugin type",
"inp_select_plugin_type_desc": "Only show plugins of the chosen type",
"inp_select_plugin_context": "plugin context",
"inp_select_plugin_context_desc": "Only show plugins of the chosen context.",
"inp_search_key": "search key",
"inp_search_key_desc": "Search within the settings key.",
"inp_editor_desc": "Editor input behaving like a code editor.",
"inp_input_clipboard_copied": "copied to clipboard",
"inp_input_clipboard_desc": "Copy to clipboard on click.",
"inp_templates_desc": "Choose a template. Switching will reset none save settings update.",
"inp_list_enter_match": "This value already match existing list item",
"inp_list_invalid_entry": "This value is invalid for list",
"icons_cross_desc": "Cross icon representing a close, delete, error or cancel state.",
"icons_check_desc": "Check icon representing a success, valid or active state.",
"icons_core_desc": "Core icon representing a core setting or plugin.",
"icons_external_desc": "External icon representing an external setting or plugin.",
"icons_crown_desc": "Crown icon representing premium feature like a pro plugin.",
"icons_plus_desc": "Plus icon representing an add, create or new state.",
"icons_trespass_desc": "Trespass icon representing a ban, disable, lock or negative state.",
"icons_discord_desc": "Discord icon representing a link to a Discord server.",
"icons_github_desc": "Github icon representing a link to a Github repository.",
"icons_linkedin_desc": "Linkedin icon representing a link to a Linkedin profile.",
"icons_twitter_desc": "Twitter icon representing a link to a Twitter account.",
"action_switch": "switch {name}",
"action_send": "send {name}",
"action_start": "start {name}",
"action_disable": "disable {name}",
"action_enable": "enable {name}",
"action_save": "save {name}",
"action_add": "add {name}",
"action_close": "close {name}",
"action_close_modal": "close modal",
"action_delete": "delete {name}",
"action_link": "link",
"action_edit": "edit {name}",
@ -92,16 +160,28 @@
"action_stop": "stop {name}",
"action_ping": "ping {name}",
"action_reload": "reload {name}",
"action_remove": "remove {name}",
"action_restart": "restart {name}",
"action_upload": "upload {name}",
"action_delete_all": "delete all {name}",
"action_previous": "previous",
"action_next": "next",
"action_toggle": "toggle {name}",
"home_version": "version",
"home_all_features_available": "all features are available",
"home_upgrade_pro": "upgrade to pro",
"home_awaiting_compliance": "awaiting compliance",
"home_renew_license": "renew license",
"home_talk_to_team": "talk to team",
"home_upgrade_to_pro": "upgrade to pro",
"home_pro": "pro",
"home_pro_locked": "pro locked",
"home_expired": "expired",
"home_suspended": "suspended",
"home_free": "free",
"home_version_number": "version number",
"home_latest_version": "latest version",
"home_upgrade_available": "upgrade available",
"home_update_available": "update available",
"home_couldnt_find_remote": "couldn't find remote",
"home_instances": "instances",
"home_total_number": "total number",
"home_services": "services",
@ -109,10 +189,128 @@
"home_plugins": "plugins",
"home_no_error": "no error",
"home_errors_found": "errors found",
"instance_hostname": "hostname",
"instances_method": "method",
"instances_port": "port",
"instances_name": "name",
"instances_hostname": "hostname",
"instances_type": "type",
"instances_status": "status",
"instances_active": "active",
"instances_inactive": "inactive"
"instances_inactive": "inactive",
"instances_creation_date": "creation date",
"instances_last_seen": "last seen",
"global_config_title": "Global configuration",
"global_config_subtitle": "Manage your global settings.",
"jobs_title": "Jobs list",
"jobs_download_cache_file": "download cache files",
"jobs_search": "search jobs",
"jobs_search_desc": "Search within job name, plugin id or last run.",
"jobs_interval": "Interval",
"jobs_interval_desc": "Choose interval between available options.",
"jobs_success": "success",
"jobs_success_desc": "Choose the job success state.",
"jobs_reload": "reload",
"jobs_reload_desc": "Choose the job reload state.",
"jobs_table_title": "Jobs list with plugin id, name, last run, interval and success state.",
"jobs_table_name": "Name",
"jobs_table_plugin_id": "Plugin id",
"jobs_table_interval": "Interval",
"jobs_table_reload": "Reload",
"jobs_table_history": "History",
"jobs_table_success": "Success",
"jobs_table_start_run": "Start run date",
"jobs_table_end_run": "End run date",
"jobs_table_cache_downloadable": "Cache (downloadable)",
"jobs_history_subtitle": "Job history details.",
"jobs_history_table_title": "Job history list with start run date, end run date and success state.",
"plugins_pro_plugin_desc": "Pro plugin",
"plugins_core_plugin_desc": "Core plugin",
"plugins_external_plugin_desc": "External plugin",
"plugins_redirect_page_desc": "Redirect to plugin page",
"plugins_search": "Search plugin",
"plugins_search_desc": "Search the plugin by his name",
"plugins_type": "Plugin type",
"plugins_type_desc": "Only show plugins of the chosen type",
"plugins_delete_desc": "Delete plugin",
"plugins_modal_delete_title": "Delete plugin",
"plugins_modal_delete_confirm": "Are you sure you want to delete the plugin below ?",
"reports_not_found": "No reports found",
"reports_search": "Search reports",
"reports_search_desc": "Search within report date, ip, url, user agent or data.",
"reports_country": "Country",
"reports_country_desc": "Country are alpha-2 country code based.",
"reports_method": "Method",
"reports_method_desc": "Methods are HTTP methods.",
"reports_status": "Status",
"reports_status_desc": "Status are HTTP status codes.",
"reports_reason": "Reason",
"reports_reason_desc": "Reason is the plugin name that triggered the report.",
"reports_title": "Reports",
"reports_table_title": "Reports list with date, ip, country, method, url, status code, user agent, reason and data.",
"reports_table_date": "Date",
"reports_table_ip": "IP",
"reports_table_country": "Country",
"reports_table_method": "Method",
"reports_table_url": "URL",
"reports_table_status_code": "Status code",
"reports_table_cache_user_agent": "User agent",
"reports_table_reason": "Reason",
"reports_table_data": "Data",
"reports_total": "Total reports",
"reports_top_status": "Top status code",
"reports_top_reason": "Top reason",
"bans_search": "Search bans",
"bans_search_desc": "Search within ban ip, ban start / end date",
"bans_reason": "Reason",
"bans_reason_desc": "Reason is the method that triggered the ban.",
"bans_terms": "Term",
"bans_terms_desc": "Order of magnitude before unban.",
"bans_title": "Bans",
"bans_table_title": "Bans list with ip, start date, end date, reason and terms.",
"bans_table_ip": "IP",
"bans_table_ban_start": "Ban start",
"bans_table_ban_end": "Ban end",
"bans_table_reason": "Reason",
"bans_table_remain": "Remain",
"bans_table_term": "Term",
"bans_table_select": "Select",
"services_new": "new service",
"services_title": "Services",
"services_table_name": "Name",
"services_table_method": "Method",
"services_table_actions": "Actions",
"services_search": "Search services",
"services_search_desc": "Search within service name",
"services_methods": "Methods",
"services_methods_desc": "Only show services of the chosen method",
"services_draft": "draft",
"services_online": "online",
"services_draft_desc": "Only show services of the chosen draft status",
"services_plugins_title": "Details",
"services_edit_title": "Edit",
"services_edit_subtitle": "Choose a mode to edit service",
"services_new_title": "new service",
"services_new_subtitle": "Choose a mode to create a new service",
"services_mode_easy": "Easy mode",
"services_mode_raw": "Raw mode",
"services_mode_advanced": "Advanced mode",
"services_draft_title": "Active status",
"services_draft_subtitle": "Service is currently in draft (configuration is not apply).",
"services_draft_switch_subtitle": "Switch to online ?",
"services_online_subtitle": "Service is currently online (configuration is apply).",
"services_online_switch_subtitle": "Switch to draft ?",
"services_delete_title": "Delete service",
"services_delete_subtitle": "Are you sure you want to delete the service below ?",
"services_settings_table_title": "Get the activate setting state of main plugins for this service.",
"services_settings_table_name": "Plugin",
"services_settings_table_status": "Status",
"services_mode_title": "Service mode",
"services_mode_subtitle": "Manage your service settings.",
"services_manage_subtitle": "Manage your service settings.",
"services_no_easy_mode": "No easy mode for this template",
"logs_title": "Logs",
"logs_not_found": "No logs found",
"logs_no_files_found": "No log files found",
"logs_select_file": "Select a log file",
"logs_select_file_info": "Log files are retrieve using syslog under the hood.",
"logs_not_selected_or_not_found": "No log file selected or content not found",
"logs_file_content": "Log content"
}

View file

@ -7,7 +7,7 @@ import { useGlobal } from "@utils/global";
/**
* @name Page/Modes.vue
* @description This component is the modes page.
* This page displays the raw form and additionnal actions to manage or create a service.
* This page displays the raw form and additional actions to manage or create a service.
*/
const modes = reactive({

View file

@ -71,7 +71,7 @@ function deletePlugin() {
deleteData.type = e.target
.closest("[data-plugin-type]")
.getAttribute("data-plugin-type");
// Attach data to submit button (need to check attributs data-delete-plugin-submit)
// Attach data to submit button (need to check attributes data-delete-plugin-submit)
const submitBtn = document.querySelector("[data-delete-plugin-submit]");
submitBtn.setAttribute("data-submit-form", JSON.stringify(deleteData));

View file

@ -76,7 +76,7 @@ export const createFormStore = (storeName, formType) => {
/**
* @name setRawData
* @description Set raw data that can be usefull for the form.
* @description Set raw data that can be useful for the form.
* @param {array} data - Template with plugins list and detail settings
* @param {boolean} [force=false] - Template with plugins list and detail settings
* @returns {void}
@ -164,7 +164,7 @@ export const createFormStore = (storeName, formType) => {
* @name useListenTempFields
* @description This will add an handler to all needed event listeners to listen to input, select... fields in order to update the template settings.
* @example
* function hander(e) {
* function handler(e) {
* // some code before calling _useUpdateTemp
* if (!e.target.closest("[data-advanced-form-plugin]")) return;
* _useUpdateTemp(e, data.base);
@ -182,7 +182,7 @@ export const createFormStore = (storeName, formType) => {
* @name useUnlistenTempFields
* @description This will stop listening to input, select... fields. Performance optimization and avoid duplicate calls conflicts.
* @example
* function hander(e) {
* function handler(e) {
* // some code before calling _useUpdateTemp
* if (!e.target.closest("[data-advanced-form-plugin]")) return;
* _useUpdateTemp(e, data.base);
@ -267,7 +267,7 @@ export const createFormStore = (storeName, formType) => {
function _useUpdateTempSettings(templates, inpId, inpValue, target) {
if (!_isFormTypeAllowed(["advanced", "easy"])) return;
// Case get data-group attribut, this is not a regular setting
// Case get data-group attribute, this is not a regular setting
if (target.closest("[data-group]")) return;
for (let i = 0; i < templates.length; i++) {
@ -303,7 +303,7 @@ export const createFormStore = (storeName, formType) => {
*/
function _useUpdateTempMultiples(templates, inpId, inpValue, target) {
if (!_isFormTypeAllowed(["advanced", "easy"])) return;
// Case get data-group attribut, this is not a regular setting
// Case get data-group attribute, this is not a regular setting
if (!target.closest("[data-group='multiple']")) return;
const multName =
target

View file

@ -8,7 +8,7 @@ import fr from "@lang/fr.json" assert { type: "json" };
* @description This file contains utils to manage the language of the application.
* This is here that we retrieve json files to add translations.
* This lang.js works with vue-i18n.
* We need to instanciate the i18n object in the main file of the application inside /pages.
* We need to instantiate the i18n object in the main file of the application inside /pages.
*/
const availablesLangs = ["en", "fr"];
@ -75,8 +75,8 @@ function getI18n(pagesArr = []) {
/**
* @name getLocalLang
* @description This will return the user langage checking the store, the browser, or the default lang.
* @returns {string} - The user langage.
* @description This will return the user language checking the store, the browser, or the default lang.
* @returns {string} - The user language.
*/
function getLocalLang() {
// get store lang, or local, or default

View file

@ -59,7 +59,7 @@ bans = [
"ban_end": 1719393920,
},
]
# Reoder bans dict
# Reorder bans dict
for ban in bans:
ban.pop("date")
ban["ip"] = ban.pop("ip")

View file

@ -157,7 +157,7 @@ def services_action(
operation: str = "",
title: str = "",
subtitle: str = "",
additionnal: str = "",
additional: str = "",
is_draft: Union[bool, None] = None,
service: dict = None,
) -> dict:
@ -221,13 +221,13 @@ def services_action(
},
)
if additionnal:
if additional:
content.append(
{
"type": "Text",
"data": {
"bold": True,
"text": additionnal,
"text": additional,
},
}
)
@ -334,7 +334,7 @@ def get_services_list(services):
operation="edit",
title="services_edit_title",
subtitle="services_edit_subtitle",
additionnal=server_name,
additional=server_name,
),
},
{
@ -351,7 +351,7 @@ def get_services_list(services):
operation="draft",
title="services_draft_title",
subtitle="services_draft_subtitle" if is_draft else "services_online_subtitle",
additionnal="services_draft_switch_subtitle" if is_draft else "services_online_switch_subtitle",
additional="services_draft_switch_subtitle" if is_draft else "services_online_switch_subtitle",
is_draft=is_draft,
),
},

View file

@ -243,7 +243,7 @@ def get_multiple_from_template(template, multiples):
# loop on settings of a multiple group
for mult_name, mult_settings in multiple_plugin.items():
# Check if at least one settign is matching a multiple setting
# Check if at least one setting is matching a multiple setting
if not format_setting in mult_settings:
continue
@ -307,7 +307,7 @@ def get_multiple_from_settings(settings, multiples):
# loop on settings of a multiple group
for mult_name, mult_settings in multiple_plugins.items():
# Check if at least one settign is matching a multiple setting
# Check if at least one setting is matching a multiple setting
if not format_setting in mult_settings:
continue
@ -473,7 +473,7 @@ def format_setting(
if "multiple" in value:
return value
# Else, we can add additionnal final data
# Else, we can add additional final data
value["method"] = settings.get(name, {}).get("method", "ui")
value["containerClass"] = f"z-{total_settings - loop_id}"

View file

@ -3012,7 +3012,7 @@ def plugins_builder(plugins, data={}):
"default",
"ui",
)
# Defaut data
# Default data
plugin_detail = {
"text": plugin.get("name"),
"type": plugin.get("type", "").lower(),

View file

@ -77,7 +77,7 @@ reports = [
},
]
# Reoder reports to get in order "date", "ip", "country", "method", "url", "code", "user_agent", "reason", "data"
# Reorder reports to get in order "date", "ip", "country", "method", "url", "code", "user_agent", "reason", "data"
for report in reports:
report["date"] = report.pop("date")
report["ip"] = report.pop("ip")