mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: setting page missing on selfhosted, heading trim and alignment
This commit is contained in:
1 parent
942c2f729c
commit
3d710ce3a3
5 files changed
+49
-22
No files matched your search
@@ -100,7 +100,11 @@
|
||||
|
||||
<svelte:window on:click={onBlur} on:keydown={onKeyDown} />
|
||||
|
||||
<div class:drop-wrapper={!noStyle} class:u-cross-child-start={childStart} bind:this={element}>
|
||||
<div
|
||||
class="u-min-width-0"
|
||||
class:drop-wrapper={!noStyle}
|
||||
class:u-cross-child-start={childStart}
|
||||
bind:this={element}>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
export { classes as class };
|
||||
</script>
|
||||
|
||||
<svelte:element this={tag} class={`heading-level-${size} ${classes}`} class:u-trim-1={trimmed} {id}>
|
||||
<svelte:element
|
||||
this={tag}
|
||||
class={`heading-level-${size} u-min-width-0 ${classes}`}
|
||||
class:u-trim-1={trimmed}
|
||||
{id}>
|
||||
<slot />
|
||||
</svelte:element>
|
||||
@@ -2,7 +2,15 @@
|
||||
import { base } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
import { tooltip } from '$lib/actions/tooltip';
|
||||
import { AvatarGroup, DropList, DropListItem, DropListLink, Tab, Tabs } from '$lib/components';
|
||||
import {
|
||||
AvatarGroup,
|
||||
DropList,
|
||||
DropListItem,
|
||||
DropListLink,
|
||||
Heading,
|
||||
Tab,
|
||||
Tabs
|
||||
} from '$lib/components';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
@@ -41,6 +49,13 @@
|
||||
$: avatars = $members.memberships?.map((m) => m.userName) ?? [];
|
||||
$: organizationId = $page.params.organization;
|
||||
$: path = `/console/organization-${organizationId}`;
|
||||
$: permanentTabSettings = [
|
||||
{
|
||||
href: `${path}/settings`,
|
||||
event: 'settings',
|
||||
title: 'Settings'
|
||||
}
|
||||
];
|
||||
$: permanentTabs = [
|
||||
{
|
||||
href: path,
|
||||
@@ -55,13 +70,7 @@
|
||||
hasChildren: true
|
||||
}
|
||||
];
|
||||
$: permanentTabSettings = [
|
||||
{
|
||||
href: `${path}/settings`,
|
||||
event: 'settings',
|
||||
title: 'Settings'
|
||||
}
|
||||
];
|
||||
|
||||
$: tabs = isCloud
|
||||
? [
|
||||
...permanentTabs,
|
||||
@@ -78,19 +87,21 @@
|
||||
},
|
||||
...permanentTabSettings
|
||||
]
|
||||
: permanentTabs;
|
||||
: [...permanentTabs, ...permanentTabSettings];
|
||||
</script>
|
||||
|
||||
{#if $organization?.$id}
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<DropList bind:show={showDropdown} placement="bottom-start" noArrow scrollable>
|
||||
<DropList bind:show={showDropdown} placement="bottom-end" noArrow scrollable>
|
||||
<button
|
||||
class="button is-text u-padding-inline-0"
|
||||
class="button is-text u-padding-inline-0 u-max-width-100-percent"
|
||||
on:click={() => (showDropdown = !showDropdown)}>
|
||||
<h1 class="heading-level-4 u-flex u-cross-center u-gap-8">
|
||||
<span class="u-flex u-cross-center u-gap-8">
|
||||
{$organization.name}
|
||||
<Heading tag="h1" size="4" class="u-flex u-cross-center u-gap-8">
|
||||
<span class="u-flex u-cross-center u-gap-8 u-min-width-0">
|
||||
<span class="u-trim">
|
||||
{$organization.name}
|
||||
</span>
|
||||
{#if isCloud && $organization?.billingPlan === BillingPlan.STARTER}
|
||||
<Pill>FREE</Pill>
|
||||
{/if}
|
||||
@@ -109,7 +120,7 @@
|
||||
<span
|
||||
class={`icon-cheveron-${showDropdown ? 'up' : 'down'}`}
|
||||
aria-hidden="true" />
|
||||
</h1>
|
||||
</Heading>
|
||||
</button>
|
||||
<svelte:fragment slot="list">
|
||||
{#each $organizationList.teams as org}
|
||||
|
||||
@@ -2,12 +2,18 @@ import type { PageLoad } from './$types';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { Query } from '@appwrite.io/console';
|
||||
import { isCloud } from '$lib/system';
|
||||
|
||||
export const load: PageLoad = async ({ depends, parent }) => {
|
||||
const { organization } = await parent();
|
||||
depends(Dependencies.ORGANIZATION);
|
||||
return {
|
||||
projects: await sdk.forConsole.projects.list([Query.equal('teamId', organization.$id)]),
|
||||
invoices: await sdk.forConsole.billing.listInvoices(organization.$id)
|
||||
};
|
||||
|
||||
const projects = await sdk.forConsole.projects.list([Query.equal('teamId', organization.$id)]);
|
||||
|
||||
if (isCloud) {
|
||||
return {
|
||||
projects,
|
||||
invoices: await sdk.forConsole.billing.listInvoices(organization.$id)
|
||||
};
|
||||
} else return { projects };
|
||||
};
|
||||
+3
-1
@@ -51,7 +51,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
$: upcomingInvoice = invoices.invoices.find((i) => i.status === 'upcoming' && i.amount > 0);
|
||||
$: upcomingInvoice = isCloud
|
||||
? invoices.invoices.find((i) => i.status === 'upcoming' && i.amount > 0)
|
||||
: null;
|
||||
</script>
|
||||
|
||||
<Modal
|
||||
|
||||
Reference in new issue
Block a user