Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions webapp/packages/core-blocks/src/HTMLTemplates/head.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<meta content="text/html; charset=utf-8" />
<link rel="alternate icon" type="image/png" href="favicon.png" sizes="16х16">
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="preload" as="font" />
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="preload" as="font"
crossorigin="anonymous" />
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet" crossorigin="anonymous" />
<link rel="prefetch" href="icons/icons.svg" as="image" type="image/svg+xml" />
4 changes: 3 additions & 1 deletion webapp/packages/core-blocks/src/Loader/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ interface Props {
loading?: boolean;
/** disable cancel button */
cancelDisabled?: boolean;
message?: string;
/** hides message */
hideMessage?: boolean;
/** render loader as overlay with white spinner */
Expand All @@ -41,6 +42,7 @@ const spinnerType = {
export const Loader: React.FC<Props> = function Loader({
cancelDisabled,
overlay,
message,
hideMessage,
secondary,
small,
Expand Down Expand Up @@ -72,7 +74,7 @@ export const Loader: React.FC<Props> = function Loader({
return styled(style)(
<loader as="div" className={className} {...use({ small, fullSize })}>
<icon as="div"><img src={spinnerURL} /></icon>
{!hideMessage && <message as="div"><Translate token='ui_processing_loading' /></message>}
{!hideMessage && <message as="div"><Translate token={message || 'ui_processing_loading'} /></message>}
{onCancel && (
<actions as='div'>
<Button
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-blocks/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export * from './StaticImage';
export * from './TextPlaceholder';
export * from './useClipboard';
export * from './useFocus';
export * from './useErrorDetails';
export * from './useAppLoadingScreen';
export * from './BlocksLocaleService';
export * from './Snackbars/NotificationMark';
Expand Down
12 changes: 12 additions & 0 deletions webapp/packages/core-utils/src/generateFileName.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* cloudbeaver - Cloud Database Manager
* Copyright (C) 2020 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/

export function generateFileName(fileName: string, fileFormat: string) {
const now = new Date();
return `${fileName}_${now.toISOString().slice(0, 10)}_${('0' + now.getHours()).slice(-2)}-${('0' + now.getMinutes()).slice(-2)}-${('0' + now.getSeconds()).slice(-2)}${fileFormat}`;
}
1 change: 1 addition & 0 deletions webapp/packages/core-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export * from './MetadataMap';
export * from './OrderedMap';
export * from './parseJSONFlat';
export * from './uuid_';
export * from './generateFileName';

export * from './Promises/CancellablePromise';
export * from './Promises/Deferred';
Expand Down