feat(v0.1.4): Fix i18n imports + Default open registration
## Changes ### i18n Module Fixes - Fix import paths in service.ts, languageSelector.tsx, header.tsx, base.tsx, results.tsx - Change from '../i18n' to '../i18n/index' or './index' for proper module resolution ### Registration (Breaking Change) - Change ACCOUNT_REGISTRATION default from false to true (out-of-box ready) - Login and Register pages now both visible by default ### Version Bump - Update package.json to v0.1.4 - Update CHANGELOG.md with v0.1.4 release notes - Update README.md and docs with new version numbers ### Build Verification - bun run build: PASSED - Docker build: PASSED - TypeScript compilation: PASSED (no errors)
This commit is contained in:
parent
5c68308c36
commit
558d638df8
17 changed files with 266 additions and 234 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { version } from "../../package.json";
|
||||
import { type SupportedLocale, defaultLocale, getTranslations } from "../i18n";
|
||||
import { type SupportedLocale, defaultLocale, getTranslations } from "../i18n/index";
|
||||
|
||||
export const BaseHtml = ({
|
||||
children,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { type SupportedLocale, type Translator, createTranslator, defaultLocale } from "../i18n";
|
||||
import { type SupportedLocale, type Translator, createTranslator, defaultLocale } from "../i18n/index";
|
||||
import { LanguageSelector } from "./languageSelector";
|
||||
|
||||
export const Header = ({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { supportedLocales, type SupportedLocale, type Translator } from "../i18n";
|
||||
import { supportedLocales, type SupportedLocale, type Translator } from "../i18n/index";
|
||||
|
||||
export const LanguageSelector = ({
|
||||
currentLocale,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
// 預設開放註冊(開箱即用),管理者可設為 false 來關閉
|
||||
export const ACCOUNT_REGISTRATION =
|
||||
process.env.ACCOUNT_REGISTRATION?.toLowerCase() === "true" || false;
|
||||
process.env.ACCOUNT_REGISTRATION?.toLowerCase() !== "false";
|
||||
|
||||
export const HTTP_ALLOWED = process.env.HTTP_ALLOWED?.toLowerCase() === "true" || false;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {
|
|||
createTranslator,
|
||||
detectLocale,
|
||||
getLocale,
|
||||
} from "../i18n";
|
||||
} from "./index";
|
||||
|
||||
/**
|
||||
* Elysia plugin for i18n/locale handling
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { ALLOW_UNAUTHENTICATED, WEBROOT } from "../helpers/env";
|
|||
import { DownloadIcon } from "../icons/download";
|
||||
import { DeleteIcon } from "../icons/delete";
|
||||
import { EyeIcon } from "../icons/eye";
|
||||
import { type SupportedLocale, type Translator, createTranslator, defaultLocale } from "../i18n";
|
||||
import { type SupportedLocale, type Translator, createTranslator, defaultLocale } from "../i18n/index";
|
||||
import { localeService } from "../i18n/service";
|
||||
import { userService } from "./user";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue