Refactor & Clean up
This commit is contained in:
@@ -161,7 +161,7 @@ export default Vue.extend({
|
||||
mounted() {
|
||||
// Get replies
|
||||
if (!this.compact) {
|
||||
(this as any).api('notes/replies', {
|
||||
this.$root.api('notes/replies', {
|
||||
noteId: this.p.id,
|
||||
limit: 8
|
||||
}).then(replies => {
|
||||
@@ -173,7 +173,7 @@ export default Vue.extend({
|
||||
if (this.p.geo) {
|
||||
const shouldShowMap = this.$store.getters.isSignedIn ? this.$store.state.settings.showMaps : true;
|
||||
if (shouldShowMap) {
|
||||
(this as any).os.getGoogleMaps().then(maps => {
|
||||
this.$root.os.getGoogleMaps().then(maps => {
|
||||
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
|
||||
const map = new maps.Map(this.$refs.map, {
|
||||
center: uluru,
|
||||
@@ -193,7 +193,7 @@ export default Vue.extend({
|
||||
this.conversationFetching = true;
|
||||
|
||||
// Fetch conversation
|
||||
(this as any).api('notes/conversation', {
|
||||
this.$root.api('notes/conversation', {
|
||||
noteId: this.p.replyId
|
||||
}).then(conversation => {
|
||||
this.conversationFetching = false;
|
||||
@@ -202,26 +202,26 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
reply() {
|
||||
(this as any).os.new(MkPostFormWindow, {
|
||||
this.$root.new(MkPostFormWindow, {
|
||||
reply: this.p
|
||||
});
|
||||
},
|
||||
|
||||
renote() {
|
||||
(this as any).os.new(MkRenoteFormWindow, {
|
||||
this.$root.new(MkRenoteFormWindow, {
|
||||
note: this.p
|
||||
});
|
||||
},
|
||||
|
||||
react() {
|
||||
(this as any).os.new(MkReactionPicker, {
|
||||
this.$root.new(MkReactionPicker, {
|
||||
source: this.$refs.reactButton,
|
||||
note: this.p
|
||||
});
|
||||
},
|
||||
|
||||
menu() {
|
||||
(this as any).os.new(MkNoteMenu, {
|
||||
this.$root.new(MkNoteMenu, {
|
||||
source: this.$refs.menuButton,
|
||||
note: this.p
|
||||
});
|
||||
|
Reference in New Issue
Block a user