diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..35dc2fc5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:18-alpine + +WORKDIR /app + +ENV IZNIK_API_V1=http://apiv1/api \ + IZNIK_API_V2=http://apiv2:8192/api + +RUN apk update && apk add git \ + && git clone https://github.com/Freegle/iznik-nuxt3.git + +CMD cd iznik-nuxt3 \ + && git pull \ + && yes | npm install -y --legacy-peer-deps \ + && export NODE_OPTIONS=--max-old-space-size=8192;npm run build \ + && npm run start \ No newline at end of file diff --git a/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java b/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java deleted file mode 100644 index f2c2217e..00000000 --- a/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.getcapacitor.myapp; - -import static org.junit.Assert.*; - -import android.content.Context; -import androidx.test.ext.junit.runners.AndroidJUnit4; -import androidx.test.platform.app.InstrumentationRegistry; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - - @Test - public void useAppContext() throws Exception { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - - assertEquals("com.getcapacitor.app", appContext.getPackageName()); - } -} diff --git a/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java b/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java deleted file mode 100644 index 02973278..00000000 --- a/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.getcapacitor.myapp; - -import static org.junit.Assert.*; - -import org.junit.Test; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - - @Test - public void addition_isCorrect() throws Exception { - assertEquals(4, 2 + 2); - } -} diff --git a/api/BaseAPI.js b/api/BaseAPI.js index b3b27495..be10889d 100644 --- a/api/BaseAPI.js +++ b/api/BaseAPI.js @@ -230,6 +230,23 @@ export default class BaseAPI { ) } + $postv2(path, data, logError = true) { + const authStore = useAuthStore() + + return this.$requestv2( + 'POST', + path, + { + headers: { + 'Content-Type': 'application/json', + Authorization: 'Iznik ' + JSON.stringify(authStore.auth?.persistent), + }, + data, + }, + logError + ) + } + $postForm(path, data, logError = true) { // Don't set Content-Type - see https://stackoverflow.com/questions/39280438/fetch-missing-boundary-in-multipart-form-data-post return this.$request( diff --git a/api/ChatAPI.js b/api/ChatAPI.js index 245fa990..205b1991 100644 --- a/api/ChatAPI.js +++ b/api/ChatAPI.js @@ -5,13 +5,13 @@ export default class ChatAPI extends BaseAPI { return this.$getv2(`/chat/${chatid}/message`) } - async listChats(since, search, logError, empty) { + async listChats(since, search, keepChat, logError) { return await this.$getv2( '/chat', { since, search, - empty, + keepChat, }, logError ) @@ -33,15 +33,8 @@ export default class ChatAPI extends BaseAPI { return this.$put('/chat/rooms', params, logError) } - send(data) { - return this.$post('/chatmessages', data, function (data) { - if (data && data.ret === 4) { - // Don't log errors for banned users - handled elsewhere. - return false - } else { - return true - } - }) + async send(data) { + return await this.$postv2('/chat/' + data.roomid + '/message', data) } nudge(chatid) { diff --git a/components/ChatFooter.vue b/components/ChatFooter.vue index 097ed91a..c7a95f1f 100644 --- a/components/ChatFooter.vue +++ b/components/ChatFooter.vue @@ -384,7 +384,7 @@ export default { }, async nudge() { await this.waitForRef('nudgewarning') - this.$refs.nudgewarning.show() + this.$refs.nudgewarning?.show() }, newline() { const p = this.$refs.chatarea.selectionStart @@ -405,7 +405,7 @@ export default { this.showAddress = true await this.waitForRef('addressModal') - this.$refs.addressModal.show() + this.$refs.addressModal?.show() }, photoAdd() { // Flag that we're uploading. This will trigger the render of the filepond instance and subsequently the @@ -445,7 +445,7 @@ export default { async showInfo() { this.showProfile = true await this.waitForRef('profile') - this.$refs.profile.show() + this.$refs.profile?.show() }, async send() { let msg = this.sendmessage @@ -477,7 +477,7 @@ export default { if (RSVP) { this.RSVP = true await this.waitForRef('rsvp') - this.$refs.rsvp.show() + this.$refs.rsvp?.show() } else { // We've sent a message. This would be a good time to do some microvolunteering. this.showMicrovolunteering = true diff --git a/components/ChatHeader.vue b/components/ChatHeader.vue index 2ff2f9b5..fbeb6ac7 100644 --- a/components/ChatHeader.vue +++ b/components/ChatHeader.vue @@ -202,7 +202,12 @@ :chatid="chat.id" @confirm="hide" /> - + diff --git a/components/EmailBelongsToSomeoneElse.vue b/components/EmailBelongsToSomeoneElse.vue index 6b8f44b5..f1fe7382 100644 --- a/components/EmailBelongsToSomeoneElse.vue +++ b/components/EmailBelongsToSomeoneElse.vue @@ -12,7 +12,7 @@

{{ theirs }} belongs to a different account from the one you're using right now. - ({{ me.email }}) + ({{ me.email }}) . But don't worry! You probably have two acounts, and we can merge them together.

@@ -54,7 +54,7 @@ export default { email: this.theirs, }) - console.log('data', data) + console.log('Merge data', data) this.showConfirm = true }, diff --git a/components/GroupHeader.vue b/components/GroupHeader.vue index ca9f3bde..7c893da1 100644 --- a/components/GroupHeader.vue +++ b/components/GroupHeader.vue @@ -215,7 +215,7 @@ export default { } else { this.joiningOrLeaving = true - await this.authStore.joinGroup(this.myid, this.group.id) + await this.authStore.joinGroup(this.myid, this.group.id, true) this.joiningOrLeaving = false } diff --git a/components/IsoChrone.vue b/components/IsoChrone.vue index 6aff38fe..9840921c 100644 --- a/components/IsoChrone.vue +++ b/components/IsoChrone.vue @@ -82,7 +82,6 @@ :max="maxMinutes" :step="step" class="pt-2" - @change="changeMinutes" /> { @@ -257,6 +256,12 @@ export default { return ret }, }, + watch: { + minutes(newVal) { + console.log('watch', newVal) + this.changeMinutes(newVal) + }, + }, methods: { increment() { this.minutes = Math.min(this.minutes + this.step, this.maxMinutes) diff --git a/components/JobsSidebar.vue b/components/JobsSidebar.vue index 49038d7a..0c311bb5 100644 --- a/components/JobsSidebar.vue +++ b/components/JobsSidebar.vue @@ -1,7 +1,7 @@