Change to use tasks for mj (#65)

Co-authored-by: Germey <germey@acedata.cloud>
This commit is contained in:
GermeyandGermey authored and GitHub committed 2024-07-02 16:29:11 +00:00
1 parent 4d179f306a
commit 01d44e75f2
16 files changed
+194 -67

No files matched your search

+6
View File
@@ -434,4 +434,10 @@ export default defineComponent({
bottom: 40px;
z-index: 1000;
}
@media (max-width: 767px) {
.help {
top: 40px;
}
}
</style>
+4 -4
View File
@@ -94,8 +94,8 @@ export default defineComponent({
};
},
computed: {
imagineTasks() {
return this.$store.state.midjourney.imagineTasks;
tasks() {
return this.$store.state.midjourney.tasks;
},
service() {
return this.$store.state.midjourney.service;
@@ -189,7 +189,7 @@ export default defineComponent({
}
},
watch: {
imagineTasks: {
tasks: {
handler(val, oldVal) {
if (oldVal === undefined && val) {
this.onScrollDown();
@@ -272,7 +272,7 @@ export default defineComponent({
}, 500);
},
async onSyncTasks() {
await this.$store.dispatch('midjourney/getImagineTasks', {
await this.$store.dispatch('midjourney/getTasks', {
limit: 30,
offset: 0
});
+13 -6
View File
@@ -73,6 +73,9 @@ export default defineComponent({
user() {
return this.$store.getters.user;
},
showSite() {
return this.$store?.state?.site?.admins?.includes(this.$store.getters.user?.id);
},
links(): ILink[] {
let links: ILink[] = [
{
@@ -105,12 +108,16 @@ export default defineComponent({
name: ROUTE_DISTRIBUTION_INDEX,
icon: 'fa-solid fa-coins'
},
{
key: 'site-index',
text: this.$t('common.nav.site'),
name: ROUTE_SITE_INDEX,
icon: 'fa-solid fa-gear'
},
...(this.showSite
? [
{
key: 'site-index',
text: this.$t('common.nav.site'),
name: ROUTE_SITE_INDEX,
icon: 'fa-solid fa-gear'
}
]
: []),
{
key: 'dark-setting',
text: this.$t('common.nav.darkMode'),