add default images
This commit is contained in:
parent
9ea0f2092b
commit
f870a52b5d
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,5 @@
|
|||
|
||||
hesabixArchive/
|
||||
|
||||
hesabixBackup/
|
||||
backup/
|
||||
.idea/
|
||||
|
|
BIN
hesabixArchive/avatars/default.png
Normal file
BIN
hesabixArchive/avatars/default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
1
hesabixArchive/avatars/index.php
Executable file
1
hesabixArchive/avatars/index.php
Executable file
|
@ -0,0 +1 @@
|
|||
<?php
|
1
hesabixArchive/support/index.php
Executable file
1
hesabixArchive/support/index.php
Executable file
|
@ -0,0 +1 @@
|
|||
<?php
|
|
@ -6,39 +6,42 @@ export default defineComponent({
|
|||
name: "notifications_btn",
|
||||
data: () => ({
|
||||
items: [],
|
||||
timeoutId: null as number | null, // برای ذخیره ID تایمر
|
||||
}),
|
||||
components: {
|
||||
|
||||
},
|
||||
components: {},
|
||||
mounted() {
|
||||
this.loadData();
|
||||
},
|
||||
beforeUnmount() {
|
||||
// پاک کردن تایمر هنگام تخریب کامپوننت
|
||||
if (this.timeoutId) {
|
||||
clearTimeout(this.timeoutId);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jump(item) {
|
||||
axios.post('/api/notifications/read/' + item.id).then((response) => {
|
||||
if (item.url.startsWith('http')) {
|
||||
window.location.href = item.url;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.$router.push(item.url);
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
},
|
||||
loadData() {
|
||||
axios.post('/api/notifications/list/new').then((response) => {
|
||||
if (response.data.length != 0) {
|
||||
this.items = response.data;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.items = [];
|
||||
}
|
||||
}).finally(() => {
|
||||
// تنظیم تایمر جدید و ذخیره ID آن
|
||||
this.timeoutId = setTimeout(this.loadData, 10000);
|
||||
});
|
||||
setTimeout(this.loadData, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -71,7 +74,6 @@ export default defineComponent({
|
|||
prepend-icon="mdi-eye" />
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -3,37 +3,45 @@ import axios from "axios";
|
|||
|
||||
export default {
|
||||
name: "icon",
|
||||
data: ()=>{return{
|
||||
items:undefined,
|
||||
}},
|
||||
created() {
|
||||
this.loadData()
|
||||
data: () => {
|
||||
return {
|
||||
items: undefined,
|
||||
timeoutId: null, // برای ذخیره ID تایمر
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
jump(item){
|
||||
axios.post('/api/notifications/read/' + item.id).then((response)=>{
|
||||
if(item.url.startsWith('http')){
|
||||
window.location.href = item.url;
|
||||
created() {
|
||||
this.loadData();
|
||||
},
|
||||
beforeDestroy() { // یا destroyed بسته به نسخه Vue
|
||||
// پاک کردن تایمر هنگام تخریب کامپوننت
|
||||
if (this.timeoutId) {
|
||||
clearTimeout(this.timeoutId);
|
||||
}
|
||||
else{
|
||||
},
|
||||
methods: {
|
||||
jump(item) {
|
||||
axios.post('/api/notifications/read/' + item.id).then((response) => {
|
||||
if (item.url.startsWith('http')) {
|
||||
window.location.href = item.url;
|
||||
} else {
|
||||
this.$router.push(item.url);
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
},
|
||||
loadData(){
|
||||
axios.post('/api/notifications/list/new').then((response)=>{
|
||||
if(response.data.length !== 0){
|
||||
loadData() {
|
||||
axios.post('/api/notifications/list/new').then((response) => {
|
||||
if (response.data.length !== 0) {
|
||||
this.items = response.data;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
this.items = undefined;
|
||||
}
|
||||
}).finally(() => {
|
||||
// تنظیم تایمر جدید و ذخیره ID آن
|
||||
this.timeoutId = setTimeout(this.loadData, 10000);
|
||||
});
|
||||
setTimeout(this.loadData, 10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -74,5 +82,4 @@ export default {
|
|||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in a new issue