Add disable attribute for no permission buttons and shorten query param names

This commit is contained in:
thiloho
2024-10-19 17:55:02 +02:00
parent 185aeea4e5
commit b1a59e38c1
22 changed files with 292 additions and 147 deletions

View File

@@ -23,9 +23,9 @@ export const load: PageServerLoad = async ({ parent, params, fetch }) => {
)
).data;
const { website } = await parent();
const { website, permissionLevel } = await parent();
return { website, article, categories, API_BASE_PREFIX };
return { website, article, categories, API_BASE_PREFIX, permissionLevel };
};
export const actions: Actions = {

View File

@@ -119,7 +119,7 @@
content={data.article.main_content ?? ""}
/>
<button type="submit">Submit</button>
<button type="submit" disabled={data.permissionLevel === 10}>Submit</button>
</form>
</section>
</WebsiteEditor>