mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-22 16:13:09 +02:00
Compare commits
50 commits
eaface372b
...
81a7a91192
Author | SHA1 | Date | |
---|---|---|---|
|
81a7a91192 | ||
|
e0afeff248 | ||
|
cfc8081cec | ||
|
011ccd3a9a | ||
|
28065fc1d1 | ||
|
960f4fcff7 | ||
|
92eec2178f | ||
|
56dca6dbf5 | ||
|
2a634e0309 | ||
|
e6970a0e7c | ||
|
571272a564 | ||
|
30bb0f60a2 | ||
|
328546c4cd | ||
|
aa11348d00 | ||
|
6bdb4a7ddc | ||
|
6bc258a3e0 | ||
|
f4e89f2e6b | ||
|
2cad97c1ab | ||
|
6ecfe7c7c3 | ||
|
23f476dbf3 | ||
|
7a1251423f | ||
|
7f5492a395 | ||
|
11d9fd9199 | ||
|
6132bc3b3e | ||
|
fef7a7b99a | ||
|
1948ca9aa8 | ||
|
848e1f9a56 | ||
|
9c4353ee79 | ||
|
a6e257f502 | ||
|
310e1a1262 | ||
|
15f3c046d1 | ||
|
01d695428a | ||
|
acf3e3460f | ||
|
4c8116859c | ||
|
0e13397db7 | ||
|
ad8818508f | ||
|
d444ee662f | ||
|
4c354fff2d | ||
|
b81448edf6 | ||
|
134d2895f0 | ||
|
7ba8fde9b9 | ||
|
1022280465 | ||
|
021d3924e6 | ||
|
b6d50d781f | ||
|
1d411bb885 | ||
|
f7afd1ae4a | ||
|
1ef1f2a03c | ||
|
829ce4f86a | ||
|
6d5d863150 | ||
|
fc7d4bc420 |
10 changed files with 51 additions and 34 deletions
|
@ -55,6 +55,8 @@ getImageTag:
|
||||||
only:
|
only:
|
||||||
- stable
|
- stable
|
||||||
- develop
|
- develop
|
||||||
|
- tags
|
||||||
|
|
||||||
buildDocker:
|
buildDocker:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
needs:
|
needs:
|
||||||
|
@ -78,6 +80,8 @@ buildDocker:
|
||||||
only:
|
only:
|
||||||
- stable
|
- stable
|
||||||
- develop
|
- develop
|
||||||
|
- tags
|
||||||
|
|
||||||
mergeManifests:
|
mergeManifests:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
needs:
|
needs:
|
||||||
|
@ -103,3 +107,4 @@ mergeManifests:
|
||||||
only:
|
only:
|
||||||
- stable
|
- stable
|
||||||
- develop
|
- develop
|
||||||
|
- tags
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sharkey",
|
"name": "sharkey",
|
||||||
"version": "2024.3.1",
|
"version": "2024.3.2-devel",
|
||||||
"codename": "shonk",
|
"codename": "shonk",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -172,7 +172,7 @@
|
||||||
"stringz": "2.1.0",
|
"stringz": "2.1.0",
|
||||||
"systeminformation": "5.22.0",
|
"systeminformation": "5.22.0",
|
||||||
"tinycolor2": "1.6.0",
|
"tinycolor2": "1.6.0",
|
||||||
"tmp": "0.2.2",
|
"tmp": "0.2.3",
|
||||||
"tsc-alias": "1.8.8",
|
"tsc-alias": "1.8.8",
|
||||||
"tsconfig-paths": "4.2.0",
|
"tsconfig-paths": "4.2.0",
|
||||||
"typeorm": "0.3.20",
|
"typeorm": "0.3.20",
|
||||||
|
|
|
@ -192,6 +192,7 @@ export class FileServerService {
|
||||||
reply.header('Content-Range', `bytes ${start}-${end}/${file.file.size}`);
|
reply.header('Content-Range', `bytes ${start}-${end}/${file.file.size}`);
|
||||||
reply.header('Accept-Ranges', 'bytes');
|
reply.header('Accept-Ranges', 'bytes');
|
||||||
reply.header('Content-Length', chunksize);
|
reply.header('Content-Length', chunksize);
|
||||||
|
reply.code(206);
|
||||||
} else {
|
} else {
|
||||||
image = {
|
image = {
|
||||||
data: fs.createReadStream(file.path),
|
data: fs.createReadStream(file.path),
|
||||||
|
@ -261,7 +262,6 @@ export class FileServerService {
|
||||||
const parts = range.replace(/bytes=/, '').split('-');
|
const parts = range.replace(/bytes=/, '').split('-');
|
||||||
const start = parseInt(parts[0], 10);
|
const start = parseInt(parts[0], 10);
|
||||||
let end = parts[1] ? parseInt(parts[1], 10) : file.file.size - 1;
|
let end = parts[1] ? parseInt(parts[1], 10) : file.file.size - 1;
|
||||||
console.log(end);
|
|
||||||
if (end > file.file.size) {
|
if (end > file.file.size) {
|
||||||
end = file.file.size - 1;
|
end = file.file.size - 1;
|
||||||
}
|
}
|
||||||
|
@ -431,6 +431,7 @@ export class FileServerService {
|
||||||
reply.header('Content-Range', `bytes ${start}-${end}/${file.file.size}`);
|
reply.header('Content-Range', `bytes ${start}-${end}/${file.file.size}`);
|
||||||
reply.header('Accept-Ranges', 'bytes');
|
reply.header('Accept-Ranges', 'bytes');
|
||||||
reply.header('Content-Length', chunksize);
|
reply.header('Content-Length', chunksize);
|
||||||
|
reply.code(206);
|
||||||
} else {
|
} else {
|
||||||
image = {
|
image = {
|
||||||
data: fs.createReadStream(file.path),
|
data: fs.createReadStream(file.path),
|
||||||
|
@ -527,6 +528,9 @@ export class FileServerService {
|
||||||
if (!file.storedInternal) {
|
if (!file.storedInternal) {
|
||||||
if (!(file.isLink && file.uri)) return '204';
|
if (!(file.isLink && file.uri)) return '204';
|
||||||
const result = await this.downloadAndDetectTypeFromUrl(file.uri);
|
const result = await this.downloadAndDetectTypeFromUrl(file.uri);
|
||||||
|
if (!file.size) {
|
||||||
|
file.size = (await fs.promises.stat(result.path)).size;
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
...result,
|
...result,
|
||||||
url: file.uri,
|
url: file.uri,
|
||||||
|
|
|
@ -5,8 +5,8 @@ block vars
|
||||||
- const title = user.name ? `${user.name} (@${user.username})` : `@${user.username}`;
|
- const title = user.name ? `${user.name} (@${user.username})` : `@${user.username}`;
|
||||||
- const url = `${config.url}/notes/${note.id}`;
|
- const url = `${config.url}/notes/${note.id}`;
|
||||||
- const isRenote = note.renote && note.text == null && note.fileIds.length == 0 && note.poll == null;
|
- const isRenote = note.renote && note.text == null && note.fileIds.length == 0 && note.poll == null;
|
||||||
- const images = (note.files || []).filter(file => file.type.startsWith('image/') && !file.isSensitive)
|
- const images = note.cw ? [] : (note.files || []).filter(file => file.type.startsWith('image/') && !file.isSensitive)
|
||||||
- const videos = (note.files || []).filter(file => file.type.startsWith('video/') && !file.isSensitive)
|
- const videos = note.cw ? [] : (note.files || []).filter(file => file.type.startsWith('video/') && !file.isSensitive)
|
||||||
|
|
||||||
block title
|
block title
|
||||||
= `${title} | ${instanceName}`
|
= `${title} | ${instanceName}`
|
||||||
|
|
|
@ -68,7 +68,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<input v-show="useCw" ref="cwInputEl" v-model="cw" :class="$style.cw" :placeholder="i18n.ts.annotation" @keydown="onKeydown">
|
<input v-show="useCw" ref="cwInputEl" v-model="cw" :class="$style.cw" :placeholder="i18n.ts.annotation" @keydown="onKeydown">
|
||||||
<div :class="[$style.textOuter, { [$style.withCw]: useCw }]">
|
<div :class="[$style.textOuter, { [$style.withCw]: useCw }]">
|
||||||
<div v-if="channel" :class="$style.colorBar" :style="{ background: channel.color }"></div>
|
<div v-if="channel" :class="$style.colorBar" :style="{ background: channel.color }"></div>
|
||||||
<textarea ref="textareaEl" v-model="text" :class="[$style.text]" :disabled="posting || posted" :readonly="textAreaReadOnly" :placeholder="placeholder" data-cy-post-form-text @keydown="onKeydown" @paste="onPaste" @compositionupdate="onCompositionUpdate" @compositionend="onCompositionEnd"/>
|
<textarea ref="textareaEl" v-model="text" :class="[$style.text]" :disabled="posting || posted" :readonly="textAreaReadOnly" :placeholder="placeholder" data-cy-post-form-text dir="auto" @keydown="onKeydown" @paste="onPaste" @compositionupdate="onCompositionUpdate" @compositionend="onCompositionEnd"/>
|
||||||
<div v-if="maxTextLength - textLength < 100" :class="['_acrylic', $style.textCount, { [$style.textOver]: textLength > maxTextLength }]">{{ maxTextLength - textLength }}</div>
|
<div v-if="maxTextLength - textLength < 100" :class="['_acrylic', $style.textCount, { [$style.textOver]: textLength > maxTextLength }]">{{ maxTextLength - textLength }}</div>
|
||||||
</div>
|
</div>
|
||||||
<input v-show="withHashtags" ref="hashtagsInputEl" v-model="hashtags" :class="$style.hashtags" :placeholder="i18n.ts.hashtags" list="hashtags">
|
<input v-show="withHashtags" ref="hashtagsInputEl" v-model="hashtags" :class="$style.hashtags" :placeholder="i18n.ts.hashtags" list="hashtags">
|
||||||
|
|
|
@ -335,67 +335,67 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'center': {
|
case 'center': {
|
||||||
return [h('div', {
|
return [h('bdi',h('div', {
|
||||||
style: 'text-align:center;',
|
style: 'text-align:center;',
|
||||||
}, genEl(token.children, scale))];
|
}, genEl(token.children, scale)))];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'url': {
|
case 'url': {
|
||||||
return [h(MkUrl, {
|
return [h('bdi',h(MkUrl, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
url: token.props.url,
|
url: token.props.url,
|
||||||
rel: 'nofollow noopener',
|
rel: 'nofollow noopener',
|
||||||
})];
|
}))];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'link': {
|
case 'link': {
|
||||||
return [h(MkLink, {
|
return [h('bdi',h(MkLink, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
url: token.props.url,
|
url: token.props.url,
|
||||||
rel: 'nofollow noopener',
|
rel: 'nofollow noopener',
|
||||||
}, genEl(token.children, scale, true))];
|
}, genEl(token.children, scale, true)))];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'mention': {
|
case 'mention': {
|
||||||
return [h(MkMention, {
|
return [h('bdi',h(MkMention, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
host: (token.props.host == null && props.author && props.author.host != null ? props.author.host : token.props.host) ?? host,
|
host: (token.props.host == null && props.author && props.author.host != null ? props.author.host : token.props.host) ?? host,
|
||||||
username: token.props.username,
|
username: token.props.username,
|
||||||
})];
|
}))];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'hashtag': {
|
case 'hashtag': {
|
||||||
return [h(MkA, {
|
return [h('bdi',h(MkA, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
to: isNote ? `/tags/${encodeURIComponent(token.props.hashtag)}` : `/user-tags/${encodeURIComponent(token.props.hashtag)}`,
|
to: isNote ? `/tags/${encodeURIComponent(token.props.hashtag)}` : `/user-tags/${encodeURIComponent(token.props.hashtag)}`,
|
||||||
style: 'color:var(--hashtag);',
|
style: 'color:var(--hashtag);',
|
||||||
}, `#${token.props.hashtag}`)];
|
}, `#${token.props.hashtag}`))];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'blockCode': {
|
case 'blockCode': {
|
||||||
return [h(MkCode, {
|
return [h('bdi',h(MkCode, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
code: token.props.code,
|
code: token.props.code,
|
||||||
lang: token.props.lang ?? undefined,
|
lang: token.props.lang ?? undefined,
|
||||||
})];
|
}))];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'inlineCode': {
|
case 'inlineCode': {
|
||||||
return [h(MkCodeInline, {
|
return [h('bdi',h(MkCodeInline, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
code: token.props.code,
|
code: token.props.code,
|
||||||
})];
|
}))];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'quote': {
|
case 'quote': {
|
||||||
if (!props.nowrap) {
|
if (!props.nowrap) {
|
||||||
return [h('div', {
|
return [h('bdi',h('div', {
|
||||||
style: QUOTE_STYLE,
|
style: QUOTE_STYLE,
|
||||||
}, genEl(token.children, scale, true))];
|
}, genEl(token.children, scale, true)))];
|
||||||
} else {
|
} else {
|
||||||
return [h('span', {
|
return [h('bdi',h('span', {
|
||||||
style: QUOTE_STYLE,
|
style: QUOTE_STYLE,
|
||||||
}, genEl(token.children, scale, true))];
|
}, genEl(token.children, scale, true)))];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,17 +439,17 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'mathInline': {
|
case 'mathInline': {
|
||||||
return [h(MkFormula, {
|
return [h('bdi',h(MkFormula, {
|
||||||
formula: token.props.formula,
|
formula: token.props.formula,
|
||||||
block: false,
|
block: false,
|
||||||
})];
|
}))];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'mathBlock': {
|
case 'mathBlock': {
|
||||||
return [h(MkFormula, {
|
return [h('bdi',h(MkFormula, {
|
||||||
formula: token.props.formula,
|
formula: token.props.formula,
|
||||||
block: true,
|
block: true,
|
||||||
})];
|
}))];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'search': {
|
case 'search': {
|
||||||
|
@ -472,8 +472,8 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
}
|
}
|
||||||
}).flat(Infinity) as (VNode | string)[];
|
}).flat(Infinity) as (VNode | string)[];
|
||||||
|
|
||||||
return h('span', {
|
return h('bdi', h('span', {
|
||||||
// https://codeday.me/jp/qa/20190424/690106.html
|
// https://codeday.me/jp/qa/20190424/690106.html
|
||||||
style: props.nowrap ? 'white-space: pre; word-wrap: normal; overflow: hidden; text-overflow: ellipsis;' : 'white-space: pre-wrap;',
|
style: props.nowrap ? 'white-space: pre; word-wrap: normal; overflow: hidden; text-overflow: ellipsis;' : 'white-space: pre-wrap;',
|
||||||
}, genEl(rootAst, props.rootScale ?? 1));
|
}, genEl(rootAst, props.rootScale ?? 1)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -557,6 +557,8 @@ rt {
|
||||||
|
|
||||||
// MFM -----------------------------
|
// MFM -----------------------------
|
||||||
|
|
||||||
|
div > bdi, p > bdi { display: block }
|
||||||
|
|
||||||
._mfm_blur_ {
|
._mfm_blur_ {
|
||||||
filter: blur(6px);
|
filter: blur(6px);
|
||||||
transition: filter 0.3s;
|
transition: filter 0.3s;
|
||||||
|
|
|
@ -392,8 +392,8 @@ importers:
|
||||||
specifier: 1.6.0
|
specifier: 1.6.0
|
||||||
version: 1.6.0
|
version: 1.6.0
|
||||||
tmp:
|
tmp:
|
||||||
specifier: 0.2.2
|
specifier: 0.2.3
|
||||||
version: 0.2.2
|
version: 0.2.3
|
||||||
tsc-alias:
|
tsc-alias:
|
||||||
specifier: 1.8.8
|
specifier: 1.8.8
|
||||||
version: 1.8.8
|
version: 1.8.8
|
||||||
|
@ -18813,6 +18813,12 @@ packages:
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
dependencies:
|
dependencies:
|
||||||
rimraf: 5.0.5
|
rimraf: 5.0.5
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/tmp@0.2.3:
|
||||||
|
resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==}
|
||||||
|
engines: {node: '>=14.14'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/tmpl@1.0.5:
|
/tmpl@1.0.5:
|
||||||
resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==}
|
resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==}
|
||||||
|
|
Loading…
Reference in a new issue