Skip to content

Commit

Permalink
Merge pull request #245 from codex-team/user-settings-link-to-marketp…
Browse files Browse the repository at this point in the history
…lace

feat(settings): User settings link to marketplace
  • Loading branch information
e11sy authored Jul 4, 2024
2 parents 630e4da + b32dc8f commit 90c6e7f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 14 deletions.
6 changes: 3 additions & 3 deletions codex-ui/src/vue/components/row/Row.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<div :class="$style['row__body']">
<div :class="$style['row__body-inner']">
<div :class="$style['row__center']">
<div :class="[$style['row__label'], 'text-ui-footnote']">
<div v-if="label" :class="[$style['row__label'], 'text-ui-footnote']">
{{ label }}
</div>

<div :class="[$style['row__title'], 'text-ui-base-medium']">
{{ title }}
</div>

<div class="text-ui-subtle">
<div v-if="subtitle" class="text-ui-subtle">
{{ subtitle }}
</div>
</div>
Expand Down Expand Up @@ -85,7 +85,7 @@ defineProps<{
display: flex;
flex: 1;
padding: var(--v-padding) var(--h-padding) var(--v-padding) 0;
gap: var(--h-padding);
gap: var(--spacing-m);
align-items: center;
}
Expand Down
7 changes: 6 additions & 1 deletion src/application/i18n/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
},
"userSettings": {
"title": "User Settings",
"changeTheme": "Change theme",
"editorTools": "Editor Tools",
"uninstallEditorTool": "Uninstall",
"toolUninstallConfirmation": "Do you really want to delete this tool?",
Expand All @@ -22,6 +21,12 @@
"name": "Name",
"email": "Email",
"general": "General",
"visitMarketplace": {
"title": "Add more tools",
"caption": "Discover new Blocks, Formattings and other tools to improve your pages",
"button": "View all tools",
"pictureName": "Hammer"
},
"appearance": {
"title": "Appearance",
"colorSheme": {
Expand Down
44 changes: 34 additions & 10 deletions src/presentation/pages/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@
:title="t('userSettings.name')"
:caption="t('userSettings.nameCaption')"
>
<Row :title="user?.name!" />
<Input
disabled
:placeholder="user?.name!"
/>
</Section>
<Section
:title="t('userSettings.email')"
:caption="t('userSettings.emailCaption')"
>
<Row :title="user?.email!" />
<Input
disabled
:placeholder="user?.email!"
/>
</Section>
<div>
<Button
Expand Down Expand Up @@ -126,21 +132,35 @@
{{ t('userSettings.uninstallEditorTool') }}
</Button>
</Card>
<Container>
<div :class="$style['container__editor-tools-visit-marketplace']">
<Row
:title="t('userSettings.visitMarketplace.title')"
:subtitle="t('userSettings.visitMarketplace.caption')"
>
<template #left>
<Picture :name="t('userSettings.visitMarketplace.pictureName')" />
</template>
<template #right>
<Button
secondary
trailing-icon="ChevronRight"
@click="$router.push('/marketplace')"
>
{{ t('userSettings.visitMarketplace.button') }}
</Button>
</template>
</Row>
</div>
</Container>
</div>
</Fieldset>
</div>
<Button
class="marketplace"
:text="t('marketplace.title')"
link="/marketplace"
type="primary"
/>
</template>
<script lang="ts" setup>
import { useI18n } from 'vue-i18n';
import { Button, Fieldset, Section, Row, Heading, Card, useTheme, Theme, ColorScheme, ThemePreview, Icon, Picture } from 'codex-ui/vue';
import { Button, Fieldset, Section, Row, Heading, Card, useTheme, Theme, ColorScheme, ThemePreview, Icon, Picture, Container, Input } from 'codex-ui/vue';
import { useRouter } from 'vue-router';
import useAuth from '@/application/services/useAuth';
import { useUserSettings } from '@/application/services/useUserSettings';
Expand Down Expand Up @@ -222,6 +242,10 @@ async function uninstallClicked(toolId: string) {
&__editor-tools {
display: grid;
gap: var(--v-padding);
&-visit-marketplace {
padding: var(--v-padding) 0;
}
}
&__appearance {
Expand Down

0 comments on commit 90c6e7f

Please sign in to comment.