aboutsummaryrefslogtreecommitdiff
path: root/front-end/src/views/Blog/components
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-09-08 17:27:10 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2023-09-08 17:27:10 -0400
commitf2781825804039b5ca68466bec7054b8d9ccce5d (patch)
tree07f6b701df7a59b97f17b739a030273286c54e41 /front-end/src/views/Blog/components
parentd66290269d4709fe2d909284801f31669aa26f74 (diff)
upstream theme updates and patches
Diffstat (limited to 'front-end/src/views/Blog/components')
-rw-r--r--front-end/src/views/Blog/components/Posts/PostEdit.vue2
-rw-r--r--front-end/src/views/Blog/components/Posts/PostTable.vue8
2 files changed, 7 insertions, 3 deletions
diff --git a/front-end/src/views/Blog/components/Posts/PostEdit.vue b/front-end/src/views/Blog/components/Posts/PostEdit.vue
index 724a8d7..e55deee 100644
--- a/front-end/src/views/Blog/components/Posts/PostEdit.vue
+++ b/front-end/src/views/Blog/components/Posts/PostEdit.vue
@@ -132,7 +132,7 @@ const onDelete = async () => {
const setMeAsAuthor = () => {
apiCall(async () => {
const { first, last } = await getProfile<{first?:string, last?:string, email:string}>();
- v$.value.author.$model = `${first} ${last}`
+ v$.value.author.$model = `${first ?? ''} ${last ?? ''}`
})
}
diff --git a/front-end/src/views/Blog/components/Posts/PostTable.vue b/front-end/src/views/Blog/components/Posts/PostTable.vue
index 734d340..96c511c 100644
--- a/front-end/src/views/Blog/components/Posts/PostTable.vue
+++ b/front-end/src/views/Blog/components/Posts/PostTable.vue
@@ -39,10 +39,11 @@
</template>
<script setup lang="ts">
-import { toRefs } from 'vue';
+import { toRefs, watch } from 'vue';
import { filter as _filter, truncate } from 'lodash-es';
import { useClipboard } from '@vueuse/core';
import { PostMeta } from '@vnuge/cmnext-admin';
+import { useGeneralToaster } from '@vnuge/vnlib.browser';
const emit = defineEmits(['reload', 'open-edit'])
@@ -52,11 +53,14 @@ const props = defineProps<{
const { posts } = toRefs(props)
-const { copy } = useClipboard()
+const { copy, copied } = useClipboard()
+const { info } = useGeneralToaster()
const openEdit = async (post: PostMeta) => emit('open-edit', post)
const getDateString = (time?: number) => new Date((time || 0) * 1000).toLocaleString();
const getSummaryString = (summary?: string) => truncate(summary || '', { length: 40 })
const getPostId = (post: PostMeta) => truncate(post.id || '', { length: 20 })
+
+watch(copied, (c) => c ? info({'title':'Copied to clipboard'}) : null)
</script> \ No newline at end of file