web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

commit d42fc6de0edaee16e5e335f4377ab9fd46465cc0
parent dece0063c71c3872ad4347200b62109c285e072c
Author: triesap <137732411+triesap@users.noreply.github.com>
Date:   Mon,  7 Oct 2024 05:19:17 +0000

apps-lib: edit stores, add locales, sort locales

Diffstat:
Mapps-lib/src/lib/locales/en/app.json | 2+-
Mapps-lib/src/lib/locales/en/common.json | 90++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mapps-lib/src/lib/locales/en/currency.json | 14+++++++-------
Mapps-lib/src/lib/locales/en/icu.json | 41+++++++++++++++++++++--------------------
Mapps-lib/src/lib/locales/en/measurement.json | 10+++++-----
Mapps-lib/src/lib/locales/en/model_fields.json | 90++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mapps-lib/src/lib/locales/en/trade.json | 20++++++++++----------
Mapps-lib/src/lib/locales/locales.json | 2+-
Mapps-lib/src/lib/stores/client.ts | 6+++++-
9 files changed, 140 insertions(+), 135 deletions(-)

diff --git a/apps-lib/src/lib/locales/en/app.json b/apps-lib/src/lib/locales/en/app.json @@ -1,3 +1,3 @@ { - "name": "Radroots" + "name": "Radroots" } \ No newline at end of file diff --git a/apps-lib/src/lib/locales/en/common.json b/apps-lib/src/lib/locales/en/common.json @@ -1,61 +1,61 @@ { - "lot": "Lot", - "lot_name": "Lot name", - "product_name": "Product name", - "summary": "Summary", - "title": "Title", - "list": "List", + "active": "Active", + "add": "Add", + "add_current_location": "Add current location", "add_map_location": "Add map location", + "add_new_location": "Add new location", + "authenticated": "Authenticated", + "back": "Back", + "cancel": "Cancel", "connect": "Connect", - "not_connected": "Not connected", - "url": "URL", - "disconnect": "Disconnect", "connected": "Connected", "connection": "Connection", + "delete": "Delete", "description": "Description", - "authenticated": "Authenticated", - "relay": "Relay", - "update": "Update", - "status": "Status", - "relays": "Relays", - "secret_key": "Secret key", + "details": "Details", + "disconnect": "Disconnect", "done": "Done", - "unlock": "Unlock", - "nsec": "Nsec", - "npub": "Npub", + "edit": "Edit", + "from": "From", "hex": "Hex", - "public_key": "Public key", + "inbox": "Inbox", + "key": "Key", "keys": "Keys", - "settings": "Settings", - "products": "Products", + "list": "List", + "location": "Location", "locations": "Locations", - "profiles": "Profiles", - "profile": "Profile", - "profile_name": "Profile name", - "details": "Details", - "key": "Key", - "active": "Active", - "delete": "Delete", - "messages": "Messages", + "lot": "Lot", + "lot_name": "Lot name", "message": "Message", - "back": "Back", - "subject": "Subject", - "from": "From", - "to": "To", - "inbox": "Inbox", - "submit": "Submit", + "messages": "Messages", + "no_items_to_display": "No items to display", + "no_locations_saved": "No locations saved", + "not_connected": "Not connected", + "npub": "Npub", + "nsec": "Nsec", "optional": "Optional", - "quantity": "Quantity", + "other": "Other", "per": "Per", "price": "Price", "product": "Product", - "location": "Location", - "edit": "Edit", - "other": "Other", - "add_current_location": "Add current location", - "add_new_location": "Add new location", - "no_locations_saved": "No locations saved", - "no_items_to_display": "No items to display", - "cancel": "Cancel", - "add": "Add" + "product_name": "Product name", + "products": "Products", + "profile": "Profile", + "profile_name": "Profile name", + "profiles": "Profiles", + "public_key": "Public key", + "quantity": "Quantity", + "relay": "Relay", + "relays": "Relays", + "secret_key": "Secret key", + "settings": "Settings", + "status": "Status", + "subject": "Subject", + "submit": "Submit", + "summary": "Summary", + "title": "Title", + "to": "To", + "unlock": "Unlock", + "update": "Update", + "url": "URL" } \ No newline at end of file diff --git a/apps-lib/src/lib/locales/en/currency.json b/apps-lib/src/lib/locales/en/currency.json @@ -1,12 +1,12 @@ { - "usd": { - "symbol": "$", - "name": "United States Dollar", - "name_short": "U.S. Dollar" - }, "eur": { - "symbol": "€", "name": "Euro", - "name_short": "Euro" + "name_short": "Euro", + "symbol": "€" + }, + "usd": { + "name": "United States Dollar", + "name_short": "U.S. Dollar", + "symbol": "$" } } \ No newline at end of file diff --git a/apps-lib/src/lib/locales/en/icu.json b/apps-lib/src/lib/locales/en/icu.json @@ -1,30 +1,31 @@ { - "total_*": "Total {value}", + "*_as": "{value} as", + "*_available": "{value} Available", + "*_copied": "{value} copied", "*_details": "{value} details", - "listing_*": "Listing {value}", - "enter_the_*": "Enter the {value}", - "show_*": "Show {value}", - "invalid_*": "Invalid {value}", - "disconnect_*": "Disconnect {value}", + "add_*": "Add {value}", + "add_a_*": "Add a {value}", + "as_*": "As {value}", "connect_*": "Connect {value}", - "unconnected_*": "Unconnected {value}", "connected_*": "Connected {value}", + "delete_*": "Delete {value}", + "disconnect_*": "Disconnect {value}", + "edit_*": "Edit {value}", + "enter_*": "Enter {value}", + "enter_new_*": "Enter new {value}", + "enter_number_of_*_per_order": "Enter number of {value} per order", + "enter_the_*": "Enter the {value}", + "invalid_*": "Invalid {value}", + "invalid_*_entry": "Invalid {value} entry", + "listing_*": "Listing {value}", + "no_*": "No {value}", "no_*_published": "No {value} published", - "*_as": "{value} as", - "as_*": "As {value}", - "*_copied": "{value} copied", - "your_*": "Your {value}", "nostr_*": "Nostr {value}", - "invalid_*_entry": "Invalid {value} entry", - "enter_new_*": "Enter new {value}", - "enter_*": "Enter {value}", "post_*": "Post {value}", - "no_*": "No {value}", - "delete_*": "Delete {value}", "set_as_*": "Set as {value}", - "add_*": "Add {value}", - "add_a_*": "Add a {value}", - "edit_*": "Edit {value}", + "show_*": "Show {value}", + "total_*": "Total {value}", + "unconnected_*": "Unconnected {value}", "view_*": "View {value}", - "*_available": "{value} Available" + "your_*": "Your {value}" } \ No newline at end of file diff --git a/apps-lib/src/lib/locales/en/measurement.json b/apps-lib/src/lib/locales/en/measurement.json @@ -2,17 +2,17 @@ "mass": { "unit": { "g": "Gram", - "g_pl": "Grams", "g_ab": "g.", + "g_pl": "Grams", "hg": "100 Gram", - "hg_pl": "100 Grams", "hg_ab": "100g.", + "hg_pl": "100 Grams", "kg": "Kilogram", - "kg_pl": "Kilograms", "kg_ab": "kg.", + "kg_pl": "Kilograms", "lb": "Pound", - "lb_pl": "Pounds", - "lb_ab": "lb." + "lb_ab": "lb.", + "lb_pl": "Pounds" } } } \ No newline at end of file diff --git a/apps-lib/src/lib/locales/en/model_fields.json b/apps-lib/src/lib/locales/en/model_fields.json @@ -1,47 +1,47 @@ { - "lat": "Latitude", - "lng": "Longitude", - "geohash": "Geohash", - "label": "Label", - "gc_id": "", - "gc_name": "", - "gc_admin1_id": "", - "gc_admin1_name": "", - "gc_country_id": "", - "gc_country_name": "", - "key": "Key", - "title": "", - "summary": "", - "process": "Process", - "lot": "Lot", - "profile": "Profile", - "year": "Year", - "qty_amt": "Quantity Amount", - "qty_unit": "Quantity Unit", - "qty_label": "Quantity Label", - "qty_avail": "Quantity Available", - "price_amt": "Price", - "price_currency": "Currency", - "price_qty_amt": "Price", - "price_qty_unit": "Unit", - "notes": "Notes", - "public_key": "Public Key", - "name": "Profile Name", - "display_name": "Display Name", - "about": "About", - "website": "Website", - "picture": "Picture", - "banner": "Banner", - "nip05": "NIP 05", - "lud06": "LUD 06", - "lud16": "LUD 16", - "url": "", - "relay_id": "", - "description": "Relay Description", - "pubkey": "Relay Admin", - "contact": "", - "supported_nips": "Supported NIPs", - "software": "Software", - "version": "Version", - "data": "" + "about": "About", + "banner": "Banner", + "contact": "", + "data": "", + "description": "Relay Description", + "display_name": "Display Name", + "gc_admin1_id": "", + "gc_admin1_name": "", + "gc_country_id": "", + "gc_country_name": "", + "gc_id": "", + "gc_name": "", + "geohash": "Geohash", + "key": "Key", + "label": "Label", + "lat": "Latitude", + "lng": "Longitude", + "lot": "Lot", + "lud06": "LUD 06", + "lud16": "LUD 16", + "name": "Profile Name", + "nip05": "NIP 05", + "notes": "Notes", + "picture": "Picture", + "price_amt": "Price", + "price_currency": "Currency", + "price_qty_amt": "Price", + "price_qty_unit": "Unit", + "process": "Process", + "profile": "Profile", + "pubkey": "Relay Admin", + "public_key": "Public Key", + "qty_amt": "Quantity Amount", + "qty_avail": "Quantity Available", + "qty_label": "Quantity Label", + "qty_unit": "Quantity Unit", + "relay_id": "", + "software": "Software", + "summary": "", + "supported_nips": "Supported NIPs", + "title": "", + "url": "", + "version": "Version", + "website": "Website", + "year": "Year" } \ No newline at end of file diff --git a/apps-lib/src/lib/locales/en/trade.json b/apps-lib/src/lib/locales/en/trade.json @@ -1,19 +1,19 @@ { + "glossary": { + "lot": "Lot", + "process": "Process", + "profile": "Profile" + }, "product": { - "key": { - "coffee": "Coffee", - "cacao": "Cacao", - "maca": "Maca" - }, "fields": { "price_amt": { "err_invalid": "Enter the price" } + }, + "key": { + "cacao": "Cacao", + "coffee": "Coffee", + "maca": "Maca" } - }, - "glossary": { - "profile": "Profile", - "lot": "Lot", - "process": "Process" } } \ No newline at end of file diff --git a/apps-lib/src/lib/locales/locales.json b/apps-lib/src/lib/locales/locales.json @@ -1,3 +1,3 @@ { - "en": "English" + "en": "English" } \ No newline at end of file diff --git a/apps-lib/src/lib/stores/client.ts b/apps-lib/src/lib/stores/client.ts @@ -1,7 +1,7 @@ import { type AppLayoutKey, type IToast, type NavigationPreviousParam } from "$lib"; +import type { ColorMode, ThemeKey } from "@radroots/theme"; import { writable } from "svelte/store"; import { queryParam, queryParameters } from "sveltekit-search-params"; - //@ts-ignore const kv_name = import.meta.env.VITE_PUBLIC_KV_NAME; if (!kv_name) throw new Error('Error: VITE_PUBLIC_KV_NAME is required'); @@ -26,6 +26,10 @@ export const app_submit_route = writable<NavigationPreviousParam | undefined>(un export const app_blur = writable<boolean>(false); export const app_db = writable<boolean>(false); export const app_geoc = writable<boolean>(false); +export const app_thc = writable<ColorMode>(`dark`); +export const app_th = writable<ThemeKey>(`os`); +export const app_nostr_key = writable<string>(``); +export const app_pwa_polyfills = writable<boolean>(false); export const nav_visible = writable<boolean>(false); export const nav_blur = writable<boolean>(false);