mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-19 17:17:50 +01:00
Compare commits
1 Commits
v2023.3.0-
...
v2023.3.0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7426dc8ce |
5
.github/workflows/artifacts.yml
vendored
5
.github/workflows/artifacts.yml
vendored
@@ -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 }}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "Yaak",
|
||||
"version": "2023.3.0-beta.1"
|
||||
"version": "2023.3.0-beta.2"
|
||||
},
|
||||
"tauri": {
|
||||
"windows": [],
|
||||
|
||||
@@ -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',
|
||||
|
||||
6
src-web/hooks/useAppVersion.ts
Normal file
6
src-web/hooks/useAppVersion.ts
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user