web


git clone https://radroots.dev/git/web.git
Log | Files | Refs | Submodules | README | LICENSE

commit c31b7425c07897ecf3ea098c9b684ded697e24bb
parent 6017c52d9116683999f68f1cd212863ad272bcd1
Author: triesap <137732411+triesap@users.noreply.github.com>
Date:   Fri, 15 Nov 2024 00:51:45 +0000

Add `/models/trade-product/view`. Edit `models/trade-product` add list card responsive styles. Edit components, routes, styles.

Diffstat:
Msrc/app.css | 29+++++++++++++++++++++++------
Msrc/lib/components/trade_product_list_card.svelte | 381++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Msrc/routes/(app)/+page.svelte | 6+++---
Msrc/routes/(app)/models/location-gcs/+page.svelte | 2+-
Msrc/routes/(app)/models/nostr-relay/view/+page.svelte | 4+---
Msrc/routes/(app)/models/trade-product/+page.svelte | 7++-----
Asrc/routes/(app)/models/trade-product/view/+page.svelte | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/routes/(app)/settings/+page.svelte | 2+-
Msrc/routes/(app)/test/+page.svelte | 2+-
Msrc/routes/(cfg)/cfg/init/+page.svelte | 8++++----
Msrc/routes/+error.svelte | 2+-
11 files changed, 324 insertions(+), 195 deletions(-)

