Compare commits

..

1 Commits

Author SHA1 Message Date
Gregory Schier
f7426dc8ce Better dropdown menu 2023-11-14 10:56:56 -08:00
5 changed files with 14 additions and 5 deletions

View File

@@ -17,8 +17,9 @@ jobs:
target: x86_64-apple-darwin
- os: windows-2022
target: x86_64-pc-windows-msvc
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
# # Re-enable Linux when context menu is supported
# - os: ubuntu-20.04
# target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os }}

View File

@@ -41,7 +41,7 @@ impl YaakUpdater {
if dialog::blocking::ask(
None::<&Window>,
"Update available",
"An update is available. Would you like to download and install it now?",
format!("{} is available. Would you like to download and install it now?", update.latest_version()),
) {
_ = update.download_and_install().await;
}

View File

@@ -8,7 +8,7 @@
},
"package": {
"productName": "Yaak",
"version": "2023.3.0-beta.1"
"version": "2023.3.0-beta.2"
},
"tauri": {
"windows": [],

View File

@@ -3,6 +3,7 @@ import classNames from 'classnames';
import { memo, useMemo } from 'react';
import { useActiveWorkspace } from '../hooks/useActiveWorkspace';
import { useAppRoutes } from '../hooks/useAppRoutes';
import { useAppVersion } from '../hooks/useAppVersion';
import { useCreateWorkspace } from '../hooks/useCreateWorkspace';
import { useDeleteWorkspace } from '../hooks/useDeleteWorkspace';
import { useExportData } from '../hooks/useExportData';
@@ -40,6 +41,7 @@ export const WorkspaceActionsDropdown = memo(function WorkspaceActionsDropdown({
const dialog = useDialog();
const prompt = usePrompt();
const routes = useAppRoutes();
const appVersion = useAppVersion();
const [updateMode, setUpdateMode] = useUpdateMode();
const items: DropdownItem[] = useMemo(() => {
@@ -159,7 +161,7 @@ export const WorkspaceActionsDropdown = memo(function WorkspaceActionsDropdown({
leftSlot: <Icon icon="upload" />,
onSelect: () => exportData.mutate(),
},
{ type: 'separator' },
{ type: 'separator', label: `v${appVersion.data}` },
{
key: 'appearance',
label: 'Toggle Theme',

View File

@@ -0,0 +1,6 @@
import { useQuery } from '@tanstack/react-query';
import { getVersion } from '@tauri-apps/api/app';
export function useAppVersion() {
return useQuery<string>(['appVersion'], getVersion);
}