feat: add sight short_name and sight features

This commit is contained in:
2026-04-19 22:36:14 +03:00
parent beb9e932ef
commit 938a7e6d1e
7 changed files with 84 additions and 9 deletions

View File

@@ -16,6 +16,7 @@ type MediaItem = {
type SightLanguageInfo = {
name: string;
short_name: string;
address: string;
left: {
heading: string;
@@ -61,18 +62,21 @@ const initialSightState: SightBaseInfo = {
video_preview: null,
ru: {
name: "",
short_name: "",
address: "",
left: { heading: "", body: "", media: [] },
right: [],
},
en: {
name: "",
short_name: "",
address: "",
left: { heading: "", body: "", media: [] },
right: [],
},
zh: {
name: "",
short_name: "",
address: "",
left: { heading: "", body: "", media: [] },
right: [],
@@ -494,6 +498,7 @@ class CreateSightStore {
longitude: this.sight.longitude,
is_default_icon: this.sight.is_default_icon,
name: (this.sight[primaryLanguage].name || "").trim(),
short_name: (this.sight[primaryLanguage].short_name || "").trim(),
address: this.sight[primaryLanguage].address,
thumbnail: this.sight.thumbnail,
icon: this.sight.icon,
@@ -522,6 +527,7 @@ class CreateSightStore {
longitude: this.sight.longitude,
is_default_icon: this.sight.is_default_icon,
name: (this.sight[lang].name || "").trim(),
short_name: (this.sight[lang].short_name || "").trim(),
address: this.sight[lang].address,
thumbnail: this.sight.thumbnail,
icon: this.sight.icon,