Add more static previews (#2770)
This commit is contained in:
@@ -18,6 +18,8 @@ module.exports = class Discourse extends LegacyService {
|
|||||||
static get route() {
|
static get route() {
|
||||||
return {
|
return {
|
||||||
base: 'discourse',
|
base: 'discourse',
|
||||||
|
pattern:
|
||||||
|
':scheme(http|https)/:host/:which(topics|posts|users|likes|status)',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,23 +27,68 @@ module.exports = class Discourse extends LegacyService {
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
title: 'Discourse topics',
|
title: 'Discourse topics',
|
||||||
previewUrl: 'https/meta.discourse.org/topics',
|
pattern: ':scheme(http|https)/:host/topics',
|
||||||
|
namedParams: {
|
||||||
|
scheme: 'https',
|
||||||
|
host: 'meta.discourse.org',
|
||||||
|
},
|
||||||
|
staticPreview: {
|
||||||
|
label: 'discourse',
|
||||||
|
message: '27k topics',
|
||||||
|
color: 'brightgreen',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Discourse posts',
|
title: 'Discourse posts',
|
||||||
previewUrl: 'https/meta.discourse.org/posts',
|
pattern: ':scheme(http|https)/:host/posts',
|
||||||
|
namedParams: {
|
||||||
|
scheme: 'https',
|
||||||
|
host: 'meta.discourse.org',
|
||||||
|
},
|
||||||
|
staticPreview: {
|
||||||
|
label: 'discourse',
|
||||||
|
message: '490k posts',
|
||||||
|
color: 'brightgreen',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Discourse users',
|
title: 'Discourse users',
|
||||||
previewUrl: 'https/meta.discourse.org/users',
|
pattern: ':scheme(http|https)/:host/users',
|
||||||
|
namedParams: {
|
||||||
|
scheme: 'https',
|
||||||
|
host: 'meta.discourse.org',
|
||||||
|
},
|
||||||
|
staticPreview: {
|
||||||
|
label: 'discourse',
|
||||||
|
message: '42k users',
|
||||||
|
color: 'brightgreen',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Discourse likes',
|
title: 'Discourse likes',
|
||||||
previewUrl: 'https/meta.discourse.org/likes',
|
pattern: ':scheme(http|https)/:host/likes',
|
||||||
|
namedParams: {
|
||||||
|
scheme: 'https',
|
||||||
|
host: 'meta.discourse.org',
|
||||||
|
},
|
||||||
|
staticPreview: {
|
||||||
|
label: 'discourse',
|
||||||
|
message: '499k likes',
|
||||||
|
color: 'brightgreen',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Discourse status',
|
title: 'Discourse status',
|
||||||
previewUrl: 'https/meta.discourse.org/status',
|
pattern: ':scheme(http|https)/:host/status',
|
||||||
|
namedParams: {
|
||||||
|
scheme: 'https',
|
||||||
|
host: 'meta.discourse.org',
|
||||||
|
},
|
||||||
|
staticPreview: {
|
||||||
|
label: 'discourse',
|
||||||
|
message: 'online',
|
||||||
|
color: 'brightgreen',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ module.exports = class Sourceforge extends LegacyService {
|
|||||||
static get route() {
|
static get route() {
|
||||||
return {
|
return {
|
||||||
base: 'sourceforge',
|
base: 'sourceforge',
|
||||||
|
pattern: ':interval(dt|dm|dw|dd)/:project/:folder?',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,23 +33,64 @@ module.exports = class Sourceforge extends LegacyService {
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
title: 'SourceForge',
|
title: 'SourceForge',
|
||||||
previewUrl: 'dm/sevenzip',
|
pattern: 'dm/:project',
|
||||||
|
namedParams: {
|
||||||
|
project: 'sevenzip',
|
||||||
|
},
|
||||||
|
staticPreview: {
|
||||||
|
label: 'downloads',
|
||||||
|
message: '216k/month',
|
||||||
|
color: 'brightgreen',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'SourceForge',
|
title: 'SourceForge',
|
||||||
previewUrl: 'dw/sevenzip',
|
pattern: 'dw/:project',
|
||||||
|
namedParams: {
|
||||||
|
project: 'sevenzip',
|
||||||
|
},
|
||||||
|
staticPreview: {
|
||||||
|
label: 'downloads',
|
||||||
|
message: '52k/week',
|
||||||
|
color: 'brightgreen',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'SourceForge',
|
title: 'SourceForge',
|
||||||
previewUrl: 'dd/sevenzip',
|
pattern: 'dd/:project',
|
||||||
|
namedParams: {
|
||||||
|
project: 'sevenzip',
|
||||||
|
},
|
||||||
|
staticPreview: {
|
||||||
|
label: 'downloads',
|
||||||
|
message: '6k/day',
|
||||||
|
color: 'brightgreen',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'SourceForge',
|
title: 'SourceForge',
|
||||||
previewUrl: 'dt/sevenzip',
|
pattern: 'dt/:project',
|
||||||
|
namedParams: {
|
||||||
|
project: 'sevenzip',
|
||||||
|
},
|
||||||
|
staticPreview: {
|
||||||
|
label: 'downloads',
|
||||||
|
message: '416M',
|
||||||
|
color: 'brightgreen',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'SourceForge',
|
title: 'SourceForge',
|
||||||
previewUrl: 'dt/arianne/stendhal',
|
pattern: 'dt/:project/:folder',
|
||||||
|
namedParams: {
|
||||||
|
project: 'arianne',
|
||||||
|
folder: 'stendhal',
|
||||||
|
},
|
||||||
|
staticPreview: {
|
||||||
|
label: 'downloads',
|
||||||
|
message: '177k',
|
||||||
|
color: 'brightgreen',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user