Binary file uploads and missing workspace empty state

This commit is contained in:
Gregory Schier
2024-03-10 10:56:38 -07:00
parent ce9ccd34e7
commit efd7e7bf84
27 changed files with 214 additions and 47 deletions

View File

@@ -1,11 +1,8 @@
import { invoke } from '@tauri-apps/api';
import type { KeyValue } from './models';
export const NAMESPACE_GLOBAL = 'global';
export const NAMESPACE_NO_SYNC = 'no_sync';
export async function setKeyValue<T>({
namespace = NAMESPACE_GLOBAL,
namespace = 'global',
key,
value,
}: {
@@ -21,7 +18,7 @@ export async function setKeyValue<T>({
}
export async function getKeyValue<T>({
namespace = NAMESPACE_GLOBAL,
namespace = 'global',
key,
fallback,
}: {

View File

@@ -1,6 +1,7 @@
export const BODY_TYPE_NONE = null;
export const BODY_TYPE_GRAPHQL = 'graphql';
export const BODY_TYPE_JSON = 'application/json';
export const BODY_TYPE_BINARY = 'binary';
export const BODY_TYPE_OTHER = 'other';
export const BODY_TYPE_FORM_URLENCODED = 'application/x-www-form-urlencoded';
export const BODY_TYPE_FORM_MULTIPART = 'multipart/form-data';

View File

@@ -1,8 +1,8 @@
import { appWindow } from '@tauri-apps/api/window';
import { NAMESPACE_NO_SYNC, getKeyValue, setKeyValue } from './keyValueStore';
import { getKeyValue, setKeyValue } from './keyValueStore';
const key = ['window_pathname', appWindow.label];
const namespace = NAMESPACE_NO_SYNC;
const namespace = 'no_sync';
const fallback = undefined;
export async function setPathname(value: string) {