Skip to content

Commit

Permalink
Added owner button to two gists sections
Browse files Browse the repository at this point in the history
  • Loading branch information
arononak committed Jun 7, 2024
1 parent 930dcce commit 046684f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions github-actions@arononak.github.io/lib/status_bar_indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,12 +730,16 @@ export class StatusBarIndicator extends PanelMenu.Button {
function toItem(e, textLengthLimiter) {
const createdAt = DateFormatController.format(e[`created_at`])
const description = e[`description`]
const login = e[`owner`][`login`]
const loginUrl = e[`owner`][`html_url`]
const text = `${createdAt}${description.length !== 0 ? ` - ${description.replace(/\n/g, ``)} ` : ``}`

return {
"iconName": `utilities-terminal-symbolic`,
"text": text.slice(0, textLengthLimiter),
"callback": () => openUrl(e[`html_url`]),
"endButtonText": login,
"endButtonCallback": () => openUrl(loginUrl),
}
}

Expand All @@ -754,12 +758,16 @@ export class StatusBarIndicator extends PanelMenu.Button {
function toItem(e, textLengthLimiter) {
const createdAt = DateFormatController.format(e[`created_at`])
const description = e[`description`]
const login = e[`owner`][`login`]
const loginUrl = e[`owner`][`html_url`]
const text = `${createdAt}${description.length !== 0 ? ` - ${description.replace(/\n/g, ``)} ` : ``}`

return {
"iconName": `starred-symbolic`,
"text": text.slice(0, textLengthLimiter),
"callback": () => openUrl(e[`html_url`]),
"endButtonText": login,
"endButtonCallback": () => openUrl(loginUrl),
}
}

Expand Down

0 comments on commit 046684f

Please sign in to comment.