Globsl Settings
							parent
							
								
									66a32dc331
								
							
						
					
					
						commit
						8c019921ba
					
				| 
						 | 
				
			
			@ -6,9 +6,19 @@
 | 
			
		|||
      <li><router-link v-if="user.admin" to="/users">Go to User Management</router-link></li>
 | 
			
		||||
    </ul>
 | 
			
		||||
 | 
			
		||||
    <form>
 | 
			
		||||
      <h2>Before Save</h2>
 | 
			
		||||
      <textarea v-model="css" name="css"></textarea>
 | 
			
		||||
    <form @submit="saveHooks">
 | 
			
		||||
      <h2>Commands</h2>
 | 
			
		||||
 | 
			
		||||
      <p class="small">Here you can set commands that are executed in the named events. You write one command
 | 
			
		||||
        per line. If the event is related to files, such as before and after saving, the environment variable
 | 
			
		||||
        <code>file</code> will be available with the path of the file.</p>
 | 
			
		||||
 | 
			
		||||
      <h3>Before Save</h3>
 | 
			
		||||
      <textarea v-model="beforeSave"></textarea>
 | 
			
		||||
 | 
			
		||||
      <h3>After Save</h3>
 | 
			
		||||
      <textarea v-model="afterSave"></textarea>
 | 
			
		||||
 | 
			
		||||
      <p><input type="submit" value="Save"></p>
 | 
			
		||||
    </form>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -22,13 +32,21 @@ export default {
 | 
			
		|||
  name: 'settings',
 | 
			
		||||
  data: function () {
 | 
			
		||||
    return {
 | 
			
		||||
      beforeSave: '',
 | 
			
		||||
      afterSave: ''
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    ...mapState([ 'user' ])
 | 
			
		||||
  },
 | 
			
		||||
  created () {
 | 
			
		||||
    // TODO: fetch current settings here
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    ...mapMutations([ 'showSuccess' ])
 | 
			
		||||
    ...mapMutations([ 'showSuccess' ]),
 | 
			
		||||
    saveHooks (event) {
 | 
			
		||||
      event.preventDefault()
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue