Compare commits

...

1 commit

Author SHA1 Message Date
Florian Schmitt
8b6aa777ab fix: direct list of nodejs timezones + chore deps
All checks were successful
deploy to prod / Build and deploy site (push) Successful in 37s
2024-11-22 14:11:01 +03:00
4 changed files with 536 additions and 621 deletions

View file

@ -1,55 +1,58 @@
import { defineConfig } from 'vitepress' import { defineConfig } from "vitepress";
// https://vitepress.dev/reference/site-config // https://vitepress.dev/reference/site-config
export default defineConfig({ export default defineConfig({
title: "NixiN", title: "NixiN",
description: "A webUI to configure NixOS machines", description: "A webUI to configure NixOS machines",
base: '/', base: "/",
head: [ head: [
['link', { rel: 'shortcut icon', href: 'logo-nixin.svg', type: 'image/svg' }] [
"link",
{ rel: "shortcut icon", href: "logo-nixin.svg", type: "image/svg" },
],
], ],
lastUpdated: true, lastUpdated: true,
themeConfig: { themeConfig: {
// https://vitepress.dev/reference/default-theme-config // https://vitepress.dev/reference/default-theme-config
footer: { footer: {
message: 'Handcrafted with ❤️ by the DistriLab', message: "Handcrafted with ❤️ by the DistriLab",
copyright: 'Copyleft © 2024-present the DistriLab - AGPL3 licence' copyright: "Copyleft © 2024-present the DistriLab - AGPL3 licence",
}, },
logo: '/logo-nixin.svg', logo: "/logo-nixin.svg",
nav: [ nav: [
{ text: 'Home', link: '/' }, { text: "Home", link: "/" },
{ text: 'Documentation', link: '/about' }, { text: "Documentation", link: "/about" },
{ text: 'Generate my configuration', link: 'configure' }, { text: "Generate my configuration", link: "configure" },
], ],
search: { search: {
provider: 'local' provider: "local",
}, },
sidebar: [ sidebar: [
{ {
text: 'The NixiN Project', text: "The NixiN Project",
items: [ items: [
{ text: 'About', link: '/about' }, { text: "About", link: "/about" },
{ text: 'Technical principles', link: '/technical-principles' }, { text: "Technical principles", link: "/technical-principles" },
{ text: 'Roadmap', link: '/roadmap' }, { text: "Roadmap", link: "/roadmap" },
] ],
}, },
{ {
text: 'Getting started', text: "Getting started",
items: [ items: [
{ text: 'Local installation', link: '/installation' }, { text: "Local installation", link: "/installation" },
{ text: 'Build virtual machine', link: '/build-virtual-machine' }, { text: "Build virtual machine", link: "/build-virtual-machine" },
] ],
} },
], ],
socialLinks: [ socialLinks: [
{ icon: 'github', link: 'https://git.distrilab.fr/NixiN' } { icon: "github", link: "https://git.distrilab.fr/NixiN" },
//{ icon: 'mastodon', link: 'https://mastodon.cc/@mrflos' } //{ icon: 'mastodon', link: 'https://mastodon.cc/@mrflos' }
] ],
}, },
ignoreDeadLinks:[ ignoreDeadLinks: [
// ignore all localhost links // ignore all localhost links
/^https?:\/\/localhost/, /^https?:\/\/localhost/,
] ],
}) });

View file

@ -2,13 +2,12 @@
import NixCode from "./NixCode.vue" import NixCode from "./NixCode.vue"
import NixForm from "./NixForm.vue" import NixForm from "./NixForm.vue"
import { provide, ref } from 'vue' import { provide, ref } from 'vue'
import { listTz, clientTz } from 'timezone-select-js';
const availableLanguages = { const availableLanguages = {
'en_US.UTF-8': 'English', 'en_US.UTF-8': 'English',
'fr_FR.UTF-8': 'Francais' 'fr_FR.UTF-8': 'Francais'
} }
const availableTimezones = listTz() const availableTimezones = Intl.supportedValuesOf('timeZone')
let nixin = { let nixin = {
netconf: 'autoconfig', netconf: 'autoconfig',
networkingHostname: '', networkingHostname: '',
@ -72,7 +71,7 @@ let nixin = {
}], }],
bundles: [], bundles: [],
services: [], services: [],
timezone: 'Europe/Belfast', // default to UTC but could be found with clientTz(), timezone: 'UTC',
locale: 'en_US.UTF-8', locale: 'en_US.UTF-8',
operatingUser: 'operator', operatingUser: 'operator',
operatingUserPassword: 'CHANGE ME !!!', operatingUserPassword: 'CHANGE ME !!!',
@ -196,7 +195,7 @@ function selectServices(bundleId, services) {
<div class="form-cell"> <div class="form-cell">
<label>Timezone</label> <label>Timezone</label>
<select v-model="nixin.timezone"> <select v-model="nixin.timezone">
<option v-for="tz in availableTimezones" :selected="nixin.timezone === tz.value" v-bind:value="tz.value">{{ tz.label }}</option> <option v-for="tz in availableTimezones" :selected="nixin.timezone === tz" v-bind:value="tz">{{ tz }}</option>
</select> </select>
</div> </div>
</div> </div>

1088
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -13,8 +13,5 @@
}, },
"devDependencies": { "devDependencies": {
"vitepress": "^1.3.3" "vitepress": "^1.3.3"
},
"dependencies": {
"timezone-select-js": "^2.0.1"
} }
} }