feat: add utility function to format URLs and create new CSS file for styling
This commit is contained in:
@@ -76,6 +76,7 @@ import { ref, computed, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useAuthStore } from '../stores/authStore.js'
|
||||
import api from '../lib/api.js'
|
||||
import { formatUrl } from '../lib/utils.js'
|
||||
|
||||
const router = useRouter()
|
||||
const authStore = useAuthStore()
|
||||
@@ -94,11 +95,6 @@ const userDisplayName = computed(() => {
|
||||
return authStore.user?.name || authStore.user?.username || 'User'
|
||||
})
|
||||
|
||||
function formatUrl(url) {
|
||||
if (!url) return ''
|
||||
return url.startsWith('http') ? url : `http://localhost:3001${url}`
|
||||
}
|
||||
|
||||
function toggleEdit() {
|
||||
editing.value = !editing.value
|
||||
if (editing.value) {
|
||||
|
||||
Reference in New Issue
Block a user