Feature: Gist card: Add hide_border option support (#3080)
This commit is contained in:
1 parent
bb9468137d
commit
da82999f06
3 files changed
+5
No files matched your search
@@ -21,6 +21,7 @@ export default async (req, res) => {
|
|||||||
border_radius,
|
border_radius,
|
||||||
border_color,
|
border_color,
|
||||||
show_owner,
|
show_owner,
|
||||||
|
hide_border,
|
||||||
} = req.query;
|
} = req.query;
|
||||||
|
|
||||||
res.setHeader("Content-Type", "image/svg+xml");
|
res.setHeader("Content-Type", "image/svg+xml");
|
||||||
@@ -72,6 +73,7 @@ export default async (req, res) => {
|
|||||||
border_color,
|
border_color,
|
||||||
locale: locale ? locale.toLowerCase() : null,
|
locale: locale ? locale.toLowerCase() : null,
|
||||||
show_owner: parseBoolean(show_owner),
|
show_owner: parseBoolean(show_owner),
|
||||||
|
hide_border: parseBoolean(hide_border),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ const renderGistCard = (gistData, options = {}) => {
|
|||||||
border_radius,
|
border_radius,
|
||||||
border_color,
|
border_color,
|
||||||
show_owner = false,
|
show_owner = false,
|
||||||
|
hide_border = false,
|
||||||
} = options;
|
} = options;
|
||||||
|
|
||||||
// returns theme based colors with proper overrides and defaults
|
// returns theme based colors with proper overrides and defaults
|
||||||
@@ -164,6 +165,7 @@ const renderGistCard = (gistData, options = {}) => {
|
|||||||
.gray { font: 400 12px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor} }
|
.gray { font: 400 12px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor} }
|
||||||
.icon { fill: ${iconColor} }
|
.icon { fill: ${iconColor} }
|
||||||
`);
|
`);
|
||||||
|
card.setHideBorder(hide_border);
|
||||||
|
|
||||||
return card.render(`
|
return card.render(`
|
||||||
<text class="description" x="25" y="-5">
|
<text class="description" x="25" y="-5">
|
||||||
|
|||||||
Vendored
+1
@@ -59,5 +59,6 @@ type WakaTimeOptions = CommonOptions & {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type GistCardOptions = CommonOptions & {
|
export type GistCardOptions = CommonOptions & {
|
||||||
|
hide_border: boolean;
|
||||||
show_owner: boolean;
|
show_owner: boolean;
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user