Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add previous meetings #87

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions extension/sidepanels/chatsidepanel.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ <h3>Your AI meeting copilot</h3>
<h2>Amurex</h2>
</div>
<div class="header-right">
<button id="previous-transcripts" class="black-btn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z" stroke="currentColor" stroke-width="1.5"/>
<path d="M12 7V12L15 15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<span>Previous Transcripts</span>
</button>
<button id="settings-btn" class="settings-btn">
<svg
width="20"
Expand Down
46 changes: 46 additions & 0 deletions extension/sidepanels/chatsidepanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,52 @@ document.addEventListener("DOMContentLoaded", () => {
document.getElementById("close-btn").addEventListener("click", () => {
window.close();
});

// Add Previous Transcripts button functionality
document.getElementById("previous-transcripts").addEventListener("click", () => {
// Open app.amurex.ai in a new tab
chrome.tabs.create({
url: `${AMUREX_CONFIG.BASE_URL_WEB}/meetings`,
active: true
});

// Get meetingId from URL if available
const meetingId = window.location.href.includes('meetingId=') ?
window.location.href.split('meetingId=')[1].split('&')[0] :
'unknown';

// Track the event if analytics is enabled
chrome.runtime.sendMessage(
{
action: "getUserId",
},
(response) => {
if (chrome.runtime.lastError) {
console.error("Error getting user id:", chrome.runtime.lastError);
return;
}

const userId = response.userId;

if (AMUREX_CONFIG.ANALYTICS_ENABLED) {
fetch(`${AMUREX_CONFIG.BASE_URL_BACKEND}/track`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
},
body: JSON.stringify({
uuid: userId,
meeting_id: meetingId,
event_type: "view_previous_transcripts"
}),
}).catch(error => {
console.error("Error tracking previous transcripts view:", error);
});
}
}
);
});
});

function setupQAObserver() {
Expand Down
7 changes: 7 additions & 0 deletions extension/sidepanels/file_upload_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ <h3>Your AI meeting copilot</h3>
<h2>Amurex</h2>
</div>
<div class="header-right">
<button id="previous-transcripts" class="black-btn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z" stroke="currentColor" stroke-width="1.5"/>
<path d="M12 7V12L15 15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<span>Previous Transcripts</span>
</button>
<button id="settings-btn" class="settings-btn">
<svg
width="20"
Expand Down
46 changes: 46 additions & 0 deletions extension/sidepanels/file_upload_panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,49 @@ document.addEventListener("DOMContentLoaded", () => {
}
});
});

// Add Previous Transcripts button functionality
document.getElementById("previous-transcripts").addEventListener("click", () => {
// Open app.amurex.ai in a new tab
chrome.tabs.create({
url: `${AMUREX_CONFIG.BASE_URL_WEB}/meetings`,
active: true
});

// Get meetingId from URL if available
const meetingId = window.location.href.includes('meetingId=') ?
window.location.href.split('meetingId=')[1].split('&')[0] :
'unknown';

// Track the event if analytics is enabled
chrome.runtime.sendMessage(
{
action: "getUserId",
},
(response) => {
if (chrome.runtime.lastError) {
console.error("Error getting user id:", chrome.runtime.lastError);
return;
}

const userId = response.userId;

if (AMUREX_CONFIG.ANALYTICS_ENABLED) {
fetch(`${AMUREX_CONFIG.BASE_URL_BACKEND}/track`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
},
body: JSON.stringify({
uuid: userId,
meeting_id: meetingId,
event_type: "view_previous_transcripts"
}),
}).catch(error => {
console.error("Error tracking previous transcripts view:", error);
});
}
}
);
});
7 changes: 7 additions & 0 deletions extension/sidepanels/lateMeetingSidePanel.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ <h3>Your AI meeting copilot</h3>
<h2>Amurex</h2>
</div>
<div class="header-right">
<button id="previous-transcripts" class="black-btn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z" stroke="currentColor" stroke-width="1.5"/>
<path d="M12 7V12L15 15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<span>Previous Transcripts</span>
</button>
<button id="settings-btn" class="settings-btn">
<svg
width="20"
Expand Down
46 changes: 46 additions & 0 deletions extension/sidepanels/latesidepanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,49 @@ document.getElementById("settings-btn").addEventListener("click", () => {
url: `${AMUREX_CONFIG.BASE_URL_WEB}/settings`,
});
});

