mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 10:13:32 -04:00 
			
		
		
		
	* style(frontend): 💄 add darktheme custom * add dummy users in dev mode * feat(frontend): ✨ add group permissions editor UI * feat(backend): ✨ add group permissions setters * test(backend): ✅ tests for basic permission get/set (WIP) Needs more testing * remove old test * chore(backend): copy template.env on setup * feat(frontend): ✨ enable send invitation via email * feat(backend): ✨ enable send invitation via email * feat: ✨ add app config checker for site-settings * refactor(frontend): ♻️ consolidate bool checks Co-authored-by: Hayden <hay-kot@pm.me>
		
			
				
	
	
		
			78 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			78 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|   <v-tooltip
 | |
|     ref="copyToolTip"
 | |
|     v-model="show"
 | |
|     color="success lighten-1"
 | |
|     top
 | |
|     :open-on-hover="false"
 | |
|     :open-on-click="true"
 | |
|     close-delay="500"
 | |
|     transition="slide-y-transition"
 | |
|   >
 | |
|     <template #activator="{ on }">
 | |
|       <v-btn
 | |
|         :icon="icon"
 | |
|         :color="color"
 | |
|         retain-focus-on-click
 | |
|         @click="
 | |
|           on.click;
 | |
|           textToClipboard();
 | |
|         "
 | |
|         @blur="on.blur"
 | |
|       >
 | |
|         <v-icon>{{ $globals.icons.contentCopy }}</v-icon>
 | |
|         {{ icon ? "" : "Copy" }}
 | |
|       </v-btn>
 | |
|     </template>
 | |
|     <span>
 | |
|       <v-icon left dark>
 | |
|         {{ $globals.icons.clipboardCheck }}
 | |
|       </v-icon>
 | |
|       <slot> {{ $t("general.copied") }}! </slot>
 | |
|     </span>
 | |
|   </v-tooltip>
 | |
| </template>
 | |
| 
 | |
| <script>
 | |
| export default {
 | |
|   props: {
 | |
|     copyText: {
 | |
|       type: String,
 | |
|       default: "Default Copy Text",
 | |
|     },
 | |
|     color: {
 | |
|       type: String,
 | |
|       default: "primary",
 | |
|     },
 | |
|     icon: {
 | |
|       type: Boolean,
 | |
|       default: true,
 | |
|     },
 | |
|   },
 | |
|   data() {
 | |
|     return {
 | |
|       show: false,
 | |
|     };
 | |
|   },
 | |
| 
 | |
|   methods: {
 | |
|     toggleBlur() {
 | |
|       this.$refs.copyToolTip.deactivate();
 | |
|     },
 | |
|     textToClipboard() {
 | |
|       this.show = true;
 | |
|       const copyText = this.copyText;
 | |
|       navigator.clipboard.writeText(copyText).then(
 | |
|         () => console.log("Copied", copyText),
 | |
|         () => console.log("Copied Failed", copyText)
 | |
|       );
 | |
|       setTimeout(() => {
 | |
|         this.toggleBlur();
 | |
|       }, 500);
 | |
|     },
 | |
|   },
 | |
| };
 | |
| </script>
 | |
| 
 | |
| <style lang="scss" scoped>
 | |
| </style> |