Git support (#143)

This commit is contained in:
Gregory Schier
2025-02-07 07:59:48 -08:00
committed by GitHub
parent cffc7714c1
commit 1a7c27663a
111 changed files with 4264 additions and 372 deletions

View File

@@ -3,18 +3,26 @@ import type { LicenseCheckStatus } from '@yaakapp-internal/license';
import { useLicense } from '@yaakapp-internal/license';
import type { ReactNode } from 'react';
import { appInfo } from '../hooks/useAppInfo';
import { useOpenSettings } from '../hooks/useOpenSettings';
import type { ButtonProps } from './core/Button';
import { Button } from './core/Button';
import {HStack} from "./core/Stacks";
import { SettingsTab } from './Settings/SettingsTab';
import { Icon } from './core/Icon';
import { HStack } from './core/Stacks';
import { openSettings } from '../commands/openSettings';
import {SettingsTab} from "./Settings/SettingsTab";
const details: Record<
LicenseCheckStatus['type'] | 'dev' | 'beta',
{ label: ReactNode; color: ButtonProps['color'] } | null
> = {
beta: { label: <HStack space={1}><span>Beta Feedback</span><Icon size="xs" icon='external_link'/></HStack>, color: 'info' },
beta: {
label: (
<HStack space={1}>
<span>Beta Feedback</span>
<Icon size="xs" icon="external_link" />
</HStack>
),
color: 'info',
},
dev: { label: 'Develop', color: 'secondary' },
commercial_use: null,
invalid_license: { label: 'License Error', color: 'danger' },
@@ -23,7 +31,6 @@ const details: Record<
};
export function LicenseBadge() {
const openSettings = useOpenSettings(SettingsTab.License);
const { check } = useLicense();
if (check.data == null) {
@@ -49,7 +56,7 @@ export function LicenseBadge() {
if (checkType === 'beta') {
await openUrl('https://feedback.yaak.app');
} else {
openSettings.mutate();
openSettings.mutate(SettingsTab.License);
}
}}
color={detail.color}