Merge branch 'develop'
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
<mk-ui>
 | 
			
		||||
	<main>
 | 
			
		||||
		<x-page-editor :page="page"/>
 | 
			
		||||
		<x-page-editor v-if="page !== undefined" :page="page" :readonly="readonly"/>
 | 
			
		||||
	</main>
 | 
			
		||||
</mk-ui>
 | 
			
		||||
</template>
 | 
			
		||||
@@ -15,9 +15,44 @@ export default Vue.extend({
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	props: {
 | 
			
		||||
		page: {
 | 
			
		||||
		pageId: {
 | 
			
		||||
			type: String,
 | 
			
		||||
			required: false
 | 
			
		||||
		},
 | 
			
		||||
		pageName: {
 | 
			
		||||
			type: String,
 | 
			
		||||
			required: false
 | 
			
		||||
		},
 | 
			
		||||
		user: {
 | 
			
		||||
			type: String,
 | 
			
		||||
			required: false
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			page: undefined,
 | 
			
		||||
			readonly: false
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	created() {
 | 
			
		||||
		if (this.pageId) {
 | 
			
		||||
			this.$root.api('pages/show', {
 | 
			
		||||
				pageId: this.pageId,
 | 
			
		||||
			}).then(page => {
 | 
			
		||||
				this.page = page;
 | 
			
		||||
			});
 | 
			
		||||
		} else if (this.pageName && this.user) {
 | 
			
		||||
			this.$root.api('pages/show', {
 | 
			
		||||
				name: this.pageName,
 | 
			
		||||
				username: this.user,
 | 
			
		||||
			}).then(page => {
 | 
			
		||||
				this.readonly = true;
 | 
			
		||||
				this.page = page;
 | 
			
		||||
			});
 | 
			
		||||
		} else {
 | 
			
		||||
			this.page = null;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user