Compare commits

...

3 commits

Author SHA1 Message Date
b9c837f106
add translations 2022-07-10 10:51:07 +02:00
503198cd87
meta: remove locales README
Since the internationalization management is not yet set up, this is
no longer applicable.
2022-07-10 10:50:27 +02:00
d0b5981a0b
Revert "Revert option to collapse long notes (Misskey PR 8561)"
This reverts commit 71150f21cd and reinstates
the option to collapse long notes again after they were expanded.

It is unclear why this commit was reverted in the first place, syuilo
claimed there to be issues with URL previews and attached images. These
problems could not be reproduced when testing.
2022-07-10 10:42:27 +02:00
6 changed files with 28 additions and 9 deletions

View file

@ -1,6 +0,0 @@
# **DO NOT edit locale files** except `ja-JP.yml`.
When you add text to the ja-JP file (of misskey-dev/misskey), it will automatically be applied to other language files.
Translations added in ja-JP file should contain the original Japanese strings.
Please see [Contribution guide](../CONTRIBUTING.md) for more information.

View file

@ -52,6 +52,7 @@ searchUser: "Nach einem Benutzer suchen"
reply: "Antworten"
loadMore: "Mehr laden"
showMore: "Mehr anzeigen"
showLess: "Weniger anzeigen"
youGotNewFollower: "ist dir gefolgt"
receiveFollowRequest: "Follow-Anfrage erhalten"
followRequestAccepted: "Follow-Anfrage akzeptiert"

View file

@ -52,6 +52,7 @@ searchUser: "Search for a user"
reply: "Reply"
loadMore: "Load more"
showMore: "Show more"
showLess: "Show less"
youGotNewFollower: "followed you"
receiveFollowRequest: "Follow request received"
followRequestAccepted: "Follow request accepted"

View file

@ -52,6 +52,7 @@ searchUser: "ユーザーを検索"
reply: "返信"
loadMore: "もっと見る"
showMore: "もっと見る"
showLess: "閉じる"
youGotNewFollower: "フォローされました"
receiveFollowRequest: "フォローリクエストされました"
followRequestAccepted: "フォローが承認されました"

View file

@ -52,6 +52,7 @@ searchUser: "Zoeken een gebruiker"
reply: "Antwoord"
loadMore: "Laad meer"
showMore: "Toon meer"
showLess: "Toon minder"
youGotNewFollower: "volgde jou"
receiveFollowRequest: "Volgverzoek ontvangen"
followRequestAccepted: "Volgverzoek geaccepteerd"

View file

@ -46,7 +46,7 @@
<Mfm v-if="appearNote.cw != ''" class="text" :text="appearNote.cw" :author="appearNote.user" :i="$i" :custom-emojis="appearNote.emojis"/>
<XCwButton v-model="showContent" :note="appearNote"/>
</p>
<div v-show="appearNote.cw == null || showContent" class="content" :class="{ collapsed }">
<div v-show="appearNote.cw == null || showContent" class="content" :class="{ collapsed, isLong }">
<div class="text">
<span v-if="appearNote.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span>
<MkA v-if="appearNote.replyId" class="reply" :to="`/notes/${appearNote.replyId}`"><i class="fas fa-reply"></i></MkA>
@ -66,9 +66,12 @@
<XPoll v-if="appearNote.poll" ref="pollViewer" :note="appearNote" class="poll"/>
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="false" class="url-preview"/>
<div v-if="appearNote.renote" class="renote"><XNoteSimple :note="appearNote.renote"/></div>
<button v-if="collapsed" class="fade _button" @click="collapsed = false">
<button v-if="isLong && collapsed" class="fade _button" @click="collapsed = false">
<span>{{ i18n.ts.showMore }}</span>
</button>
<button v-else-if="isLong && !collapsed" class="showLess _button" @click="collapsed = true">
<span>{{ i18n.ts.showLess }}</span>
</button>
</div>
<MkA v-if="appearNote.channel && !inChannel" class="channel" :to="`/channels/${appearNote.channel.id}`"><i class="fas fa-satellite-dish"></i> {{ appearNote.channel.name }}</MkA>
</div>
@ -166,7 +169,8 @@ const reactButton = ref<HTMLElement>();
let appearNote = $computed(() => isRenote ? note.renote as misskey.entities.Note : note);
const isMyRenote = $i && ($i.id === note.userId);
const showContent = ref(false);
const collapsed = ref(appearNote.cw == null && appearNote.text != null && (
const collapsed = ref(appearNote.cw == null);
const isLong = ref(appearNote.cw == null && appearNote.text != null && (
(appearNote.text.split('\n').length > 9) ||
(appearNote.text.length > 500)
));
@ -454,6 +458,23 @@ function readPromo() {
}
> .content {
&.isLong {
> .showLess {
width: 100%;
margin-top: 1em;
position: sticky;
bottom: 1em;
> span {
display: inline-block;
background: var(--panel);
padding: 6px 10px;
font-size: 0.8em;
border-radius: 999px;
box-shadow: 0 0 7px 7px var(--bg);
}
}
}
&.collapsed {
position: relative;
max-height: 9em;