Resolve #7425
This commit is contained in:
		
							parent
							
								
									d4c4e30fe4
								
							
						
					
					
						commit
						c22ff4c556
					
				
					 3 changed files with 42 additions and 3 deletions
				
			
		| 
						 | 
					@ -121,7 +121,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts">
 | 
				
			||||||
import { defineAsyncComponent, defineComponent, markRaw } from 'vue';
 | 
					import { defineAsyncComponent, defineComponent, markRaw } from 'vue';
 | 
				
			||||||
import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip } from '@fortawesome/free-solid-svg-icons';
 | 
					import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip, faShareAlt } from '@fortawesome/free-solid-svg-icons';
 | 
				
			||||||
import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
 | 
					import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
 | 
				
			||||||
import * as mfm from 'mfm-js';
 | 
					import * as mfm from 'mfm-js';
 | 
				
			||||||
import { sum } from '../../prelude/array';
 | 
					import { sum } from '../../prelude/array';
 | 
				
			||||||
| 
						 | 
					@ -625,6 +625,11 @@ export default defineComponent({
 | 
				
			||||||
						window.open(this.appearNote.url || this.appearNote.uri, '_blank');
 | 
											window.open(this.appearNote.url || this.appearNote.uri, '_blank');
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				} : undefined,
 | 
									} : undefined,
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										icon: faShareAlt,
 | 
				
			||||||
 | 
										text: this.$ts.share,
 | 
				
			||||||
 | 
										action: this.share
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
				null,
 | 
									null,
 | 
				
			||||||
				statePromise.then(state => state.isFavorited ? {
 | 
									statePromise.then(state => state.isFavorited ? {
 | 
				
			||||||
					icon: faStar,
 | 
										icon: faStar,
 | 
				
			||||||
| 
						 | 
					@ -850,6 +855,14 @@ export default defineComponent({
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							share() {
 | 
				
			||||||
 | 
								navigator.share({
 | 
				
			||||||
 | 
									title: this.$t('noteOf', { user: this.appearNote.user.name }),
 | 
				
			||||||
 | 
									text: this.appearNote.text,
 | 
				
			||||||
 | 
									url: `${url}/notes/${this.appearNote.id}`
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		focus() {
 | 
							focus() {
 | 
				
			||||||
			this.$el.focus();
 | 
								this.$el.focus();
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -103,7 +103,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts">
 | 
				
			||||||
import { defineAsyncComponent, defineComponent, markRaw } from 'vue';
 | 
					import { defineAsyncComponent, defineComponent, markRaw } from 'vue';
 | 
				
			||||||
import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip } from '@fortawesome/free-solid-svg-icons';
 | 
					import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip, faShareAlt } from '@fortawesome/free-solid-svg-icons';
 | 
				
			||||||
import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
 | 
					import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
 | 
				
			||||||
import * as mfm from 'mfm-js';
 | 
					import * as mfm from 'mfm-js';
 | 
				
			||||||
import { sum } from '../../prelude/array';
 | 
					import { sum } from '../../prelude/array';
 | 
				
			||||||
| 
						 | 
					@ -600,6 +600,11 @@ export default defineComponent({
 | 
				
			||||||
						window.open(this.appearNote.url || this.appearNote.uri, '_blank');
 | 
											window.open(this.appearNote.url || this.appearNote.uri, '_blank');
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				} : undefined,
 | 
									} : undefined,
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										icon: faShareAlt,
 | 
				
			||||||
 | 
										text: this.$ts.share,
 | 
				
			||||||
 | 
										action: this.share
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
				null,
 | 
									null,
 | 
				
			||||||
				statePromise.then(state => state.isFavorited ? {
 | 
									statePromise.then(state => state.isFavorited ? {
 | 
				
			||||||
					icon: faStar,
 | 
										icon: faStar,
 | 
				
			||||||
| 
						 | 
					@ -825,6 +830,14 @@ export default defineComponent({
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							share() {
 | 
				
			||||||
 | 
								navigator.share({
 | 
				
			||||||
 | 
									title: this.$t('noteOf', { user: this.appearNote.user.name }),
 | 
				
			||||||
 | 
									text: this.appearNote.text,
 | 
				
			||||||
 | 
									url: `${url}/notes/${this.appearNote.id}`
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		focus() {
 | 
							focus() {
 | 
				
			||||||
			this.$el.focus();
 | 
								this.$el.focus();
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -102,7 +102,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts">
 | 
				
			||||||
import { defineAsyncComponent, defineComponent, markRaw } from 'vue';
 | 
					import { defineAsyncComponent, defineComponent, markRaw } from 'vue';
 | 
				
			||||||
import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip } from '@fortawesome/free-solid-svg-icons';
 | 
					import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip, faShareAlt } from '@fortawesome/free-solid-svg-icons';
 | 
				
			||||||
import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
 | 
					import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
 | 
				
			||||||
import * as mfm from 'mfm-js';
 | 
					import * as mfm from 'mfm-js';
 | 
				
			||||||
import { sum } from '../../../prelude/array';
 | 
					import { sum } from '../../../prelude/array';
 | 
				
			||||||
| 
						 | 
					@ -607,6 +607,11 @@ export default defineComponent({
 | 
				
			||||||
						window.open(this.appearNote.url || this.appearNote.uri, '_blank');
 | 
											window.open(this.appearNote.url || this.appearNote.uri, '_blank');
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				} : undefined,
 | 
									} : undefined,
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										icon: faShareAlt,
 | 
				
			||||||
 | 
										text: this.$ts.share,
 | 
				
			||||||
 | 
										action: this.share
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
				null,
 | 
									null,
 | 
				
			||||||
				statePromise.then(state => state.isFavorited ? {
 | 
									statePromise.then(state => state.isFavorited ? {
 | 
				
			||||||
					icon: faStar,
 | 
										icon: faStar,
 | 
				
			||||||
| 
						 | 
					@ -836,6 +841,14 @@ export default defineComponent({
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							share() {
 | 
				
			||||||
 | 
								navigator.share({
 | 
				
			||||||
 | 
									title: this.$t('noteOf', { user: this.appearNote.user.name }),
 | 
				
			||||||
 | 
									text: this.appearNote.text,
 | 
				
			||||||
 | 
									url: `${url}/notes/${this.appearNote.id}`
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		focus() {
 | 
							focus() {
 | 
				
			||||||
			this.$el.focus();
 | 
								this.$el.focus();
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue