Skip to content

Commit

Permalink
Merge pull request #1 from joao-salomao/setup-husky
Browse files Browse the repository at this point in the history
Setup husky
  • Loading branch information
joao-salomao authored Nov 17, 2024
2 parents 55d6785 + 65f8c7f commit 94f8206
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- release

env:
# Disable the Husky hooks
HUSKY: 0

jobs:
release:
permissions:
Expand Down
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm run tsc
cd src-tauri && cargo check
22 changes: 22 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"tsc": "vue-tsc",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"tauri": "tauri"
"tauri": "tauri",
"prepare": "husky"
},
"dependencies": {
"@tato30/vue-pdf": "^1.11.2",
Expand All @@ -30,6 +31,7 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.5",
"husky": "^9.1.6",
"typescript": "^5.2.2",
"unplugin-vue-components": "^0.27.4",
"vite": "^5.3.1",
Expand Down
7 changes: 4 additions & 3 deletions src/components/MangaList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div v-else class="manga-list-container">
<div
v-for="(item, index) in sourceMangas"
:key="[item.anilist?.id, index].join('-')"
:key="[source, item.title, index].join('-')"
class="manga-container"
>
<div class="manga-details">
Expand All @@ -37,7 +37,8 @@
</div>

<div class="actions">
<span v-tooltip="!item.chaptersAvailableToDownload ? 'There are no chapters available for download' : null">
<span
v-tooltip="!item.chaptersAvailableToDownload ? 'There are no chapters available for download' : null">
<Button v-if="allowDownload" size="small" label="Download"
icon="pi pi-download"
:disabled="!item.chaptersAvailableToDownload"
Expand Down Expand Up @@ -134,7 +135,7 @@ const mangasAddedToLibraryBySourceAndTitle = computed<Record<string, Record<stri
function openAnilistPage(manga: Manga) {
const element = document.createElement('a')
element.href = manga.anilist!.siteUrl
element.href = manga.anilist!.siteUrl!
element.target = '_blank'
document.body.appendChild(element)
Expand Down
2 changes: 1 addition & 1 deletion src/models/Manga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class Manga {
}

anilist?: {
siteUrl: string;
siteUrl?: string;
}

downloadedChapters?: Array<DownloadedChapter>
Expand Down

0 comments on commit 94f8206

Please sign in to comment.