Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,19 @@ const sort = computed({
const sortOptions = [
{
label: 'Alphabeticly',
value: 'name_ASC'
value: 'name_asc'
},
{
label: 'Most contributors',
value: 'contributorsCount_DESC'
value: 'contributorCount_desc'
},
{
label: 'Most organizations',
value: 'organizationsCount_DESC'
value: 'organizationCount_desc'
},
// {
// label: 'Most valuable',
// value: 'softwareValueCount_DESC'
// value: 'softwareValueCount_desc'
// },
];
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
class="leading-6 transition-all"
:class="scrollTop > 50 ? 'text-xs md:text-sm' : 'text-xs md:text-base'"
>
{{formatNumberShort(props.collection.projectsCount)}} projects
{{formatNumberShort(props.collection.projectCount)}} projects
</p>
</article>
<!--<article class="flex items-center gap-2 h-min">-->
Expand Down Expand Up @@ -108,9 +108,9 @@
</template>

<script lang="ts" setup>
import type {Collection} from "~~/types/collection";
import LfxIconButton from "~/components/uikit/icon-button/icon-button.vue";
import LfxBack from "~/components/uikit/back/back.vue";
import type {Collection} from "~/components/modules/collection/types/Collection";
import {formatNumberShort} from "~/components/shared/utils/formatter";
import LfxIcon from "~/components/uikit/icon/icon.vue";
import useScroll from "~/components/shared/utils/scroll";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/>
</div>
<p class="leading-6 transition-all text-sm whitespace-nowrap">
{{formatNumberShort(props.collection.projectsCount)}} projects
{{formatNumberShort(props.collection.projectCount)}} projects
</p>
</article>
<!-- <article class="flex items-center gap-2">-->
Expand Down Expand Up @@ -71,7 +71,7 @@
</template>

<script setup lang="ts">
import type {Collection} from "~/components/modules/collection/types/Collection";
import type {Collection} from "~~/types/collection";
import LfxCard from "~/components/uikit/card/card.vue";
import LfxChip from "~/components/uikit/chip/chip.vue";
import LfxAvatar from "~/components/uikit/avatar/avatar.vue";
Expand Down
13 changes: 0 additions & 13 deletions frontend/app/components/modules/collection/types/Collection.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@
</template>

<script setup lang="ts">
import type {Collection} from "~/components/modules/collection/types/Collection";
import {useRoute} from 'vue-router';
import type {Collection} from "~~/types/collection";
import type {Project} from "~~/types/project";
import type {Pagination} from "~~/types/shared/pagination";
import LfxCollectionHeader from "~/components/modules/collection/components/details/header.vue";
import LfxCollectionFilters from "~/components/modules/collection/components/details/filters.vue";
import LfxProjectListItem from "~/components/modules/project/components/list/project-list-item.vue";
import type {Project} from "~/components/modules/project/types/project";
import type {Pagination} from "~/components/shared/types/pagination";
import LfxProjectListItemLoading from "~/components/modules/project/components/list/project-list-item-loading.vue";
import useScroll from "~/components/shared/utils/scroll";
import LfxIcon from "~/components/uikit/icon/icon.vue";
Expand All @@ -66,18 +67,21 @@ const props = defineProps<{
collection: Collection
}>()

const route = useRoute();
const collectionSlug = route.params.slug as string;

const {scrollTopPercentage} = useScroll();

const sort = ref('name_ASC');
const sort = ref('name_asc');
const tab = ref('all');

const page = ref(1);
const page = ref(0);
const pageSize = ref(50);

const projects = ref([]);

watch([sort, tab], () => {
page.value = 1;
page.value = 0;
});

const { data, status } = await useFetch<Pagination<Project>>(
Expand All @@ -88,10 +92,11 @@ const { data, status } = await useFetch<Pagination<Project>>(
page,
pageSize,
isLf: tab.value === 'lfx',
collectionSlug
},
watch: [sort, tab, page],
transform: (res: Pagination<Project>) => {
if (res.page === 1) {
if (res.page === 0) {
projects.value = res.data;
} else {
projects.value = [...projects.value, ...res.data];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@
<script setup lang="ts">
import {useFetch} from "nuxt/app";
import {watch} from "vue";
import type {Pagination} from "~~/types/shared/pagination";
import type {Collection} from "~~/types/collection";
import LfxIcon from '~/components/uikit/icon/icon.vue';
import LfxTag from '~/components/uikit/tag/tag.vue';
import LfxDropdown from '~/components/uikit/dropdown/dropdown.vue';
import LfxCollectionListItem from '~/components/modules/collection/components/list/collection-list-item.vue';
import type {Pagination} from "~/components/shared/types/pagination";
import type {Collection} from "~/components/modules/collection/types/Collection";
import {ToastTypesEnum} from "~/components/uikit/toast/types/toast.types";
import useToastService from "~/components/uikit/toast/toast.service";
import useResponsive from "~/components/shared/utils/responsive";
Expand All @@ -111,7 +111,7 @@ const {scrollTop} = useScroll();

const page = ref(0);
const pageSize = ref(10);
const sort = ref('name_ASC');
const sort = ref('name_asc');

// const stack = ref('');
// const industry = ref('');
Expand Down Expand Up @@ -167,15 +167,15 @@ watch(error, (err) => {
const sortOptions = [
{
label: 'Alphabetically',
value: 'name_ASC'
value: 'name_asc'
},
{
label: 'Most projects',
value: 'projectCount_DESC'
value: 'projectCount_desc'
},
// {
// label: 'Most valuable',
// value: 'softwareValueCount_DESC'
// value: 'softwareValueCount_desc'
// },
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
Contributors
</lfx-tag>
<p class="text-body-1">
{{formatNumber(props.project.contributorsCount)}}
{{formatNumber(props.project.contributorCount)}}
</p>
</article>
<article class="flex justify-between items-center">
Expand All @@ -44,7 +44,7 @@
Organizations
</lfx-tag>
<p class="text-body-1">
{{formatNumber(props.project.organizationsCount)}}
{{formatNumber(props.project.organizationCount)}}
</p>
</article>
<!--<article class="flex justify-between items-center">-->
Expand All @@ -68,12 +68,12 @@
</template>

<script lang="ts" setup>
import type {Project} from "~~/types/project";
import {formatNumber} from "~/components/shared/utils/formatter";
import LfxCard from "~/components/uikit/card/card.vue";
import LfxAvatar from "~/components/uikit/avatar/avatar.vue";
import LfxTag from "~/components/uikit/tag/tag.vue";
import LfxIcon from "~/components/uikit/icon/icon.vue";
import type {Project} from "~/components/modules/project/types/project";
import {LfxRoutes} from "~/components/shared/types/routes";

const props = defineProps<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
<script lang="ts" setup>
import {useRoute} from 'nuxt/app';
import {computed} from 'vue';
import type {Project} from "~~/types/project";
import {LfxRoutes} from '~/components/shared/types/routes';
import LfxIcon from '~/components/uikit/icon/icon.vue';
import LfxMenuButton from '~/components/uikit/menu-button/menu-button.vue';
Expand All @@ -136,7 +137,6 @@ import useScroll from "~/components/shared/utils/scroll";
import LfxIconButton from "~/components/uikit/icon-button/icon-button.vue";
import LfxShare from "~/components/uikit/share/share.vue";
import LfxProjectRepositorySwitch from "~/components/modules/project/components/shared/header/repository-switch.vue";
import type {Project} from "~/components/modules/project/types/project";
import LfxBack from "~/components/uikit/back/back.vue";
import LfxProjectDateRangePicker from "~/components/modules/project/components/shared/header/date-range-picker.vue";
import LfxMaintainHeight from "~/components/uikit/maintain-height/maintain-height.vue";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ import {
computed, onMounted, ref, watch
} from "vue";
import {storeToRefs} from "pinia";
import type {ProjectRepository} from "~~/types/project";
import LfxModal from "~/components/uikit/modal/modal.vue";
import LfxIcon from "~/components/uikit/icon/icon.vue";
import type {ProjectRepository} from "~/components/modules/project/types/project";
import LfxProjectRepositorySwitchItem
from "~/components/modules/project/components/shared/header/repository-switch-item.vue";
import {LfxRoutes} from "~/components/shared/types/routes";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import {
dateOptKeys,
lfxProjectDateOptions
} from '~/components/modules/project/config/date-options';
import type {
Project,
ProjectRepository
} from '~/components/modules/project/types/project';
import type {Project, ProjectRepository} from "~~/types/project";
import { getRepoNameFromUrl } from '~/components/modules/repository/utils/repository.helpers';

export const useProjectStore = defineStore('project', () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/components/shared/layout/navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="h-14 lg:h-17 flex justify-between items-center gap-4 lg:gap-5">
<div class="flex items-center gap-6 flex-grow min-w-0">
<div>
<nuxt-link :to="{ name: LfxRoutes.EXPLORE }">
<nuxt-link :to="{ name: LfxRoutes.COLLECTIONS }">
<img
src="~/assets/images/logo.svg"
alt="LFX Insights"
Expand Down
6 changes: 3 additions & 3 deletions frontend/app/components/shared/layout/search/search-modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
<script setup lang="ts">
import { computed, onMounted, ref } from "vue";
import { debounce } from "lodash";
import type {
SearchCollection, SearchProject, SearchRepository, SearchResults
} from "~~/types/search";
import LfxModal from "~/components/uikit/modal/modal.vue";
import LfxIcon from "~/components/uikit/icon/icon.vue";
import LfxSearchResult from "~/components/shared/layout/search/search-result.vue";
import type {
SearchCollection, SearchProject, SearchRepository, SearchResults
} from "~/components/shared/types/search";
import LfxSpinner from "~/components/uikit/spinner/spinner.vue";

const props = defineProps<{ modelValue: boolean }>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@

<script setup lang="ts">
import {useRoute} from "nuxt/app";
import type {SearchCollection, SearchProject, SearchRepository} from "~~/types/search";
import LfxTabs from "~/components/uikit/tabs/tabs.vue";
import LfxAvatar from "~/components/uikit/avatar/avatar.vue";
import LfxIcon from "~/components/uikit/icon/icon.vue";
import {LfxRoutes} from "~/components/shared/types/routes";
import type {SearchCollection, SearchProject, SearchRepository} from "~/components/shared/types/search";
import {getRepoNameFromUrl} from "~/components/modules/repository/utils/repository.helpers";

const props = defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/pages/collection/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import {
useFetch, useRoute, createError, showError
} from "nuxt/app";
import type {Collection} from "~~/types/collection";
import LfxCollectionDetailsView from "~/components/modules/collection/views/collection-details.vue";
import type {Collection} from "~/components/modules/collection/types/Collection";

const route = useRoute();
const {slug} = route.params;
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/pages/project/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
useRoute,
} from "nuxt/app";
import {storeToRefs} from "pinia";
import type {Project} from "~~/types/project";
import LfxProjectHeader from "~/components/modules/project/components/shared/header.vue";
import type {Project} from "~/components/modules/project/types/project";
import {useProjectStore} from "~/components/modules/project/store/project.store";

const route = useRoute();
Expand Down
22 changes: 14 additions & 8 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path';
import { fileURLToPath } from 'url';
import { FlatCompat } from '@eslint/eslintrc';
import {fileURLToPath} from 'url';
import {FlatCompat} from '@eslint/eslintrc';
import withNuxt from './.nuxt/eslint.config.mjs';

const filename = fileURLToPath(import.meta.url);
Expand All @@ -11,9 +11,9 @@ const compat = new FlatCompat({
});
const getRules = (extendedRules, excludeKeys = null) => {
const rules = extendedRules
.filter((rule) => rule.rules)
.map((rule) => rule.rules)
.reduce((r, c) => Object.assign(r, c), {});
.filter((rule) => rule.rules)
.map((rule) => rule.rules)
.reduce((r, c) => Object.assign(r, c), {});

if (excludeKeys) {
// remove all the properties from the rules object that matches the excludeKeys string
Expand All @@ -37,12 +37,18 @@ export default withNuxt({
extensions: ['.js', '.jsx', '.ts', '.tsx'],
map: [
['@', './app'],
['~', './app']
['~', './app'],
['~~', '.']
]
},
typescript: {}
typescript: {
paths: {
'~/*': ['./app/*'],
'@/*': ['./app/*'],
'~~/*': ['./*']
}
}
}
// extends: [...compat.extends('airbnb-base'), ...compat.extends('airbnb-typescript/base')],
},
ignores: ['*.config.*js', '.tailwind/*'],
rules: {
Expand Down
1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"@nuxt/eslint": "^0.7.5",
"@pinia/nuxt": "0.9.0",
"@primevue/themes": "^4.2.5",
"dayjs": "^1.11.13",
"echarts": "^5.6.0",
"eslint": "^9.18.0",
"lodash": "^4.17.21",
Expand Down
8 changes: 0 additions & 8 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading