From 1087372a22a249225b7047a9320975e8a44f7800 Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Tue, 31 Oct 2023 18:38:13 +0800 Subject: [PATCH] center: update project-single hbs --- binary/center/templates/css/input.css | 59 +++++++++++++++ binary/center/templates/project-single.hbs | 87 +++++++++++++--------- binary/center/templates/signin.hbs | 18 +++-- 3 files changed, 119 insertions(+), 45 deletions(-) diff --git a/binary/center/templates/css/input.css b/binary/center/templates/css/input.css index 096f924a..6f91afe5 100644 --- a/binary/center/templates/css/input.css +++ b/binary/center/templates/css/input.css @@ -106,3 +106,62 @@ #sign-in-button { @apply text-xl px-4 py-2 bg-primary rounded-lg text-white hover:bg-white hover:border hover:border-primary hover:text-primary; } +#project-navbar { + @apply font-medium text-center text-gray-500 border-b border-gray-200; +} +#project-navbar li { + @apply mr-2; +} +#project-navbar li a.item { + @apply inline-block p-4 border-b-2 border-transparent rounded-t-lg hover:text-gray-600 hover:border-gray-300; +} +#project-navbar li a.item.active { + @apply text-primary border-primary hover:text-primary hover:border-primary; +} +#project-navbar li a.item.disable { + @apply cursor-not-allowed text-gray-400 hover:text-gray-400 hover:border-transparent; +} +#project-main { + @apply mt-6 flex space-x-4; +} +#project-main > .left { + @apply w-3/4; +} +#project-main > .right { + @apply w-1/4; +} +#project-main .deployment-status { + @apply bg-sky-50 rounded-lg p-6; +} +#project-main .deployment-status h3, +.deployment-lists h3 { + @apply text-xl font-semibold; +} +#project-main .deployment-status .desc, +.deployment-lists .desc, +#deployment-list .date { + @apply text-gray-400; +} +#project-main .deployment-status p { + @apply leading-6; +} +#project-main .deployment-status .label { + @apply mt-6 text-gray-400 uppercase; +} +#project-main .deployment-status .domains .link, +#deployment-list .link { + @apply hover:underline; +} + +.deployment-lists { + @apply p-6 border rounded-lg border-gray-200 my-4; +} +#deployment-list { + @apply mt-4; +} +#deployment-list .item { + @apply py-3 flex justify-between; +} +#deployment-list .prod-badge { + @apply px-1 py-0.5 text-sm text-white bg-blue-500 rounded-lg; +} diff --git a/binary/center/templates/project-single.hbs b/binary/center/templates/project-single.hbs index 8f53da5f..683825b0 100644 --- a/binary/center/templates/project-single.hbs +++ b/binary/center/templates/project-single.hbs @@ -13,49 +13,62 @@ PENDING PRODUCTION DEPLOYMENT
- +
-
-
-
-
-
spryest-pyknoses-242
- - +
+
+
+

Production Deployment

+

This project is in Production.

+ -
- Running +
+

updated

+

3 Days ago

-
-
-
spryest-pyknoses-242
- -
-
- Running -
+ +
+

All Deployments

+

All deployments for this project.

+
+
w-1/4
{{> partials/footer.hbs}} diff --git a/binary/center/templates/signin.hbs b/binary/center/templates/signin.hbs index 4c0561a2..0a1a9305 100644 --- a/binary/center/templates/signin.hbs +++ b/binary/center/templates/signin.hbs @@ -24,17 +24,19 @@ afterSignUpUrl: "/projects", }); - // if clerk is signed in, redirect to projects page - if (window.Clerk.session && window.Clerk.user) { - await window.Clerk.navigate('/projects'); // TODO: target should from query string "redirect=xxx" - return; - } - - let show = function () { + let show = async function () { if (!window.Clerk.isReady()) { return } clearInterval(window.intervalID) + + // if clerk is signed in, redirect to projects page + if (window.Clerk.session && window.Clerk.user) { + await window.Clerk.navigate('/projects'); // TODO: target should from query string "redirect=xxx" + return; + } + + // render ui const signInComponent = document.querySelector('#sign-in'); window.Clerk.openSignIn(signInComponent, { appearance: { @@ -47,7 +49,7 @@ button.disabled = false; button.textContent = "Sign-in via Clerk.js" } - + window.intervalID = setInterval(show, 200); }