Skip to content

Commit

Permalink
Fix bug preventing app from launching
Browse files Browse the repository at this point in the history
Hardcoding app info for now
Removed app name from tag name
  • Loading branch information
gaeljacquin committed Apr 24, 2024
1 parent 2fff810 commit c44bd56
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: media-downloader-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: 'Media Downloader v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
Expand Down
8 changes: 2 additions & 6 deletions app/components/views/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

import Image from "next/image";

import useAboutStore from '@/app/stores/about';

export default function About() {
const { author, title, description, version } = useAboutStore();

return (
<>
<div className="relative flex-col items-start gap-8 flex" x-chunk="dashboard-03-chunk-0">
Expand All @@ -24,10 +20,10 @@ export default function About() {
/>
</div>
<div className="grid justify-center">
<h1>{title} v{version} by {author}</h1>
<h1>Media Downloader v0.5.1 by Gaël Jacquin</h1>
</div>
<div className="grid justify-center">
<h1>{description}</h1>
<h1>yt-dlp GUI wrapper</h1>
</div>
<div className="grid justify-center">
<h1>Special thanks to the yt-dlp team</h1>
Expand Down
5 changes: 1 addition & 4 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ import { useEffect } from 'react';
import UI from "@/app/components/ui";
import { ViewProvider } from '@/app/contexts/view';
import { TerminalOutputProvider } from '@/app/contexts/terminal-output';
import useAboutStore from '@/app/stores/about';

export default function Home() {
const { fetchAppInfo } = useAboutStore();

useEffect(() => {
invoke('close_splashscreen');
fetchAppInfo();
}, [fetchAppInfo])
}, [])

return (
<>
Expand Down
13 changes: 1 addition & 12 deletions app/stores/about.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { create } from 'zustand';
import { devtools, persist } from 'zustand/middleware';
import { invoke } from '@tauri-apps/api/tauri';

interface AboutStore {
author: string
version: string
description: string
title: string
fetchAppInfo: () => Promise<void>
}

const defaultAboutData = {
Expand All @@ -20,17 +18,8 @@ const defaultAboutData = {
const useAboutStore = create<AboutStore>()(
persist(
devtools(
(set) => ({
() => ({
...defaultAboutData,
fetchAppInfo: async () => {
try {
const appInfo = await invoke('get_app_info');
const parsedAppInfo = JSON.parse(appInfo as string);
set(parsedAppInfo);
} catch (error) {
console.error('Failed to fetch app info:', error);
}
},
}),
), {
name: 'AboutStore',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Media Downloader",
"description": "yt-dlp GUI wrapper",
"author": "Gaël Jacquin",
"version": "0.5.0",
"version": "0.5.1",
"scripts": {
"dev": "next dev",
"build": "next build",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

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

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "app"
version = "0.5.0"
version = "0.5.1"
description = "yt-dlp GUI wrapper"
authors = ["Gaël Jacquin"]
license = "Unlicense license"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "Media Downloader",
"version": "0.5.0"
"version": "0.5.1"
},
"tauri": {
"allowlist": {
Expand Down

0 comments on commit c44bd56

Please sign in to comment.