🐛 修复启动应用
This commit is contained in:
@@ -16,7 +16,7 @@ import { useCollectionStore } from '@/features/collection/store';
|
|||||||
import { useDownloadsStore } from '@/features/downloads/store';
|
import { useDownloadsStore } from '@/features/downloads/store';
|
||||||
import { Progress } from '@/components/ui/progress';
|
import { Progress } from '@/components/ui/progress';
|
||||||
import { X } from 'lucide-solid';
|
import { X } from 'lucide-solid';
|
||||||
import { checkIsInstalled, checkLaunchApp, launchApp } from '@/lib/api/deb';
|
import { checkIsInstalled, checkLaunchApp, launchLaunchApp } from '@/lib/api/deb';
|
||||||
|
|
||||||
const AppDetail: Component = () => {
|
const AppDetail: Component = () => {
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
@@ -128,14 +128,14 @@ const AppDetail: Component = () => {
|
|||||||
checkLaunchApp(params.pkgname).then(canLaunch => {
|
checkLaunchApp(params.pkgname).then(canLaunch => {
|
||||||
setAppCanLaunch(canLaunch);
|
setAppCanLaunch(canLaunch);
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
size="lg"
|
size="lg"
|
||||||
class='w-full'
|
class='w-full'
|
||||||
disabled={!appCanLaunch()}
|
disabled={!appCanLaunch()}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
launchApp(params.pkgname)
|
launchLaunchApp(params.pkgname)
|
||||||
showToast({ description: '正在启动应用...' });
|
showToast({ description: '正在启动应用...' });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user