Compare commits

...

5 Commits

Author SHA1 Message Date
Tom Moor 5c6475f776 0.68.1 2023-02-19 12:27:59 -05:00
Tom Moor 0383b8749d 0.68.0 2023-02-19 12:26:03 -05:00
Tom Moor 670bd862f2 test 2023-02-19 12:25:13 -05:00
Tom Moor 41a18a4e85 fix: Cursor position changes on new token with line numbers enabled (#4896)
Move line numbers to psuedo element
2023-02-19 12:25:05 -05:00
Tom Moor 6c069f658b fix: Do not show authentication provider plugins that aren't enabled 2023-02-19 12:24:58 -05:00
4 changed files with 41 additions and 25 deletions
+1 -1
View File
@@ -358,5 +358,5 @@
"jpeg-js": "0.4.4",
"qs": "6.9.7"
},
"version": "0.67.2"
"version": "0.68.1"
}
@@ -17,11 +17,18 @@ export default class AuthenticationHelper {
return providerConfigs
.sort((config) => (config.id === "email" ? 1 : -1))
.filter((config) => {
// guest sign-in is an exception as it does not have an authentication
// provider using passport, instead it exists as a boolean option on the team
// Don't return authentication methods that are not enabled.
if (!config.enabled) {
return false;
}
// Guest sign-in is an exception as it does not have an authentication
// provider using passport, instead it exists as a boolean option.
if (config.id === "email") {
return team?.emailSigninEnabled;
}
// If no team return all possible authentication providers except email.
if (!team) {
return true;
}
+14 -8
View File
@@ -992,15 +992,21 @@ mark {
pre {
padding-left: calc(var(--line-number-gutter-width, 0) * 1em + 1.5em);
}
}
.code-block .line-numbers {
position: absolute;
left: 1em;
color: ${props.theme.textTertiary};
text-align: right;
font-variant-numeric: tabular-nums;
user-select: none;
&:after {
content: attr(data-line-numbers);
position: absolute;
left: 1em;
top: calc(1px + 0.75em);
font-family: ${props.theme.fontFamilyMono};
font-size: 13px;
line-height: 1.4em;
color: ${props.theme.textTertiary};
text-align: right;
font-variant-numeric: tabular-nums;
user-select: none;
}
}
.mermaid-diagram-wrapper {
+17 -14
View File
@@ -99,21 +99,24 @@ function getDecorations({
if (lineNumbers) {
const lineCount =
(block.node.textContent.match(/\n/g) || []).length + 1;
const lineCountText = new Array(lineCount)
.fill(0)
.map((_, i) => i + 1)
.join("\n");
lineDecorations.push(
Decoration.widget(block.pos + 1, () => {
const el = document.createElement("div");
el.innerText = new Array(lineCount)
.fill(0)
.map((_, i) => i + 1)
.join("\n");
el.className = "line-numbers";
return el;
})
);
lineDecorations.push(
Decoration.node(block.pos, block.pos + block.node.nodeSize, {
style: `--line-number-gutter-width: ${String(lineCount).length}`,
})
Decoration.node(
block.pos,
block.pos + block.node.nodeSize,
{
"data-line-numbers": lineCountText,
style: `--line-number-gutter-width: ${String(lineCount).length};`,
},
{
key: `line-${lineCount}-gutter`,
}
)
);
}