Skip to content

Commit 7b00e6b

Browse files
authored
Merge pull request #262 from codex-team/note-settings-style-fix
chore(note-settings): note settings style fix
2 parents 6a65050 + 0756952 commit 7b00e6b

File tree

1 file changed

+87
-84
lines changed

1 file changed

+87
-84
lines changed

src/presentation/pages/NoteSettings.vue

Lines changed: 87 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,99 @@
11
<template>
2-
<div
3-
v-if="noteSettings"
4-
class="note-settings"
5-
>
2+
<ThreeColsLayout data-dimensions="large">
63
<div
7-
class="note-settings__page-header"
4+
v-if="noteSettings"
5+
class="note-settings"
86
>
9-
<Heading
10-
:level="1"
7+
<div
8+
class="note-settings__page-header"
119
>
12-
{{ $t('noteSettings.title') }}
13-
</Heading>
14-
<Heading
15-
:level="2"
16-
class="note-settings__subheading"
17-
>
18-
{{ noteTitle }}
19-
</Heading>
20-
</div>
21-
<div class="form">
22-
<Section
23-
:title="t('noteSettings.parentNote')"
24-
:caption="t('noteSettings.parentNoteCaption')"
25-
:with-background="false"
26-
>
27-
<div class="change-parent">
28-
<Input
29-
v-model="parentURL"
30-
data-dimensions="large"
31-
:disabled="parentNote !== undefined"
32-
:placeholder="t('noteSettings.parentNotePlaceholder')"
33-
@input="setParentDebounced"
34-
/>
35-
<Card
36-
v-if="parentNote"
37-
:title="parentNoteTitle"
38-
:subtitle="formatShortDate(parentNote.createdAt!)"
39-
orientation="horizontal"
40-
>
41-
<Button
42-
secondary
43-
@click="handleUnlinkParentClick"
10+
<Heading
11+
:level="1"
12+
>
13+
{{ $t('noteSettings.title') }}
14+
</Heading>
15+
<Heading
16+
:level="2"
17+
class="note-settings__subheading"
18+
>
19+
{{ noteTitle }}
20+
</Heading>
21+
</div>
22+
<div class="form">
23+
<Section
24+
:title="t('noteSettings.parentNote')"
25+
:caption="t('noteSettings.parentNoteCaption')"
26+
:with-background="false"
27+
>
28+
<div class="change-parent">
29+
<Input
30+
v-model="parentURL"
31+
data-dimensions="large"
32+
:disabled="parentNote !== undefined"
33+
:placeholder="t('noteSettings.parentNotePlaceholder')"
34+
@input="setParentDebounced"
35+
/>
36+
<Card
37+
v-if="parentNote"
38+
:title="parentNoteTitle"
39+
:subtitle="formatShortDate(parentNote.createdAt!)"
40+
orientation="horizontal"
4441
>
45-
{{ t('note.unlink') }}
46-
</Button>
47-
</Card>
48-
</div>
49-
</Section>
42+
<Button
43+
secondary
44+
@click="handleUnlinkParentClick"
45+
>
46+
{{ t('note.unlink') }}
47+
</Button>
48+
</Card>
49+
</div>
50+
</Section>
5051

51-
<Section
52-
:title="t('noteSettings.availabilityTitle')"
53-
:caption="t('noteSettings.availabilityCaption')"
54-
>
55-
<Row :title="t('noteSettings.availabilityRowTitle')">
56-
<template #right>
57-
<Switch
58-
v-model="isPublic"
59-
@click="changeAccess"
60-
/>
61-
</template>
62-
</Row>
63-
</Section>
52+
<Section
53+
:title="t('noteSettings.availabilityTitle')"
54+
:caption="t('noteSettings.availabilityCaption')"
55+
>
56+
<Row :title="t('noteSettings.availabilityRowTitle')">
57+
<template #right>
58+
<Switch
59+
v-model="isPublic"
60+
@click="changeAccess"
61+
/>
62+
</template>
63+
</Row>
64+
</Section>
6465

65-
<Fieldset
66-
:title="t('noteSettings.teamFormFieldSetTitle')"
67-
>
68-
<div
69-
class="fieldset"
70-
data-dimensions="large"
66+
<Fieldset
67+
:title="t('noteSettings.teamFormFieldSetTitle')"
7168
>
72-
<Team
73-
:note-id="id"
74-
:team="noteSettings.team"
75-
/>
76-
<InviteLink
77-
:id="props.id"
78-
:invintation-hash="noteSettings.invitationHash"
79-
/>
80-
<Button
81-
destructive
82-
class="delete-button"
83-
@click="deleteNote"
69+
<div
70+
class="fieldset"
71+
data-dimensions="large"
8472
>
85-
{{ t('noteSettings.deleteNote') }}
86-
</Button>
87-
</div>
88-
</Fieldset>
89-
<br>
73+
<Team
74+
:note-id="id"
75+
:team="noteSettings.team"
76+
/>
77+
<InviteLink
78+
:id="props.id"
79+
:invintation-hash="noteSettings.invitationHash"
80+
/>
81+
<Button
82+
destructive
83+
class="delete-button"
84+
@click="deleteNote"
85+
>
86+
{{ t('noteSettings.deleteNote') }}
87+
</Button>
88+
</div>
89+
</Fieldset>
90+
<br>
91+
</div>
92+
</div>
93+
<div v-else>
94+
Loading...
9095
</div>
91-
</div>
92-
<div v-else>
93-
Loading...
94-
</div>
96+
</ThreeColsLayout>
9597
</template>
9698

9799
<script lang="ts" setup>
@@ -104,6 +106,7 @@ import { computed, ref, onMounted } from 'vue';
104106
import { useDebounceFn } from '@vueuse/core';
105107
import Team from '@/presentation/components/team/Team.vue';
106108
import { Section, Row, Switch, Button, Heading, Fieldset, Input, Card } from 'codex-ui/vue';
109+
import ThreeColsLayout from '@/presentation/layouts/ThreeColsLayout.vue';
107110
import { getTitle } from '@/infrastructure/utils/note';
108111
import { formatShortDate } from '@/infrastructure/utils/date';
109112
import InviteLink from '@/presentation/components/noteSettings/InviteLink.vue';

0 commit comments

Comments
 (0)