Skip to content

Commit 75e7ed1

Browse files
[New Feature] Add created date functionality
1 parent 383f39c commit 75e7ed1

File tree

16 files changed

+866
-18
lines changed

16 files changed

+866
-18
lines changed

components/Common/Notifications/Toast/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</template>
2323

2424
<script setup lang="ts">
25-
import type { ToastInterface } from "@/types/Toast/ToastInterface.ts";
25+
import type { ToastInterface } from "./types/ToastInterface";
2626
import { ref, onMounted, watch } from "vue";
2727
2828
const props = defineProps<{ toast: ToastInterface; toastStyle?: string }>();

composables/convertTimestampToDate.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default function convertFirebaseTimestampToDate(input) {
2+
if (input instanceof Date) {
3+
return input;
4+
}
5+
6+
if (input && typeof input.seconds === "number") {
7+
return new Date(input.seconds * 1000);
8+
}
9+
10+
return null
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<template>
2+
<button
3+
:style="`width: ${props.size}px;height: ${props.size}px;`"
4+
class="flex justify-center items-center text-textPrimaryColorF text-sm font-medium rounded-full p-1 transition-colors duration-300"
5+
>
6+
<slot />
7+
</button>
8+
</template>
9+
10+
<script setup lang="ts">
11+
const props = defineProps<{ size: string }>();
12+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<template>
2+
<button
3+
class="flex justify-center items-center rounded-md hover:bg-secondaryColorFHover transition-colors duration-300"
4+
:style="`width: ${Number(props.size) + 20}px;height: ${
5+
Number(props.size) + 12
6+
}px;`"
7+
>
8+
<svg
9+
class="fill-textPrimaryColorF"
10+
:style="`width: ${props.size}px;height: ${props.size}px;`"
11+
xmlns="http://www.w3.org/2000/svg"
12+
version="1.1"
13+
xmlns:xlink="http://www.w3.org/1999/xlink"
14+
viewBox="0 0 492.004 492.004"
15+
xml:space="preserve"
16+
>
17+
<g transform="matrix(-1,0,0,1,492.0040588378906,0)">
18+
<path
19+
d="M382.678 226.804 163.73 7.86C158.666 2.792 151.906 0 144.698 0s-13.968 2.792-19.032 7.86l-16.124 16.12c-10.492 10.504-10.492 27.576 0 38.064L293.398 245.9l-184.06 184.06c-5.064 5.068-7.86 11.824-7.86 19.028 0 7.212 2.796 13.968 7.86 19.04l16.124 16.116c5.068 5.068 11.824 7.86 19.032 7.86s13.968-2.792 19.032-7.86L382.678 265c5.076-5.084 7.864-11.872 7.848-19.088.016-7.244-2.772-14.028-7.848-19.108z"
20+
opacity="1"
21+
data-original="#000000"
22+
></path>
23+
</g>
24+
</svg>
25+
</button>
26+
</template>
27+
28+
<script setup lang="ts">
29+
let props = defineProps<{ size: string }>();
30+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<template>
2+
<button
3+
class="flex justify-center items-center rounded-md hover:bg-secondaryColorFHover transition-colors duration-300"
4+
:style="`width: ${Number(props.size) + 20}px;height: ${
5+
Number(props.size) + 12
6+
}px;`"
7+
>
8+
<svg
9+
xmlns="http://www.w3.org/2000/svg"
10+
version="1.1"
11+
xmlns:xlink="http://www.w3.org/1999/xlink"
12+
viewBox="0 0 492.004 492.004"
13+
xml:space="preserve"
14+
class="fill-textPrimaryColorF"
15+
:style="`width: ${props.size}px;height: ${props.size}px;`"
16+
>
17+
<g>
18+
<path
19+
d="M382.678 226.804 163.73 7.86C158.666 2.792 151.906 0 144.698 0s-13.968 2.792-19.032 7.86l-16.124 16.12c-10.492 10.504-10.492 27.576 0 38.064L293.398 245.9l-184.06 184.06c-5.064 5.068-7.86 11.824-7.86 19.028 0 7.212 2.796 13.968 7.86 19.04l16.124 16.116c5.068 5.068 11.824 7.86 19.032 7.86s13.968-2.792 19.032-7.86L382.678 265c5.076-5.084 7.864-11.872 7.848-19.088.016-7.244-2.772-14.028-7.848-19.108z"
20+
opacity="1"
21+
data-original="#000000"
22+
></path>
23+
</g>
24+
</svg>
25+
</button>
26+
</template>
27+
28+
<script setup lang="ts">
29+
let props = defineProps<{ size: string }>();
30+
</script>

0 commit comments

Comments
 (0)