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="/contact" element={<Contact />} />
<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>
</Layout>
</Router>

View file

@ -31,7 +31,7 @@ const Header: React.FC = () => {
{ name: t("nav.services"), path: "/services" },
{ name: t("nav.blog"), path: "/blog" },
{ 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 (

View file

@ -277,7 +277,7 @@ const translations = {
"contact.info.title": "İletişim Bilgileri",
"contact.address": "Adres",
"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.email": "E-posta",
"contact.taxOffice": "Vergi Dairesi",
@ -386,7 +386,7 @@ const translations = {
"footer.quickLinksTitle": "Hızlı Bağlantılar",
"footer.servicesTitle": "Hizmetlerimiz",
"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.privacyPolicy": "Gizlilik Politikası",
"footer.termsOfUse": "Kullanım Şartları",
@ -668,7 +668,7 @@ const translations = {
"contact.info.title": "Contact Information",
"contact.address": "Address",
"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.email": "Email",
"contact.taxOffice": "Tax Office",
@ -776,7 +776,7 @@ const translations = {
"footer.quickLinksTitle": "Quick Links",
"footer.servicesTitle": "Our Services",
"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.privacyPolicy": "Privacy Policy",
"footer.termsOfUse": "Terms of Use",

View file

@ -38,7 +38,7 @@ const Contact: React.FC = () => {
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
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 {
const response = await fetch(apiUrl, {

View file

@ -1 +1,11 @@
/// <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,
"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_REACT_APP_VERSION=$npm_package_version
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/'
API_ROOTNAMESPACE='Kurs.Platform'
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/'
API_ROOTNAMESPACE='Kurs.Platform'
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"
}, {
"url": "index.html",
"revision": "0.952ffulqdco"
"revision": "0.ahaqbcsu15g"
}], {});
workbox.cleanupOutdatedCaches();
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">
<Card className="min-w-[320px] md:min-w-[450px]" bodyClass="md:p-10">
<a
href="https://sozsoft.com"
href={import.meta.env.VITE_COMPANY_URL}
rel="noopener noreferrer"
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 [loading, setLoading] = useState(false)
const navigate = useNavigate()
const isMultiTenant = useStoreState((a) => a.abpConfig.config?.multiTenancy.isEnabled)
const { setTenantId } = useStoreActions((a) => a.auth)
@ -178,23 +177,6 @@ const Login = () => {
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) => {
return (
<components.SingleValue {...props}>
@ -245,6 +227,7 @@ const Login = () => {
const { config } = useStoreState((state) => state.abpConfig)
const { setLang } = useStoreActions((actions) => actions.locale)
const currentCulture = config?.localization?.currentCulture?.cultureName
const languageList = config?.localization.languages
const languageOptions = useMemo(() => {
@ -258,18 +241,10 @@ const Login = () => {
)
}, [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) => {
setLoading(true)
const dispatchLang = () => {
i18n.changeLanguage(cultureName)
setLang(cultureName)
setLoading(false)
}
if (dateLocales[cultureName]) {
@ -297,6 +272,8 @@ const Login = () => {
}
}, [isMultiTenant])
console.log(currentCulture)
return (
<motion.div
initial={{ opacity: 0, x: 100 }}
@ -334,7 +311,7 @@ const Login = () => {
Option: CustomSelectOption,
SingleValue: CustomSingleValue,
}}
defaultValue={selectedLang}
value={languageOptions.find((lang) => lang.cultureName === currentCulture)}
onChange={(option) => onLanguageSelect(option?.value)}
className="mb-4"
/>

View file

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