diff --git a/src/app.css b/src/app.css @@ -29,20 +29,37 @@ @apply active:scale-[97%] group-active:scale-[97%] delay-75 duration-700 ease-in-out transition-all; } - .touch-layer-1 { - @apply active:bg-layer-1-surface_a/20 group-active:bg-layer-1-surface_a/20 transition-all; + .focus-layer-1 { + @apply focus:bg-layer-1-surface-focus group-focus:bg-layer-1-surface-focus transition-all; } - .touch-layer-1-raise, - .touch-layer-1-raise-less { + .focus-layer-1-raise, + .focus-layer-1-raise-less { + @apply focus:scale-[101%] group-focus:scale-[101%] ease-in-out transition-all; + } + + .focus-layer-1-raise { + @apply ring-layer-2-surface/60 focus:ring-[0.3rem] group-focus:ring-[0.3rem] delay-[75ms] duration-[350ms]; + } + + .focus-layer-1-raise-less { + @apply ring-layer-2-surface/60 focus:ring-[0.25rem] group-focus:ring-[0.25rem] delay-[50ms] duration-[350ms]; + } + + .active-layer-1 { + @apply active:bg-layer-1-surface-focus group-active:bg-layer-1-surface-focus transition-all; + } + + .active-layer-1-raise, + .active-layer-1-raise-less { @apply active:scale-[101%] group-active:scale-[101%] ease-in-out transition-all; } - .touch-layer-1-raise { + .active-layer-1-raise { @apply ring-layer-2-surface/60 active:ring-[0.3rem] group-active:ring-[0.3rem] delay-[75ms] duration-[350ms]; } - .touch-layer-1-raise-less { + .active-layer-1-raise-less { @apply ring-layer-2-surface/60 active:ring-[0.25rem] group-active:ring-[0.25rem] delay-[50ms] duration-[350ms]; } diff --git a/src/lib/components/trade_product_list_card.svelte b/src/lib/components/trade_product_list_card.svelte @@ -3,10 +3,13 @@ import { fmt_location_gcs } from "@radroots/models"; import { app_layout, + el_id, + els_id_pref_index, fmt_geol_latitude, fmt_geol_longitude, Glyph, locale, + route, t, } from "@radroots/svelte-lib"; import { @@ -20,7 +23,10 @@ import LineEntryData from "./line_entry_data.svelte"; import LineEntryLabel from "./line_entry_label.svelte"; + const id_pref = `trade-product-list-card`; + export let basis: { + index: number; result: TradeProductBundle; }; $: ({ @@ -32,214 +38,249 @@ num_min(trade_product.qty_avail, 1) - tradeproduct_qty_sold; </script> -<div - class={`flex flex-col min-h-[22rem] w-${$app_layout} justify-start items-start bg-layer-1-surface touch-layer-1 touch-layer-1-raise-less round-44`} -> +<div class={`relative flex flex-col w-full justify-center items-center`}> <div - class={`flex flex-row h-[10rem] w-full justify-center items-center border-b-line border-b-layer-1-surface-edge`} + id={`${id_pref}-control-${basis.index}-${trade_product.id}`} + class={`hidden absolute top-0 left-0 flex flex-row h-12 w-full justify-center items-start el-re`} > <button - class={`group flex flex-row w-full justify-center items-center`} - on:click={async () => {}} + class={`flex flex-row px-5 py-1 justify-center items-center bg-layer-1-surface active-layer-1 rounded-full`} + on:click={async () => { + await route(`/models/trade-product/view`, [ + [`id`, trade_product.id], + ]); + }} > - <div - class={`relative flex flex-col w-full justify-start items-center`} + <p class={`font-sans font-[500] text-layer-0-glyph`}> + {`${$t(`common.view`)}`} + </p> + </button> + </div> + <button + id={`${id_pref}-display-${basis.index}-${trade_product.id}`} + class={`flex flex-col min-h-[22rem] w-${$app_layout} justify-start items-start bg-layer-1-surface focus-layer-1 focus-layer-1-raise-less round-44 focus:translate-y-12`} + on:click={async ({ currentTarget: el }) => { + el.focus(); + const el_ctr = el_id( + `${id_pref}-control-${basis.index}-${trade_product.id}`, + ); + if (el_ctr) el_ctr.classList.remove(`hidden`); + const els = els_id_pref_index(`${id_pref}-display`, basis.index); + if (els) els.forEach((el) => el.classList.add(`translate-y-12`)); + }} + on:blur={async () => { + const el_ctr = el_id(`${id_pref}-control-${trade_product.id}`); + if (el_ctr) el_ctr.classList.add(`hidden`); + const els = els_id_pref_index(`${id_pref}-display`, basis.index); + if (els) els.forEach((el) => el.classList.remove(`translate-y-12`)); + }} + > + <div + class={`flex flex-row h-[10rem] w-full justify-center items-center border-b-line border-b-layer-1-surface-edge`} + > + <button + class={`group flex flex-row w-20 justify-center items-center`} + on:click|stopPropagation={async () => {}} > <div - class={`relative flex flex-row py-2 px-[0.8rem] justify-center items-center`} + class={`relative flex flex-col w-full justify-start items-center`} > - <Glyph - basis={{ - classes: `text-layer-0-glyph group-active:text-layer-0-glyph_a el-re`, - dim: `xl`, - weight: `bold`, - key: `camera`, - }} - /> <div - class={`absolute top-0 right-0 flex flex-row justify-center items-center`} + class={`relative flex flex-row py-2 px-[0.8rem] justify-center items-center`} > <Glyph basis={{ classes: `text-layer-0-glyph group-active:text-layer-0-glyph_a el-re`, - dim: `xs`, + dim: `xl`, weight: `bold`, - key: `plus`, + key: `camera`, }} /> + <div + class={`absolute top-0 right-0 flex flex-row justify-center items-center`} + > + <Glyph + basis={{ + classes: `text-layer-0-glyph group-active:text-layer-0-glyph_a el-re`, + dim: `xs`, + weight: `bold`, + key: `plus`, + }} + /> + </div> </div> - </div> - <div - class={`absolute -bottom-4 left-0 flex flex-row w-full justify-center items-center`} - > - <p - class={`font-sans font-[500] text-[1rem] text-layer-0-glyph group-active:text-layer-0-glyph_a el-re`} + <div + class={`absolute -bottom-4 left-0 flex flex-row w-full justify-center items-center`} > - {`${$t(`icu.no_*`, { value: `${$t(`common.photos`)}`.toLowerCase() })}`} - </p> + <p + class={`font-sans font-[500] text-[1rem] text-layer-0-glyph group-active:text-layer-0-glyph_a el-re`} + > + {`${$t(`icu.no_*`, { value: `${$t(`common.photos`)}`.toLowerCase() })}`} + </p> + </div> </div> - </div> - </button> - </div> - {#if location_gcs} - <div - class={`flex flex-col min-h-[11rem] w-full pt-8 pb-12 justify-start items-start`} - > + </button> + </div> + {#if location_gcs} <div - class={`flex flex-col w-full px-5 gap-6 justify-center items-center`} + class={`flex flex-col min-h-[11rem] w-full pt-8 pb-12 justify-start items-start`} > - <div class={`grid grid-cols-12 w-full`}> - <LineEntryLabel - basis={{ - classes_wrap: `col-span-7`, - value: `"${trade_product.title}"`, - }} - /> - <LineEntryData - basis={{ - classes_wrap: `col-span-5 justify-end capitalize`, - value: `${trade_product.key}`, - }} - /> - </div> - <div class={`grid grid-cols-12 w-full gap-y-[2px]`}> - <LineEntriesBetween - basis={{ - classes: `col-span-12`, - label: { - value: `${$t(`common.origin`)}`, - }, - data: { - value: `${fmt_geol_latitude( - location_gcs.lat, - `d`, - 4, - )}, ${fmt_geol_longitude( - location_gcs.lng, - `d`, - 4, - )}`, - }, - }} - /> - <LineEntryData - basis={{ - classes_wrap: `col-span-12 justify-end capitalize`, - value: `${fmt_location_gcs(location_gcs, `city`)}`, - }} - /> - </div> - <div class={`grid grid-cols-12 w-full gap-y-[2px]`}> - {#await parse_currency_price($locale, trade_product.price_currency, trade_product.price_amt) then price} + <div + class={`flex flex-col w-full px-5 gap-6 justify-center items-center`} + > + <div class={`grid grid-cols-12 w-full`}> + <LineEntryLabel + basis={{ + classes_wrap: `col-span-7`, + value: `"${trade_product.title}"`, + }} + /> + <LineEntryData + basis={{ + classes_wrap: `col-span-5 justify-end capitalize`, + value: `${trade_product.key}`, + }} + /> + </div> + <div class={`grid grid-cols-12 w-full gap-y-[2px]`}> <LineEntriesBetween basis={{ classes: `col-span-12`, label: { - value: `${$t(`common.price`)}`, + value: `${$t(`common.origin`)}`, }, data: { - value: `${price ? fmt_currency_price(price) : ``} / ${`${$t(`measurement.mass.unit.${trade_product.price_qty_unit}_ab`)}`}`, + value: `${fmt_geol_latitude( + location_gcs.lat, + `d`, + 4, + )}, ${fmt_geol_longitude( + location_gcs.lng, + `d`, + 4, + )}`, }, }} /> - {/await} - <LineEntriesBetween - basis={{ - classes: `col-span-12`, - label: { - value: `${$t(`icu.*_order`, { value: `${$t(`common.quantity`)}` })}`, - }, - data: { - value: `${trade_product.qty_amt} / ${`${$t(`measurement.mass.unit.${trade_product.qty_unit}_ab`)}`}`, - }, - }} - /> - <LineEntriesBetween - basis={{ - classes: `col-span-12`, - label: { - value: `${$t(`icu.*_available`, { value: `${$t(`common.quantity`)}` })}`, - }, - data: { - value: `${tradeproduct_qty_avail} ${trade_product.qty_label || fmt_plural_agreement(tradeproduct_qty_avail, `${$t(`common.bag`)}`, `${$t(`common.bags`)}`)}`, - }, - }} - /> - <LineEntriesBetween - basis={{ - classes: `col-span-12`, - label: { - value: `${$t(`icu.*_sold`, { value: `${$t(`common.quantity`)}` })}`, - }, - data: { - value: `${tradeproduct_qty_sold} ${trade_product.qty_label || fmt_plural_agreement(tradeproduct_qty_sold, `${$t(`common.bag`)}`, `${$t(`common.bags`)}`)}`, - }, - }} - /> - <LineEntriesBetween - basis={{ - classes: `col-span-12`, - label: { - value: `${$t(`common.lot`)}`, - }, - data: { - classes: `capitalize`, - value: `${trade_product.lot}`, - }, - }} - /> - <LineEntriesBetween - basis={{ - classes: `col-span-12`, - label: { - value: `${$t(`common.process`)}`, - }, - data: { - classes: `capitalize`, - value: `${trade_product.process.replaceAll(`_`, ` `)}`, - }, - }} - /> - <LineEntriesBetween - basis={{ - classes: `col-span-12`, - label: { - value: `${$t(`common.profile`)}`, - }, - data: { - classes: `capitalize`, - value: `${trade_product.profile.replaceAll(`_`, ` `)}`, - }, - }} - /> - <LineEntriesBetween - basis={{ - classes: `col-span-12`, - label: { - value: `${$t(`common.year`)}`, - }, - data: { - value: `${trade_product.year}`, - }, - }} - /> - </div> - <div class={`grid grid-cols-12 w-full gap-y-[2px]`}> - {#await parse_currency_price($locale, trade_product.price_currency, trade_product.price_amt * Math.floor(Math.max(trade_product.price_qty_amt, 1)) * mass_tf_str(trade_product.price_qty_unit, trade_product.qty_unit, trade_product.qty_amt)) then price} + <LineEntryData + basis={{ + classes_wrap: `col-span-12 justify-end capitalize`, + value: `${fmt_location_gcs(location_gcs, `city`)}`, + }} + /> + </div> + <div class={`grid grid-cols-12 w-full gap-y-[2px]`}> + {#await parse_currency_price($locale, trade_product.price_currency, trade_product.price_amt) then price} + <LineEntriesBetween + basis={{ + classes: `col-span-12`, + label: { + value: `${$t(`common.price`)}`, + }, + data: { + value: `${price ? fmt_currency_price(price) : ``} / ${`${$t(`measurement.mass.unit.${trade_product.price_qty_unit}_ab`)}`}`, + }, + }} + /> + {/await} <LineEntriesBetween basis={{ classes: `col-span-12`, label: { - value: `${$t(`icu.total_*`, { value: `${$t(`common.value`)}` })}`, + value: `${$t(`icu.*_order`, { value: `${$t(`common.quantity`)}` })}`, }, data: { - value: `${price ? fmt_currency_price(price) : ``} / ${`${$t(`measurement.mass.unit.${trade_product.price_qty_unit}_ab`)}`}`, + value: `${trade_product.qty_amt} / ${`${$t(`measurement.mass.unit.${trade_product.qty_unit}_ab`)}`}`, }, }} /> - {/await} + <LineEntriesBetween + basis={{ + classes: `col-span-12`, + label: { + value: `${$t(`icu.*_available`, { value: `${$t(`common.quantity`)}` })}`, + }, + data: { + value: `${tradeproduct_qty_avail} ${trade_product.qty_label || fmt_plural_agreement(tradeproduct_qty_avail, `${$t(`common.bag`)}`, `${$t(`common.bags`)}`)}`, + }, + }} + /> + <LineEntriesBetween + basis={{ + classes: `col-span-12`, + label: { + value: `${$t(`icu.*_sold`, { value: `${$t(`common.quantity`)}` })}`, + }, + data: { + value: `${tradeproduct_qty_sold} ${trade_product.qty_label || fmt_plural_agreement(tradeproduct_qty_sold, `${$t(`common.bag`)}`, `${$t(`common.bags`)}`)}`, + }, + }} + /> + <LineEntriesBetween + basis={{ + classes: `col-span-12`, + label: { + value: `${$t(`common.lot`)}`, + }, + data: { + classes: `capitalize`, + value: `${trade_product.lot}`, + }, + }} + /> + <LineEntriesBetween + basis={{ + classes: `col-span-12`, + label: { + value: `${$t(`common.process`)}`, + }, + data: { + classes: `capitalize`, + value: `${trade_product.process.replaceAll(`_`, ` `)}`, + }, + }} + /> + <LineEntriesBetween + basis={{ + classes: `col-span-12`, + label: { + value: `${$t(`common.profile`)}`, + }, + data: { + classes: `capitalize`, + value: `${trade_product.profile.replaceAll(`_`, ` `)}`, + }, + }} + /> + <LineEntriesBetween + basis={{ + classes: `col-span-12`, + label: { + value: `${$t(`common.year`)}`, + }, + data: { + value: `${trade_product.year}`, + }, + }} + /> + </div> + <div class={`grid grid-cols-12 w-full gap-y-[2px]`}> + {#await parse_currency_price($locale, trade_product.price_currency, trade_product.price_amt * Math.floor(Math.max(trade_product.price_qty_amt, 1)) * mass_tf_str(trade_product.price_qty_unit, trade_product.qty_unit, trade_product.qty_amt)) then price} + <LineEntriesBetween + basis={{ + classes: `col-span-12`, + label: { + value: `${$t(`icu.total_*`, { value: `${$t(`common.value`)}` })}`, + }, + data: { + value: `${price ? fmt_currency_price(price) : ``} / ${`${$t(`measurement.mass.unit.${trade_product.price_qty_unit}_ab`)}`}`, + }, + }} + /> + {/await} + </div> </div> </div> - </div> - {/if} + {/if} + </button> </div> diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte @@ -117,7 +117,7 @@ <!--<div class={`flex flex-col pt-2 justify-center items-center`}> {#if tmp_show_no_profile} <button - class={`relative flex flex-row h-24 w-${$app_layout} p-4 gap-4 justify-center items-center bg-layer-2-surface/60 round-20 touch-layer-1 touch-layer-1-raise-less el-re`} + class={`relative flex flex-row h-24 w-${$app_layout} p-4 gap-4 justify-center items-center bg-layer-2-surface/60 round-20 active-layer-1 active-layer-1-raise-less el-re`} on:click={async () => { await route(`/models/nostr-profile`); }} @@ -168,7 +168,7 @@ <div class={`flex flex-col w-full gap-5 justify-start items-center`}> {#each page_param.buttons[$app_cfg_type] as btn} <button - class={`flex flex-row h-20 w-${$app_layout} py-2 px-6 justify-between items-center bg-layer-1-surface touch-layer-1 touch-layer-1-raise-less round-20 el-re`} + class={`flex flex-row h-20 w-${$app_layout} py-2 px-6 justify-between items-center bg-layer-1-surface active-layer-1 active-layer-1-raise-less round-20 el-re`} on:click={async () => { if (btn.callback) await btn.callback(); else if (btn.route) await route(btn.route); @@ -213,7 +213,7 @@ list: [ { icon: `house-line`, - label: `Home`, + label: `${$t(`common.home`)}`, callback: async () => { await route(`/`); const res = await db.nostr_relay_get({ list: [`all`] }); diff --git a/src/routes/(app)/models/location-gcs/+page.svelte b/src/routes/(app)/models/location-gcs/+page.svelte @@ -143,7 +143,7 @@ <Nav basis={{ prev: { - label: `Home`, + label: `${$t(`common.home`)}`, route: `/`, }, title: { diff --git a/src/routes/(app)/models/nostr-relay/view/+page.svelte b/src/routes/(app)/models/nostr-relay/view/+page.svelte @@ -70,9 +70,7 @@ } }; - $: { - app_blur.set(show_edit); - } + $: app_blur.set(show_edit); $: { console.log(JSON.stringify(ld, null, 4), `ld`); diff --git a/src/routes/(app)/models/trade-product/+page.svelte b/src/routes/(app)/models/trade-product/+page.svelte @@ -59,10 +59,6 @@ console.log(`(error) load_data `, e); } }; - - $: { - console.log(JSON.stringify(ld, null, 4), `ld`); - } </script> {#if ld && ld.results.length > 0} @@ -71,6 +67,7 @@ {#each ld.results as li, li_i} <TradeProductListCard basis={{ + index: li_i, result: li, }} /> @@ -81,7 +78,7 @@ <Nav basis={{ prev: { - label: `Home`, + label: `${$t(`common.home`)}`, route: `/`, }, title: { diff --git a/src/routes/(app)/models/trade-product/view/+page.svelte b/src/routes/(app)/models/trade-product/view/+page.svelte @@ -0,0 +1,76 @@ +<script lang="ts"> + import { db } from "$lib/client"; + import type { TradeProductBundle } from "$lib/types"; + import { + app_notify, + LayoutTrellis, + LayoutView, + Nav, + qp_id, + t, + } from "@radroots/svelte-lib"; + import { onMount } from "svelte"; + + type LoadData = TradeProductBundle; + let ld: LoadData | undefined = undefined; + + onMount(async () => { + try { + if (!$qp_id) app_notify.set(`${$t(`error.client.page.load`)}`); + ld = await load_data(); + } catch (e) { + } finally { + } + }); + + const load_data = async (): Promise<LoadData | undefined> => { + try { + const _trade_product = await db.trade_product_get_one({ + id: $qp_id, + }); + if (`err` in _trade_product) { + app_notify.set(`${$t(`error.client.page.load`)}`); //@todo + return; + } + const { result: trade_product } = _trade_product; + + const location_gcs = await db.location_gcs_get({ + list: [`on_trade_product`, { id: trade_product.id }], + }); + + const data: LoadData = { + trade_product, + location_gcs: + `results` in location_gcs + ? location_gcs.results[0] + : undefined, + }; + return data; + } catch (e) { + console.log(`(error) load_data `, e); + } + }; +</script> + +{#if ld} + <LayoutView> + <LayoutTrellis> + <p class={`font-sans font-[400] text-layer-0-glyph break-all`}> + {JSON.stringify(ld)} + </p> + </LayoutTrellis> + </LayoutView> +{/if} +<Nav + basis={{ + prev: { + label: `${$t(`common.back`)}`, + route: `/models/trade-product`, + }, + title: { + label: { + value: `${$t(`common.product`)}`, + }, + }, + }} +/> diff --git a/src/routes/(app)/settings/+page.svelte b/src/routes/(app)/settings/+page.svelte @@ -417,7 +417,7 @@ <Nav basis={{ prev: { - label: `Home`, + label: `${$t(`common.home`)}`, route: `/`, }, title: { diff --git a/src/routes/(app)/test/+page.svelte b/src/routes/(app)/test/+page.svelte @@ -49,7 +49,7 @@ <Nav basis={{ prev: { - label: `Home`, + label: `${$t(`common.home`)}`, route: `/`, }, title: { diff --git a/src/routes/(cfg)/cfg/init/+page.svelte b/src/routes/(cfg)/cfg/init/+page.svelte @@ -745,7 +745,7 @@ class={`flex flex-col w-full gap-5 justify-center items-center`} > <button - class={`flex flex-col h-touch_bold w-${$app_layout} justify-center items-center bg-layer-1-surface touch-layer-1-raise-less round-44 ${cgf_init_key_option === `key_gen` ? `bg-layer-1-surface_a/40` : ``}`} + class={`flex flex-col h-touch_bold w-${$app_layout} justify-center items-center bg-layer-1-surface active-layer-1-raise-less round-44 ${cgf_init_key_option === `key_gen` ? `bg-layer-1-surface_a/40` : ``}`} on:click|stopPropagation={async () => { cgf_init_key_option = `key_gen`; }} @@ -757,7 +757,7 @@ </p> </button> <button - class={`flex flex-col h-touch_bold w-${$app_layout} justify-center items-center bg-layer-1-surface round-44 touch-layer-1-raise-less ${cgf_init_key_option === `kv_nostr_secretkey` ? `bg-layer-1-surface_a/40` : ``}`} + class={`flex flex-col h-touch_bold w-${$app_layout} justify-center items-center bg-layer-1-surface round-44 active-layer-1-raise-less ${cgf_init_key_option === `kv_nostr_secretkey` ? `bg-layer-1-surface_a/40` : ``}`} on:click|stopPropagation={async () => { cgf_init_key_option = `kv_nostr_secretkey`; }} @@ -926,7 +926,7 @@ class={`flex flex-col w-full gap-5 justify-center items-center`} > <button - class={`flex flex-col h-touch_bold w-${$app_layout} justify-center items-center bg-layer-1-surface touch-layer-1-raise-less round-44 ${cfg_main_opt_idx1 === `farmer` ? `bg-layer-1-surface_a/40` : ``}`} + class={`flex flex-col h-touch_bold w-${$app_layout} justify-center items-center bg-layer-1-surface active-layer-1-raise-less round-44 ${cfg_main_opt_idx1 === `farmer` ? `bg-layer-1-surface_a/40` : ``}`} on:click|stopPropagation={async () => { cfg_main_opt_idx1 = `farmer`; }} @@ -938,7 +938,7 @@ </p> </button> <button - class={`flex flex-col h-touch_bold w-${$app_layout} justify-center items-center bg-layer-1-surface touch-layer-1-raise-less round-44 ${cfg_main_opt_idx1 === `personal` ? `bg-layer-1-surface_a/40` : ``}`} + class={`flex flex-col h-touch_bold w-${$app_layout} justify-center items-center bg-layer-1-surface active-layer-1-raise-less round-44 ${cfg_main_opt_idx1 === `personal` ? `bg-layer-1-surface_a/40` : ``}`} on:click|stopPropagation={async () => { cfg_main_opt_idx1 = `personal`; }} diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte @@ -22,7 +22,7 @@ <Nav basis={{ prev: { - label: `Home`, + label: `${$t(`common.home`)}`, route: `/`, }, }}