Skip to content

Commit b345f36

Browse files
authored
Merge pull request #303 from Peppermint-Lab/master
inline
2 parents f2ab25c + 63c116d commit b345f36

File tree

5 files changed

+62
-56
lines changed

5 files changed

+62
-56
lines changed

.github/workflows/dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
build:
10-
runs-on: ubuntu-latest
10+
runs-on: self-hosted
1111
steps:
1212
- name: Get current time
1313
uses: 1466587594/get-current-time@v2
@@ -33,7 +33,7 @@ jobs:
3333
- name: Build and push
3434
uses: docker/build-push-action@v2
3535
with:
36-
platforms: linux/amd64,linux/arm64,linux/arm
36+
platforms: linux/amd64,linux/arm64
3737
push: true
3838
tags: |
39-
pepperlabs/peppermint:dev
39+
pepperlabs/peppermint:nightly

.github/workflows/main.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Main Client Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: self-hosted
11+
steps:
12+
- name: Get current time
13+
uses: 1466587594/get-current-time@v2
14+
id: current-time
15+
with:
16+
format: YYYY-MM-DD--HH
17+
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
21+
# Install QEMU-based emulator
22+
- name: Install QEMU
23+
run: apt-get update && apt-get install -y qemu-user-static
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v1
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v2
30+
31+
- name: Login to DockerHub
32+
uses: docker/login-action@v1
33+
with:
34+
username: ${{ secrets.DOCKERHUB_USERNAME }}
35+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
36+
37+
- name: Build and push
38+
uses: docker/build-push-action@v2
39+
with:
40+
platforms: linux/amd64,linux/arm64
41+
push: true
42+
tags: |
43+
pepperlabs/peppermint:latest

apps/api/src/lib/imap.ts

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,6 @@ const year = date.getFullYear();
1414
//@ts-ignore
1515
const d = new Date([year, month, today]);
1616

17-
function parseEmailContent(emailText: any) {
18-
const lines = emailText.split("\n");
19-
const parsedData = {
20-
name: "",
21-
email: "",
22-
phoneNumbers: [],
23-
addresses: [],
24-
companyDetails: "",
25-
};
26-
27-
let inAddressSection = false;
28-
29-
lines.forEach((line: any) => {
30-
if (line.includes("@")) {
31-
parsedData.email = line.trim();
32-
} else if (line.includes("US:") || line.includes("UK:")) {
33-
//@ts-ignore
34-
parsedData.phoneNumbers.push(line.trim());
35-
} else if (line.includes("ISO")) {
36-
parsedData.companyDetails = line.trim();
37-
} else if (line.trim() === "North America:" || line.trim() === "Europe:") {
38-
inAddressSection = true;
39-
//@ts-ignore
40-
} else if (inAddressSection && line.trim() !== "") {
41-
//@ts-ignore
42-
parsedData.addresses.push(line.trim());
43-
}
44-
});
45-
46-
return parsedData;
47-
}
48-
4917
export const getEmails = async () => {
5018
try {
5119
const queues = await client.emailQueue.findMany({});
@@ -87,7 +55,7 @@ export const getEmails = async () => {
8755

8856
console.log("from", from);
8957

90-
const parsedData = parseEmailContent(textAsHtml);
58+
// const parsedData = parseEmailContent(textAsHtml);
9159

9260
if (subject !== undefined && subject.includes("Re:")) {
9361
return await client.comment.create({
@@ -116,7 +84,7 @@ export const getEmails = async () => {
11684
isComplete: Boolean(false),
11785
priority: "Low",
11886
fromImap: Boolean(true),
119-
detail: html,
87+
detail: html ? html : textAsHtml,
12088
},
12189
});
12290

apps/client/layouts/newLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ export default function NewLayout({ children }: any) {
952952
{user.isAdmin && (
953953
<Link href="https://github.com/Peppermint-Lab/peppermint/releases">
954954
<span className="inline-flex items-center rounded-md bg-green-700/10 px-3 py-2 text-xs font-medium text-green-600 ring-1 ring-inset ring-green-500/20">
955-
Version 0.4.6
955+
Version 0.4.7
956956
</span>
957957
</Link>
958958
)}

apps/client/pages/new.tsx

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Link, RichTextEditor } from "@mantine/tiptap";
2-
import Placeholder from '@tiptap/extension-placeholder';
32
import Highlight from "@tiptap/extension-highlight";
3+
import Placeholder from "@tiptap/extension-placeholder";
44
import Underline from "@tiptap/extension-underline";
55
import { useEditor } from "@tiptap/react";
66
import StarterKit from "@tiptap/starter-kit";
@@ -55,7 +55,7 @@ export default function CreateTicket() {
5555
Superscript,
5656
SubScript,
5757
Highlight,
58-
Placeholder.configure({ placeholder: t("ticket_extra_details") })
58+
Placeholder.configure({ placeholder: t("ticket_extra_details") }),
5959
// TextAlign.configure({ types: ['heading', 'paragraph'] }),
6060
],
6161
content: issue,
@@ -378,6 +378,17 @@ export default function CreateTicket() {
378378
</div>
379379
<div className="flex flex-col xl:flex-row h-full w-full">
380380
<div className="w-full xl:w-2/3 order-2 xl:order-2">
381+
<div className="px-4 border-b border-gray-700">
382+
<input
383+
type="text"
384+
name="title"
385+
placeholder={t("ticket_details")}
386+
maxLength={64}
387+
autoComplete="off"
388+
onChange={(e) => setTitle(e.target.value)}
389+
className="w-full pl-0 pr-0 sm:text-xl border-none dark:bg-[#0A090C] dark:text-white focus:outline-none focus:shadow-none focus:ring-0 focus:border-none"
390+
/>
391+
</div>
381392
<RichTextEditor
382393
editor={editor}
383394
placeholder={t("ticket_extra_details")}
@@ -428,22 +439,6 @@ export default function CreateTicket() {
428439
</div>
429440
<div className="w-full xl:w-1/6 p-3 flex flex-col dark:bg-[#0A090C] dark:text-white border-b-[1px] xl:border-b-0 xl:border-r-[1px] order-1 xl:order-1">
430441
<div className="flex flex-col">
431-
<div>
432-
<label>
433-
<span className="block text-sm font-medium text-gray-700 dark:text-white">
434-
Title
435-
</span>
436-
</label>
437-
<input
438-
type="text"
439-
name="title"
440-
placeholder={t("ticket_details")}
441-
maxLength={64}
442-
autoComplete="off"
443-
onChange={(e) => setTitle(e.target.value)}
444-
className="w-full pl-0 pr-0 sm:text-xl border-none dark:bg-[#0A090C] dark:text-white focus:outline-none focus:shadow-none focus:ring-0 focus:border-none"
445-
/>
446-
</div>
447442
<div>
448443
<label>
449444
<span className="block text-sm font-medium text-gray-700 dark:text-white">

0 commit comments

Comments
 (0)