better first interactions + bug fix

This commit is contained in:
Emily
2024-09-21 15:14:46 +02:00
parent f285e92132
commit 4eeebaa0c3
13 changed files with 381 additions and 137 deletions

View File

@@ -110,6 +110,8 @@ async function deleteProject() {
const { createAlert } = useAlert()
const activeProjectId = useActiveProjectId()
function copyScript() {
if (!navigator.clipboard) alert('You can\'t copy in HTTP');
@@ -117,7 +119,7 @@ function copyScript() {
const createScriptText = () => {
return [
'<script defer ',
`data-project="${activeProject.value?._id}" `,
`data-project="${activeProjectId.data.value}" `,
'src="https://cdn.jsdelivr.net/gh/litlyx/litlyx-js/browser/litlyx.js"></',
'script>'
].join('')
@@ -130,7 +132,7 @@ function copyScript() {
function copyProjectId() {
if (!navigator.clipboard) alert('You can\'t copy in HTTP');
navigator.clipboard.writeText(activeProject.value?._id?.toString() || '');
navigator.clipboard.writeText(activeProjectId.data.value || '');
createAlert('Success', 'Project id copied successfully.', 'far fa-circle-check', 5000);
}
@@ -186,7 +188,7 @@ function copyProjectId() {
<div><i class="far fa-copy" @click="copyScript()"></i></div>
</LyxUiCard>
</template>
<template #pdelete >
<template #pdelete>
<div class="flex justify-end" v-if="!isGuest">
<LyxUiButton type="danger" @click="deleteProject()">
Delete project

View File

@@ -23,7 +23,7 @@ const props = defineProps<SettingsTemplateProp>();
<div class="poppins font-medium text-lyx-text">
{{ entry.title }}
</div>
<div class="poppins font-regular text-lyx-text-dark">
<div class="poppins font-regular text-lyx-text-dark whitespace-pre-wrap">
{{ entry.text }}
</div>
</div>

View File

@@ -68,9 +68,9 @@ function getPremiumPrice(type: number) {
}
const entries: SettingsTemplateEntry[] = [
{ id: 'info', title: 'Billing informations', text: 'Manage billing informations for this project' },
{ id: 'plan', title: 'Current plan', text: 'Manage current plat for this project' },
{ id: 'usage', title: 'Usage', text: 'Show usage of current project' },
{ id: 'info', title: 'Billing address', text: 'This will be reflected in every upcoming invoice,\npast invoices are not affected' },
{ id: 'invoices', title: 'Invoices', text: 'Manage invoices of current project' },
]