mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-04 03:28:28 -05:00 
			
		
		
		
	* fix webhooks not firing due to missing session * disable webhook test button because it doesnt do anything * fix background task administration not working at all * fix error in test
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
<template>
 | 
						|
  <v-item-group>
 | 
						|
    <template v-for="btn in buttons">
 | 
						|
      <v-menu v-if="btn.children" :key="'menu-' + btn.event" active-class="pa-0" offset-y top left>
 | 
						|
        <template #activator="{ on, attrs }">
 | 
						|
          <v-btn tile :large="large" icon v-bind="attrs" v-on="on">
 | 
						|
            <v-icon>
 | 
						|
              {{ btn.icon }}
 | 
						|
            </v-icon>
 | 
						|
          </v-btn>
 | 
						|
        </template>
 | 
						|
        <v-list dense>
 | 
						|
          <v-list-item v-for="(child, idx) in btn.children" :key="idx" dense @click="$emit(child.event)">
 | 
						|
            <v-list-item-title>{{ child.text }}</v-list-item-title>
 | 
						|
          </v-list-item>
 | 
						|
        </v-list>
 | 
						|
      </v-menu>
 | 
						|
      <v-tooltip
 | 
						|
        v-else
 | 
						|
        :key="'btn-' + btn.event"
 | 
						|
        open-delay="200"
 | 
						|
        transition="slide-y-reverse-transition"
 | 
						|
        dense
 | 
						|
        bottom
 | 
						|
        content-class="text-caption"
 | 
						|
      >
 | 
						|
        <template #activator="{ on, attrs }">
 | 
						|
          <v-btn tile :large="large" icon v-bind="attrs" @click="$emit(btn.event)" v-on="on" :disabled="btn.disabled">
 | 
						|
            <v-icon> {{ btn.icon }} </v-icon>
 | 
						|
          </v-btn>
 | 
						|
        </template>
 | 
						|
        <span>{{ btn.text }}</span>
 | 
						|
      </v-tooltip>
 | 
						|
    </template>
 | 
						|
  </v-item-group>
 | 
						|
</template>
 | 
						|
 | 
						|
<script lang="ts">
 | 
						|
import { defineComponent } from "@nuxtjs/composition-api";
 | 
						|
 | 
						|
export interface ButtonOption {
 | 
						|
  icon?: string;
 | 
						|
  text: string;
 | 
						|
  event: string;
 | 
						|
  children?: ButtonOption[];
 | 
						|
  disabled?: boolean;
 | 
						|
}
 | 
						|
 | 
						|
export default defineComponent({
 | 
						|
  props: {
 | 
						|
    buttons: {
 | 
						|
      type: Array as () => ButtonOption[],
 | 
						|
      required: true,
 | 
						|
    },
 | 
						|
    large: {
 | 
						|
      type: Boolean,
 | 
						|
      default: true,
 | 
						|
    },
 | 
						|
  },
 | 
						|
});
 | 
						|
</script>
 |