mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-11 17:46:41 -05:00
Fix redirecting to latest workspace
This commit is contained in:
@@ -19,7 +19,7 @@ use sea_query::{Cond, Expr, OnConflict, Order, Query, SqliteQueryBuilder};
|
||||
use sea_query_rusqlite::RusqliteBinder;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::path::Path;
|
||||
use tauri::{AppHandle, Emitter, Listener, Manager, Runtime, WebviewWindow};
|
||||
use ts_rs::TS;
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
import type { LicenseCheckStatus } from '@yaakapp-internal/license';
|
||||
import { useLicense } from '@yaakapp-internal/license';
|
||||
import { appInfo } from '../hooks/useAppInfo';
|
||||
import { useOpenSettings } from '../hooks/useOpenSettings';
|
||||
import type { ButtonProps } from './core/Button';
|
||||
import { Button } from './core/Button';
|
||||
import {SettingsTab} from "./Settings/SettingsTab";
|
||||
import { SettingsTab } from './Settings/SettingsTab';
|
||||
|
||||
const details: Record<
|
||||
LicenseCheckStatus['type'],
|
||||
LicenseCheckStatus['type'] | 'dev',
|
||||
{ label: string; color: ButtonProps['color'] } | null
|
||||
> = {
|
||||
dev: { label: 'Develop', color: 'secondary' },
|
||||
commercial_use: null,
|
||||
invalid_license: { label: 'License Error', color: 'danger' },
|
||||
personal_use: { label: 'Personal Use', color: 'primary' },
|
||||
@@ -23,7 +25,8 @@ export function LicenseBadge() {
|
||||
return null;
|
||||
}
|
||||
|
||||
const detail = details[check.data.type];
|
||||
const checkType = appInfo.isDev ? 'dev' : check.data.type;
|
||||
const detail = details[checkType];
|
||||
if (detail == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export function RedirectToLatestWorkspace() {
|
||||
const search = {
|
||||
cookie_jar_id: cookieJarId,
|
||||
environment_id: environmentId,
|
||||
requestId: requestId,
|
||||
request_id: requestId,
|
||||
};
|
||||
|
||||
await router.navigate({ to: '/workspaces/$workspaceId', params, search });
|
||||
|
||||
Reference in New Issue
Block a user