From: Andrew Gundersen Date: Thu, 17 Mar 2022 11:54:08 +0000 (-0500) Subject: annotate content patch X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=6f7c0f17c54e982e9fa93be501789fd5afb12bcd;p=mime-chat annotate content patch --- diff --git a/.npmrc b/.npmrc index d8d704d..ce46d51 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,2 @@ @crimata:registry=https://gitlab.com/api/v4/projects/28849281/packages/npm/ -//gitlab.com/api/v4/projects/28849281/packages/npm/:_authToken=${NPM_TOKEN} +//gitlab.com/api/v4/projects/28849281/packages/npm/:_authToken=${API_TOKEN} \ No newline at end of file diff --git a/README.md b/README.md index 1bec458..e9fefb0 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Debug electron-osx-sign: ### Some things to note: -If new package.json, build manually. Only copies src code into /Resources/app. +Notarize only when distributing outside the Mac App Store. #### Gatekeeper Assess Electron-osx-sign seems to have a bug where the sign will fail if "gatekeeper-assess" is true (default). @@ -57,7 +57,7 @@ Electron-osx-sign seems to have a bug where the sign will fail if "gatekeeper-as Not to be confused with Info.plist, this file specifies entitlements the app can have in hardened runtime (e.g. Can I use the microphone?). Only including the ones Electron reccommends seems to work (including audio of course and omitting allow-unsigned-executable-memory). #### The Benifit of Electron OSX Sign -Without this package, we would have to manually go in and figure out how to sign each level of the app. While it didn't work out of the box (gatekeeper-assess) it's proven to be good otherwise. However, there is a bug where it puts multiple runtime flags on each command - not catastrophic though. +Without this package, we would have to manually go in and figure out how to sign each level of the app. While it didn't work out of the box (gatekeeper-assess) it seems to be good otherwise. However, there is a bug where it puts multiple runtime flags on each command - not catastrophic though. #### Apple Password This must be an app specific password, not your normal Apple ID password. diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..2897b98 Binary files /dev/null and b/icon.png differ diff --git a/notarize.js b/notarize.js index 39449da..cd3b19a 100644 --- a/notarize.js +++ b/notarize.js @@ -2,7 +2,7 @@ const exec = require('child_process').exec; const sign = require("electron-osx-sign").signAsync; const notarize = require("electron-notarize").notarize; -const app = "Electron.app"; +const app = "Crimata.app"; const dir = `${app}/Contents/Resources/app`; const runShellCommand = (cmd) => (new Promise((resolve, reject) => { @@ -23,7 +23,7 @@ const signConfig = { const notarizeConfig = { appPath: app, appleId: "gundersena@crimata.com", - appBundleId: "com.github.Electron", + appBundleId: "com.crimata.CrimataMessenger", appleIdPassword: process.env["AC_PASSWORD"] }; diff --git a/package-lock.json b/package-lock.json index 6505d8a..cc9403e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "Crimata", "version": "1.0.0", "dependencies": { - "@crimata/nodeaudio": "^0.0.0", + "@crimata/nodeaudio": "0.0.0", "axios": "^0.21.1", "base64-arraybuffer": "^1.0.1", "electron-store": "^8.0.0", @@ -22,7 +22,7 @@ "node_modules/@crimata/nodeaudio": { "version": "0.0.0", "resolved": "https://gitlab.com/api/v4/projects/28849281/packages/npm/@crimata/nodeaudio/-/@crimata/nodeaudio-0.0.0.tgz", - "integrity": "sha1-epnrLe2KfWntf4tPqwW4KVb/sQ0=", + "integrity": "sha1-4lPe1QynEwebXcjezyAPhfwI+VM=", "hasInstallScript": true, "dependencies": { "bindings": "~1.2.1", @@ -634,7 +634,7 @@ "@crimata/nodeaudio": { "version": "0.0.0", "resolved": "https://gitlab.com/api/v4/projects/28849281/packages/npm/@crimata/nodeaudio/-/@crimata/nodeaudio-0.0.0.tgz", - "integrity": "sha1-epnrLe2KfWntf4tPqwW4KVb/sQ0=", + "integrity": "sha1-4lPe1QynEwebXcjezyAPhfwI+VM=", "requires": { "bindings": "~1.2.1", "sleep": "^6.3.0" diff --git a/package.json b/package.json index 9f62421..6b6c329 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "start": "electron ." }, "dependencies": { - "@crimata/nodeaudio": "^0.0.0", + "@crimata/nodeaudio": "0.0.0", "axios": "^0.21.1", "base64-arraybuffer": "^1.0.1", "electron-store": "^8.0.0", diff --git a/src/config.js b/src/config.js index cabf8f3..bc47fb5 100644 --- a/src/config.js +++ b/src/config.js @@ -3,6 +3,7 @@ const { app } = require("electron"); const DOMAIN = "crimata.com"; const prod = !process.defaultApp; +// const prod = true; module.exports = { PLATFORM: prod ? `https://app.${DOMAIN}` : `http://localhost:8760`, diff --git a/src/render/components/messenger.js b/src/render/components/messenger.js index ed7ca40..4ed4912 100644 --- a/src/render/components/messenger.js +++ b/src/render/components/messenger.js @@ -45,6 +45,13 @@ const Messenger = { { search(update.message).context = update.context; } + else if (update.text) + { + search(update.message).content.at(-1).text = update.text; + setTimeout(() => { + document.getElementById("messenger").dispatchEvent(new CustomEvent('adjust-scroll')) + }, 100); + } }); diff --git a/src/session.js b/src/session.js index 9cd33ca..8d31656 100644 --- a/src/session.js +++ b/src/session.js @@ -53,6 +53,10 @@ function handleMessageQueue() { search(update.message).context = update.context; } + else if (update.text) /* Update the text of last message */ + { + search(update.message).content.at(-1).text = update.text; + } ipcEmit("message", update); }