Adds delete and restore for a creator's page

This commit is contained in:
2025-04-15 15:57:40 -04:00
parent 43f37177af
commit adfaaf3595
9 changed files with 187 additions and 39 deletions

View File

@@ -276,6 +276,25 @@ const closeDialog = () => {
</div>
</div>
<div class="card">
<div class="card-title">Danger Zone</div>
<div class="content">
<p>
CAUTION: This will delete your creator page and suspend all tips and donations.
</p>
<button v-if="!creatorProfileStore.creator.isDeleted"
class="danger-action"
@click="creatorProfileStore.removeCreatorPage()">
DELETE PAGE
</button>
<button v-else
class="safe-action"
@click="creatorProfileStore.restoreCreatorPage()">
RESTORE PAGE
</button>
</div>
</div>
</template>
</div>
@@ -286,11 +305,24 @@ const closeDialog = () => {
.action {
@apply p-2 flex items-center w-full mb-2;
@apply font-sans text-base;
@apply rounded-md;
@apply transition duration-200 ease-in-out;
@apply hover:bg-hutopyPrimary active:bg-hutopySecondary;
}
.danger-action {
@apply action;
@apply mt-4;
@apply bg-red-800 hover:bg-red-700 active:bg-red-600;
}
.safe-action {
@apply action;
@apply mt-4;
@apply bg-green-800 hover:bg-green-700 active:bg-green-600;
}
.label {
@apply flex-none min-w-40 text-left;
}