// Add Previous Transcripts button functionality
document.getElementById("previous-transcripts").addEventListener("click", () => {
// Open app.amurex.ai in a new tab
chrome.tabs.create({
url: `${AMUREX_CONFIG.BASE_URL_WEB}/meetings`,
active: true
});

// Get meetingId from URL if available
const meetingId = window.location.href.includes('meetingId=') ?
window.location.href.split('meetingId=')[1].split('&')[0] :
'unknown';

// Track the event if analytics is enabled
chrome.runtime.sendMessage(
{
action: "getUserId",
},
(response) => {
if (chrome.runtime.lastError) {
console.error("Error getting user id:", chrome.runtime.lastError);
return;
}

const userId = response.userId;

if (AMUREX_CONFIG.ANALYTICS_ENABLED) {
fetch(`${AMUREX_CONFIG.BASE_URL_BACKEND}/track`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
},
body: JSON.stringify({
uuid: userId,
meeting_id: meetingId,
event_type: "view_previous_transcripts"
}),
}).catch(error => {
console.error("Error tracking previous transcripts view:", error);
});
}
}
);
});
26 changes: 25 additions & 1 deletion extension/sidepanels/sidepanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ body {
.header-right {
display: flex;
align-items: center;
gap: 4px;
gap: 8px;
}

.settings-btn {
Expand Down Expand Up @@ -792,4 +792,28 @@ h2 {
justify-content: center;
}

.black-btn {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 10px;
background: #18181B;
border: 1px solid #27272A;
border-radius: 8px;
color: #FAFAFA;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
}

.black-btn:hover {
background: #27272A;
}

.black-btn svg {
width: 20px;
height: 20px;
}


7 changes: 7 additions & 0 deletions extension/sidepanels/sidepanel.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ <h3>Your AI meeting copilot</h3>
<h2>Amurex</h2>
</div>
<div class="header-right">
<button id="previous-transcripts" class="black-btn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z" stroke="currentColor" stroke-width="1.5"/>
<path d="M12 7V12L15 15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<span>Previous Transcripts</span>
</button>
<button id="settings-btn" class="settings-btn">
<svg
width="20"
Expand Down
45 changes: 45 additions & 0 deletions extension/sidepanels/sidepanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,3 +670,48 @@ document.getElementById('share-to-apps').addEventListener('click', () => {
}
);
});

document.getElementById("previous-transcripts").addEventListener("click", () => {
// Open app.amurex.ai in a new tab
chrome.tabs.create({
url: `${AMUREX_CONFIG.BASE_URL_WEB}/meetings`,
active: true
});

// Get meetingId from URL if available
const meetingId = window.location.href.includes('meetingId=') ?
window.location.href.split('meetingId=')[1].split('&')[0] :
'unknown';

// Track the event if analytics is enabled
chrome.runtime.sendMessage(
{
action: "getUserId",
},
(response) => {
if (chrome.runtime.lastError) {
console.error("Error getting user id:", chrome.runtime.lastError);
return;
}

const userId = response.userId;

if (AMUREX_CONFIG.ANALYTICS_ENABLED) {
fetch(`${AMUREX_CONFIG.BASE_URL_BACKEND}/track`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
},
body: JSON.stringify({
uuid: userId,
meeting_id: meetingId,
event_type: "view_previous_transcripts"
}),
}).catch(error => {
console.error("Error tracking previous transcripts view:", error);
});
}
}
);
});