diff --git a/docs/changelogs.md b/docs/changelogs.md index 159492d9..77d47b80 100644 --- a/docs/changelogs.md +++ b/docs/changelogs.md @@ -5,6 +5,20 @@ description: Changelogs for Kener # Changelogs +## v3.0.1 + + + + 🚀 + + +Here are the changes in this release + +### Features + +- Support for i18n in dates. +- Support of i18n in monitor embeds. Read more [here](/docs/embed#javascript-parameters) + ## v3.0.0 diff --git a/docs/embed.md b/docs/embed.md index 5f811f07..81f4e4ed 100644 --- a/docs/embed.md +++ b/docs/embed.md @@ -34,6 +34,7 @@ You can pass the following parameters to the embed code - `theme`: You can pass `light` or `dark` theme - `monitor`: The monitor url - `bgc`: Background color of the monitor. Only supports hex color codes. DO NOT include the `#` symbol +- `locale`: The locale of the monitor. You can pass the code of the locale you have enabled in your kener settings Replace `[hostname]` with your kener hostname and `[tag]` with your monitor tag. @@ -79,6 +80,7 @@ You can pass the following parameters to the embed code - `theme`: You can pass `light` or `dark` theme - `bgc`: Background color of the monitor. Only supports hex color codes. DO NOT include the `#` symbol +- `locale`: The locale of the monitor. You can pass the code of the locale you have enabled in your kener settings ### Demo diff --git a/docs/i18n.md b/docs/i18n.md index d5e49cf4..6d390641 100644 --- a/docs/i18n.md +++ b/docs/i18n.md @@ -123,6 +123,22 @@ Open `src/lib/locales/locales.json` and add the locale code and the name of the ### Step 3 +Open `src/lib/i18n/client.js` and add the locale code to the `locales` array. + +```js +import { ru, enUS, hi, de, zhCN, vi, ja, nl, da, fr, ko } from "date-fns/locale"; +``` + +This should be valid for the date-fns library. + +Next add a mapping in the `locales` object. + +```js +const locales = { ru, en: enUS, hi, dk: de, "zh-CN": zhCN, vi, ja, nl, dk: da, fr, ko }; +``` + +### Step 4 + Restart the server and you will see a dropdown in the navbar to select the language.
diff --git a/docs/roadmap.md b/docs/roadmap.md index 34a095c3..b466bbfa 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -28,10 +28,16 @@ description: Roadmap for Kener ☐ Introduce sitemap.xml -☐ Migrate from moment to date-fns +☑ ~~Migrate from moment to date-fns for status page~~ (moment remains in dashboard. Will remove later) ☑ ~~Create Admin UI~~ Released in (3.0.0) +☐ Webhook customization + +☐ Monitor Update Screen + +☐ i18n for admin dashboard + --- Request a feature or start a discussion [here](https://github.com/rajnandan1/kener/discussions/119) diff --git a/embed.html b/embed.html index 9a2a57fe..434fe164 100644 --- a/embed.html +++ b/embed.html @@ -14,7 +14,7 @@ Hello world diff --git a/package-lock.json b/package-lock.json index ed93cac7..bb049a14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "bits-ui": "^0.9.9", "clsx": "^2.0.0", "croner": "^7.0.5", + "date-fns": "^4.1.0", "dns2": "^2.1.0", "dotenv": "^16.4.5", "express": "^4.18.2", @@ -2098,6 +2099,23 @@ "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, + "node_modules/concurrently/node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -2283,19 +2301,13 @@ } }, "node_modules/date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", + "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", + "license": "MIT", "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" } }, "node_modules/date-picker-svelte": { diff --git a/package.json b/package.json index 846de3fa..2f43f5f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kener", - "version": "3.0.0", + "version": "3.0.1", "private": false, "license": "MIT", "description": "Kener: An open-source Node.js status page application for real-time service monitoring, incident management, and customizable reporting. Simplify service outage tracking, enhance incident communication, and ensure a seamless user experience.", @@ -76,6 +76,7 @@ "bits-ui": "^0.9.9", "clsx": "^2.0.0", "croner": "^7.0.5", + "date-fns": "^4.1.0", "dns2": "^2.1.0", "dotenv": "^16.4.5", "express": "^4.18.2", diff --git a/src/kener.css b/src/kener.css index 3f2e6aad..8ab84f8f 100644 --- a/src/kener.css +++ b/src/kener.css @@ -761,7 +761,7 @@ textarea::placeholder { vertical-align: middle; width: auto; word-break: keep-all; - z-index: 0; + z-index: 10; } @media (min-width: 768px) { diff --git a/src/lib/components/IncidentNew.svelte b/src/lib/components/IncidentNew.svelte index ec881309..d77f93cf 100644 --- a/src/lib/components/IncidentNew.svelte +++ b/src/lib/components/IncidentNew.svelte @@ -1,20 +1,23 @@