Skip to content

Commit

Permalink
system and tag description
Browse files Browse the repository at this point in the history
  • Loading branch information
NyaomiDEV committed Aug 5, 2024
1 parent 79bbbb9 commit 48688e5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/lib/db/entities/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { liveQuery } from "dexie";

export type System = UUIDable & {
name: string,
description?: string,
image?: File
}

Expand Down
1 change: 1 addition & 0 deletions src/lib/db/entities/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ref, Ref, watch } from "vue";

export type Tag = UUIDable & {
name: string,
description?: string,
type: "member" | "journal",
color?: string
}
Expand Down
9 changes: 7 additions & 2 deletions src/modals/TagEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
IonItem,
modalController,
IonModal,
IonSegment
IonSegment,
IonTextarea
} from "@ionic/vue";
import MD3SegmentButton from "../components/MD3SegmentButton.vue";
import Color from "../components/Color.vue";
Expand Down Expand Up @@ -91,6 +92,10 @@
<IonInput mode="md" fill="outline" :label="$t('options:tagManagement.edit.name')" labelPlacement="floating" v-model="tag!.name" />
</IonItem>

<IonItem lines="none">
<IonTextarea mode="md" fill="outline" auto-grow :label="$t('options:tagManagement.edit.description')" labelPlacement="floating" v-model="tag!.description" />
</IonItem>

<IonItem button lines="none">
<Color v-model="tag!.color" @update:model-value="present">
<IonLabel>
Expand Down Expand Up @@ -147,7 +152,7 @@
--padding-bottom: 80px;
}
ion-input {
ion-input, ion-textarea {
margin: 16px 0;
}
</style>
9 changes: 6 additions & 3 deletions src/views/options/SystemSettings.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<script setup lang="ts">
import { IonContent, IonHeader, IonList, IonPage, IonTitle, IonToolbar, IonBackButton, IonAvatar, IonButton, IonIcon, IonInput, IonFab, IonFabButton, IonItem, useIonRouter, IonLabel} from '@ionic/vue';
import { IonContent, IonHeader, IonList, IonPage, IonTitle, IonToolbar, IonBackButton, IonAvatar, IonButton, IonIcon, IonInput, IonFab, IonFabButton, IonItem, useIonRouter, IonLabel, IonTextarea} from '@ionic/vue';
import { inject, ref } from 'vue';
import { getBlobURL } from '../../lib/util/blob';
import { getFiles } from '../../lib/util/misc';
import { resizeImage } from '../../lib/util/image';
import { modifySystem, system } from '../../lib/db/entities/system';
import { members } from '../../lib/db/entities/members';
import {
peopleOutline as peopleIOS,
Expand All @@ -15,7 +16,6 @@
import peopleMD from "@material-design-icons/svg/outlined/groups_2.svg"
import pencilMD from "@material-design-icons/svg/outlined/edit.svg"
import saveMD from "@material-design-icons/svg/outlined/save.svg"
import { members } from '../../lib/db/entities/members';
const isIOS = inject<boolean>("isIOS");
Expand Down Expand Up @@ -67,6 +67,9 @@ import { members } from '../../lib/db/entities/members';
<IonItem lines="none">
<IonInput fill="outline" labelPlacement="floating" :label="$t('options:systemSettings.systemName')" v-model="system.name" />
</IonItem>
<IonItem lines="none">
<IonTextarea mode="md" fill="outline" auto-grow :label="$t('options:systemSettings.systemDescription')" labelPlacement="floating" v-model="system.description" />
</IonItem>
<IonItem lines="none">
<IonLabel>{{ $t("options:systemSettings.memberCount") }}</IonLabel>
<IonButton slot="end" v-if="!membersShowed" @click="membersShowed = true">{{ $t("options:systemSettings.tapToShow") }}</IonButton>
Expand Down Expand Up @@ -105,7 +108,7 @@ import { members } from '../../lib/db/entities/members';
--padding-bottom: 80px;
}
ion-input {
ion-input, ion-textarea {
margin: 16px 0;
}
</style>
2 changes: 2 additions & 0 deletions translations/en/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"systemSettings": {
"header": "System name and photo",
"systemName": "System name",
"systemDescription": "System description",
"memberCount": "Member count",
"memberCountText": "{{memberCount}} member(s)",
"tapToShow": "Tap to show"
Expand Down Expand Up @@ -45,6 +46,7 @@
"journal": "Edit journal tag"
},
"name": "Tag name",
"description": "Tag description",
"color": "Tag color",
"type": {
"header": "Tag type",
Expand Down

0 comments on commit 48688e5

Please sign in to comment.