This commit is contained in:
Timothy Jaeryang Baek
2026-03-23 23:39:52 -05:00
parent 3a4b862e81
commit 139e764b2f
45 changed files with 6251 additions and 5730 deletions
@@ -163,7 +163,9 @@
const hasPublicWriteGrant = (grants: AccessGrant[]): boolean =>
grants.some(
(grant) =>
grant.principal_type === 'user' && grant.principal_id === '*' && grant.permission === 'write'
grant.principal_type === 'user' &&
grant.principal_id === '*' &&
grant.permission === 'write'
);
const currentGrants = (): AccessGrant[] =>
@@ -203,11 +205,7 @@
const setPublic = (isPublic: boolean) => {
// Remove all user:* grants
const filtered = currentGrants().filter(
(grant) =>
!(
grant.principal_type === 'user' &&
grant.principal_id === '*'
)
(grant) => !(grant.principal_type === 'user' && grant.principal_id === '*')
);
if (isPublic) {
filtered.push({
@@ -27,7 +27,9 @@
onChange={() => onChange(value)}
>
<svelte:fragment slot="trigger" let:selectedLabel>
<span class="inline-flex h-input px-0.5 w-full outline-hidden bg-transparent truncate placeholder-gray-400 focus:outline-hidden">
<span
class="inline-flex h-input px-0.5 w-full outline-hidden bg-transparent truncate placeholder-gray-400 focus:outline-hidden"
>
{selectedLabel}
</span>
<ChevronDown className=" size-3.5" strokeWidth="2.5" />