Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): integrate layout page block component #290

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions codex-ui/src/vue/layout/page-block/PageBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ defineProps({
&--stretched {
max-width: 100%;
flex: 2;
overflow: hidden;
}
}

Expand Down
46 changes: 0 additions & 46 deletions src/application/services/useLayout.ts

This file was deleted.

15 changes: 0 additions & 15 deletions src/presentation/layouts/Fullpage.vue

This file was deleted.

15 changes: 0 additions & 15 deletions src/presentation/layouts/Layout.vue

This file was deleted.

42 changes: 0 additions & 42 deletions src/presentation/layouts/ThreeColsLayout.vue

This file was deleted.

7 changes: 3 additions & 4 deletions src/presentation/pages/History.vue
neSpecc marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<ThreeColsLayout data-dimensions="large">
<PageBlock data-dimensions="large">
<div :class="$style['history']">
<div :class="$style['history__page-header']">
<Heading
Expand Down Expand Up @@ -47,12 +47,11 @@
</Container>
</div>
</div>
</ThreeColsLayout>
</PageBlock>
</template>

<script setup lang="ts">
import { Heading, Container, Row, Avatar, Button } from 'codex-ui/vue';
import ThreeColsLayout from '../layouts/ThreeColsLayout.vue';
import { Heading, Container, Row, Avatar, Button, PageBlock } from 'codex-ui/vue';
import useNoteHistory from '@/application/services/useNoteHistory';
import useNavbar from '@/application/services/useNavbar';
import useNote from '@/application/services/useNote';
Expand Down
14 changes: 8 additions & 6 deletions src/presentation/pages/HistoryVersion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,19 @@
</Button>
</template>
</NoteHeader>
<Editor
v-if="isEditorReady"
ref="editor"
v-bind="editorConfig"
/>
<PageBlock>
<Editor
v-if="isEditorReady"
ref="editor"
v-bind="editorConfig"
/>
</PageBlock>
</div>
</template>

<script lang="ts" setup>
import { ref, toRef, watch } from 'vue';
import { Editor, Button, Avatar } from 'codex-ui/vue';
import { Editor, Button, Avatar, PageBlock } from 'codex-ui/vue';
import NoteHeader from '@/presentation/components/note-header/NoteHeader.vue';
import useHistory from '@/application/services/useNoteHistory';
import { useNoteEditor } from '@/application/services/useNoteEditor';
Expand Down
8 changes: 3 additions & 5 deletions src/presentation/pages/Home.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<ThreeColsLayout data-dimensions="large">
<PageBlock data-dimensions="large">
<router-link
v-if="user"
to="/new"
Expand Down Expand Up @@ -49,17 +49,15 @@
<NoteList
v-else-if="user !== undefined"
/>
</ThreeColsLayout>
</PageBlock>
</template>

<script setup lang="ts">
import { useHead } from 'unhead';
import { useI18n } from 'vue-i18n';
import { useAppState } from '@/application/services/useAppState';
import { Container, Row, Button, Heading } from 'codex-ui/vue';
import { Container, Row, Button, Heading, PageBlock } from 'codex-ui/vue';
import Hammer from '../components/pictures/Hammer.vue';

import ThreeColsLayout from '@/presentation/layouts/ThreeColsLayout.vue';
import NoteList from '@/presentation/components/note-list/NoteList.vue';
import useAuth from '@/application/services/useAuth';

Expand Down
7 changes: 3 additions & 4 deletions src/presentation/pages/NoteSettings.vue
neSpecc marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<ThreeColsLayout data-dimensions="large">
<PageBlock data-dimensions="large">
<div
v-if="noteSettings"
class="note-settings"
Expand Down Expand Up @@ -93,7 +93,7 @@
<div v-else>
Loading...
</div>
</ThreeColsLayout>
</PageBlock>
</template>

<script lang="ts" setup>
Expand All @@ -105,8 +105,7 @@ import { useI18n } from 'vue-i18n';
import { computed, ref, onMounted, watch } from 'vue';
import { useDebounceFn } from '@vueuse/core';
import Team from '@/presentation/components/team/Team.vue';
import { Section, Row, Switch, Button, Heading, Fieldset, Input, Card } from 'codex-ui/vue';
import ThreeColsLayout from '@/presentation/layouts/ThreeColsLayout.vue';
import { Section, Row, Switch, Button, Heading, Fieldset, Input, Card, PageBlock } from 'codex-ui/vue';
import { getTitle } from '@/infrastructure/utils/note';
import { getTimeFromNow } from '@/infrastructure/utils/date';
import InviteLink from '@/presentation/components/noteSettings/InviteLink.vue';
Expand Down
7 changes: 3 additions & 4 deletions src/presentation/pages/Settings.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<ThreeColsLayout data-dimensions="large">
<PageBlock data-dimensions="large">
<div :class="$style['page-header']">
<Heading :level="1">
{{ t('userSettings.title') }}
Expand Down Expand Up @@ -157,12 +157,12 @@
</div>
</Fieldset>
</div>
</ThreeColsLayout>
</PageBlock>
</template>

<script lang="ts" setup>
import { useI18n } from 'vue-i18n';
import { Button, Fieldset, Section, Row, Heading, Card, useTheme, Theme, ColorScheme, ThemePreview, Icon, LightColorShemeIcon, DarkColorShemeIcon, Container, Input } from 'codex-ui/vue';
import { Button, Fieldset, Section, Row, Heading, Card, useTheme, Theme, ColorScheme, ThemePreview, Icon, LightColorShemeIcon, DarkColorShemeIcon, Container, Input, PageBlock } from 'codex-ui/vue';
import { Hammer } from '@/presentation/components/pictures';
import { useRouter } from 'vue-router';
import useAuth from '@/application/services/useAuth';
Expand All @@ -171,7 +171,6 @@ import { useAppState } from '@/application/services/useAppState';
import { useHead } from 'unhead';
import { ref } from 'vue';
import useNavbar from '@/application/services/useNavbar';
import ThreeColsLayout from '@/presentation/layouts/ThreeColsLayout.vue';
const { user, userEditorTools } = useAppState();
const { t } = useI18n();
Expand Down
1 change: 0 additions & 1 deletion src/presentation/pages/marketplace/AddTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ async function setCover(event: Event) {
display: flex;
flex-direction: column;
gap: var(--spacing-xxl);
width: var(--layout-content-width);
}
.add-tool-button {
Expand Down
9 changes: 4 additions & 5 deletions src/presentation/pages/marketplace/MarketplacePage.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<ThreeColsLayout>
<template #left-col>
<PageBlock>
<template #left>
<VerticalMenu
class="menu"
:items="verticalMenuItems"
Expand All @@ -9,13 +9,12 @@
<template #default>
<router-view />
</template>
</ThreeColsLayout>
</PageBlock>
</template>

<script lang="ts" setup>
import { VerticalMenu, type VerticalMenuItem } from 'codex-ui/vue';
import { VerticalMenu, type VerticalMenuItem, PageBlock } from 'codex-ui/vue';
import { computed, Ref } from 'vue';
import ThreeColsLayout from '@/presentation/layouts/ThreeColsLayout.vue';
import { useRoute, useRouter } from 'vue-router';
const route = useRoute();
Expand Down
1 change: 0 additions & 1 deletion src/presentation/pages/marketplace/MarketplaceTools.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const { tools } = useMarketplace();
display: flex;
flex-direction: column;
gap: var(--spacing-xxl);
width: var(--layout-content-width);
&__subheader {
margin-bottom: var(--spacing-l);
Expand Down
Loading