style: code cleanup
This commit is contained in:
parent
3beaddf0bd
commit
e44c7d0c2e
3 changed files with 11 additions and 10 deletions
|
@ -18,12 +18,10 @@ const props = defineProps<{
|
||||||
const modalPopupVisible = ref<boolean>(false);
|
const modalPopupVisible = ref<boolean>(false);
|
||||||
|
|
||||||
function showModalPopup() {
|
function showModalPopup() {
|
||||||
console.log("hello there")
|
|
||||||
modalPopupVisible.value = true
|
modalPopupVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideModalPopup() {
|
function hideModalPopup() {
|
||||||
console.log("gone")
|
|
||||||
modalPopupVisible.value = false
|
modalPopupVisible.value = false
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -23,9 +23,11 @@ async function sendRequest() {
|
||||||
try {
|
try {
|
||||||
await addFriend(inputField.value.value)
|
await addFriend(inputField.value.value)
|
||||||
alert("Friend request sent!")
|
alert("Friend request sent!")
|
||||||
} catch {
|
} catch (error: any) {
|
||||||
alert("Request failed :(")
|
if (error?.response?.status !== 200) {
|
||||||
}
|
alert(`error ${error?.response?.status} met whilst trying to add friend\n"${error?.response._data?.message}"`)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -69,7 +69,6 @@ const props = defineProps<ModalProps & {
|
||||||
onFinish: () => void
|
onFinish: () => void
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const friendsSinceRequest = await getFriendsSince(props.profile)
|
|
||||||
const me = await fetchMe() as UserResponse
|
const me = await fetchMe() as UserResponse
|
||||||
|
|
||||||
const displayName = getDisplayName(props.profile)
|
const displayName = getDisplayName(props.profile)
|
||||||
|
@ -79,7 +78,7 @@ const aboutMe = getAboutMe(props.profile)
|
||||||
|
|
||||||
const registrationDate = getRegistrationDate(props.profile)
|
const registrationDate = getRegistrationDate(props.profile)
|
||||||
const joinDate = getGuildJoinDate(props.profile)
|
const joinDate = getGuildJoinDate(props.profile)
|
||||||
const friendsSince = friendsSinceRequest
|
const friendsSince = await getFriendsSince(props.profile)
|
||||||
|
|
||||||
const uuid = getUuid(props.profile)
|
const uuid = getUuid(props.profile)
|
||||||
|
|
||||||
|
@ -96,8 +95,10 @@ async function buttonAddFriend() {
|
||||||
try {
|
try {
|
||||||
await addFriend(username)
|
await addFriend(username)
|
||||||
alert("sent!")
|
alert("sent!")
|
||||||
} catch {
|
} catch (error: any) {
|
||||||
alert("failed :(")
|
if (error?.response?.status !== 200) {
|
||||||
|
alert(`error ${error?.response?.status} met whilst trying to add friend\n"${error?.response._data?.message}"`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +166,6 @@ function buttonEditProfile() {
|
||||||
#display-name {
|
#display-name {
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#username-and-pronouns {
|
#username-and-pronouns {
|
||||||
|
@ -235,6 +235,7 @@ function buttonEditProfile() {
|
||||||
.date-entry-title {
|
.date-entry-title {
|
||||||
font-size: .8em;
|
font-size: .8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.date-entry-value {
|
.date-entry-value {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue