Lint fix and now diplaying the '/app/' prefix when previewing an app url

This commit is contained in:
Dean 2022-03-29 09:59:39 +01:00
parent af19b41c2d
commit 7e3a0046bd
2 changed files with 9 additions and 3 deletions

View File

@ -25,8 +25,12 @@
await setupValidation()
})
const appPrefix = "/app"
$: appUrl = `${window.location.origin}${
$values.url ? $values.url : `${resolveAppUrl(template, $values.name)}`
$values.url
? `${appPrefix}${$values.url}`
: `${appPrefix}${resolveAppUrl(template, $values.name)}`
}`
const resolveAppUrl = (template, name) => {
@ -161,7 +165,7 @@
/>
{#if $values.url && $values.url !== "" && !$validation.errors.url}
<div class="app-server" title={appUrl}>
{`${window.location.origin}${$values.url}`}
{appUrl}
</div>
{/if}
</span>

View File

@ -71,7 +71,9 @@
<Heading size="S">Users</Heading>
<ButtonGroup>
<Button disabled secondary>Import users</Button>
<Button primary dataCy="add-user" on:click={createUserModal.show}>Add user</Button>
<Button primary dataCy="add-user" on:click={createUserModal.show}
>Add user</Button
>
</ButtonGroup>
</div>
<div class="field">