mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-14 16:51:15 +10:00
Fix lints
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
<i18n>
|
||||||
|
{
|
||||||
|
"en": {
|
||||||
|
"↓": "↓",
|
||||||
|
"↑": "↑"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</i18n>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
@ -180,7 +189,7 @@
|
|||||||
>
|
>
|
||||||
{{ option.name }}
|
{{ option.name }}
|
||||||
<span v-if="currentSort === option.param">
|
<span v-if="currentSort === option.param">
|
||||||
{{ sortOrder === 'asc' ? '↑' : '↓' }}
|
{{ sortOrder === "asc" ? $t("↑") : $t("↓") }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
@ -500,11 +509,10 @@ await updateGames(filterQuery.value, true);
|
|||||||
function handleSortClick(option: StoreSortOption, event: MouseEvent) {
|
function handleSortClick(option: StoreSortOption, event: MouseEvent) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
if (currentSort.value === option.param) {
|
if (currentSort.value === option.param) {
|
||||||
sortOrder.value = sortOrder.value === 'asc' ? 'desc' : 'asc';
|
sortOrder.value = sortOrder.value === "asc" ? "desc" : "asc";
|
||||||
} else {
|
} else {
|
||||||
currentSort.value = option.param;
|
currentSort.value = option.param;
|
||||||
sortOrder.value = option.param === 'name' ? 'asc' : 'desc';
|
sortOrder.value = option.param === "name" ? "asc" : "desc";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -246,7 +246,11 @@ export class IGDBProvider implements MetadataProvider {
|
|||||||
return <T[]>response.data;
|
return <T[]>response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _getMediaInternal(mediaID: IGDBID, type: string, size: string = "t_thumb" ) {
|
private async _getMediaInternal(
|
||||||
|
mediaID: IGDBID,
|
||||||
|
type: string,
|
||||||
|
size: string = "t_thumb",
|
||||||
|
) {
|
||||||
if (mediaID === undefined)
|
if (mediaID === undefined)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`IGDB mediaID when getting item of type ${type} was undefined`,
|
`IGDB mediaID when getting item of type ${type} was undefined`,
|
||||||
@ -371,7 +375,7 @@ export class IGDBProvider implements MetadataProvider {
|
|||||||
} else {
|
} else {
|
||||||
context?.logger.info("Missing cover URL, using fallback...");
|
context?.logger.info("Missing cover URL, using fallback...");
|
||||||
iconRaw = jdenticon.toPng(id, 512);
|
iconRaw = jdenticon.toPng(id, 512);
|
||||||
coverRaw = iconRaw
|
coverRaw = iconRaw;
|
||||||
}
|
}
|
||||||
|
|
||||||
const icon = createObject(iconRaw);
|
const icon = createObject(iconRaw);
|
||||||
@ -469,7 +473,10 @@ export class IGDBProvider implements MetadataProvider {
|
|||||||
|
|
||||||
if (currentGame.summary.length > (currentGame.storyline?.length ?? 0)) {
|
if (currentGame.summary.length > (currentGame.storyline?.length ?? 0)) {
|
||||||
description = currentGame.summary;
|
description = currentGame.summary;
|
||||||
shortDescription = this.trimMessage(currentGame.storyline ?? currentGame.summary, 280);
|
shortDescription = this.trimMessage(
|
||||||
|
currentGame.storyline ?? currentGame.summary,
|
||||||
|
280,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
description = currentGame.storyline ?? currentGame.summary;
|
description = currentGame.storyline ?? currentGame.summary;
|
||||||
shortDescription = this.trimMessage(currentGame.summary, 280);
|
shortDescription = this.trimMessage(currentGame.summary, 280);
|
||||||
|
|||||||
Reference in New Issue
Block a user