support multiline about me's
This commit is contained in:
parent
59422455bb
commit
d276faebcc
4 changed files with 43 additions and 5 deletions
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|
||||||
|
console.log("CHANNEL!")
|
||||||
const props = defineProps<{ name: string, uuid: string, currentUuid: string, href: string }>();
|
const props = defineProps<{ name: string, uuid: string, currentUuid: string, href: string }>();
|
||||||
|
|
||||||
const isCurrentChannel = props.uuid == props.currentUuid;
|
const isCurrentChannel = props.uuid == props.currentUuid;
|
||||||
|
|
|
@ -214,8 +214,21 @@ function buttonEditProfile() {
|
||||||
|
|
||||||
align-self: center;
|
align-self: center;
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
font-size: .8em;
|
font-size: .8em;
|
||||||
font-weight: lighter;
|
font-weight: lighter;
|
||||||
|
|
||||||
|
white-space: pre-line;
|
||||||
|
line-height: 1;
|
||||||
|
max-height: 7em; /* 7 x 1 */
|
||||||
|
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#about-me-text::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,11 @@
|
||||||
<label for="profile-pronouns-input" class="subtitle">PRONOUNS</label>
|
<label for="profile-pronouns-input" class="subtitle">PRONOUNS</label>
|
||||||
<input id="profile-pronouns-input" class="profile-data-input" type="text" v-model="user.pronouns" placeholder="Enter pronouns" />
|
<input id="profile-pronouns-input" class="profile-data-input" type="text" v-model="user.pronouns" placeholder="Enter pronouns" />
|
||||||
<label for="profile-about-me-input" class="subtitle">ABOUT ME</label>
|
<label for="profile-about-me-input" class="subtitle">ABOUT ME</label>
|
||||||
<input id="profile-about-me-input" class="profile-data-input" type="text" v-model="user.about" placeholder="About me" />
|
<div id="profile-about-me-input" class="profile-data-input profile-textarea-input"
|
||||||
|
placeholder="About Me" maxlength="240" wrap="soft" rows="8"
|
||||||
|
autocorrect="off" spellcheck="true" contenteditable="true"
|
||||||
|
@keyup="handleAboutMeKeyUp" ref="aboutMeInput">
|
||||||
|
</div>
|
||||||
<Button style="margin-top: 2dvh" text="Save Changes" :callback="saveChanges"></Button>
|
<Button style="margin-top: 2dvh" text="Save Changes" :callback="saveChanges"></Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -42,6 +45,7 @@ import type { UserResponse } from '~/types/interfaces';
|
||||||
let newPfpFile: File;
|
let newPfpFile: File;
|
||||||
const isCropPopupVisible = ref(false);
|
const isCropPopupVisible = ref(false);
|
||||||
const cropImageSrc = ref("")
|
const cropImageSrc = ref("")
|
||||||
|
const aboutMeInput = ref<HTMLDivElement>()
|
||||||
|
|
||||||
const { fetchUser } = useAuth();
|
const { fetchUser } = useAuth();
|
||||||
|
|
||||||
|
@ -125,6 +129,12 @@ function handleCrop(blob: Blob, url: string) {
|
||||||
function closeCropPopup() {
|
function closeCropPopup() {
|
||||||
isCropPopupVisible.value = false
|
isCropPopupVisible.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleAboutMeKeyUp(event: KeyboardEvent) {
|
||||||
|
if (user && aboutMeInput.value) {
|
||||||
|
user.about = aboutMeInput.value.innerText
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -139,8 +149,9 @@ function closeCropPopup() {
|
||||||
|
|
||||||
.profile-data-input {
|
.profile-data-input {
|
||||||
min-width: 30dvw;
|
min-width: 30dvw;
|
||||||
|
max-width: 30dvw;
|
||||||
margin: 0.07dvh;
|
margin: 0.07dvh;
|
||||||
padding: 0.1dvh 0.7dvw;
|
padding: .1em .7em;
|
||||||
height: 2.5em;
|
height: 2.5em;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
@ -149,6 +160,12 @@ function closeCropPopup() {
|
||||||
background-color: var(--accent-color);
|
background-color: var(--accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.profile-textarea-input {
|
||||||
|
padding: .6em .7em;
|
||||||
|
|
||||||
|
height: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
#profile-popup {
|
#profile-popup {
|
||||||
margin-left: 2dvw;
|
margin-left: 2dvw;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<span v-if="props.user.pronouns"> - {{ props.user.pronouns }}</span>
|
<span v-if="props.user.pronouns"> - {{ props.user.pronouns }}</span>
|
||||||
</p>
|
</p>
|
||||||
<div id="about-me" v-if="props.user.about">
|
<div id="about-me" v-if="props.user.about">
|
||||||
{{ props.user.about }}
|
{{ props.user.about.trim() }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -84,5 +84,12 @@ const props = defineProps<{
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
||||||
|
white-space: pre-line;
|
||||||
|
line-height: 1;
|
||||||
|
max-height: 7em; /* 7 x 1 */
|
||||||
|
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
Loading…
Add table
Add a link
Reference in a new issue