Add plugin projects (#13)
* Add plugin projects * Add images for readme
This commit is contained in:
BIN
.github/readme/imgs/project_create.png
vendored
Normal file
BIN
.github/readme/imgs/project_create.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 126 KiB |
BIN
.github/readme/imgs/project_setup.png
vendored
Normal file
BIN
.github/readme/imgs/project_setup.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 115 KiB |
BIN
.github/readme/imgs/project_track_progress.png
vendored
Normal file
BIN
.github/readme/imgs/project_track_progress.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 181 KiB |
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -33,7 +33,6 @@ jobs:
|
|||||||
token: ${{ secrets.METRICS_TOKEN }}
|
token: ${{ secrets.METRICS_TOKEN }}
|
||||||
repositories: 1
|
repositories: 1
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Terminal template
|
- name: Terminal template
|
||||||
@@ -43,7 +42,6 @@ jobs:
|
|||||||
token: ${{ secrets.METRICS_TOKEN }}
|
token: ${{ secrets.METRICS_TOKEN }}
|
||||||
repositories: 1
|
repositories: 1
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: PageSpeed plugin
|
- name: PageSpeed plugin
|
||||||
@@ -55,7 +53,6 @@ jobs:
|
|||||||
plugin_pagespeed: yes
|
plugin_pagespeed: yes
|
||||||
plugin_pagespeed_token: ${{ secrets.PAGESPEED_TOKEN }}
|
plugin_pagespeed_token: ${{ secrets.PAGESPEED_TOKEN }}
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Music plugin (playlist - apple)
|
- name: Music plugin (playlist - apple)
|
||||||
@@ -67,7 +64,6 @@ jobs:
|
|||||||
plugin_music: yes
|
plugin_music: yes
|
||||||
plugin_music_playlist: ${{ secrets.MUSIC_PLAYLIST_APPLE }}
|
plugin_music_playlist: ${{ secrets.MUSIC_PLAYLIST_APPLE }}
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Music plugin (playlist - spotify)
|
- name: Music plugin (playlist - spotify)
|
||||||
@@ -79,7 +75,6 @@ jobs:
|
|||||||
plugin_music: yes
|
plugin_music: yes
|
||||||
plugin_music_playlist: ${{ secrets.MUSIC_PLAYLIST_SPOTIFY }}
|
plugin_music_playlist: ${{ secrets.MUSIC_PLAYLIST_SPOTIFY }}
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Music plugin (recent - spotify)
|
- name: Music plugin (recent - spotify)
|
||||||
@@ -92,7 +87,6 @@ jobs:
|
|||||||
plugin_music_provider: spotify
|
plugin_music_provider: spotify
|
||||||
plugin_music_token: ${{ secrets.SPOTIFY_TOKENS }}
|
plugin_music_token: ${{ secrets.SPOTIFY_TOKENS }}
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Posts plugin (dev.to)
|
- name: Posts plugin (dev.to)
|
||||||
@@ -104,7 +98,6 @@ jobs:
|
|||||||
plugin_posts: yes
|
plugin_posts: yes
|
||||||
plugin_posts_source: dev.to
|
plugin_posts_source: dev.to
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Isocalendar plugin
|
- name: Isocalendar plugin
|
||||||
@@ -115,7 +108,6 @@ jobs:
|
|||||||
repositories: 1
|
repositories: 1
|
||||||
plugin_isocalendar: yes
|
plugin_isocalendar: yes
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Isocalendar plugin (full year)
|
- name: Isocalendar plugin (full year)
|
||||||
@@ -127,7 +119,6 @@ jobs:
|
|||||||
plugin_isocalendar: yes
|
plugin_isocalendar: yes
|
||||||
plugin_isocalendar_duration: full-year
|
plugin_isocalendar_duration: full-year
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Habits plugin
|
- name: Habits plugin
|
||||||
@@ -138,7 +129,6 @@ jobs:
|
|||||||
repositories: 1
|
repositories: 1
|
||||||
plugin_habits: yes
|
plugin_habits: yes
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Languages plugin
|
- name: Languages plugin
|
||||||
@@ -149,7 +139,6 @@ jobs:
|
|||||||
repositories: 1
|
repositories: 1
|
||||||
plugin_languages: yes
|
plugin_languages: yes
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Follow-up plugin
|
- name: Follow-up plugin
|
||||||
@@ -160,7 +149,6 @@ jobs:
|
|||||||
repositories: 1
|
repositories: 1
|
||||||
plugin_followup: yes
|
plugin_followup: yes
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Lines plugin
|
- name: Lines plugin
|
||||||
@@ -171,7 +159,6 @@ jobs:
|
|||||||
repositories: 1
|
repositories: 1
|
||||||
plugin_lines: yes
|
plugin_lines: yes
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Traffic plugin
|
- name: Traffic plugin
|
||||||
@@ -182,7 +169,6 @@ jobs:
|
|||||||
repositories: 1
|
repositories: 1
|
||||||
plugin_traffic: yes
|
plugin_traffic: yes
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Gists plugin
|
- name: Gists plugin
|
||||||
@@ -193,7 +179,6 @@ jobs:
|
|||||||
repositories: 1
|
repositories: 1
|
||||||
plugin_gists: yes
|
plugin_gists: yes
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Topics plugin (stars)
|
- name: Topics plugin (stars)
|
||||||
@@ -205,7 +190,6 @@ jobs:
|
|||||||
plugin_topics: yes
|
plugin_topics: yes
|
||||||
plugin_topics_sort: stars
|
plugin_topics_sort: stars
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Topics plugin (activity)
|
- name: Topics plugin (activity)
|
||||||
@@ -217,7 +201,6 @@ jobs:
|
|||||||
plugin_topics: yes
|
plugin_topics: yes
|
||||||
plugin_topics_sort: activity
|
plugin_topics_sort: activity
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Topics plugin (starred)
|
- name: Topics plugin (starred)
|
||||||
@@ -229,7 +212,6 @@ jobs:
|
|||||||
plugin_topics: yes
|
plugin_topics: yes
|
||||||
plugin_topics_sort: starred
|
plugin_topics_sort: starred
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
|
|
||||||
- name: Topics plugin (random)
|
- name: Topics plugin (random)
|
||||||
@@ -241,5 +223,4 @@ jobs:
|
|||||||
plugin_topics: yes
|
plugin_topics: yes
|
||||||
plugin_topics_sort: random
|
plugin_topics_sort: random
|
||||||
plugins_errors_fatal: yes
|
plugins_errors_fatal: yes
|
||||||
verify: yes
|
|
||||||
dryrun: yes
|
dryrun: yes
|
||||||
12
action.yml
12
action.yml
@@ -229,6 +229,18 @@ inputs:
|
|||||||
description: Number of starred topics to display
|
description: Number of starred topics to display
|
||||||
default: 15
|
default: 15
|
||||||
|
|
||||||
|
# Projects plugins
|
||||||
|
# Display active projects
|
||||||
|
plugin_projects:
|
||||||
|
description: Display active projects
|
||||||
|
default: no
|
||||||
|
|
||||||
|
# Limit the number of projects displayed
|
||||||
|
# Between 1 and 100
|
||||||
|
plugin_projects_limit:
|
||||||
|
description: Number of active projects to display
|
||||||
|
default: 4
|
||||||
|
|
||||||
# Enable debug mode
|
# Enable debug mode
|
||||||
# Be sure to put all secrets in your repository secrets before to avoid any leaks !
|
# Be sure to put all secrets in your repository secrets before to avoid any leaks !
|
||||||
debug:
|
debug:
|
||||||
|
|||||||
24
action/dist/index.js
vendored
24
action/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -84,6 +84,7 @@
|
|||||||
isocalendar:{enabled:bool(core.getInput("plugin_isocalendar"))},
|
isocalendar:{enabled:bool(core.getInput("plugin_isocalendar"))},
|
||||||
gists:{enabled:bool(core.getInput("plugin_gists"))},
|
gists:{enabled:bool(core.getInput("plugin_gists"))},
|
||||||
topics:{enabled:bool(core.getInput("plugin_topics"))},
|
topics:{enabled:bool(core.getInput("plugin_topics"))},
|
||||||
|
projects:{enabled:bool(core.getInput("projects"))},
|
||||||
}
|
}
|
||||||
let q = Object.fromEntries(Object.entries(plugins).filter(([key, plugin]) => plugin.enabled).map(([key]) => [key, true]))
|
let q = Object.fromEntries(Object.entries(plugins).filter(([key, plugin]) => plugin.enabled).map(([key]) => [key, true]))
|
||||||
console.log(`Plugins enabled | ${Object.entries(plugins).filter(([key, plugin]) => plugin.enabled).map(([key]) => key).join(", ")}`)
|
console.log(`Plugins enabled | ${Object.entries(plugins).filter(([key, plugin]) => plugin.enabled).map(([key]) => key).join(", ")}`)
|
||||||
@@ -123,6 +124,12 @@
|
|||||||
console.log(`Topics sort mode | ${q["topics.sort"]}`)
|
console.log(`Topics sort mode | ${q["topics.sort"]}`)
|
||||||
console.log(`Topics limit | ${q["topics.limit"]}`)
|
console.log(`Topics limit | ${q["topics.limit"]}`)
|
||||||
}
|
}
|
||||||
|
//Projects
|
||||||
|
if (plugins.projects.enabled) {
|
||||||
|
for (const option of ["limit"])
|
||||||
|
q[`projects.${option}`] = core.getInput(`plugin_projects_${option}`) || null
|
||||||
|
console.log(`Projects limit | ${q["projects.limit"]}`)
|
||||||
|
}
|
||||||
|
|
||||||
//Repositories to use
|
//Repositories to use
|
||||||
const repositories = Number(core.getInput("repositories")) || 100
|
const repositories = Number(core.getInput("repositories")) || 100
|
||||||
|
|||||||
@@ -50,6 +50,9 @@
|
|||||||
},
|
},
|
||||||
"topics":{ "//":"Topics plugin",
|
"topics":{ "//":"Topics plugin",
|
||||||
"enabled":false, "//":"Enable or disable starred topics display"
|
"enabled":false, "//":"Enable or disable starred topics display"
|
||||||
|
},
|
||||||
|
"projects":{ "//":"Projects plugin",
|
||||||
|
"enabled":false, "//":"Enable or disable personal projects display"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
import music from "./music/index.mjs"
|
import music from "./music/index.mjs"
|
||||||
import pagespeed from "./pagespeed/index.mjs"
|
import pagespeed from "./pagespeed/index.mjs"
|
||||||
import posts from "./posts/index.mjs"
|
import posts from "./posts/index.mjs"
|
||||||
|
import projects from "./projects/index.mjs"
|
||||||
import selfskip from "./selfskip/index.mjs"
|
import selfskip from "./selfskip/index.mjs"
|
||||||
import topics from "./topics/index.mjs"
|
import topics from "./topics/index.mjs"
|
||||||
import traffic from "./traffic/index.mjs"
|
import traffic from "./traffic/index.mjs"
|
||||||
@@ -25,6 +26,7 @@
|
|||||||
music,
|
music,
|
||||||
pagespeed,
|
pagespeed,
|
||||||
posts,
|
posts,
|
||||||
|
projects,
|
||||||
selfskip,
|
selfskip,
|
||||||
topics,
|
topics,
|
||||||
traffic,
|
traffic,
|
||||||
|
|||||||
58
src/plugins/projects/index.mjs
Normal file
58
src/plugins/projects/index.mjs
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
//Setup
|
||||||
|
export default async function ({login, graphql, q}, {enabled = false} = {}) {
|
||||||
|
//Plugin execution
|
||||||
|
try {
|
||||||
|
//Check if plugin is enabled and requirements are met
|
||||||
|
if ((!enabled)||(!q.projects))
|
||||||
|
return null
|
||||||
|
//Parameters override
|
||||||
|
let {"projects.limit":limit = 4} = q
|
||||||
|
//Limit
|
||||||
|
limit = Math.max(1, Math.min(100, Number(limit)))
|
||||||
|
//Retrieve contribution calendar from graphql api
|
||||||
|
const {user:{projects}} = await graphql(`
|
||||||
|
query Projects {
|
||||||
|
user(login: "${login}") {
|
||||||
|
projects(last: ${limit}, states: OPEN, orderBy: {field: UPDATED_AT, direction: DESC}) {
|
||||||
|
totalCount
|
||||||
|
nodes {
|
||||||
|
name
|
||||||
|
updatedAt
|
||||||
|
progress {
|
||||||
|
doneCount
|
||||||
|
inProgressCount
|
||||||
|
todoCount
|
||||||
|
enabled
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
)
|
||||||
|
//Iterate through projects and format them
|
||||||
|
const list = []
|
||||||
|
for (const project of projects.nodes) {
|
||||||
|
//Format date
|
||||||
|
const time = (Date.now()-new Date(project.updatedAt).getTime())/(24*60*60*1000)
|
||||||
|
let updated = project.updatedAt
|
||||||
|
if (time < 1)
|
||||||
|
updated = "less than 1 day ago"
|
||||||
|
else if (time < 30)
|
||||||
|
updated = `${Math.floor(time)} day${time >= 2 ? "s" : ""} ago`
|
||||||
|
else
|
||||||
|
updated = new Date(project.updatedAt).toDateString().substring(4)
|
||||||
|
//Format progress
|
||||||
|
const {enabled, todoCount:todo, inProgressCount:doing, doneCount:done} = project.progress
|
||||||
|
//Append
|
||||||
|
list.push({name:project.name, updated, progress:{enabled, todo, doing, done, total:todo+doing+done}})
|
||||||
|
}
|
||||||
|
//Results
|
||||||
|
return {list, totalCount:projects.totalCount}
|
||||||
|
}
|
||||||
|
//Handle errors
|
||||||
|
catch (error) {
|
||||||
|
console.debug(error)
|
||||||
|
throw {error:{message:`An error occured`}}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
+ (!!computed.plugins.isocalendar)*192 + (computed.plugins.isocalendar ? computed.plugins.isocalendar.duration === 'full-year' ? 100 : 0 : 0)
|
+ (!!computed.plugins.isocalendar)*192 + (computed.plugins.isocalendar ? computed.plugins.isocalendar.duration === 'full-year' ? 100 : 0 : 0)
|
||||||
+ (!!computed.plugins.gists)*68
|
+ (!!computed.plugins.gists)*68
|
||||||
+ (!!computed.plugins.topics)*160
|
+ (!!computed.plugins.topics)*160
|
||||||
|
+ (!!computed.plugins.projects)*22 + (computed.plugins.projects ? computed.plugins.projects.list.length : 0)*60
|
||||||
+ Math.max(0, (((!!base.metadata)+(!!base.header)+((!!base.activity)||(!!base.community))+(!!base.repositories)+((!!computed.plugins.habits))+(!!computed.plugins.pagespeed)+(!!computed.plugins.languages)+(!!computed.plugins.music)+(!!computed.plugins.posts)+(!!computed.plugins.isocalendar)+(!!computed.plugins.gists))-1))*4
|
+ Math.max(0, (((!!base.metadata)+(!!base.header)+((!!base.activity)||(!!base.community))+(!!base.repositories)+((!!computed.plugins.habits))+(!!computed.plugins.pagespeed)+(!!computed.plugins.languages)+(!!computed.plugins.music)+(!!computed.plugins.posts)+(!!computed.plugins.isocalendar)+(!!computed.plugins.gists))-1))*4
|
||||||
%>">
|
%>">
|
||||||
|
|
||||||
@@ -93,8 +94,7 @@
|
|||||||
<% if (base.community) { %>
|
<% if (base.community) { %>
|
||||||
<section>
|
<section>
|
||||||
<h2 class="field">
|
<h2 class="field">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M1.326 1.973a1.2 1.2 0 011.49-.832c.387.112.977.307 1.575.602.586.291 1.243.71 1.7 1.296.022.027.042.056.061.084A13.22 13.22 0 018 3c.67 0 1.289.037 1.861.108l.051-.07c.457-.586 1.114-1.004 1.7-1.295a9.654 9.654 0 011.576-.602 1.2 1.2 0 011.49.832c.14.493.356 1.347.479 2.29.079.604.123 1.28.07 1.936.541.977.773 2.11.773 3.301C16 13 14.5 15 8 15s-8-2-8-5.5c0-1.034.238-2.128.795-3.117-.08-.712-.034-1.46.052-2.12.122-.943.34-1.797.479-2.29zM8 13.065c6 0 6.5-2 6-4.27C13.363 5.905 11.25 5 8 5s-5.363.904-6 3.796c-.5 2.27 0 4.27 6 4.27z"></path><path d="M4 8a1 1 0 012 0v1a1 1 0 01-2 0V8zm2.078 2.492c-.083-.264.146-.492.422-.492h3c.276 0 .505.228.422.492C9.67 11.304 8.834 12 8 12c-.834 0-1.669-.696-1.922-1.508zM10 8a1 1 0 112 0v1a1 1 0 11-2 0V8z"></path></svg> Community stats
|
||||||
Community stats
|
|
||||||
</h2>
|
</h2>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M1.5 14.25c0 .138.112.25.25.25H4v-1.25a.75.75 0 01.75-.75h2.5a.75.75 0 01.75.75v1.25h2.25a.25.25 0 00.25-.25V1.75a.25.25 0 00-.25-.25h-8.5a.25.25 0 00-.25.25v12.5zM1.75 16A1.75 1.75 0 010 14.25V1.75C0 .784.784 0 1.75 0h8.5C11.216 0 12 .784 12 1.75v12.5c0 .085-.006.168-.018.25h2.268a.25.25 0 00.25-.25V8.285a.25.25 0 00-.111-.208l-1.055-.703a.75.75 0 11.832-1.248l1.055.703c.487.325.779.871.779 1.456v5.965A1.75 1.75 0 0114.25 16h-3.5a.75.75 0 01-.197-.026c-.099.017-.2.026-.303.026h-3a.75.75 0 01-.75-.75V14h-1v1.25a.75.75 0 01-.75.75h-3zM3 3.75A.75.75 0 013.75 3h.5a.75.75 0 010 1.5h-.5A.75.75 0 013 3.75zM3.75 6a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM3 9.75A.75.75 0 013.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 013 9.75zM7.75 9a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM7 6.75A.75.75 0 017.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 017 6.75zM7.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5z"></path></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M1.5 14.25c0 .138.112.25.25.25H4v-1.25a.75.75 0 01.75-.75h2.5a.75.75 0 01.75.75v1.25h2.25a.25.25 0 00.25-.25V1.75a.25.25 0 00-.25-.25h-8.5a.25.25 0 00-.25.25v12.5zM1.75 16A1.75 1.75 0 010 14.25V1.75C0 .784.784 0 1.75 0h8.5C11.216 0 12 .784 12 1.75v12.5c0 .085-.006.168-.018.25h2.268a.25.25 0 00.25-.25V8.285a.25.25 0 00-.111-.208l-1.055-.703a.75.75 0 11.832-1.248l1.055.703c.487.325.779.871.779 1.456v5.965A1.75 1.75 0 0114.25 16h-3.5a.75.75 0 01-.197-.026c-.099.017-.2.026-.303.026h-3a.75.75 0 01-.75-.75V14h-1v1.25a.75.75 0 01-.75.75h-3zM3 3.75A.75.75 0 013.75 3h.5a.75.75 0 010 1.5h-.5A.75.75 0 013 3.75zM3.75 6a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM3 9.75A.75.75 0 013.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 013 9.75zM7.75 9a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM7 6.75A.75.75 0 017.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 017 6.75zM7.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5z"></path></svg>
|
||||||
@@ -291,6 +291,66 @@
|
|||||||
</section>
|
</section>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
<% if (computed.plugins.projects) { %>
|
||||||
|
<section>
|
||||||
|
<h2 class="field">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path></svg>
|
||||||
|
<%= computed.plugins.projects.totalCount %> Project<%= s(computed.plugins.projects.totalCount) %>
|
||||||
|
</h2>
|
||||||
|
<div class="row">
|
||||||
|
<% if (computed.plugins.projects.error) { %>
|
||||||
|
<section>
|
||||||
|
<div class="field error">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M2.343 13.657A8 8 0 1113.657 2.343 8 8 0 012.343 13.657zM6.03 4.97a.75.75 0 00-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 101.06 1.06L8 9.06l1.97 1.97a.75.75 0 101.06-1.06L9.06 8l1.97-1.97a.75.75 0 10-1.06-1.06L8 6.94 6.03 4.97z"></path></svg>
|
||||||
|
<%= computed.plugins.projects.error.message %>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<% } else { %>
|
||||||
|
<section>
|
||||||
|
<% for (const {name, updated, progress} of computed.plugins.projects.list) { %>
|
||||||
|
<div class="row fill-width">
|
||||||
|
<section>
|
||||||
|
<div class="field">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M0 3.75C0 2.784.784 2 1.75 2h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0114.25 14H1.75A1.75 1.75 0 010 12.25v-8.5zm1.75-.25a.25.25 0 00-.25.25v8.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-8.5a.25.25 0 00-.25-.25H1.75zM3.5 6.25a.75.75 0 01.75-.75h7a.75.75 0 010 1.5h-7a.75.75 0 01-.75-.75zm.75 2.25a.75.75 0 000 1.5h4a.75.75 0 000-1.5h-4z"></path></svg>
|
||||||
|
<%= name %>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<section>
|
||||||
|
<div class="field">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.5 4.75a.75.75 0 00-1.5 0v3.5a.75.75 0 00.471.696l2.5 1a.75.75 0 00.557-1.392L8.5 7.742V4.75z"></path></svg>
|
||||||
|
Updated <%= updated %>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<% if (progress.enabled) { %>
|
||||||
|
<section>
|
||||||
|
<div class="field">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M2.5 1.75a.25.25 0 01.25-.25h8.5a.25.25 0 01.25.25v7.736a.75.75 0 101.5 0V1.75A1.75 1.75 0 0011.25 0h-8.5A1.75 1.75 0 001 1.75v11.5c0 .966.784 1.75 1.75 1.75h3.17a.75.75 0 000-1.5H2.75a.25.25 0 01-.25-.25V1.75zM4.75 4a.75.75 0 000 1.5h4.5a.75.75 0 000-1.5h-4.5zM4 7.75A.75.75 0 014.75 7h2a.75.75 0 010 1.5h-2A.75.75 0 014 7.75zm11.774 3.537a.75.75 0 00-1.048-1.074L10.7 14.145 9.281 12.72a.75.75 0 00-1.062 1.058l1.943 1.95a.75.75 0 001.055.008l4.557-4.45z"></path></svg>
|
||||||
|
<%= [progress.done ? `${progress.done} done` : "", progress.doing ? `${progress.doing} doing` : "", progress.todo ? `${progress.todo} todo` : ""].filter(str => str).join(" · ") %>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
<% if (progress.enabled) { %>
|
||||||
|
<div class="field center horizontal-wrap ">
|
||||||
|
<svg class="bar" xmlns="http://www.w3.org/2000/svg" width="460" height="8">
|
||||||
|
<mask id="project-bar">
|
||||||
|
<rect x="0" y="0" width="460" height="8" fill="white" rx="5"/>
|
||||||
|
</mask>
|
||||||
|
<rect mask="url(#project-bar)" x="0" y="0" width="<%= (progress.done/progress.total)*460 %>" height="8" fill="#28A745"/>
|
||||||
|
<rect mask="url(#project-bar)" x="<%= (progress.done/progress.total)*460 %>" y="0" width="<%= (progress.doing/progress.total)*460 %>" height="8" fill="#6F42C1"/>
|
||||||
|
<rect mask="url(#project-bar)" x="<%= ((progress.done+progress.doing)/progress.total)*460 %>" y="0" width="<%= (progress.todo/progress.total)*460 %>" height="8" fill="#d1d5da"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
<% } %>
|
||||||
|
</section>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
<% if (computed.plugins.gists) { %>
|
<% if (computed.plugins.gists) { %>
|
||||||
<section>
|
<section>
|
||||||
<h2 class="field">
|
<h2 class="field">
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 57 KiB |
Reference in New Issue
Block a user