Add note and menu to the extension

This commit is contained in:
Jackson Harper 2023-05-22 14:51:53 +08:00
parent 6122993e2a
commit 62e37b7766
8 changed files with 483 additions and 42 deletions

View file

@ -24,6 +24,7 @@
"webpack-merge": "^5.7.3"
},
"dependencies": {
"nanoid": "^4.0.2",
"uuid": "^8.3.2"
}
}

View file

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "process.env.EXTENSION_NAME",
"short_name": "process.env.EXTENSION_NAME",
"version": "2.0.2",
"version": "2.0.8",
"description": "Save PDFs and Articles to your Omnivore library",
"author": "Omnivore Media, Inc",
"default_locale": "en",

View file

@ -130,3 +130,190 @@ async function setLabels(apiUrl, pageId, labelIds) {
}
return data.setLabels.labels
}
async function addNote(apiUrl, pageId, noteId, shortId, note) {
const query = JSON.stringify({
query: `query GetArticle(
$username: String!
$slug: String!
$includeFriendsHighlights: Boolean
) {
article(username: $username, slug: $slug) {
... on ArticleSuccess {
article {
highlights(input: { includeFriends: $includeFriendsHighlights }) {
...HighlightFields
}
}
}
... on ArticleError {
errorCodes
}
}
}
fragment HighlightFields on Highlight {
id
type
annotation
}
`,
variables: {
username: 'me',
slug: pageId,
includeFriendsHighlights: false,
},
})
const data = await gqlRequest(apiUrl, query)
if (!data.article || data.article['errorCodes'] || !data.article['article']) {
console.log('GQL Error getting existing highlights:', data)
return
}
const existingNote = data.article.article.highlights.find(
(h) => h.type == 'NOTE'
)
if (existingNote) {
const mutation = JSON.stringify({
query: `
mutation UpdateHighlight($input: UpdateHighlightInput!) {
updateHighlight(input: $input) {
... on UpdateHighlightSuccess {
highlight {
id
}
}
... on UpdateHighlightError {
errorCodes
}
}
}
`,
variables: {
input: {
highlightId: existingNote.id,
annotation: existingNote.annotation
? existingNote.annotation + '\n\n' + note
: note,
},
},
})
const result = await gqlRequest(apiUrl, mutation)
if (
!result.updateHighlight ||
result.updateHighlight['errorCodes'] ||
!result.updateHighlight.highlight
) {
console.log('GQL Error updating note:', result)
return
}
return result.updateHighlight.highlight.id
} else {
const mutation = JSON.stringify({
query: `
mutation CreateHighlight($input: CreateHighlightInput!) {
createHighlight(input: $input) {
... on CreateHighlightSuccess {
highlight {
id
}
}
... on CreateHighlightError {
errorCodes
}
}
}
`,
variables: {
input: {
id: noteId,
shortId: shortId,
type: 'NOTE',
articleId: pageId,
annotation: note,
},
},
})
const result = await gqlRequest(apiUrl, mutation)
if (
!result.createHighlight ||
result.createHighlight['errorCodes'] ||
!result.createHighlight.highlight
) {
console.log('GQL Error setting note:', result)
return
}
return result.createHighlight.highlight.id
}
}
async function archive(apiUrl, pageId) {
const mutation = JSON.stringify({
query: `mutation SetLinkArchived($input: ArchiveLinkInput!) {
setLinkArchived(input: $input) {
... on ArchiveLinkSuccess {
linkId
message
}
... on ArchiveLinkError {
message
errorCodes
}
}
}
`,
variables: {
input: {
linkId: pageId,
archived: true,
},
},
})
const data = await gqlRequest(apiUrl, mutation)
if (
!data.setLinkArchived ||
data.setLinkArchived['errorCodes'] ||
!data.setLinkArchived.linkId
) {
console.log('GQL Error archiving:', data)
throw new Error('Error archiving.')
}
return data.setLinkArchived.linkId
}
async function deleteItem(apiUrl, pageId) {
const mutation = JSON.stringify({
query: `mutation SetBookmarkArticle($input: SetBookmarkArticleInput!) {
setBookmarkArticle(input: $input) {
... on SetBookmarkArticleSuccess {
bookmarkedArticle {
id
}
}
... on SetBookmarkArticleError {
errorCodes
}
}
}
`,
variables: {
input: {
articleID: pageId,
bookmark: false,
},
},
})
const data = await gqlRequest(apiUrl, mutation)
if (
!data.setBookmarkArticle ||
data.setBookmarkArticle['errorCodes'] ||
!data.setBookmarkArticle.bookmarkedArticle
) {
console.log('GQL Error deleting:', data)
throw new Error('Error deleting.')
}
return data.setBookmarkArticle.bookmarkedArticle
}

