瀏覽代碼

Update ComposeModal.vue

Daniel Supernault 5 年之前
父節點
當前提交
fad680eba1
共有 1 個文件被更改,包括 3 次插入10 次删除
  1. 3 10
      resources/assets/js/components/ComposeModal.vue

+ 3 - 10
resources/assets/js/components/ComposeModal.vue

@@ -340,6 +340,9 @@ export default {
 
 	beforeMount() {
 		this.fetchProfile();
+		if(this.config.uploader.media_types.includes('video/mp4') == false) {
+			this.composeType = 'post'
+		}
 	},
 
 	mounted() {
@@ -390,16 +393,6 @@ export default {
 	},
 
 	methods: {
-		fetchConfig() {
-			axios.get('/api/v2/config').then(res => {
-				this.config = res.data;
-				window.pixelfed.config = window.pixelfed.config || res.data;
-				if(this.config.uploader.media_types.includes('video/mp4') == false) {
-					this.composeType = 'post'
-				}
-			});
-		},
-
 		fetchProfile() {
 			axios.get('/api/v1/accounts/verify_credentials').then(res => {
 				this.profile = res.data;