This commit is contained in:
iriska-gri committed 2023-11-02 16:54:44 +03:00
1 parent 139321f102
commit 88d785e657
12 files changed
+81 -175

No files matched your search

+35 -8
View File
@@ -37,23 +37,23 @@
>
<v-row class="ma-3">
<v-col
v-for="x in 6"
v-for="x in favorit"
:key="x"
lg=6
class="pa-1"
>
<v-btn
prepend-icon="mdi-wikipedia"
block
variant="outlined"
class="ma-1"
to="/news"
:to="x.fullPath"
>
Wiki
{{menuTruncated(x.page)}}
</v-btn>
</v-col>
</v-row>
<!-- <my-helper :pretext="t_daily"/> -->
<!-- <my-helper :pretext="favorit"/> -->
</v-card>
</v-col>
</v-row>
@@ -88,7 +88,7 @@
</template>
<script>
import { ref, onMounted } from 'vue'
import {useAppStore} from '@/store/app'
import {useAccountStore} from '@/store/AccountStore'
import {pagecounter} from '@/utils/universal_functions'
@@ -99,7 +99,7 @@
import NewsListHome from '@/components/news-list-home.vue'
import LoadRound from '@/components/load-round.vue'
import DigitalLetna from '@/components/digital-letna.vue'
import { axiosApiInstance } from '@/utils/axios-api'
export default {
components: {
@@ -112,14 +112,41 @@
DigitalLetna
},
setup(){
const appStore = useAppStore()
const favorit = ref([])
pagecounter()
const accountStore = useAccountStore()
onMounted(() => {
favoritLinks()
})
const favoritLinks = () => {
axiosApiInstance.get(`api/watcher/selectedlinks/`)
.then(data => {
favorit.value = data.data
})
}
const menuTruncated = (menus) => {
return menus.slice(0,7).toUpperCase()
}
return {
accountStore,
appStore
appStore,
favoritLinks,
favorit,
menuTruncated
}
}
}