added switch for title being untitled or null

This commit is contained in:
AndzejsP 2023-05-04 11:44:08 +03:00
parent d130b36742
commit 3179e69a4c

View File

@ -1,13 +1,13 @@
<template> <template>
<div :class="selected ? 'bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md' : ''" <div :class="selected ? 'bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md' : ''"
class="container flex flex-col sm:flex-row item-center gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"> class="container flex flex-col sm:flex-row item-center shadow-sm gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer">
<!-- INDICATOR FOR SELECTED ITEM --> <!-- INDICATOR FOR SELECTED ITEM -->
<div v-if="selected" class="items-center inline-block min-h-full w-2 rounded-xl self-stretch " <div v-if="selected" class="items-center inline-block min-h-full w-2 rounded-xl self-stretch "
:class="loading ? 'animate-bounce bg-accent ' : ' bg-secondary '"></div> :class="loading ? 'animate-bounce bg-accent ' : ' bg-secondary '"></div>
<div v-else class="items-center inline-block min-h-full w-2 rounded-xl self-stretch"></div> <div v-else class="items-center inline-block min-h-full w-2 rounded-xl self-stretch"></div>
<!-- TITLE --> <!-- TITLE -->
<p class="truncate w-auto">{{ title }}</p> <p class="truncate w-auto">{{ title ? title === "untitled" ? "New discussion" : title : "New discussion" }}</p>
<!-- CONTROL BUTTONS --> <!-- CONTROL BUTTONS -->
<div class="flex items-center gap-3 flex-1 max-h-6"> <div class="flex items-center gap-3 flex-1 max-h-6">
<div class="flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"> <div class="flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75">
@ -40,18 +40,18 @@ export default {
data() { data() {
return { return {
} }
}, },
methods: { methods: {
}, mounted() { },
mounted() {
nextTick(() => { nextTick(() => {
feather.replace() feather.replace()
}) })
},
}
} }
</script> </script>
<style scoped></style> <style scoped></style>