mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-20 15:51:23 +02:00
Don't persist settings tab
This commit is contained in:
@@ -69,7 +69,6 @@ export const RequestPane = memo(function RequestPane({
|
|||||||
|
|
||||||
const handleContentTypeChange = useCallback(
|
const handleContentTypeChange = useCallback(
|
||||||
async (contentType: string | null) => {
|
async (contentType: string | null) => {
|
||||||
console.log('UPDATE CONTENT TYPE', contentType);
|
|
||||||
const headers = activeRequest.headers.filter((h) => h.name.toLowerCase() !== 'content-type');
|
const headers = activeRequest.headers.filter((h) => h.name.toLowerCase() !== 'content-type');
|
||||||
|
|
||||||
if (contentType != null) {
|
if (contentType != null) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
|
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import React from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useKeyPressEvent, useLocalStorage } from 'react-use';
|
import { useKeyPressEvent } from 'react-use';
|
||||||
import { useOsInfo } from '../../hooks/useOsInfo';
|
import { useOsInfo } from '../../hooks/useOsInfo';
|
||||||
import { capitalize } from '../../lib/capitalize';
|
import { capitalize } from '../../lib/capitalize';
|
||||||
import { HStack } from '../core/Stacks';
|
import { HStack } from '../core/Stacks';
|
||||||
@@ -20,7 +20,7 @@ const tabs = [Tab.General, Tab.Appearance];
|
|||||||
|
|
||||||
export const Settings = () => {
|
export const Settings = () => {
|
||||||
const osInfo = useOsInfo();
|
const osInfo = useOsInfo();
|
||||||
const [tab, setTab] = useLocalStorage<string>('settings_tab', Tab.General);
|
const [tab, setTab] = useState<string>(Tab.General);
|
||||||
|
|
||||||
// Close settings window on escape
|
// Close settings window on escape
|
||||||
// TODO: Could this be put in a better place? Eg. in Rust key listener when creating the window
|
// TODO: Could this be put in a better place? Eg. in Rust key listener when creating the window
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ export function SettingsGeneral() {
|
|||||||
value={settings.updateChannel}
|
value={settings.updateChannel}
|
||||||
onChange={(updateChannel) => updateSettings.mutate({ updateChannel })}
|
onChange={(updateChannel) => updateSettings.mutate({ updateChannel })}
|
||||||
options={[
|
options={[
|
||||||
{ label: 'Release', value: 'stable' },
|
{ label: 'Stable (less frequent)', value: 'stable' },
|
||||||
{ label: 'Early Bird (Beta)', value: 'beta' },
|
{ label: 'Beta (more frequent)', value: 'beta' },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<IconButton
|
<IconButton
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export function useIntrospectGraphQL(baseRequest: HttpRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { data } = JSON.parse(bodyText);
|
const { data } = JSON.parse(bodyText);
|
||||||
console.log('Introspection response', data);
|
console.log(`Got introspection response for ${baseRequest.url}`, data);
|
||||||
await setIntrospection(data);
|
await setIntrospection(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user