diff --git a/@xen-orchestra/lite/.gitignore b/@xen-orchestra/lite/.gitignore index c1909668a..7446217bf 100644 --- a/@xen-orchestra/lite/.gitignore +++ b/@xen-orchestra/lite/.gitignore @@ -27,3 +27,4 @@ coverage *.sln *.sw? .env +.npmrc diff --git a/@xen-orchestra/lite/.npmrc.dist b/@xen-orchestra/lite/.npmrc.dist new file mode 100644 index 000000000..0d5a824f2 --- /dev/null +++ b/@xen-orchestra/lite/.npmrc.dist @@ -0,0 +1,2 @@ +@fortawesome:registry=https://npm.fontawesome.com/ +//npm.fontawesome.com/:_authToken=INSERT_FONT_AWESOME_PRO_TOKEN_HERE diff --git a/@xen-orchestra/lite/README.md b/@xen-orchestra/lite/README.md index e762d37ae..407e5349e 100644 --- a/@xen-orchestra/lite/README.md +++ b/@xen-orchestra/lite/README.md @@ -89,6 +89,8 @@ const fontSize = ref("2rem"); ### Icons +This project is using Font Awesome Pro 6. + Here is how to use an icon in your template. Note: `FontAwesomeIcon` is a global component that does not need to be imported. @@ -105,6 +107,17 @@ import { faDisplay } from "@fortawesome/free-solid-svg-icons"; ``` +#### Font weight <=> Style name + +Here is the equivalent between font weight and style name. + +| Style name | Font weight | +|------------|-------------| +| Solid | 900 | +| Regular | 400 | +| Light | 300 | +| Thin | 100 | + ### CSS Always use `rem` unit (`1rem` = `10px`) diff --git a/@xen-orchestra/lite/package.json b/@xen-orchestra/lite/package.json index 87e52be4e..10fdbf574 100644 --- a/@xen-orchestra/lite/package.json +++ b/@xen-orchestra/lite/package.json @@ -11,9 +11,10 @@ }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.1.1", - "@fortawesome/free-brands-svg-icons": "^6.1.1", - "@fortawesome/free-regular-svg-icons": "^6.1.1", - "@fortawesome/free-solid-svg-icons": "^6.1.1", + "@fortawesome/pro-light-svg-icons": "^6.1.2", + "@fortawesome/pro-regular-svg-icons": "^6.1.2", + "@fortawesome/pro-solid-svg-icons": "^6.1.2", + "@fortawesome/pro-thin-svg-icons": "^6.1.2", "@fortawesome/vue-fontawesome": "^3.0.1", "@novnc/novnc": "^1.3.0", "@vueuse/core": "^8.7.5", diff --git a/@xen-orchestra/lite/src/assets/base.css b/@xen-orchestra/lite/src/assets/base.css index 12a07fdc1..f409e7379 100644 --- a/@xen-orchestra/lite/src/assets/base.css +++ b/@xen-orchestra/lite/src/assets/base.css @@ -5,7 +5,6 @@ body { min-height: 100vh; - font-family: Poppins, sans-serif; font-size: 1.3rem; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; diff --git a/@xen-orchestra/lite/src/assets/reset.css b/@xen-orchestra/lite/src/assets/reset.css index c746f93be..8b386eb34 100644 --- a/@xen-orchestra/lite/src/assets/reset.css +++ b/@xen-orchestra/lite/src/assets/reset.css @@ -9,6 +9,7 @@ html { box-sizing: inherit; margin: 0; position: relative; + font-family: Poppins, sans-serif; } body, h1, h2, h3, h4, h5, h6, p, ol, ul { diff --git a/@xen-orchestra/lite/src/assets/theme.css b/@xen-orchestra/lite/src/assets/theme.css index a7184f0be..d718744f4 100644 --- a/@xen-orchestra/lite/src/assets/theme.css +++ b/@xen-orchestra/lite/src/assets/theme.css @@ -1,4 +1,4 @@ -body { +:root { --color-blue-scale-000: #000000; --color-blue-scale-100: #1A1B38; --color-blue-scale-200: #595A6F; @@ -30,13 +30,13 @@ body { --color-orange-world-d40: #554F94; --color-orange-world-d60: #383563; - --color-red-vates-l60: #D1CEFB; - --color-red-vates-l40: #BBB5F9; - --color-red-vates-l20: #A39DF8; - --color-red-vates-base: #8F84FF; - --color-red-vates-d20: #716AC6; - --color-red-vates-d40: #554F94; - --color-red-vates-d60: #383563; + --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; @@ -51,13 +51,9 @@ body { --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); - - --form-control-disabled: var(--color-blue-scale-200); - --form-background: var(--color-blue-scale-500); - --form-control-color: var(--color-blue-scale-100); } -body.dark { +:root.dark { --color-blue-scale-000: #FFFFFF; --color-blue-scale-100: #E5E5E7; --color-blue-scale-200: #9899A5; diff --git a/@xen-orchestra/lite/src/components/AccountButton.vue b/@xen-orchestra/lite/src/components/AccountButton.vue new file mode 100644 index 000000000..0fe41422f --- /dev/null +++ b/@xen-orchestra/lite/src/components/AccountButton.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/@xen-orchestra/lite/src/components/AppHeader.vue b/@xen-orchestra/lite/src/components/AppHeader.vue index 94905b800..f648b89cb 100644 --- a/@xen-orchestra/lite/src/components/AppHeader.vue +++ b/@xen-orchestra/lite/src/components/AppHeader.vue @@ -19,7 +19,7 @@ import { useXenApiStore } from "@/stores/xen-api.store"; const router = useRouter(); const toggleTheme = () => { - document.body.classList.toggle("dark"); + document.documentElement.classList.toggle("dark"); }; const logout = () => { diff --git a/@xen-orchestra/lite/src/components/AppLogin.vue b/@xen-orchestra/lite/src/components/AppLogin.vue index 97cd0d127..8d5413ae6 100644 --- a/@xen-orchestra/lite/src/components/AppLogin.vue +++ b/@xen-orchestra/lite/src/components/AppLogin.vue @@ -36,7 +36,7 @@ async function handleSubmit() { } - diff --git a/@xen-orchestra/lite/src/components/CollectionFilterRow.vue b/@xen-orchestra/lite/src/components/CollectionFilterRow.vue new file mode 100644 index 000000000..fd63d9c13 --- /dev/null +++ b/@xen-orchestra/lite/src/components/CollectionFilterRow.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/@xen-orchestra/lite/src/components/CollectionSorter.vue b/@xen-orchestra/lite/src/components/CollectionSorter.vue new file mode 100644 index 000000000..add7c606a --- /dev/null +++ b/@xen-orchestra/lite/src/components/CollectionSorter.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/@xen-orchestra/lite/src/components/CollectionTable.vue b/@xen-orchestra/lite/src/components/CollectionTable.vue index 720ef2520..58a1ee302 100644 --- a/@xen-orchestra/lite/src/components/CollectionTable.vue +++ b/@xen-orchestra/lite/src/components/CollectionTable.vue @@ -1,11 +1,21 @@