View file

@ -12,6 +12,7 @@
'use strict'
import { v4 as uuidv4 } from 'uuid'
import { nanoid } from 'nanoid'
let authToken = undefined
const omnivoreURL = process.env.OMNIVORE_URL
@ -285,6 +286,28 @@ async function editTitleRequest(tabId, request, completedResponse) {
})
}
async function addNoteRequest(tabId, request, completedResponse) {
const noteId = uuidv4()
const shortId = nanoid(8)
return addNote(
omnivoreGraphqlURL + 'graphql',
completedResponse.responseId,
noteId,
shortId,
request.note
)
.then(() => {
updateClientStatus(tabId, 'note', 'success', 'Note updated.')
return true
})
.catch((err) => {
console.log('caught error updating title: ', err)
updateClientStatus(tabId, 'note', 'failure', 'Error adding note.')
return true
})
}
async function setLabelsRequest(tabId, request, completedResponse) {
return setLabels(
omnivoreGraphqlURL + 'graphql',
@ -301,6 +324,33 @@ async function setLabelsRequest(tabId, request, completedResponse) {
})
}
async function archiveRequest(tabId, request, completedResponse) {
return archive(omnivoreGraphqlURL + 'graphql', completedResponse.responseId)
.then(() => {
updateClientStatus(tabId, 'extra', 'success', 'Archived')
return true
})
.catch(() => {
updateClientStatus(tabId, 'extra', 'failure', 'Error archiving')
return true
})
}
async function deleteRequest(tabId, request, completedResponse) {
return deleteItem(
omnivoreGraphqlURL + 'graphql',
completedResponse.responseId
)
.then(() => {
updateClientStatus(tabId, 'extra', 'success', 'Deleted')
return true
})
.catch(() => {
updateClientStatus(tabId, 'extra', 'failure', 'Error deleting')
return true
})
}
async function processPendingRequests(tabId) {
const tabRequests = pendingRequests.filter((pr) => pr.tabId === tabId)
@ -312,9 +362,18 @@ async function processPendingRequests(tabId) {
case 'EDIT_TITLE':
handled = await editTitleRequest(tabId, pr, completed)
break
case 'ADD_NOTE':
handled = await addNoteRequest(tabId, pr, completed)
break
case 'SET_LABELS':
handled = await setLabelsRequest(tabId, pr, completed)
break
case 'ARCHIVE':
handled = await archiveRequest(tabId, pr, completed)
break
case 'DELETE':
handled = await deleteRequest(tabId, pr, completed)
break
}
}
@ -764,6 +823,39 @@ function init() {
processPendingRequests(sender.tab.id)
}
if (request.action === ACTIONS.Archive) {
pendingRequests.push({
id: uuidv4(),
type: 'ARCHIVE',
tabId: sender.tab.id,
clientRequestId: request.payload.ctx.requestId,
})
processPendingRequests(sender.tab.id)
}
if (request.action === ACTIONS.Delete) {
pendingRequests.push({
type: 'DELETE',
tabId: sender.tab.id,
clientRequestId: request.payload.ctx.requestId,
})
processPendingRequests(sender.tab.id)
}
if (request.action === ACTIONS.AddNote) {
pendingRequests.push({
id: uuidv4(),
type: 'ADD_NOTE',
tabId: sender.tab.id,
note: request.payload.note,
clientRequestId: request.payload.ctx.requestId,
})
processPendingRequests(sender.tab.id)
}
if (request.action === ACTIONS.SetLabels) {
pendingRequests.push({
id: uuidv4(),

View file

@ -35,8 +35,12 @@ window.ACTIONS = {
ShowToolbar: 'SHOW_TOOLBAR',
UpdateStatus: 'UPDATE_STATUS',
AddNote: 'ADD_NOTE',
EditTitle: 'EDIT_TITLE',
SetLabels: 'SET_LABELS',
Archive: 'ARCHIVE',
Delete: 'DELETE',
}
window.SAVE_URL_QUERY = `mutation SaveUrl ($input: SaveUrlInput!) {

View file

@ -76,32 +76,7 @@
document.body.appendChild(root)
connectButtons(root)
return root
}
async function createCtaModal(url) {
if (currentToastEl) {
currentToastEl.remove()
currentToastEl = undefined
}
const file = await fetch(browserApi.runtime.getURL('/views/cta-popup.html'))
const html = await file.text()
const root = document.createElement('div')
root.attachShadow({ mode: 'open' })
if (root.shadowRoot) {
root.shadowRoot.innerHTML = `<style>:host {all initial;}</style>`
}
const toastEl = document.createElement('div')
toastEl.id = '#omnivore-toast'
toastEl.innerHTML = html
root.shadowRoot.appendChild(toastEl)
document.body.appendChild(root)
connectButtons(root)
// connectKeyboard(root)
return root
}
@ -123,6 +98,8 @@
'#omnivore-toast-edit-title-btn',
'#omnivore-toast-edit-labels-btn',
'#omnivore-toast-read-now-btn',
'#omnivore-toast-add-note-btn',
'#omnivore-open-menu-btn',
]
actionButtons.forEach((btnId) => {
const btn = currentToastEl.shadowRoot.querySelector(btnId)
@ -152,6 +129,19 @@
case 'page':
updatePageStatus(payload.status)
break
case 'note':
updateStatusBox(
'#omnivore-add-note-status',
payload.status,
payload.message,
payload.status == 'success' ? 2500 : undefined
)
if (payload.status == 'success') {
setTimeout(() => {
toggleRow('#omnivore-add-note-status')
}, 3000)
}
break
case 'title':
updateStatusBox(
'#omnivore-edit-title-status',
@ -159,6 +149,11 @@
payload.message,
payload.status == 'success' ? 2500 : undefined
)
if (payload.status == 'success') {
setTimeout(() => {
toggleRow('#omnivore-edit-title-status')
}, 3000)
}
break
case 'labels':
updateStatusBox(
@ -168,6 +163,19 @@
payload.status == 'success' ? 2500 : undefined
)
break
case 'extra':
updateStatusBox(
'#omnivore-extra-status',
payload.status,
payload.message,
payload.status == 'success' ? 2500 : undefined
)
if (payload.status == 'success') {
setTimeout(() => {
currentToastEl.remove()
}, 3000)
}
break
}
}
@ -259,12 +267,13 @@
}
if (dismissAfter) {
setTimeout(() => {
statusBox.innerHTML = null
statusBox.innerHTML = ''
}, dismissAfter)
}
}
function toggleRow(rowId) {
console.log('currentToastEl: ', currentToastEl)
const container = currentToastEl.shadowRoot.querySelector(rowId)
const initialState = container?.getAttribute('data-state')
const rows = currentToastEl.shadowRoot.querySelectorAll(
@ -283,12 +292,15 @@
function connectButtons(root) {
const btns = [
{ id: '#omnivore-toast-add-note-btn', func: addNote },
{ id: '#omnivore-toast-edit-title-btn', func: editTitle },
{ id: '#omnivore-toast-edit-labels-btn', func: editLabels },
{ id: '#omnivore-toast-read-now-btn', func: readNow },
{ id: '#omnivore-open-menu-btn', func: openMenu },
{ id: '#omnivore-toast-close-btn', func: closeToast },
{ id: '#omnivore-toast-login-btn', func: login },
{ id: '#omnivore-toast-archive-btn', func: archive },
{ id: '#omnivore-toast-delete-btn', func: deleteItem },
]
for (const btnInfo of btns) {
@ -297,6 +309,53 @@
btn.addEventListener('click', btnInfo.func)
}
}
var x = window.matchMedia('(max-width: 500px)')
if (x.matches) {
const labels = root.shadowRoot.querySelectorAll(
'.omnivore-top-button-label'
)
labels.forEach((label) => {
console.log(' - hiding label', label)
label.style.display = 'none'
})
const container = root.shadowRoot.querySelector(
'#omnivore-toast-container'
)
container.style.width = '280px'
}
root.shadowRoot.focus()
}
function connectKeyboard(root) {
console.log('connecting keyboard')
root.addEventListener('keydown', (e) => {
console.log(
'root.addEventListener document code: ',
e.key,
'activeElement:',
document.activeElement
)
switch (e.key) {
case 'r':
readNow()
break
case 'l':
editLabels()
break
case 'm':
openMenu()
break
case 'i':
editTitle()
break
case 't':
addNote()
break
}
})
}
function createLabelRow(label, idx) {
@ -424,7 +483,34 @@
}
}
function addNote() {
cancelAutoDismiss()
toggleRow('#omnivore-add-note-row')
currentToastEl.shadowRoot
.querySelector('#omnivore-add-note-textarea')
?.focus()
currentToastEl.shadowRoot.querySelector(
'#omnivore-add-note-form'
).onsubmit = (event) => {
console.log('submitting form: ', event)
updateStatusBox('#omnivore-add-note-status', 'loading', 'Adding note...')
browserApi.runtime.sendMessage({
action: ACTIONS.AddNote,
payload: {
ctx: ctx,
note: event.target.elements.title.value,
},
})
event.preventDefault()
}
}
function editTitle() {
console.log('editing title')
cancelAutoDismiss()
toggleRow('#omnivore-edit-title-row')
currentToastEl.shadowRoot
@ -551,9 +637,31 @@
}, 1000)
}
function archive(event) {
browserApi.runtime.sendMessage({
action: ACTIONS.Archive,
payload: {
ctx: ctx,
},
})
event.preventDefault()
}
function deleteItem(event) {
browserApi.runtime.sendMessage({
action: ACTIONS.Delete,
payload: {
ctx: ctx,
},
})
event.preventDefault()
}
function openMenu() {
cancelAutoDismiss()
toggleRow('omnivore-extra-buttons-row')
toggleRow('#omnivore-extra-buttons-row')
}
function closeToast() {

View file

@ -18,7 +18,7 @@
box-shadow: 0px 5px 20px rgba(32, 31, 29, 0.12);
transition: all 300ms ease;
z-index: 9999999;
width: 455px;
width: 480px;
}
#omnivore-toast-container .omnivore-toast-func-row {
@ -30,6 +30,14 @@
padding-bottom: 10px;
}
#omnivore-toast-container #omnivore-extra-buttons-row {
padding-left: 5px;
}
#omnivore-toast-container #omnivore-extra-buttons-row button {
padding-left: 10px;
}
#omnivore-toast-container #omnivore-logged-out-row {
flex-direction: column;
align-items: center;
@ -119,6 +127,28 @@
#omnivore-edit-title-row textarea {
width: 100%;
height: 100px;
padding: 5px;
padding-top: 10px;
padding-bottom: 10px;
resize: none;
border: 1px solid #8E8E93;
border-radius: 4px;
box-sizing: border-box;
background-color: transparent;
}
#omnivore-add-note-row {
flex-direction: column;
visibility: unset;
padding-top: 20px;
height: 100%;
gap: 10px;
}
#omnivore-add-note-row textarea {
width: 100%;
height: 100px;
padding: 5px;
padding-top: 10px;
padding-bottom: 10px;
resize: none;
@ -161,7 +191,6 @@
}
#omnivore-toast-container #omnivore-extra-buttons-row button {
width: 80%;
align-self: flex-start;
padding: 10px;
margin: 0px;
@ -246,11 +275,11 @@
</span>
<span class="omnivore-toast-divider"></span>
<button class="omnivore-top-button" id="omnivore-toast-edit-title-btn">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.5625 4.50004L13.5 8.43754M6.71406 15.1516L2.84828 11.2858M6.517 15.1875H3.375C3.22582 15.1875 3.08274 15.1283 2.97725 15.0228C2.87176 14.9173 2.8125 14.7742 2.8125 14.625V11.483C2.8125 11.4092 2.82705 11.336 2.85532 11.2678C2.88359 11.1995 2.92502 11.1375 2.97725 11.0853L11.4148 2.64778C11.5202 2.5423 11.6633 2.48303 11.8125 2.48303C11.9617 2.48303 12.1048 2.5423 12.2102 2.64778L15.3523 5.78979C15.4577 5.89528 15.517 6.03835 15.517 6.18754C15.517 6.33672 15.4577 6.4798 15.3523 6.58528L6.91475 15.0228C6.86252 15.075 6.80051 15.1165 6.73226 15.1447C6.66402 15.173 6.59087 15.1875 6.517 15.1875Z" stroke="#6A6968" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
Edit Title
<button class="omnivore-top-button" id="omnivore-toast-add-note-btn">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="#6a6968" viewBox="0 0 256 256">
<path d="M88,96a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,96Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16Zm32,16H96a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16ZM224,48V156.69A15.86,15.86,0,0,1,219.31,168L168,219.31A15.86,15.86,0,0,1,156.69,224H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM48,208H152V160a8,8,0,0,1,8-8h48V48H48Zm120-40v28.7L196.69,168Z"></path>
</svg>
<span class="omnivore-top-button-label">Add Note</span>
</button>
<span class="omnivore-toast-divider"></span>
@ -259,7 +288,7 @@
<path d="M8.99031 14.9786L15.3061 8.67029C15.3757 8.6002 15.4307 8.51707 15.468 8.42568C15.5053 8.33429 15.5242 8.23643 15.5237 8.13772L15.5237 1.38683C15.5237 1.18789 15.4446 0.997101 15.304 0.85643C15.1633 0.715759 14.9725 0.636731 14.7736 0.636731L8.02269 0.636731C7.92397 0.63616 7.82611 0.655082 7.73472 0.69241C7.64333 0.729738 7.5602 0.784739 7.49012 0.85426L1.18179 7.17009C0.76038 7.59202 0.523681 8.16397 0.523681 8.7603C0.523681 9.35663 0.76038 9.92857 1.18179 10.3505L5.77239 14.9786C6.19432 15.4 6.76627 15.6367 7.3626 15.6367C7.95893 15.6367 8.53087 15.4 8.95281 14.9786L8.99031 14.9786ZM6.87503 13.921L2.24693 9.28536C2.10722 9.14482 2.0288 8.95471 2.0288 8.75655C2.0288 8.55838 2.10722 8.36827 2.24693 8.22773L8.33022 2.13693L14.0235 2.13693L14.0235 7.83018L7.93267 13.921C7.86258 13.9905 7.77946 14.0455 7.68807 14.0828C7.59668 14.1202 7.49882 14.1391 7.4001 14.1385C7.20332 14.1377 7.01475 14.0595 6.87503 13.921Z" fill="#6A6968"/>
<circle cx="10.8818" cy="5.48069" r="1.24925" fill="#6A6968"/>
</svg>
Set Labels
<span class="omnivore-top-button-label">Set Labels</span>
</button>
<span class="omnivore-toast-divider"></span>
@ -267,10 +296,10 @@
<svg width="18" height="15" viewBox="0 0 18 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.1272 0.939454H12.6584C11.6995 0.939454 10.762 1.21484 9.95532 1.73438L9.0022 2.3457L8.04907 1.73438C7.24323 1.21494 6.30469 0.938941 5.34595 0.939454H0.877197C0.531494 0.939454 0.252197 1.21875 0.252197 1.56445V12.6582C0.252197 13.0039 0.531494 13.2832 0.877197 13.2832H5.34595C6.30493 13.2832 7.24243 13.5586 8.04907 14.0781L8.91626 14.6367C8.94165 14.6523 8.97095 14.6621 9.00024 14.6621C9.02954 14.6621 9.05884 14.6543 9.08423 14.6367L9.95142 14.0781C10.76 13.5586 11.6995 13.2832 12.6584 13.2832H17.1272C17.4729 13.2832 17.7522 13.0039 17.7522 12.6582V1.56445C17.7522 1.21875 17.4729 0.939454 17.1272 0.939454ZM5.34595 11.877H1.65845V2.3457H5.34595C6.03735 2.3457 6.70923 2.54297 7.28931 2.91602L8.24243 3.52734L8.3772 3.61523V12.6387C7.44751 12.1387 6.40845 11.877 5.34595 11.877ZM16.3459 11.877H12.6584C11.5959 11.877 10.5569 12.1387 9.6272 12.6387V3.61523L9.76196 3.52734L10.7151 2.91602C11.2952 2.54297 11.967 2.3457 12.6584 2.3457H16.3459V11.877ZM6.75415 4.8457H3.12524C3.04907 4.8457 2.98657 4.91211 2.98657 4.99219V5.87109C2.98657 5.95117 3.04907 6.01758 3.12524 6.01758H6.7522C6.82837 6.01758 6.89087 5.95117 6.89087 5.87109V4.99219C6.89282 4.91211 6.83032 4.8457 6.75415 4.8457ZM11.1116 4.99219V5.87109C11.1116 5.95117 11.1741 6.01758 11.2502 6.01758H14.8772C14.9534 6.01758 15.0159 5.95117 15.0159 5.87109V4.99219C15.0159 4.91211 14.9534 4.8457 14.8772 4.8457H11.2502C11.1741 4.8457 11.1116 4.91211 11.1116 4.99219ZM6.75415 7.58008H3.12524C3.04907 7.58008 2.98657 7.64648 2.98657 7.72656V8.60547C2.98657 8.68555 3.04907 8.75195 3.12524 8.75195H6.7522C6.82837 8.75195 6.89087 8.68555 6.89087 8.60547V7.72656C6.89282 7.64648 6.83032 7.58008 6.75415 7.58008ZM14.8792 7.58008H11.2502C11.1741 7.58008 11.1116 7.64648 11.1116 7.72656V8.60547C11.1116 8.68555 11.1741 8.75195 11.2502 8.75195H14.8772C14.9534 8.75195 15.0159 8.68555 15.0159 8.60547V7.72656C15.0178 7.64648 14.9553 7.58008 14.8792 7.58008Z" fill="#6A6968"/>
</svg>
Read Now
<span class="omnivore-top-button-label">Read Now</span>
</button>
<span class="omnivore-toast-divider"></span>
<!--
<button id="omnivore-open-menu-btn">
<svg width="15" height="4" viewBox="0 0 15 4" fill="none" xmlns="http://www.w3.org/2000/svg">
<ellipse cx="1.48679" cy="1.79492" rx="1.4846" ry="1.5" fill="#6A6968"/>
@ -280,7 +309,7 @@
</svg>
</button>
<span class="omnivore-toast-divider"></span>
-->
<button id="omnivore-toast-close-btn">
<svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="9.50049" cy="9.52783" r="9" />
@ -290,6 +319,13 @@
</div>
<div id="omnivore-add-note-row" class="omnivore-toast-func-row" data-state="closed">
<span id="omnivore-add-note-status" class="omnivore-toast-func-status"></span>
<form id="omnivore-add-note-form">
<textarea id="omnivore-add-note-textarea" name="title"></textarea>
<button class="omnivore-save-button">Save</button>
</form>
</div>
<div id="omnivore-edit-title-row" class="omnivore-toast-func-row" data-state="closed">
<span id="omnivore-edit-title-status" class="omnivore-toast-func-status"></span>
<form id="omnivore-edit-title-form">
@ -310,7 +346,15 @@
</div>
<div id="omnivore-extra-buttons-row" class="omnivore-toast-func-row" data-state="closed">
<button>
<span id="omnivore-extra-status" class="omnivore-toast-func-status"></span>
<button id="omnivore-toast-edit-title-btn">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.5625 4.50004L13.5 8.43754M6.71406 15.1516L2.84828 11.2858M6.517 15.1875H3.375C3.22582 15.1875 3.08274 15.1283 2.97725 15.0228C2.87176 14.9173 2.8125 14.7742 2.8125 14.625V11.483C2.8125 11.4092 2.82705 11.336 2.85532 11.2678C2.88359 11.1995 2.92502 11.1375 2.97725 11.0853L11.4148 2.64778C11.5202 2.5423 11.6633 2.48303 11.8125 2.48303C11.9617 2.48303 12.1048 2.5423 12.2102 2.64778L15.3523 5.78979C15.4577 5.89528 15.517 6.03835 15.517 6.18754C15.517 6.33672 15.4577 6.4798 15.3523 6.58528L6.91475 15.0228C6.86252 15.075 6.80051 15.1165 6.73226 15.1447C6.66402 15.173 6.59087 15.1875 6.517 15.1875Z" stroke="#6A6968" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<span class="omnivore-top-button-label">Edit Title</span>
</button>
<span style="border-bottom: 1px solid #D9D9D9;width:80%"></span>
<button id="omnivore-toast-archive-btn">
<svg width="18" height="16" viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.0143 0.166748H1.93155C1.157 0.166748 0.523193 0.800512 0.523193 1.5751V3.92222C0.523193 4.6264 1.03956 5.18958 1.69675 5.30698V14.0148C1.69675 14.7893 2.33052 15.4231 3.10511 15.4231H14.8407C15.6152 15.4231 16.249 14.7894 16.249 14.0148V5.30698C16.9062 5.18959 17.4226 4.6264 17.4226 3.92222V1.5751C17.4226 0.800554 16.7888 0.166748 16.0143 0.166748ZM1.93155 1.5751H16.0143V3.92222H1.93155V1.5751ZM14.8407 14.0148H3.10511V5.33049H14.8407V14.0148Z" fill="#6A6968"/>
<path d="M7.82307 8.26431H10.1702C10.5692 8.26431 10.8744 7.95914 10.8744 7.56013C10.8744 7.16114 10.5692 6.85596 10.1702 6.85596H7.82307C7.42408 6.85596 7.1189 7.16113 7.1189 7.56013C7.1189 7.95912 7.44748 8.26431 7.82307 8.26431Z" fill="#6A6968"/>
@ -318,7 +362,7 @@
Archive
</button>
<span style="border-bottom: 1px solid #D9D9D9;width:80%"></span>
<button>
<button id="omnivore-toast-delete-btn">
<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.6602 5.16992L3.51147 5.16993" stroke="#6A6968" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8.29272 8.91992V13.9199" stroke="#6A6968" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>

View file

@ -3161,6 +3161,11 @@ nanoid@^3.2.0:
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35"
integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==
nanoid@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-4.0.2.tgz#140b3c5003959adbebf521c170f282c5e7f9fb9e"
integrity sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"