diff --git a/src/App.vue b/src/App.vue index 13dae39..99315a2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,26 +1,89 @@ diff --git a/src/background/run.ts b/src/background/run.ts index d3ab521..eeafe21 100644 --- a/src/background/run.ts +++ b/src/background/run.ts @@ -14,7 +14,7 @@ export async function main() { // create main window. await createWindow({ width: 350, - height: 525, + height: 500, resizable: true }); diff --git a/src/background/session.ts b/src/background/session.ts index 5959e2e..7ca7f36 100644 --- a/src/background/session.ts +++ b/src/background/session.ts @@ -23,8 +23,8 @@ interface TextMessage { content: string; } -const ip = 'ws://127.0.0.1'; -const port = 8081; +const ip = 'ws://localhost'; +const port = 8760; const reconnectTimeout = 3000; //ms let socket: WebSocket; let success = false; diff --git a/src/background/window.ts b/src/background/window.ts index 8967dea..036999a 100644 --- a/src/background/window.ts +++ b/src/background/window.ts @@ -55,6 +55,9 @@ export const createWindow = async (options: WindowSettings): Promise => { width: options.width, height: options.height, resizable: options.resizable, + frame: false, + minWidth: 350, + minHeight: 500, webPreferences: { // Use pluginOptions.nodeIntegration, leave this alone // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info diff --git a/src/components/messageView/index.vue b/src/components/messageView/index.vue index 261e718..58d19e8 100644 --- a/src/components/messageView/index.vue +++ b/src/components/messageView/index.vue @@ -4,6 +4,7 @@ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" :viewBox="scrollView" + @click="emittMessage" > @@ -21,24 +22,33 @@ + + diff --git a/src/components/messageView/viewDetails/offsetCalculator.ts b/src/components/messageView/viewDetails/offsetCalculator.ts index a04e5ab..01be800 100644 --- a/src/components/messageView/viewDetails/offsetCalculator.ts +++ b/src/components/messageView/viewDetails/offsetCalculator.ts @@ -5,7 +5,7 @@ import { ref } from "vue"; export default function useOffsetCalculator() { const xOffset = ref(0); const yOffset = ref(0); - const firstChildMarginTop = 0; + const firstChildMarginTop = 45; let previousMessageHeight = 0; const messagePadding = 15; diff --git a/src/components/messageView/viewDetails/transitions.ts b/src/components/messageView/viewDetails/transitions.ts index 8d85701..493725e 100644 --- a/src/components/messageView/viewDetails/transitions.ts +++ b/src/components/messageView/viewDetails/transitions.ts @@ -33,9 +33,12 @@ export default function useTransitions() { const animateMessage = async (el: SVGGElement) => { + // Where the message gets translated to. const elTransform = `translate(${messageOffset.x} ${messageOffset.y})`; + const viewTransform = `translate(0 ${-vB})`; + // Shift of view height > window height. if (shift) { await shiftAnimate(el, elTransform, messageView, viewTransform); } else { @@ -44,6 +47,7 @@ export default function useTransitions() { rendering.value = false; } + // Get height of messageView. const beforeEnter: VueTransitionCallback = () => { rendering.value = true; // query DOM for messageView element diff --git a/src/components/taInput/index.vue b/src/components/taInput/index.vue index 91fb570..b0f3a28 100644 --- a/src/components/taInput/index.vue +++ b/src/components/taInput/index.vue @@ -1,17 +1,33 @@ diff --git a/src/views/login.vue b/src/views/login.vue index 41f9b37..6cbee8f 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,5 +1,6 @@ @@ -80,33 +89,44 @@ export default defineComponent({ diff --git a/src/views/splash.vue b/src/views/splash.vue index cb47283..d30173d 100644 --- a/src/views/splash.vue +++ b/src/views/splash.vue @@ -59,14 +59,13 @@ export default defineComponent({ \ No newline at end of file