Alt-text Novice Achivement #55

Open
leah wants to merge 2 commits from feature/alt-text-achivements into main
7 changed files with 33 additions and 3 deletions
Showing only changes of commit 5780e9c84e - Show all commits

View file

@ -1759,6 +1759,10 @@ _achievements:
title: "Double🤯"
description: "Two of the biggest objects in the bubble game at the same time"
flavor: "You can fill a lunch box like this 🤯 🤯 a bit."
_altTextNovice:
title: "Alt text novice"
description: "And im just getting started"
flavor: "Help make the Fediverse a more accessible place"
_role:
new: "New role"
edit: "Edit role"

16
locales/index.d.ts vendored
View file

@ -6843,7 +6843,7 @@ export interface Locale extends ILocale {
};
"_tutorialCompleted": {
/**
* Misskey初心者講座
* Forkey初心者講座
*/
"title": string;
/**
@ -6875,6 +6875,20 @@ export interface Locale extends ILocale {
*/
"flavor": string;
};
"_altTextNovice": {
/**
*
*/
"title": string;
/**
*
*/
"description": string;
/**
* Fediverseをより利用しやすい場所にすることに貢献する
*/
"flavor": string;
};
};
};
"_role": {

View file

@ -1770,6 +1770,10 @@ _achievements:
title: "ダブル🤯"
description: "バブルゲームで最も大きいモを2つ同時に出した"
flavor: "これくらいの おべんとばこに 🤯 🤯 ちょっとつめて"
_altTextNovice:
title: "キャプション初心者"
description: "まだ始まったばかりだ"
flavor: "Fediverseをより利用しやすい場所にすることに貢献する"
_role:
new: "ロールの作成"

View file

@ -89,6 +89,7 @@ export const ACHIEVEMENT_TYPES = [
'tutorialCompleted',
'bubbleGameExplodingHead',
'bubbleGameDoubleExplodingHead',
'altTextNovice'
] as const;
@Injectable()

View file

@ -29,8 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</span>
</div>
<div :class="$style.description">{{ withDescription ? i18n.ts._achievements._types['_' + achievement.name].description : '???' }}</div>
<div v-if="i18n.ts._achievements._types['_' + achievement.name].flavor && withDescription" :class="$style.flavor">{{ i18n.ts._achievements._types['_' + achievement.name].flavor }}</div>
</div>
<div v-if="'flavor' in i18n.ts._achievements._types['_' + achievement.name] && withDescription" :class="$style.flavor">{{ i18n.ts._achievements._types['_' + achievement.name].flavor }}</div> </div>
</div>
<template v-if="withLocked">
<div v-for="achievement in lockedAchievements" :key="achievement" :class="[$style.achievement, $style.locked]" class="_panel" @click="achievement === 'clickedClickHere' ? clickHere() : () => {}">

View file

@ -782,6 +782,8 @@ async function post(ev?: MouseEvent) {
if (canceled) return;
if (result === 'cancel') return;
} else {
claimAchievement('altTextNovice');
}
}

View file

@ -85,6 +85,7 @@ export const ACHIEVEMENT_TYPES = [
'tutorialCompleted',
'bubbleGameExplodingHead',
'bubbleGameDoubleExplodingHead',
'altTextNovice'
] as const;
export const ACHIEVEMENT_BADGES = {
@ -478,6 +479,11 @@ export const ACHIEVEMENT_BADGES = {
bg: 'linear-gradient(0deg, rgb(255 77 77), rgb(247 155 214))',
frame: 'silver',
},
'altTextNovice': {
img: '/fluent-emoji/1f9fe.png',
bg: 'linear-gradient(0deg, rgb(255 77 77), rgb(247 155 214))',
frame: 'bronze',
},
/* @see <https://github.com/misskey-dev/misskey/pull/10365#discussion_r1155511107>
} as const satisfies Record<typeof ACHIEVEMENT_TYPES[number], {
img: string;