Ui ve Company .env değişiklikleri

This commit is contained in:
Sedat ÖZTÜRK 2025-05-30 14:27:38 +03:00
parent 2e62cfa950
commit 39bcf390c5
16 changed files with 41 additions and 44 deletions

View file

@ -1 +1,3 @@
VITE_API_BASE_URL='https://localhost:44344' VITE_APPLICATION_BASEURL='http://localhost:3003/'
VITE_API_URL='https://localhost:44344'
VITE_KURS_URL='http://localhost:3000/'

View file

@ -1 +1,3 @@
VITE_API_BASE_URL='https://kurs-dev-api.sozsoft.com' VITE_APPLICATION_BASEURL='https://sozsoft.com'
VITE_API_URL='https://kurs-dev-api.sozsoft.com'
VITE_KURS_URL='https://kurs-dev.sozsoft.com'

View file

@ -1 +1,3 @@
VITE_API_BASE_URL='https://kurs-api.sozsoft.com' VITE_APPLICATION_BASEURL='https://sozsoft.com'
VITE_API_URL='https://kurs-api.sozsoft.com'
VITE_KURS_URL='https://kurs.sozsoft.com'

View file

@ -24,7 +24,7 @@ function App() {
<Route path="/blog" element={<Blog />} /> <Route path="/blog" element={<Blog />} />
<Route path="/contact" element={<Contact />} /> <Route path="/contact" element={<Contact />} />
<Route path="/blog/:id" element={<BlogDetail />} /> <Route path="/blog/:id" element={<BlogDetail />} />
<Route path="*" element={<NotFound />} /> {/* Eşleşmeyen tüm yollar için 404 sayfasını göster */} <Route path="*" element={<NotFound />} />
</Routes> </Routes>
</Layout> </Layout>
</Router> </Router>

View file

@ -31,7 +31,7 @@ const Header: React.FC = () => {
{ name: t("nav.services"), path: "/services" }, { name: t("nav.services"), path: "/services" },
{ name: t("nav.blog"), path: "/blog" }, { name: t("nav.blog"), path: "/blog" },
{ name: t("nav.contact"), path: "/contact" }, { name: t("nav.contact"), path: "/contact" },
{ name: t("nav.demo"), path: "https://kurs.sozsoft.com" }, { name: t("nav.demo"), path: import.meta.env.VITE_KURS_URL },
]; ];
return ( return (

View file

@ -277,7 +277,7 @@ const translations = {
"contact.info.title": "İletişim Bilgileri", "contact.info.title": "İletişim Bilgileri",
"contact.address": "Adres", "contact.address": "Adres",
"contact.address.full": "contact.address.full":
"Barbaros Mah. Ahlat Sok. Varyap Meridian Sitesi D1 Blok Daire 115 Kat 14 PK:34746 Ataşehir İstanbul", "Esenşehir Mah. Baraj Yolu Cad. Kemerdere Mevkii No:17 Ağaoglu Eltes Güneşi Sitesi C5 Blok Daire 36 PK:34776 Ümraniye İstanbul",
"contact.phone": "Telefon", "contact.phone": "Telefon",
"contact.email": "E-posta", "contact.email": "E-posta",
"contact.taxOffice": "Vergi Dairesi", "contact.taxOffice": "Vergi Dairesi",
@ -386,7 +386,7 @@ const translations = {
"footer.quickLinksTitle": "Hızlı Bağlantılar", "footer.quickLinksTitle": "Hızlı Bağlantılar",
"footer.servicesTitle": "Hizmetlerimiz", "footer.servicesTitle": "Hizmetlerimiz",
"footer.address": "footer.address":
"Barbaros Mah. Ahlat Sok. Varyap Meridian Sitesi D1 Blok Daire 115 Kat 14 PK:34746 Ataşehir İstanbul", "Esenşehir Mah. Baraj Yolu Cad. Kemerdere Mevkii No:17 Ağaoglu Eltes Güneşi Sitesi C5 Blok Daire 36 PK:34776 Ümraniye İstanbul",
"footer.copyright": "Tüm hakları saklıdır.", "footer.copyright": "Tüm hakları saklıdır.",
"footer.privacyPolicy": "Gizlilik Politikası", "footer.privacyPolicy": "Gizlilik Politikası",
"footer.termsOfUse": "Kullanım Şartları", "footer.termsOfUse": "Kullanım Şartları",
@ -668,7 +668,7 @@ const translations = {
"contact.info.title": "Contact Information", "contact.info.title": "Contact Information",
"contact.address": "Address", "contact.address": "Address",
"contact.address.full": "contact.address.full":
"Barbaros Mah. Ahlat Sok. Varyap Meridian Sitesi D1 Blok Daire 115 Kat 14 PK:34746 Ataşehir İstanbul", "Esenşehir Mah. Baraj Yolu Cad. Kemerdere Mevkii No:17 Ağaoglu Eltes Güneşi Sitesi C5 Blok Daire 36 PK:34776 Ümraniye İstanbul",
"contact.phone": "Phone", "contact.phone": "Phone",
"contact.email": "Email", "contact.email": "Email",
"contact.taxOffice": "Tax Office", "contact.taxOffice": "Tax Office",
@ -776,7 +776,7 @@ const translations = {
"footer.quickLinksTitle": "Quick Links", "footer.quickLinksTitle": "Quick Links",
"footer.servicesTitle": "Our Services", "footer.servicesTitle": "Our Services",
"footer.address": "footer.address":
"Barbaros Mah. Ahlat Sok. Varyap Meridian Sitesi D1 Blok Daire 115 Kat 14 PK:34746 Ataşehir İstanbul", "Esenşehir Mah. Baraj Yolu Cad. Kemerdere Mevkii No:17 Ağaoglu Eltes Güneşi Sitesi C5 Blok Daire 36 PK:34776 Ümraniye İstanbul",
"footer.copyright": "All rights reserved.", "footer.copyright": "All rights reserved.",
"footer.privacyPolicy": "Privacy Policy", "footer.privacyPolicy": "Privacy Policy",
"footer.termsOfUse": "Terms of Use", "footer.termsOfUse": "Terms of Use",

View file

@ -38,7 +38,7 @@ const Contact: React.FC = () => {
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => { const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault(); e.preventDefault();
const apiUrl = `${import.meta.env.VITE_API_BASE_URL}/api/app/demo/demo-form`; const apiUrl = `${import.meta.env.VITE_API_URL}/api/app/demo/demo-form`;
try { try {
const response = await fetch(apiUrl, { const response = await fetch(apiUrl, {

View file

@ -1 +1,11 @@
/// <reference types="vite/client" /> /// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_APPLICATION_BASEURL: string
readonly VITE_API_URL: string
readonly VITE_KURS_URL: string
}
interface ImportMeta {
readonly env: ImportMetaEnv
}

View file

@ -20,5 +20,5 @@
"noUnusedParameters": true, "noUnusedParameters": true,
"noFallthroughCasesInSwitch": true "noFallthroughCasesInSwitch": true
}, },
"include": ["src"] "include": ["src", "src/vite-env.d.ts"]
} }

View file

@ -12,3 +12,4 @@ API_ROOTNAMESPACE='Kurs.Platform'
VITE_CDN_URL='http://localhost:4005' VITE_CDN_URL='http://localhost:4005'
VITE_REACT_APP_VERSION=$npm_package_version VITE_REACT_APP_VERSION=$npm_package_version
VITE_AI_URL='https://ai.sozsoft.com/webhook/' VITE_AI_URL='https://ai.sozsoft.com/webhook/'
VITE_COMPANY_URL='http://localhost:3003'

View file

@ -10,3 +10,4 @@ OAUTH_REQUIREHTTPS=true
VITE_API_URL='https://kurs-dev-api.sozsoft.com/' VITE_API_URL='https://kurs-dev-api.sozsoft.com/'
API_ROOTNAMESPACE='Kurs.Platform' API_ROOTNAMESPACE='Kurs.Platform'
VITE_CDN_URL='https://kurs-dev-cdn.sozsoft.com' VITE_CDN_URL='https://kurs-dev-cdn.sozsoft.com'
VITE_COMPANY_URL='https://sozsoft.com'

View file

@ -10,3 +10,4 @@ OAUTH_REQUIREHTTPS=true
VITE_API_URL='https://kurs-api.sozsoft.com/' VITE_API_URL='https://kurs-api.sozsoft.com/'
API_ROOTNAMESPACE='Kurs.Platform' API_ROOTNAMESPACE='Kurs.Platform'
VITE_CDN_URL='https://kurs-cdn.sozsoft.com' VITE_CDN_URL='https://kurs-cdn.sozsoft.com'
VITE_COMPANY_URL='https://sozsoft.com'

View file

@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812" "revision": "3ca0b8505b4bec776b69afdba2768812"
}, { }, {
"url": "index.html", "url": "index.html",
"revision": "0.952ffulqdco" "revision": "0.ahaqbcsu15g"
}], {}); }], {});
workbox.cleanupOutdatedCaches(); workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {

View file

@ -16,7 +16,7 @@ const Simple = ({ children, content, ...rest }: SimpleProps) => {
<Container className="flex flex-col flex-auto items-center justify-center min-w-0 h-full"> <Container className="flex flex-col flex-auto items-center justify-center min-w-0 h-full">
<Card className="min-w-[320px] md:min-w-[450px]" bodyClass="md:p-10"> <Card className="min-w-[320px] md:min-w-[450px]" bodyClass="md:p-10">
<a <a
href="https://sozsoft.com" href={import.meta.env.VITE_COMPANY_URL}
rel="noopener noreferrer" rel="noopener noreferrer"
className="top-0 right-0 text-gray-500 hover:text-gray-700" className="top-0 right-0 text-gray-500 hover:text-gray-700"
> >

View file

@ -49,7 +49,6 @@ const validationSchema = Yup.object().shape({
}) })
const Login = () => { const Login = () => {
const [loading, setLoading] = useState(false)
const navigate = useNavigate() const navigate = useNavigate()
const isMultiTenant = useStoreState((a) => a.abpConfig.config?.multiTenancy.isEnabled) const isMultiTenant = useStoreState((a) => a.abpConfig.config?.multiTenancy.isEnabled)
const { setTenantId } = useStoreActions((a) => a.auth) const { setTenantId } = useStoreActions((a) => a.auth)
@ -178,23 +177,6 @@ const Login = () => {
setSubmitting(false) setSubmitting(false)
} }
const CustomControl = ({ children, ...props }: any) => {
const selected = props.getValue()[0]
return (
<components.Control {...props} className="flex items-center justify-start gap-2 px-2">
{selected && (
<Avatar
className="ltr:ml-2 rtl:mr-2"
shape="circle"
size={18}
src={`/img/countries/${selected.cultureName}.png`}
/>
)}
{children}
</components.Control>
)
}
const CustomSingleValue = ({ data, ...props }: any) => { const CustomSingleValue = ({ data, ...props }: any) => {
return ( return (
<components.SingleValue {...props}> <components.SingleValue {...props}>
@ -245,6 +227,7 @@ const Login = () => {
const { config } = useStoreState((state) => state.abpConfig) const { config } = useStoreState((state) => state.abpConfig)
const { setLang } = useStoreActions((actions) => actions.locale) const { setLang } = useStoreActions((actions) => actions.locale)
const currentCulture = config?.localization?.currentCulture?.cultureName
const languageList = config?.localization.languages const languageList = config?.localization.languages
const languageOptions = useMemo(() => { const languageOptions = useMemo(() => {
@ -258,18 +241,10 @@ const Login = () => {
) )
}, [languageList]) }, [languageList])
const [selectedLang, setSelectedLang] = useState<SelectBoxOption | null>(() => {
const currentCulture = config?.localization?.currentCulture?.cultureName
return languageOptions.find((lang) => lang.cultureName === currentCulture) || null
})
const onLanguageSelect = (cultureName = appConfig.locale) => { const onLanguageSelect = (cultureName = appConfig.locale) => {
setLoading(true)
const dispatchLang = () => { const dispatchLang = () => {
i18n.changeLanguage(cultureName) i18n.changeLanguage(cultureName)
setLang(cultureName) setLang(cultureName)
setLoading(false)
} }
if (dateLocales[cultureName]) { if (dateLocales[cultureName]) {
@ -297,6 +272,8 @@ const Login = () => {
} }
}, [isMultiTenant]) }, [isMultiTenant])
console.log(currentCulture)
return ( return (
<motion.div <motion.div
initial={{ opacity: 0, x: 100 }} initial={{ opacity: 0, x: 100 }}
@ -334,7 +311,7 @@ const Login = () => {
Option: CustomSelectOption, Option: CustomSelectOption,
SingleValue: CustomSingleValue, SingleValue: CustomSingleValue,
}} }}
defaultValue={selectedLang} value={languageOptions.find((lang) => lang.cultureName === currentCulture)}
onChange={(option) => onLanguageSelect(option?.value)} onChange={(option) => onLanguageSelect(option?.value)}
className="mb-4" className="mb-4"
/> />

View file

@ -15,6 +15,7 @@ interface ImportMetaEnv {
readonly VITE_CDN_URL: string readonly VITE_CDN_URL: string
readonly VITE_REACT_APP_VERSION: string readonly VITE_REACT_APP_VERSION: string
readonly VITE_AI_URL: string readonly VITE_AI_URL: string
readonly VITE_COMPANY_URL: string
} }
interface ImportMeta { interface ImportMeta {