chore: format with Prettier

This commit is contained in:
Julien Fontanet
2023-04-05 11:22:10 +02:00
parent 2fdba2eb0f
commit 8f55884602
19 changed files with 143 additions and 124 deletions

View File

@@ -130,7 +130,7 @@ exports.Task = class Task {
return true
}
return false;
return false
}
async run(fn) {

View File

@@ -12,13 +12,23 @@ html {
font-family: Poppins, sans-serif;
}
body, h1, h2, h3, h4, h5, h6, p, ol, ul {
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
margin: 0;
padding: 0;
font-weight: normal;
}
ol, ul {
ol,
ul {
list-style: none;
}

View File

@@ -1,75 +1,85 @@
:root {
--color-blue-scale-000: #000000;
--color-blue-scale-100: #1A1B38;
--color-blue-scale-200: #595A6F;
--color-blue-scale-300: #9899A5;
--color-blue-scale-400: #E5E5E7;
--color-blue-scale-500: #FFFFFF;
--color-blue-scale-100: #1a1b38;
--color-blue-scale-200: #595a6f;
--color-blue-scale-300: #9899a5;
--color-blue-scale-400: #e5e5e7;
--color-blue-scale-500: #ffffff;
--color-extra-blue-l60: #D1CEFB;
--color-extra-blue-l40: #BBB5F9;
--color-extra-blue-l20: #A39DF8;
--color-extra-blue-base: #8F84FF;
--color-extra-blue-d20: #716AC6;
--color-extra-blue-d40: #554F94;
--color-extra-blue-l60: #d1cefb;
--color-extra-blue-l40: #bbb5f9;
--color-extra-blue-l20: #a39df8;
--color-extra-blue-base: #8f84ff;
--color-extra-blue-d20: #716ac6;
--color-extra-blue-d40: #554f94;
--color-extra-blue-d60: #383563;
--color-green-infra-l60: #B5DBCA;
--color-green-infra-l40: #91C9B0;
--color-green-infra-l20: #70B795;
--color-green-infra-base: #55A57B;
--color-green-infra-l60: #b5dbca;
--color-green-infra-l40: #91c9b0;
--color-green-infra-l20: #70b795;
--color-green-infra-base: #55a57b;
--color-green-infra-d20: #438463;
--color-green-infra-d40: #32634A;
--color-green-infra-d40: #32634a;
--color-green-infra-d60: #214231;
--color-orange-world-l60: #F2CDA8;
--color-orange-world-l40: #EBB57D;
--color-orange-world-l20: #E59D56;
--color-orange-world-base: #EF7F18;
--color-orange-world-d20: #BF6612;
--color-orange-world-d40: #864F1F;
--color-orange-world-d60: #5A3514;
--color-orange-world-l60: #f2cda8;
--color-orange-world-l40: #ebb57d;
--color-orange-world-l20: #e59d56;
--color-orange-world-base: #ef7f18;
--color-orange-world-d20: #bf6612;
--color-orange-world-d40: #864f1f;
--color-orange-world-d60: #5a3514;
--color-red-vates-l60: #DDA5A7;
--color-red-vates-l40: #CE787C;
--color-red-vates-l20: #BF4F51;
--color-red-vates-base: #BE1621;
--color-red-vates-d20: #8E2221;
--color-red-vates-d40: #6A1919;
--color-red-vates-l60: #dda5a7;
--color-red-vates-l40: #ce787c;
--color-red-vates-l20: #bf4f51;
--color-red-vates-base: #be1621;
--color-red-vates-d20: #8e2221;
--color-red-vates-d40: #6a1919;
--color-red-vates-d60: #471010;
--color-grayscale-200: #585757;
--background-color-primary: #FFFFFF;
--background-color-secondary: #F6F6F7;
--background-color-extra-blue: #F4F3FE;
--background-color-green-infra: #ECF5F2;
--background-color-orange-world: #FBF2E9;
--background-color-red-vates: #F5E8E9;
--background-color-primary: #ffffff;
--background-color-secondary: #f6f6f7;
--background-color-extra-blue: #f4f3fe;
--background-color-green-infra: #ecf5f2;
--background-color-orange-world: #fbf2e9;
--background-color-red-vates: #f5e8e9;
--shadow-100: 0 0.1rem 0.1rem rgba(20, 20, 30, 0.06);
--shadow-200: 0 0.1rem 0.3rem rgba(20, 20, 30, 0.1), 0 0.2rem 0.1rem rgba(20, 20, 30, 0.06), 0 0.1rem 0.1rem rgba(20, 20, 30, 0.08);
--shadow-300: 0 0.3rem 0.5rem rgba(20, 20, 30, 0.1), 0 0.1rem 1.8rem rgba(20, 20, 30, 0.06), 0 0.6rem 1.0rem rgba(20, 20, 30, 0.08);
--shadow-400: 0 1.1rem 1.5rem rgba(20, 20, 30, 0.1), 0 0.9rem 4.6rem rgba(20, 20, 30, 0.06), 0 2.4rem 3.8rem rgba(20, 20, 30, 0.04);
--shadow-200: 0 0.1rem 0.3rem rgba(20, 20, 30, 0.1),
0 0.2rem 0.1rem rgba(20, 20, 30, 0.06),
0 0.1rem 0.1rem rgba(20, 20, 30, 0.08);
--shadow-300: 0 0.3rem 0.5rem rgba(20, 20, 30, 0.1),
0 0.1rem 1.8rem rgba(20, 20, 30, 0.06), 0 0.6rem 1rem rgba(20, 20, 30, 0.08);
--shadow-400: 0 1.1rem 1.5rem rgba(20, 20, 30, 0.1),
0 0.9rem 4.6rem rgba(20, 20, 30, 0.06),
0 2.4rem 3.8rem rgba(20, 20, 30, 0.04);
}
:root.dark {
--color-blue-scale-000: #FFFFFF;
--color-blue-scale-100: #E5E5E7;
--color-blue-scale-200: #9899A5;
--color-blue-scale-300: #595A6F;
--color-blue-scale-400: #1A1B38;
--color-blue-scale-000: #ffffff;
--color-blue-scale-100: #e5e5e7;
--color-blue-scale-200: #9899a5;
--color-blue-scale-300: #595a6f;
--color-blue-scale-400: #1a1b38;
--color-blue-scale-500: #000000;
--background-color-primary: #14141D;
--background-color-secondary: #17182A;
--background-color-extra-blue: #35335D;
--background-color-green-infra: #243B3D;
--background-color-primary: #14141d;
--background-color-secondary: #17182a;
--background-color-extra-blue: #35335d;
--background-color-green-infra: #243b3d;
--background-color-orange-world: #493328;
--background-color-red-vates: #3C1A28;
--background-color-red-vates: #3c1a28;
--shadow-100: 0 0.1rem 0.1rem rgba(20, 20, 30, 0.12);
--shadow-200: 0 0.1rem 0.3rem rgba(20, 20, 30, 0.2), 0 0.2rem 0.1rem rgba(20, 20, 30, 0.12), 0 0.1rem 0.1rem rgba(20, 20, 30, 0.16);
--shadow-300: 0 0.3rem 0.5rem rgba(20, 20, 30, 0.2), 0 0.1rem 1.8rem rgba(20, 20, 30, 0.12), 0 0.6rem 1.0rem rgba(20, 20, 30, 0.16);
--shadow-400: 0 1.1rem 1.5rem rgba(20, 20, 30, 0.2), 0 0.9rem 4.6rem rgba(20, 20, 30, 0.12), 0 2.4rem 3.8rem rgba(20, 20, 30, 0.08);
--shadow-200: 0 0.1rem 0.3rem rgba(20, 20, 30, 0.2),
0 0.2rem 0.1rem rgba(20, 20, 30, 0.12),
0 0.1rem 0.1rem rgba(20, 20, 30, 0.16);
--shadow-300: 0 0.3rem 0.5rem rgba(20, 20, 30, 0.2),
0 0.1rem 1.8rem rgba(20, 20, 30, 0.12), 0 0.6rem 1rem rgba(20, 20, 30, 0.16);
--shadow-400: 0 1.1rem 1.5rem rgba(20, 20, 30, 0.2),
0 0.9rem 4.6rem rgba(20, 20, 30, 0.12),
0 2.4rem 3.8rem rgba(20, 20, 30, 0.08);
}

View File

@@ -6,10 +6,10 @@ This composable allows you to keep a history of each removed item of an array.
```typescript
const myArray = ref([]);
const history = useArrayRemovedItemsHistory(myArray)
const history = useArrayRemovedItemsHistory(myArray);
myArray.push('A'); // myArray = ['A']; history = []
myArray.push('B'); // myArray = ['A', 'B']; history = []
myArray.push("A"); // myArray = ['A']; history = []
myArray.push("B"); // myArray = ['A', 'B']; history = []
myArray.shift(); // myArray = ['B']; history = ['A']
```
@@ -25,8 +25,8 @@ Be careful when using an array of objects which is likely to be replaced (instea
```typescript
const myArray = ref([]);
const history = useArrayRemovedItemsHistory(myArray);
myArray.value = [{ id: 'foo' }, { id: 'bar' }];
myArray.value = [{ id: 'bar' }, { id: 'baz' }]; // history = [{ id: 'foo' }, { id: 'bar' }]
myArray.value = [{ id: "foo" }, { id: "bar" }];
myArray.value = [{ id: "bar" }, { id: "baz" }]; // history = [{ id: 'foo' }, { id: 'bar' }]
```
In this case, `{ id: 'bar' }` is detected as removed since in JavaScript `{ id: 'bar' } !== { id: 'bar' }`.
@@ -35,7 +35,11 @@ You must therefore use an identity function as third parameter to return the val
```typescript
const myArray = ref<{ id: string }[]>([]);
const history = useArrayRemovedItemsHistory(myArray, undefined, (item) => item.id);
myArray.value = [{ id: 'foo' }, { id: 'bar' }];
myArray.value = [{ id: 'bar' }, { id: 'baz' }]; // history = [{ id: 'foo' }]
const history = useArrayRemovedItemsHistory(
myArray,
undefined,
(item) => item.id
);
myArray.value = [{ id: "foo" }, { id: "bar" }];
myArray.value = [{ id: "bar" }, { id: "baz" }]; // history = [{ id: 'foo' }]
```

View File

@@ -26,14 +26,14 @@ test('parseDateTime()', function () {
}
})
test('failing parseDateTime()' , function(){
test('failing parseDateTime()', function () {
for (const [input, error] of [
// object
[{}, TypeError],
[undefined, TypeError],
// string
['XXX 03/10/2010', RangeError]
['XXX 03/10/2010', RangeError],
]) {
assert.throws(() => parseDateTime(input), error)
}

View File

@@ -1,9 +1,6 @@
{
"gitbook": ">=3.0.0",
"root": "./docs",
"plugins": [
"anchors",
"-edit-link"
],
"plugins": ["anchors", "-edit-link"],
"pluginsConfig": {}
}

View File

@@ -113,7 +113,7 @@ Save the configuration and then activate the plugin (button on top).
This plugin allows any GitHub user to authenticate to Xen-Orchestra.
The first time a user signs in, XO will create a new XO user with the same identifier (i.e. GitHub name), with *user* permissions. An existing admin will need to apply the appropriate permissions for your environment.
The first time a user signs in, XO will create a new XO user with the same identifier (i.e. GitHub name), with _user_ permissions. An existing admin will need to apply the appropriate permissions for your environment.
First you need to configure a new app in your GitHub account:

View File

@@ -1,4 +1,3 @@
// CHARTIST ===================================================================
$ct-series-colors: (
@@ -19,8 +18,8 @@ $ct-series-colors: (
#a748ca
) !default;
@import "../../../node_modules/chartist/dist/scss/settings/_chartist-settings";
@import "../../../node_modules/chartist/dist/scss/chartist";
@import '../../../node_modules/chartist/dist/scss/settings/_chartist-settings';
@import '../../../node_modules/chartist/dist/scss/chartist';
.ct-chart {
display: flex;
@@ -45,11 +44,11 @@ $ct-series-colors: (
.ct-point {
stroke-width: 30px;
stroke-opacity: 0!important;
stroke-opacity: 0 !important;
}
.ct-point:hover {
stroke-opacity: 0.2!important;
stroke-opacity: 0.2 !important;
stroke-width: 20px;
}

View File

@@ -2,6 +2,7 @@
opacity: 0.5;
}
tr:hover .button, tr:focus .button {
tr:hover .button,
tr:focus .button {
opacity: 1;
}

View File

@@ -39,7 +39,7 @@
/* Bulleted list */
.bullet {
position:relative;
position: relative;
margin-bottom: 0;
}
.bullet:after {

View File

@@ -1,6 +1,6 @@
.listTitle {
font-weight: bold;
font-size: 1.1em
font-size: 1.1em;
}
.listItem {

View File

@@ -347,7 +347,6 @@
@extend .fa-circle-thin;
}
// Backups
&-backup {
@extend .fa;
@@ -685,7 +684,6 @@
}
}
// Host and VM actions
&-host,
&-vm {

View File

@@ -7,14 +7,14 @@
meter {
/* For Firefox */
background: #EEE;
box-shadow: 0 2px 3px rgba(0,0,0,0.2) inset;
background: #eee;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2) inset;
border-radius: 3px;
}
meter::-webkit-meter-bar {
background: #EEE;
box-shadow: 0 2px 3px rgba(0,0,0,0.2) inset;
background: #eee;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2) inset;
border-radius: 3px;
}

View File

@@ -4,7 +4,7 @@
.itemContainer {
border: 1px solid #eee;
border-radius: .3em;
border-radius: 0.3em;
}
.itemContainerHeader {
@@ -42,7 +42,7 @@
color: #999;
font-size: 1em;
text-overflow: ellipsis;
white-space:nowrap;
white-space: nowrap;
}
.itemExpandButton {