Merge pull request 'develop' (#1) from Sharkey/Sharkey:develop into develop

Reviewed-on: https://git.joinsharkey.org/vavency/Sharkey/pulls/1
This commit is contained in:
vavency 2023-12-30 09:33:41 +01:00
commit 1cf52ca894
7 changed files with 52 additions and 31 deletions

View file

@ -1,5 +1,6 @@
name: 🐛 Bug Report name: 🐛 Bug Report
description: Create a report to help us improve description: Create a report to help us improve
title: 'bug: '
body: body:
- type: markdown - type: markdown

View file

@ -1,10 +0,0 @@
---
name: "Feature Request"
about: "Suggest an idea for this project"
title: "feat: "
---
## Summary
<!-- Tell us what the suggestion is -->
## Purpose
<!-- Describe the specific problem or need you think this feature will solve, and who it will help. -->

View file

@ -0,0 +1,22 @@
name: ✨ Feature Request
description: Suggest an idea for this project
title: 'feat: '
body:
- type: textarea
attributes:
label: Summary
description: Tell us what the suggestion is
validations:
required: true
- type: textarea
attributes:
label: Purpose
description: Describe the specific problem or need you think this feature will solve, and who it will help.
validations:
required: true
- type: checkboxes
attributes:
label: Do you want to implement this feature yourself?
options:
- label: Yes, I will implement this by myself and send a pull request

View file

@ -46,7 +46,7 @@ pin: "Pin to profile"
unpin: "Unpin from profile" unpin: "Unpin from profile"
copyContent: "Copy contents" copyContent: "Copy contents"
copyLink: "Copy link" copyLink: "Copy link"
copyLinkRenote: "Copy renote link" copyLinkRenote: "Copy boost link"
delete: "Delete" delete: "Delete"
deleteAndEdit: "Delete and edit" deleteAndEdit: "Delete and edit"
deleteAndEditConfirm: "Are you sure you want to redraft this note? This means you will lose all reactions, boosts, and replies to it." deleteAndEditConfirm: "Are you sure you want to redraft this note? This means you will lose all reactions, boosts, and replies to it."
@ -115,7 +115,7 @@ rmboost: "Unboosted."
cantRenote: "This post can't be boosted." cantRenote: "This post can't be boosted."
cantReRenote: "A boost can't be boosted." cantReRenote: "A boost can't be boosted."
quote: "Quote" quote: "Quote"
inChannelRenote: "Channel-only Renote" inChannelRenote: "Channel-only Boost"
inChannelQuote: "Channel-only Quote" inChannelQuote: "Channel-only Quote"
pinnedNote: "Pinned note" pinnedNote: "Pinned note"
pinned: "Pin to profile" pinned: "Pin to profile"
@ -135,8 +135,8 @@ unmarkAsSensitive: "Unmark as sensitive"
enterFileName: "Enter filename" enterFileName: "Enter filename"
mute: "Mute" mute: "Mute"
unmute: "Unmute" unmute: "Unmute"
renoteMute: "Mute Renotes" renoteMute: "Mute Boosts"
renoteUnmute: "Unmute Renotes" renoteUnmute: "Unmute Boosts"
block: "Block" block: "Block"
unblock: "Unblock" unblock: "Unblock"
markAsNSFW: "Mark all media from user as NSFW" markAsNSFW: "Mark all media from user as NSFW"
@ -685,7 +685,7 @@ behavior: "Behavior"
sample: "Sample" sample: "Sample"
abuseReports: "Reports" abuseReports: "Reports"
reportAbuse: "Report" reportAbuse: "Report"
reportAbuseRenote: "Report renote" reportAbuseRenote: "Report boost"
reportAbuseOf: "Report {name}" reportAbuseOf: "Report {name}"
fillAbuseReportDescription: "Please fill in details regarding this report. If it is about a specific note, please include its URL." fillAbuseReportDescription: "Please fill in details regarding this report. If it is about a specific note, please include its URL."
abuseReported: "Your report has been sent. Thank you very much." abuseReported: "Your report has been sent. Thank you very much."
@ -1275,8 +1275,8 @@ _initialTutorial:
_visibility: _visibility:
description: "You can limit who can view your note." description: "You can limit who can view your note."
public: "Your note will be visible for all users." public: "Your note will be visible for all users."
home: "Public only on the Home timeline. People visiting your profile, via followers, and through renotes can see it." home: "Public only on the Home timeline. People visiting your profile, via followers, and through boosts can see it."
followers: "Visible to followers only. Only followers can see it and no one else, and it cannot be renoted by others." followers: "Visible to followers only. Only followers can see it and no one else, and it cannot be boosted by others."
direct: "Visible only to specified users, and the recipient will be notified. It can be used as an alternative to direct messaging." direct: "Visible only to specified users, and the recipient will be notified. It can be used as an alternative to direct messaging."
doNotSendConfidencialOnDirect1: "Be careful when sending sensitive information!" doNotSendConfidencialOnDirect1: "Be careful when sending sensitive information!"
doNotSendConfidencialOnDirect2: "Administrators of the server can see what you write. Be careful with sensitive information when sending direct notes to users on untrusted servers." doNotSendConfidencialOnDirect2: "Administrators of the server can see what you write. Be careful with sensitive information when sending direct notes to users on untrusted servers."
@ -1774,7 +1774,7 @@ _channel:
notesCount: "{n} Notes" notesCount: "{n} Notes"
nameAndDescription: "Name and description" nameAndDescription: "Name and description"
nameOnly: "Name only" nameOnly: "Name only"
allowRenoteToExternal: "Allow renote and quote outside the channel" allowRenoteToExternal: "Allow boosts and quote outside the channel"
_menuDisplay: _menuDisplay:
sideFull: "Side" sideFull: "Side"
sideIcon: "Side (Icons)" sideIcon: "Side (Icons)"
@ -1837,7 +1837,7 @@ _theme:
hashtag: "Hashtag" hashtag: "Hashtag"
mention: "Mention" mention: "Mention"
mentionMe: "Mentions (Me)" mentionMe: "Mentions (Me)"
renote: "Renote" renote: "Boost"
modalBg: "Modal background" modalBg: "Modal background"
divider: "Divider" divider: "Divider"
scrollbarHandle: "Scrollbar handle" scrollbarHandle: "Scrollbar handle"
@ -2221,7 +2221,7 @@ _notification:
follow: "New followers" follow: "New followers"
mention: "Mentions" mention: "Mentions"
reply: "Replies" reply: "Replies"
renote: "Renotes" renote: "Boosts"
quote: "Quotes" quote: "Quotes"
reaction: "Reactions" reaction: "Reactions"
pollEnded: "Polls ending" pollEnded: "Polls ending"
@ -2233,7 +2233,7 @@ _notification:
_actions: _actions:
followBack: "followed you back" followBack: "followed you back"
reply: "Reply" reply: "Reply"
renote: "Renote" renote: "Boost"
_deck: _deck:
alwaysShowMainColumn: "Always show main column" alwaysShowMainColumn: "Always show main column"
columnAlign: "Align columns" columnAlign: "Align columns"

View file

@ -109,6 +109,7 @@
"file-type": "18.7.0", "file-type": "18.7.0",
"fluent-ffmpeg": "2.1.2", "fluent-ffmpeg": "2.1.2",
"form-data": "4.0.0", "form-data": "4.0.0",
"glob": "10.3.10",
"got": "14.0.0", "got": "14.0.0",
"happy-dom": "10.0.3", "happy-dom": "10.0.3",
"hpagent": "1.2.0", "hpagent": "1.2.0",

View file

@ -8,6 +8,7 @@ import { fileURLToPath } from 'node:url';
import { dirname, resolve } from 'node:path'; import { dirname, resolve } from 'node:path';
import * as yaml from 'js-yaml'; import * as yaml from 'js-yaml';
import type { RedisOptions } from 'ioredis'; import type { RedisOptions } from 'ioredis';
import { globSync } from 'glob';
type RedisOptionsSource = Partial<RedisOptions> & { type RedisOptionsSource = Partial<RedisOptions> & {
host: string; host: string;
@ -193,11 +194,18 @@ const path = process.env.MISSKEY_CONFIG_YML
export function loadConfig(): Config { export function loadConfig(): Config {
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../built/meta.json`, 'utf-8')); const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../built/meta.json`, 'utf-8'));
const clientManifestExists = fs.existsSync(_dirname + '/../../../built/_vite_/manifest.json'); const clientManifestExists = fs.existsSync(`${_dirname}/../../../built/_vite_/manifest.json`);
const clientManifest = clientManifestExists ? const clientManifest = clientManifestExists ?
JSON.parse(fs.readFileSync(`${_dirname}/../../../built/_vite_/manifest.json`, 'utf-8')) JSON.parse(fs.readFileSync(`${_dirname}/../../../built/_vite_/manifest.json`, 'utf-8'))
: { 'src/_boot_.ts': { file: 'src/_boot_.ts' } }; : { 'src/_boot_.ts': { file: 'src/_boot_.ts' } };
const config = yaml.load(fs.readFileSync(path, 'utf-8')) as Source;
const config = globSync(path)
.map(path => fs.readFileSync(path, 'utf-8'))
.map(contents => yaml.load(contents) as Source)
.reduce(
(acc: Source, cur: Source) => Object.assign(acc, cur),
{} as Source,
) as Source;
const url = tryCreateUrl(config.url); const url = tryCreateUrl(config.url);
const version = meta.version; const version = meta.version;

View file

@ -208,6 +208,9 @@ importers:
form-data: form-data:
specifier: 4.0.0 specifier: 4.0.0
version: 4.0.0 version: 4.0.0
glob:
specifier: 10.3.10
version: 10.3.10
got: got:
specifier: 14.0.0 specifier: 14.0.0
version: 14.0.0 version: 14.0.0
@ -7976,6 +7979,7 @@ packages:
/@types/node@20.10.5: /@types/node@20.10.5:
resolution: {integrity: sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==} resolution: {integrity: sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==}
requiresBuild: true
dependencies: dependencies:
undici-types: 5.26.5 undici-types: 5.26.5
@ -12732,7 +12736,7 @@ packages:
fs.realpath: 1.0.0 fs.realpath: 1.0.0
inflight: 1.0.6 inflight: 1.0.6
inherits: 2.0.4 inherits: 2.0.4
minimatch: 5.1.2 minimatch: 5.1.6
once: 1.4.0 once: 1.4.0
/global-dirs@3.0.1: /global-dirs@3.0.1:
@ -15000,12 +15004,6 @@ packages:
dependencies: dependencies:
brace-expansion: 1.1.11 brace-expansion: 1.1.11
/minimatch@5.1.2:
resolution: {integrity: sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==}
engines: {node: '>=10'}
dependencies:
brace-expansion: 2.0.1
/minimatch@5.1.6: /minimatch@5.1.6:
resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==}
engines: {node: '>=10'} engines: {node: '>=10'}
@ -17244,7 +17242,7 @@ packages:
/readdir-glob@1.1.2: /readdir-glob@1.1.2:
resolution: {integrity: sha512-6RLVvwJtVwEDfPdn6X6Ille4/lxGl0ATOY4FN/B9nxQcgOazvvI0nodiD19ScKq0PvA/29VpaOQML36o5IzZWA==} resolution: {integrity: sha512-6RLVvwJtVwEDfPdn6X6Ille4/lxGl0ATOY4FN/B9nxQcgOazvvI0nodiD19ScKq0PvA/29VpaOQML36o5IzZWA==}
dependencies: dependencies:
minimatch: 5.1.2 minimatch: 5.1.6
dev: false dev: false
/readdirp@3.6.0: /readdirp@3.6.0:
@ -19197,6 +19195,7 @@ packages:
/undici-types@5.26.5: /undici-types@5.26.5:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
requiresBuild: true
/undici@5.22.1: /undici@5.22.1:
resolution: {integrity: sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==} resolution: {integrity: sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==}