beatufitull front end for ozone modration ,, wit catpucoin and ebergarden !
ozone moderation
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

upate ui and fix post reports

+41 -40
+4 -4
src/components/Header.svelte
··· 39 39 </script> 40 40 41 41 <div 42 - class="mx-auto mb-4 flex max-w-2xl items-center justify-between rounded-xl border border-ctp-surface1 px-2 py-2" 42 + class="mx-auto mt-5 mb-4 flex max-w-2xl items-center justify-between rounded-xl border border-ctp-surface1 px-2 py-2" 43 43 > 44 44 <a class="ml-3 cursor-pointer" href="/"> 45 45 <Cat class="text-ctp-subtext1 hover:text-ctp-text" /> ··· 47 47 <div class="flex items-center gap-2"> 48 48 <PopupMenu 49 49 wrapperClass="relative" 50 - menuClass="absolute top-full right-0 z-50 w-48 rounded-md border border-ctp-surface1 bg-ctp-surface0 px-1.5 py-2 shadow-lg" 50 + menuClass="absolute top-full right-0 z-50 w-48 rounded-md border border-ctp-surface1 bg-ctp-base px-1.5 py-2 shadow-lg" 51 51 > 52 52 <svelte:fragment slot="trigger" let:toggle> 53 53 <Button ··· 111 111 </PopupMenu> 112 112 <PopupMenu 113 113 wrapperClass="relative" 114 - menuClass="absolute top-full right-0 z-50 w-40 rounded-md border border-ctp-surface1 bg-ctp-surface0 px-1.5 py-2 shadow-lg" 114 + menuClass="absolute top-full right-0 z-50 w-40 rounded-md border border-ctp-surface1 bg-ctp-base px-1.5 py-2 shadow-lg" 115 115 > 116 116 <svelte:fragment slot="trigger" let:toggle> 117 117 <Button ··· 134 134 variant="ghost" 135 135 fullWidth={true} 136 136 size="icon" 137 - className="justify-start rounded-md" 137 + className="justify-start rounded-md hover:bg-ctp-surface0" 138 138 > 139 139 <span class="grid size-6 place-items-center"> 140 140 <Icon size={16} />
+30 -30
src/components/view/Post.svelte
··· 116 116 reason: string, 117 117 { createLabelVals, negateLabelVals }: { createLabelVals: string[]; negateLabelVals: string[] } 118 118 ) { 119 - // const agent = $session?.agent; 120 - // if (!agent) { 121 - // throw new Error('No active session'); 122 - // } 123 - // if (createLabelVals.length === 0 && negateLabelVals.length === 0) { 124 - // return; 125 - // } 126 - // const result = await agent.tools.ozone.moderation.emitEvent({ 127 - // subject: { 128 - // $type: 'com.atproto.admin.defs#repoRef', 129 - // did: uri.host 130 - // }, 131 - // modTool: { 132 - // $type: 'tools.ozone.moderation.defs#modTool', 133 - // name: 'meowzone' 134 - // }, 135 - // event: { 136 - // $type: 'tools.ozone.moderation.defs#modEventLabel', 137 - // negateLabelVals, 138 - // createLabelVals, 139 - // comment: reason 140 - // }, 141 - // createdBy: agent.assertDid 142 - // }); 143 - // if (!result.success) { 144 - // throw new Error('Failed to submit labels'); 145 - // } else { 146 - // await userQuery.refetch(); 147 - // await eventsQuery.refetch(); 148 - // } 119 + const agent = $session?.agent; 120 + if (!agent) { 121 + throw new Error('No active session'); 122 + } 123 + if (createLabelVals.length === 0 && negateLabelVals.length === 0) { 124 + return; 125 + } 126 + const result = await agent.tools.ozone.moderation.emitEvent({ 127 + subject: { 128 + $type: 'com.atproto.repo.strongRef', 129 + uri: uri.toString() 130 + }, 131 + modTool: { 132 + $type: 'tools.ozone.moderation.defs#modTool', 133 + name: 'meowzone' 134 + }, 135 + event: { 136 + $type: 'tools.ozone.moderation.defs#modEventLabel', 137 + negateLabelVals, 138 + createLabelVals, 139 + comment: reason 140 + }, 141 + createdBy: agent.assertDid 142 + }); 143 + if (!result.success) { 144 + throw new Error('Failed to submit labels'); 145 + } else { 146 + await postQuery.refetch(); 147 + await eventsQuery.refetch(); 148 + } 149 149 } 150 150 </script> 151 151
+4 -3
src/routes/+layout.svelte
··· 103 103 <LabelerSetup /> 104 104 {:else if !redirecting} 105 105 {#if currentPath !== '/login'} 106 - <div class="w-full bg-ctp-base md:flex"> 107 - <div class="hidden md:block"> 106 + <div class="w-full bg-ctp-base"> 107 + <!-- <div class="hidden md:block"> 108 108 <Sidebar /> 109 109 </div> 110 110 <div class="px-4 pt-4 md:hidden"> 111 111 <Header /> 112 - </div> 112 + </div> --> 113 + <Header /> 113 114 {@render children()} 114 115 </div> 115 116 {:else}
+2 -2
src/routes/+page.svelte
··· 94 94 <Post isOpen={true} uri={selectedPostUri} onClose={() => (selectedPostUri = null)} /> 95 95 {/key} 96 96 {/if} 97 - <div class="max-w-2xl"> 97 + <div class="mx-auto max-w-2xl"> 98 98 {#if reportsQuery.isLoading} 99 99 <div class="flex min-h-screen items-center justify-center"> 100 100 <div class="text-center"> ··· 115 115 {#each reportsQuery.data.pages as page} 116 116 {#each page.subjectStatuses as report} 117 117 {@const subject = report.subject} 118 - <li class="rounded-lg border border-ctp-surface0 p-4"> 118 + <li class="rounded-lg border border-ctp-surface1 p-4"> 119 119 <div class="flex items-center justify-between"> 120 120 <div class="flex items-center gap-2"> 121 121 {#if report.appealed}
+1 -1
src/routes/events/+page.svelte
··· 84 84 <PostModal isOpen={true} uri={selectedPostUri} onClose={() => (selectedPostUri = null)} /> 85 85 {/key} 86 86 {/if} 87 - <div class="max-w-2xl"> 87 + <div class="mx-auto max-w-2xl"> 88 88 <div class="flex items-center gap-2 pb-5 text-ctp-subtext0"> 89 89 <ScrollIcon size={16} /> 90 90 <h2 class="text-md font-medium">Recent Events</h2>