mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 03:03:37 +02:00
snake_case icons and better toast styles
This commit is contained in:
@@ -15,7 +15,8 @@ export function useCopy({ disableToast }: { disableToast?: boolean } = {}) {
|
||||
if (text != '' && !disableToast) {
|
||||
toast.show({
|
||||
id: 'copied',
|
||||
variant: 'copied',
|
||||
color: 'secondary',
|
||||
icon: 'copy',
|
||||
message: 'Copied to clipboard',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useMemo } from 'react';
|
||||
import type { DropdownItem } from '../components/core/Dropdown';
|
||||
import { Icon } from '../components/core/Icon';
|
||||
import { BODY_TYPE_GRAPHQL } from '../lib/models';
|
||||
import { BODY_TYPE_GRAPHQL } from '../lib/model_util';
|
||||
import { useCreateFolder } from './useCreateFolder';
|
||||
import { useCreateGrpcRequest } from './useCreateGrpcRequest';
|
||||
import { useCreateHttpRequest } from './useCreateHttpRequest';
|
||||
|
||||
@@ -33,7 +33,7 @@ export function useExportData() {
|
||||
activeWorkspace={activeWorkspace}
|
||||
onSuccess={() => {
|
||||
toast.show({
|
||||
variant: 'success',
|
||||
color: 'success',
|
||||
message: 'Data export successful',
|
||||
});
|
||||
}}
|
||||
|
||||
@@ -39,7 +39,7 @@ export function useImportCurl() {
|
||||
}
|
||||
|
||||
toast.show({
|
||||
variant: 'success',
|
||||
color: 'success',
|
||||
message: `${verb} request from Curl`,
|
||||
});
|
||||
},
|
||||
|
||||
@@ -51,7 +51,7 @@ export function useImportQuerystring(requestId: string) {
|
||||
if (additionalUrlParameters.length > 0) {
|
||||
toast.show({
|
||||
id: 'querystring-imported',
|
||||
variant: 'info',
|
||||
color: 'info',
|
||||
message: `Imported ${additionalUrlParameters.length} ${pluralize('param', additionalUrlParameters.length)} from URL`,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isResponseLoading } from '../lib/models';
|
||||
import { isResponseLoading } from '../lib/model_util';
|
||||
import { useLatestHttpResponse } from './useLatestHttpResponse';
|
||||
|
||||
export function useIsResponseLoading(requestId: string | null): boolean {
|
||||
|
||||
@@ -27,7 +27,7 @@ export function useNotificationToast() {
|
||||
id: payload.id,
|
||||
timeout: null,
|
||||
message: payload.message,
|
||||
variant: 'custom',
|
||||
color: 'custom',
|
||||
onClose: () => markRead(payload.id),
|
||||
action:
|
||||
actionLabel && actionUrl ? (
|
||||
|
||||
@@ -5,7 +5,7 @@ import slugify from 'slugify';
|
||||
import { InlineCode } from '../components/core/InlineCode';
|
||||
import { useToast } from '../components/ToastContext';
|
||||
import type { HttpResponse } from '@yaakapp/api';
|
||||
import { getContentTypeHeader } from '../lib/models';
|
||||
import { getContentTypeHeader } from '../lib/model_util';
|
||||
import { getHttpRequest } from '../lib/store';
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user