Merge pull request 'develop' (#9551) from develop into main

Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9551
This commit is contained in:
Kainoa Kanter 2023-02-04 04:25:46 +00:00
commit 090fc75076
5 changed files with 10294 additions and 23 deletions

10286
CHANGELOG.md

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "13.1.0", "version": "13.1.1",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -35,6 +35,12 @@ export function convertLegacyReactions(reactions: Record<string, number>) {
} else { } else {
_reactions[legacies[reaction]] = reactions[reaction]; _reactions[legacies[reaction]] = reactions[reaction];
} }
} else if (reaction === "♥️") {
if (_reactions["❤️"]) {
_reactions["❤️"] += reactions[reaction];
} else {
_reactions["❤️"] = reactions[reaction];
}
} else { } else {
if (_reactions[reaction]) { if (_reactions[reaction]) {
_reactions[reaction] += reactions[reaction]; _reactions[reaction] += reactions[reaction];
@ -61,15 +67,10 @@ export async function toDbReaction(
reacterHost = toPunyNullable(reacterHost); reacterHost = toPunyNullable(reacterHost);
// 文字列タイプのリアクションを絵文字に変換 // Convert string-type reactions to unicode
if (Object.keys(legacies).includes(reaction)) return legacies[reaction]; if (Object.keys(legacies).includes(reaction)) return legacies[reaction];
// Convert old heart to new
// Unicode絵文字 if (reaction === "♥️") return "❤️";
const match = emojiRegex.exec(reaction);
if (match) {
const unicode = match[0];
return unicode.match("\u200d") ? unicode : unicode.replace(/\ufe0f/g, "");
}
const custom = reaction.match(/^:([\w+-]+)(?:@\.)?:$/); const custom = reaction.match(/^:([\w+-]+)(?:@\.)?:$/);
if (custom) { if (custom) {

View File

@ -381,8 +381,7 @@ function readPromo() {
} }
> div > i { > div > i {
position: absolute; margin-left: -.5px;
right: 100%;
} }
> .info { > .info {
display: flex; display: flex;
@ -605,6 +604,7 @@ function readPromo() {
opacity: 0.7; opacity: 0.7;
flex-grow: 1; flex-grow: 1;
max-width: 3.5em; max-width: 3.5em;
width: max-content;
min-width: max-content; min-width: max-content;
&:first-of-type { &:first-of-type {
margin-left: -.5em; margin-left: -.5em;
@ -637,11 +637,15 @@ function readPromo() {
&.max-width_450px { &.max-width_450px {
--avatarSize: 46px; --avatarSize: 46px;
padding-top: 6px;
> .note-context { > .note-context {
padding-inline: 16px; padding-inline: 16px;
margin-top: 0; margin-top: 0;
> :not(.line) { > :not(.line) {
margin-top: 10px; margin-top: 5px;
}
> .line {
margin-right: 10px;
} }
} }
> .article { > .article {

View File

@ -1496,7 +1496,7 @@
{ "category": "symbols", "char": "🀄", "name": "mahjong", "keywords": ["game", "play", "chinese", "kanji"] }, { "category": "symbols", "char": "🀄", "name": "mahjong", "keywords": ["game", "play", "chinese", "kanji"] },
{ "category": "symbols", "char": "♠️", "name": "spades", "keywords": ["poker", "cards", "suits", "magic"] }, { "category": "symbols", "char": "♠️", "name": "spades", "keywords": ["poker", "cards", "suits", "magic"] },
{ "category": "symbols", "char": "♣️", "name": "clubs", "keywords": ["poker", "cards", "magic", "suits"] }, { "category": "symbols", "char": "♣️", "name": "clubs", "keywords": ["poker", "cards", "magic", "suits"] },
{ "category": "symbols", "char": "", "name": "hearts", "keywords": ["poker", "cards", "magic", "suits"] }, { "category": "symbols", "char": "", "name": "hearts", "keywords": ["poker", "cards", "magic", "suits"] },
{ "category": "symbols", "char": "♦️", "name": "diamonds", "keywords": ["poker", "cards", "magic", "suits"] }, { "category": "symbols", "char": "♦️", "name": "diamonds", "keywords": ["poker", "cards", "magic", "suits"] },
{ "category": "symbols", "char": "🎴", "name": "flower_playing_cards", "keywords": ["game", "sunset", "red"] }, { "category": "symbols", "char": "🎴", "name": "flower_playing_cards", "keywords": ["game", "sunset", "red"] },
{ "category": "symbols", "char": "💭", "name": "thought_balloon", "keywords": ["bubble", "cloud", "speech", "thinking", "dream"] }, { "category": "symbols", "char": "💭", "name": "thought_balloon", "keywords": ["bubble", "cloud", "speech", "thinking", "dream"] },