-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Platform UI - ldflag stuff Signed-off-by: Kial Jinnah <[email protected]> * Allow vhtml in header Signed-off-by: Kial Jinnah <[email protected]> * forgot to save this file in previous commit Signed-off-by: Kial Jinnah <[email protected]> * tweak Signed-off-by: Kial Jinnah <[email protected]> --------- Signed-off-by: Kial Jinnah <[email protected]>
- Loading branch information
Showing
7 changed files
with
101 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<script setup lang="ts"> | ||
const ldStore = useConnectLaunchdarklyStore() | ||
const { $sanitize } = useNuxtApp() | ||
defineProps({ | ||
dismissible: { type: Boolean, default: false }, | ||
icon: { type: String, default: 'i-mdi-information' } | ||
}) | ||
const close = ref(false) | ||
const message = ref('') | ||
onMounted(async () => { | ||
await ldStore.ldClient?.waitUntilReady() | ||
message.value = $sanitize(ldStore.getStoredFlag('banner-text')?.trim()) | ||
}) | ||
</script> | ||
|
||
<template> | ||
<UAlert | ||
v-show="!!message && !close" | ||
class="border-b-2 border-yellow-400 py-0" | ||
color="yellow" | ||
:description="message" | ||
variant="solid" | ||
:close-button="dismissible ? { class: 'pr-2 text-gray-900' } : null" | ||
:ui="{ rounded: 'rounded-none', padding: 'p-0', gap: 'app-inner-container py-2' }" | ||
@close="close = true" | ||
> | ||
<template #icon> | ||
<!-- NB: needed due to icon sizing via app.config / ui config for alert is not getting applied --> | ||
<UIcon class="ml-[-2px] text-[34px]" :name="icon" /> | ||
</template> | ||
<template #description> | ||
<!-- eslint-disable vue/no-v-html tailwindcss/no-custom-classname --> | ||
<p class="vhtml text-gray-900" v-html="message" /> | ||
</template> | ||
</UAlert> | ||
</template> | ||
<!-- must style globally for vhtml style to work --> | ||
<style> | ||
.vhtml > a { | ||
color: #212529; | ||
text-decoration: underline; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<template> | ||
<div class="app-container" data-testid="platform-registration-layout"> | ||
<ConnectHeader /> | ||
<ConnectSystemBanner /> | ||
<ConnectBreadcrumb /> | ||
<main class="app-inner-container app-body"> | ||
<slot /> | ||
</main> | ||
<ConnectFooter /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default defineNuxtRouteMiddleware(async () => { | ||
const { ldClient, getStoredFlag } = useConnectLaunchdarklyStore() | ||
await ldClient?.waitUntilReady() | ||
if (!getStoredFlag('enable-public-users')) { | ||
return navigateTo({ path: useLocalePath()('/comingSoon') }) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script setup lang="ts"> | ||
const { t } = useI18n() | ||
// page stuff | ||
useHead({ | ||
title: t('platform.title.comingSoon') | ||
}) | ||
definePageMeta({ | ||
path: '/comingSoon' | ||
}) | ||
setBreadcrumbs([ | ||
{ label: t('label.bcregDash'), to: useRuntimeConfig().public.registryHomeURL + 'dashboard' }, | ||
{ label: t('platform.title.dashboard') } | ||
]) | ||
</script> | ||
<template> | ||
<div class="py-14 text-center"> | ||
<ConnectTypographyH1 :text="$t('platform.title.comingSoon')" /> | ||
<p class="pt-3"> | ||
{{ $t('platform.text.comingSoon') }} | ||
</p> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "strr-pm-web", | ||
"name": "strr-platform-web", | ||
"private": true, | ||
"type": "module", | ||
"version": "0.0.1", | ||
|