mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Add disable attribute for no permission buttons and shorten query param names
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user