Skip to content

Commit

Permalink
Add tooltip to specifications
Browse files Browse the repository at this point in the history
  • Loading branch information
PineappleIOnic committed Dec 18, 2024
1 parent 21f3d94 commit c95befe
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/lib/wizards/functions/components/specificationsTooltip.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<div class="u-flex-vertical u-gap-16">
<div class="u-flex-vertical u-gap-8">
<p>Additional CPU and RAM are available for Pro and Scale teams.</p>
<p>
<a
class="link"
target="_blank"
rel="noopener noreferrer"
href="https://appwrite.io/docs/products/functions/specificatinos">Learn more</a>
</p>
</div>
</div>

<style>
div {
color: hsl(var(--color-neutral-50));
line-height: 1.25rem;
&:first-child {
color: hsl(var(--color-neutral-70));
}
}
:global(.theme-dark) div {
color: hsl(var(--color-neutral-20));
&:first-child {
color: hsl(var(--color-neutral-10));
}
}
</style>
7 changes: 7 additions & 0 deletions src/lib/wizards/functions/steps/templateConfiguration.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
import { WizardStep } from '$lib/layout';
import { runtimesList } from '$lib/stores/runtimes';
import { specificationsList } from '$lib/stores/specifications';
import { BillingPlan } from '$lib/constants';
import SpecificationsTooltip from '../components/specificationsTooltip.svelte';
import { template, templateConfig } from '../store';
import { organization } from '$lib/stores/organization';
import { isCloud } from '$lib/system';
let showCustomId = false;
Expand Down Expand Up @@ -99,6 +103,9 @@
required
disabled={specificationOptions.length < 1}
options={specificationOptions}
popover={isCloud && $organization?.billingPlan === BillingPlan.FREE
? SpecificationsTooltip
: null}
bind:value={$templateConfig.specification} />
{/await}
</FormList>
Expand Down

0 comments on commit c95befe

Please sign in to comment.