Skip to content

Commit

Permalink
feat: members, revoke access, change role (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiroaisen authored Jun 13, 2023
2 parents 84bed01 + b4a6d62 commit befc4e3
Show file tree
Hide file tree
Showing 41 changed files with 961 additions and 987 deletions.
1 change: 1 addition & 0 deletions defs/api/PublicInvitation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type PublicInvitation = {
account_id: string;
receiver_email: string;
created_at: DateTime;
deleted_at: DateTime | null;
is_expired: boolean;
expires_at: DateTime;
account: InvitationAccount | null;
Expand Down
4 changes: 4 additions & 0 deletions defs/api/accounts/[account]/members/[member]/DELETE/Output.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { EmptyStruct } from "../../../../../../EmptyStruct";

export type Output = EmptyStruct;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type AccessKind = "owner" | "staff";
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { EmptyStruct } from "../../../../../../../EmptyStruct";

export type Output = EmptyStruct;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AccessKind } from "./AccessKind";

export type Payload = { role: AccessKind };
4 changes: 4 additions & 0 deletions defs/api/invitations/[invitation]/DELETE/Output.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { EmptyStruct } from "../../../../EmptyStruct";

export type Output = EmptyStruct;
12 changes: 6 additions & 6 deletions front/admin/src/lib/components/SimpleLogo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
}
</style>

<div class="logo">
<div class="logo-icon" style:background-image="url({ logo })" />
<div class="logo-text">
{$locale.logo_text}
</div>
</div>
<div class="logo">
<div class="logo-icon" style:background-image="url({ logo })" />
<div class="logo-text">
{$locale.logo_text}
</div>
</div>

10 changes: 9 additions & 1 deletion front/app/src/lib/components/Dashboard/TopUser.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { click_out } from "$share/actions";
import { action, _post } from "$share/net.client";
import Icon from "$share/Icon.svelte";
import { mdiAccountCircleOutline, mdiAccountMultipleOutline, mdiCastAudioVariant, mdiLogout } from "@mdi/js";
import { mdiAccountCircleOutline, mdiAccountMultipleOutline, mdiAccountPlusOutline, mdiCastAudioVariant, mdiLogout } from "@mdi/js";
import { goto } from "$app/navigation";
import { locale } from "$lib/locale";
import { invalidate_siblings } from "$lib/invalidate";
Expand Down Expand Up @@ -271,6 +271,14 @@
{$locale.user_menu.profile}
</a>
</div>
<div class="menu-section">
<a href="/me/invitations" class="na menu-section-link ripple-container" use:ripple on:click={() => menu_open = false}>
<div class="menu-icon">
<Icon d={mdiAccountPlusOutline} />
</div>
{$locale.user_menu.invitations}
</a>
</div>
<div class="menu-section">
<a href="/accounts" class="na menu-section-link ripple-container" use:ripple on:click={() => menu_open = false}>
<div class="menu-icon">
Expand Down
12 changes: 6 additions & 6 deletions front/app/src/lib/components/SimpleLogo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
}
</style>

<div class="logo">
<div class="logo-icon" style:background-image="url({ logo })" />
<div class="logo-text">
{$locale.logo_text}
</div>
</div>
<div class="logo">
<div class="logo-icon" style:background-image="url({ logo })" />
<div class="logo-text">
{$locale.logo_text}
</div>
</div>

Loading

0 comments on commit befc4e3

Please sign in to comment.