Compare commits
6 Commits
footerImpr
...
m2
| Author | SHA1 | Date | |
|---|---|---|---|
| 55c7a2097f | |||
| 4b6e4af86d | |||
|
|
b58068d108 | ||
|
|
f9d1556ce9 | ||
| 0900d51954 | |||
| 0ec897bcd0 |
@@ -30,8 +30,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
|
||||
const [dnsVerified, setDnsVerified] = useState({
|
||||
cname: false,
|
||||
ns: false,
|
||||
a: false,
|
||||
ip: false
|
||||
a: false
|
||||
});
|
||||
|
||||
// Form validation
|
||||
@@ -62,7 +61,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
|
||||
}
|
||||
|
||||
validateForm();
|
||||
}, [useCustomDomain, dnsVerified.cname, dnsVerified.ns, dnsVerified.ns, domainType, dnsMethod]);
|
||||
}, [useCustomDomain, dnsVerified.cname, dnsVerified.ns, domainType, dnsMethod]);
|
||||
|
||||
// Show toast notification
|
||||
const showToast = (message) => {
|
||||
@@ -111,8 +110,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
|
||||
setDnsVerified({
|
||||
cname: false,
|
||||
ns: false,
|
||||
a: false,
|
||||
ip: false
|
||||
a: false
|
||||
});
|
||||
} else {
|
||||
// Force SiliconPin subdomain to be checked if custom domain is checked
|
||||
@@ -189,23 +187,45 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
|
||||
setValidationMessage('');
|
||||
setShowDnsConfig(false);
|
||||
|
||||
// Simulate an API call to validate the domain
|
||||
setTimeout(() => {
|
||||
// Simulate a real domain check - in a real app this would be an API call
|
||||
const checkResult = true; // Assume domain is valid for demo
|
||||
fetch('/validate-domain', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
domain,
|
||||
type: domainType
|
||||
})
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
const checkResult = data.status === "success";
|
||||
console.log("finding:: checkResult:: ", checkResult, data);
|
||||
|
||||
setIsValidating(false);
|
||||
setIsValidDomain(checkResult);
|
||||
setIsValidating(false);
|
||||
setIsValidDomain(checkResult);
|
||||
|
||||
if (checkResult) {
|
||||
setValidationMessage('Domain is valid and registered.');
|
||||
setShowDnsConfig(true);
|
||||
} else {
|
||||
setValidationMessage('Domain appears to be unregistered or unavailable.');
|
||||
}
|
||||
if (checkResult) {
|
||||
setValidationMessage('Domain is valid and registered.');
|
||||
setShowDnsConfig(true);
|
||||
} else {
|
||||
setValidationMessage('Domain appears to be unregistered or unavailable.');
|
||||
}
|
||||
|
||||
validateForm();
|
||||
}, 1500);
|
||||
validateForm();
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error validating domain:', error);
|
||||
setIsValidating(false);
|
||||
setIsValidDomain(false);
|
||||
setValidationMessage('Error checking domain. Please try again.');
|
||||
validateForm();
|
||||
});
|
||||
};
|
||||
|
||||
// Check DNS configuration
|
||||
@@ -248,10 +268,6 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
|
||||
setFormValid(false);
|
||||
return;
|
||||
}
|
||||
if (dnsMethod === 'ip' && !dnsVerified.ip) {
|
||||
setFormValid(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
setFormValid(true);
|
||||
@@ -267,7 +283,20 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
|
||||
}
|
||||
|
||||
// In a real app, this would submit the form data to the server
|
||||
console.log([{ deploymentType, appType, sampleWebAppType, sourceType, repoUrl, deploymentKey, useSubdomain, useCustomDomain, customDomain, customSubdomain, domainType, dnsMethod}]);
|
||||
console.log({
|
||||
deploymentType,
|
||||
appType,
|
||||
sampleWebAppType,
|
||||
sourceType,
|
||||
repoUrl,
|
||||
deploymentKey,
|
||||
useSubdomain,
|
||||
useCustomDomain,
|
||||
customDomain,
|
||||
customSubdomain,
|
||||
domainType,
|
||||
dnsMethod
|
||||
});
|
||||
|
||||
showToast('Form submitted successfully!');
|
||||
};
|
||||
@@ -543,10 +572,9 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
|
||||
|
||||
{/* Domain Validation */}
|
||||
<button
|
||||
disabled={!customDomain}
|
||||
type="button"
|
||||
onClick={validateDomain}
|
||||
className={`px-4 py-2 ${!customDomain ? 'bg-neutral-600 cursor-not-allowed' : 'bg-[#6d9e37] focus:ring-[#6d9e37] transition-colors'} text-white font-medium rounded-md transition-colors focus:outline-none`}
|
||||
className="px-4 py-2 bg-neutral-600 text-white font-medium rounded-md hover:bg-neutral-500 transition-colors focus:outline-none focus:ring-2 focus:ring-neutral-500"
|
||||
>
|
||||
Validate Domain
|
||||
</button>
|
||||
@@ -576,7 +604,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
|
||||
|
||||
{/* CNAME Record Option */}
|
||||
<div className="p-4 bg-neutral-700/30 rounded-md border border-neutral-600 space-y-3">
|
||||
<label for="dns-cname" className="flex items-start cursor-pointer">
|
||||
<div className="flex items-start">
|
||||
<input
|
||||
type="radio"
|
||||
id="dns-cname"
|
||||
@@ -616,114 +644,67 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Nameserver Option (only for full domains, not subdomains) */}
|
||||
{domainType === 'domain' && (
|
||||
<>
|
||||
<div className="p-4 bg-neutral-700/30 rounded-md border border-neutral-600 space-y-3">
|
||||
<label for="dns-ns" className="flex items-start cursor-pointer">
|
||||
<input
|
||||
type="radio"
|
||||
id="dns-ns"
|
||||
name="dns-method"
|
||||
value="ns"
|
||||
checked={dnsMethod === 'ns'}
|
||||
onChange={handleDnsMethodChange}
|
||||
className="mt-1 mr-2"
|
||||
/>
|
||||
<div className="flex-1">
|
||||
<label htmlFor="dns-ns" className="block text-white font-medium">Use Our Nameservers</label>
|
||||
<p className="text-sm text-neutral-300">Update your domain's nameservers to use ours</p>
|
||||
<div className="p-4 bg-neutral-700/30 rounded-md border border-neutral-600 space-y-3">
|
||||
<div className="flex items-start">
|
||||
<input
|
||||
type="radio"
|
||||
id="dns-ns"
|
||||
name="dns-method"
|
||||
value="ns"
|
||||
checked={dnsMethod === 'ns'}
|
||||
onChange={handleDnsMethodChange}
|
||||
className="mt-1 mr-2"
|
||||
/>
|
||||
<div className="flex-1">
|
||||
<label htmlFor="dns-ns" className="block text-white font-medium">Use Our Nameservers</label>
|
||||
<p className="text-sm text-neutral-300">Update your domain's nameservers to use ours</p>
|
||||
|
||||
<div className="mt-3 space-y-2">
|
||||
<div className="flex items-center">
|
||||
<div className="bg-neutral-800 p-2 rounded font-mono text-sm text-neutral-300">ns1.siliconpin.com</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => copyToClipboard('ns1.siliconpin.com')}
|
||||
className="ml-2 text-[#6d9e37] hover:text-white"
|
||||
aria-label="Copy nameserver value"
|
||||
>
|
||||
<span className="text-lg">📋</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center">
|
||||
<div className="bg-neutral-800 p-2 rounded font-mono text-sm text-neutral-300">ns2.siliconpin.com</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => copyToClipboard('ns2.siliconpin.com')}
|
||||
className="ml-2 text-[#6d9e37] hover:text-white"
|
||||
aria-label="Copy nameserver value"
|
||||
>
|
||||
<span className="text-lg">📋</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mt-2 text-right">
|
||||
<div className="mt-3 space-y-2">
|
||||
<div className="flex items-center">
|
||||
<div className="bg-neutral-800 p-2 rounded font-mono text-sm text-neutral-300">ns1.siliconpin.com</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => checkDnsConfig('ns')}
|
||||
className={`px-3 py-1 text-white text-sm rounded
|
||||
${dnsVerified.ns
|
||||
? 'bg-green-700 hover:bg-green-600'
|
||||
: 'bg-neutral-600 hover:bg-neutral-500'}`}
|
||||
onClick={() => copyToClipboard('ns1.siliconpin.com')}
|
||||
className="ml-2 text-[#6d9e37] hover:text-white"
|
||||
aria-label="Copy nameserver value"
|
||||
>
|
||||
{dnsVerified.ns ? '✓ Nameservers Verified' : 'Check Nameservers'}
|
||||
<span className="text-lg">📋</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center">
|
||||
<div className="bg-neutral-800 p-2 rounded font-mono text-sm text-neutral-300">ns2.siliconpin.com</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => copyToClipboard('ns2.siliconpin.com')}
|
||||
className="ml-2 text-[#6d9e37] hover:text-white"
|
||||
aria-label="Copy nameserver value"
|
||||
>
|
||||
<span className="text-lg">📋</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className="p-4 bg-neutral-700/30 rounded-md border border-neutral-600 space-y-3">
|
||||
<label for="dns-ip" className="flex items-start cursor-pointer">
|
||||
<input
|
||||
type="radio"
|
||||
id="dns-ip"
|
||||
name="dns-method"
|
||||
value="ip"
|
||||
checked={dnsMethod === 'ip'}
|
||||
onChange={handleDnsMethodChange}
|
||||
className="mt-1 mr-2"
|
||||
/>
|
||||
<div className="flex-1">
|
||||
<label htmlFor="dns-ip" className="block text-white font-medium">Use Our IP Address</label>
|
||||
<p className="text-sm text-neutral-300">Update your domain's nameservers to use ours</p>
|
||||
|
||||
<div className="mt-3 space-y-2">
|
||||
<div className="flex items-center">
|
||||
<div className="bg-neutral-800 p-2 rounded font-mono text-sm text-neutral-300">xxx.xxx.x.xx</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => copyToClipboard('xxx.xxx.x.xx')}
|
||||
className="ml-2 text-[#6d9e37] hover:text-white"
|
||||
aria-label="Copy nameserver value"
|
||||
>
|
||||
<span className="text-lg">📋</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-2 text-right">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => checkDnsConfig('ip')}
|
||||
className={`px-3 py-1 text-white text-sm rounded
|
||||
${dnsMethod === 'ip'
|
||||
? 'bg-green-700 hover:bg-green-600'
|
||||
: 'bg-neutral-600 hover:bg-neutral-500'}`}
|
||||
>
|
||||
{/* {dnsVerified.ip ? '✓ IP Address Verified' : 'Check IP Address'} */}
|
||||
Proceed to Pay
|
||||
</button>
|
||||
</div>
|
||||
<div className="mt-2 text-right">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => checkDnsConfig('ns')}
|
||||
className={`px-3 py-1 text-white text-sm rounded
|
||||
${dnsVerified.ns
|
||||
? 'bg-green-700 hover:bg-green-600'
|
||||
: 'bg-neutral-600 hover:bg-neutral-500'}`}
|
||||
>
|
||||
{dnsVerified.ns ? '✓ Nameservers Verified' : 'Check Nameservers'}
|
||||
</button>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
@@ -733,6 +714,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Form Submit Button */}
|
||||
<button
|
||||
type="submit"
|
||||
@@ -746,6 +728,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
|
||||
Start the Deployment
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<Toast visible={toast.visible} message={toast.message} />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -24,17 +24,17 @@ const pageImage = "https://images.unsplash.com/photo-1551731409-43eb3e517a1a?q=8
|
||||
<div class="max-w-4xl mx-auto space-y-12">
|
||||
<section class="bg-neutral-800 rounded-lg p-6 sm:p-8 border border-neutral-700">
|
||||
<h2 class="text-2xl font-bold text-white mb-4">Our Story</h2>
|
||||
<p class="text-neutral-300 mb-4 text-justify">
|
||||
<p class="text-neutral-300 mb-4">
|
||||
SiliconPin was founded in 2021 with a clear mission: to provide businesses of all sizes with reliable, high-performance hosting solutions that enable growth and innovation. What started as a small team of passionate developers and system administrators has grown into a trusted hosting provider serving clients across various industries.
|
||||
</p>
|
||||
<p class="text-neutral-300 text-justify">
|
||||
<p class="text-neutral-300">
|
||||
Based in Habra, West Bengal, India, our team combines technical expertise with a deep understanding of business needs to deliver hosting solutions that are not just technically sound but also aligned with our clients' business objectives.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="bg-neutral-800 rounded-lg p-6 sm:p-8 border border-neutral-700">
|
||||
<h2 class="text-2xl font-bold text-white mb-4">Our Mission</h2>
|
||||
<p class="text-neutral-300 text-justify">
|
||||
<p class="text-neutral-300">
|
||||
At SiliconPin, our mission is to empower businesses through technology by providing reliable, secure, and scalable hosting solutions. We believe that technology should enable businesses to focus on what they do best, without worrying about infrastructure management or technical complexities.
|
||||
</p>
|
||||
</section>
|
||||
@@ -44,25 +44,25 @@ const pageImage = "https://images.unsplash.com/photo-1551731409-43eb3e517a1a?q=8
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<h3 class="text-xl font-medium text-[#6d9e37] mb-2">Reliability</h3>
|
||||
<p class="text-neutral-300 text-justify">
|
||||
<p class="text-neutral-300">
|
||||
We understand that downtime means lost business. That's why we prioritize reliability in everything we do, from our infrastructure to our customer service.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-xl font-medium text-[#6d9e37] mb-2">Security</h3>
|
||||
<p class="text-neutral-300 text-justify">
|
||||
<p class="text-neutral-300">
|
||||
In an increasingly digital world, security is paramount. We implement robust security measures to protect our clients' data and applications.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-xl font-medium text-[#6d9e37] mb-2">Innovation</h3>
|
||||
<p class="text-neutral-300 text-justify">
|
||||
<p class="text-neutral-300">
|
||||
We continuously explore new technologies and methodologies to improve our services and provide our clients with cutting-edge solutions.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-xl font-medium text-[#6d9e37] mb-2">Customer Focus</h3>
|
||||
<p class="text-neutral-300 text-justify">
|
||||
<p class="text-neutral-300">
|
||||
Our clients' success is our success. We work closely with our clients to understand their needs and provide tailored solutions that help them achieve their goals.
|
||||
</p>
|
||||
</div>
|
||||
@@ -71,7 +71,7 @@ const pageImage = "https://images.unsplash.com/photo-1551731409-43eb3e517a1a?q=8
|
||||
|
||||
<section class="bg-neutral-800 rounded-lg p-6 sm:p-8 border border-neutral-700">
|
||||
<h2 class="text-2xl font-bold text-white mb-4">Why Choose SiliconPin?</h2>
|
||||
<ul class="list-disc list-inside space-y-3 text-neutral-300 text-justify">
|
||||
<ul class="list-disc list-inside space-y-3 text-neutral-300">
|
||||
<li>24/7 expert technical support</li>
|
||||
<li>99.9% uptime guarantee</li>
|
||||
<li>Scalable infrastructure to grow with your business</li>
|
||||
|
||||
@@ -133,7 +133,7 @@ const contactSchema = {
|
||||
<span class="text-neutral-300 font-medium">Sunday:</span>
|
||||
<span class="text-white">Closed</span>
|
||||
</div>
|
||||
<div class="pt-3 border-t border-neutral-700 flex items-center justify-between">
|
||||
<div class="pt-3 border-t border-neutral-700">
|
||||
<span class="text-neutral-300">Technical Support:</span>
|
||||
<span class="text-[#6d9e37] font-semibold block mt-1">24/7</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user