Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Custom Domains Wizard and List #64

Merged
merged 2 commits into from
Oct 18, 2022
Merged

Conversation

stnguyen90
Copy link
Contributor

What does this PR do?

Implement Custom Domains List and Wizard.

Test Plan

Manual

Related PRs and Issues

None

Have you read the Contributing Guidelines on issues?

Yes

@vercel
Copy link

vercel bot commented Oct 6, 2022

@stnguyen90 is attempting to deploy a commit to the appwrite Team on Vercel.

To accomplish this, @stnguyen90 needs to request access to the Team.

Afterwards, an owner of the Team is required to accept their membership request.

If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account.

@vercel
Copy link

vercel bot commented Oct 7, 2022

An owner of the appwrite Team on Vercel accepted @stnguyen90's request to join.

@stnguyen90's commit is now being deployed.

@vercel
Copy link

vercel bot commented Oct 7, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
console ✅ Ready (Inspect) Visit Preview Oct 17, 2022 at 9:18PM (UTC)

export let maxlength: number = null;

// https://stackoverflow.com/questions/10306690/what-is-a-regular-expression-which-will-match-a-valid-domain-name-without-a-subd
const pattern = String.raw`^((?!-))(xn--)?[a-z0-9][a-z0-9-_]{0,61}[a-z0-9]{0,1}\.(xn--)?([a-z0-9-]{1,61}|[a-z0-9-]{1,30}\.[a-z]{2,})$`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested various domains, but they are always invalid, is this pattern correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops looks like it wasn't working for more subdomains.

{#if isVerifying[domain.$id]}
<div
class="loader"
style="color: hsl(var(--color-neutral-50)); inline-size: 1.25rem; block-size: 1.25rem" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably let the UI library handle all these inline styles. Let's add a TODO: remove inline styles to the file remember :)

import { domain } from './store';

const parts = $domain.name.split('.');
const registerable = [parts[parts.length - 2], parts[parts.length - 1]].join('.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this work for api.appwrite.example.com?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems right:

image

Although, I'm not sure what the expected outcome is for something like example.com:

image

@TorstenDittmann
Copy link
Contributor

@stnguyen90 the interceptor is merged now 👍🏻

@stnguyen90
Copy link
Contributor Author

  1. Updated Step 1 to create domain
  2. Fixed TLS status on domain list to not show tooltip when already enabled

@stnguyen90
Copy link
Contributor Author

@stnguyen90 the interceptor is merged now 👍🏻

@TorstenDittmann, updated!

@TorstenDittmann TorstenDittmann merged commit 7a0f5fb into main Oct 18, 2022
@TorstenDittmann TorstenDittmann deleted the feat-custom-domains branch October 18, 2022 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants