Skip to content

Commit

Permalink
add link to AI admin doc
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Mar 21, 2024
1 parent f5f1b4c commit a692b92
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/components/NoProviderEmptyContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
:name="t('assistant', 'No provider found')"
:description="t('assistant', 'AI Providers need to be installed to use the Assistant')">
<template v-if="isAdmin" #action>
<span v-html="actionHtml" />
<div class="actions">
<span v-html="action1Html" />
<span v-html="action2Html" />
</div>
</template>
<template #icon>
<AssistantIcon />
Expand All @@ -27,6 +30,10 @@ const integrationSectionUrl = generateUrl('/settings/apps/integration')
const integrationLinkText = t('assistant', 'integration')
const integrationLink = `<a class="external" target="_blank" href="${integrationSectionUrl}">${integrationLinkText}</a>`
const aiDocUrl = 'https://docs.nextcloud.com/server/latest/admin_manual/ai/index.html'
const aiDocLinkText = t('assistant', 'complete AI documentation')
const aiAdminDocLink = `<a class="external" target="_blank" href="${aiDocUrl}">${aiDocLinkText}</a>`
export default {
name: 'NoProviderEmptyContent',
Expand All @@ -45,12 +52,17 @@ export default {
},
computed: {
actionHtml() {
action1Html() {
return t('assistant', 'AI provider apps can be found in the {toolLink} and {integrationLink} app settings sections.', {
toolLink,
integrationLink,
}, undefined, { escape: false, sanitize: false })
},
action2Html() {
return t('assistant', 'You can also check the {aiAdminDocLink}', {
aiAdminDocLink,
}, undefined, { escape: false, sanitize: false })
},
},
watch: {
Expand All @@ -65,5 +77,9 @@ export default {
</script>
<style lang="scss">
// nothing yet
.actions {
display: flex;
flex-direction: column;
align-items: center;
}
</style>

0 comments on commit a692b92

Please sign in to comment.