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
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
} else if (reason === InvalidFileType.SIZE) {
addNotification({
type: 'error',
message: 'File size exceeds 10MB'
message: `File size exceeds ${readableMaxSize.value}${readableMaxSize.unit}`
});
} else {
addNotification({
Expand Down Expand Up @@ -188,9 +188,9 @@
: [];

$: maxSize =
isCloud && $currentPlan
isCloud && $currentPlan?.deploymentSize
? $currentPlan.deploymentSize * 1000000
: $regionalConsoleVariables._APP_COMPUTE_SIZE_LIMIT; // already in MB
: $regionalConsoleVariables._APP_COMPUTE_SIZE_LIMIT;

$: readableMaxSize = humanFileSize(maxSize);
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
$: maxSize =
isCloud && $currentPlan?.deploymentSize
? $currentPlan.deploymentSize * 1000000
: $consoleVariables._APP_COMPUTE_SIZE_LIMIT; // already in MB
: $consoleVariables._APP_COMPUTE_SIZE_LIMIT;

$: readableMaxSize = humanFileSize(maxSize);

Expand Down Expand Up @@ -58,7 +58,7 @@
if (reason === InvalidFileType.EXTENSION) {
error = 'Only .tar.gz files allowed';
} else if (reason === InvalidFileType.SIZE) {
error = 'File size exceeds 10MB';
error = `File size exceeds ${readableMaxSize.value}${readableMaxSize.unit}`;
} else {
error = 'Invalid file';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,22 +104,35 @@
</Layout.Stack>

<svelte:fragment slot="footer">
<Layout.Stack direction="row" justifyContent="space-between">
<Button text disabled={loading} on:click={handleBackToOrganization}>
Back to organization
</Button>
<Layout.Stack direction="row" justifyContent="flex-end">
<Button secondary disabled={loading} on:click={handleResume}>
{#if $isSmallViewport}
<Layout.Stack gap="xs">
<Button disabled={loading} fullWidth on:click={handleResume}>
{#if loading}
Restoring...
{:else}
Restore project
{/if}
</Button>
{#if !$isSmallViewport}
<Button text disabled={loading} fullWidth on:click={handleBackToOrganization}>
Go to organization
</Button>
</Layout.Stack>
{:else}
<Layout.Stack direction="row" justifyContent="space-between">
<Button text disabled={loading} on:click={handleBackToOrganization}>
Back to organization
</Button>
<Layout.Stack direction="row" justifyContent="flex-end">
<Button secondary disabled={loading} on:click={handleResume}>
{#if loading}
Restoring...
{:else}
Restore project
{/if}
</Button>
<Button disabled={loading} on:click={handleUpgrade}>Upgrade</Button>
{/if}
</Layout.Stack>
</Layout.Stack>
</Layout.Stack>
{/if}
</svelte:fragment>
</Modal>
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
let files: FileList;

$: maxSize =
isCloud && $currentPlan
isCloud && $currentPlan?.deploymentSize
? $currentPlan.deploymentSize * 1000000
: $regionalConsoleVariables._APP_COMPUTE_SIZE_LIMIT; // already in MB
: $regionalConsoleVariables._APP_COMPUTE_SIZE_LIMIT;

$: readableMaxSize = humanFileSize(maxSize);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
let error: string = '';

$: maxSize =
isCloud && $currentPlan
isCloud && $currentPlan?.deploymentSize
? $currentPlan.deploymentSize * 1000000
: $consoleVariables._APP_COMPUTE_SIZE_LIMIT; // already in MB
: $consoleVariables._APP_COMPUTE_SIZE_LIMIT;

$: readableMaxSize = humanFileSize(maxSize);

Expand Down Expand Up @@ -58,7 +58,7 @@
if (reason === InvalidFileType.EXTENSION) {
error = 'Only .tar.gz files allowed';
} else if (reason === InvalidFileType.SIZE) {
error = 'File size exceeds 10MB';
error = `File size exceeds ${readableMaxSize.value}${readableMaxSize.unit}`;
} else {
error = 'Invalid file';
}
Expand Down
Loading