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