Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/remove-wait-for-ref' into remove…
Browse files Browse the repository at this point in the history
…-wait-for-ref
  • Loading branch information
edwh committed Oct 12, 2023
2 parents c92067a + d562f03 commit 9d0254a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
5 changes: 4 additions & 1 deletion components/ExternalDa.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</div>
</template>
<script setup>
import { nextTick } from 'vue'
import { useMiscStore } from '../stores/misc'
import { ref, computed, onBeforeUnmount } from '#imports'
Expand Down Expand Up @@ -101,12 +102,14 @@ let shownFirst = false
const emit = defineEmits(['rendered'])
function visibilityChanged(visible) {
async function visibilityChanged(visible) {
try {
if (visible && !shownFirst) {
isVisible.value = visible
shownFirst = true
await nextTick()
window.googletag = window.googletag || { cmd: [] }
window.googletag.cmd.push(function () {
window.googletag.pubads().collapseEmptyDivs()
Expand Down
3 changes: 3 additions & 0 deletions components/MessageReplySection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
</template>
<script>
import { mapWritableState } from 'pinia'
import { nextTick } from 'vue'
import { useMessageStore } from '../stores/message'
import { useAuthStore } from '../stores/auth'
import { useReplyStore } from '../stores/reply'
Expand Down Expand Up @@ -221,6 +222,8 @@ export default {
this.newUserPassword = ret.password
this.showNewUser = true
await nextTick()
// Now that we are logged in, we can reply.
this.$refs.newUserModal?.show()
Expand Down
2 changes: 1 addition & 1 deletion components/OurFilePond.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default {
const png = await window.heic2any({
blob,
toType: 'image/jpeg',
quality: 0.1,
quality: 0.92,
})
data.append('photo', png, 'photo')
} else {
Expand Down
5 changes: 2 additions & 3 deletions components/OurMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,8 @@ export default {
}
if (this.scrollIntoView) {
this.$nextTick(() => {
this.$refs.msg.scrollIntoView()
})
await this.$nextTick()
this.$refs.msg.scrollIntoView()
}
},
methods: {
Expand Down
9 changes: 4 additions & 5 deletions components/PostMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export default {
photoid: id,
})
},
drop(e) {
async drop(e) {
// Although it's probably not widely used (I didn't know it even worked) in the old code you could drag and drog
// a file onto the Add photos button. So we should handle that too here.
const droppedFiles = e.dataTransfer.files
Expand All @@ -195,10 +195,9 @@ export default {
this.pondBrowse = false
// Give pond time to render.
this.$nextTick().then(() => {
;[...droppedFiles].forEach((f) => {
this.$refs.filepond.addFile(f)
})
await this.$nextTick()
;[...droppedFiles].forEach((f) => {
this.$refs.filepond.addFile(f)
})
},
hidePhotoButton() {
Expand Down
4 changes: 3 additions & 1 deletion composables/useCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ export async function freegleIt(type, router) {
})
}
} catch (e) {
console.log('Submit failed', e, e?.response?.data?.ret)
console.log('Submit failed', e, e.response.data.ret)
this.submitting = false

if (e?.message) {
if (e.message.includes('Unvalidated email')) {
console.log('unvalidated')
Expand Down

0 comments on commit 9d0254a

Please sign in to comment.