Compare commits

...

47 commits

Author SHA1 Message Date
Puniko 31fa6223ec resolve merge conflicts 2022-09-17 11:17:40 +02:00
floatingghost f628483499 translation parameterisation (#165)
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: AkkomaGang/pleroma-fe#165
2022-09-12 15:47:53 +00:00
floatingghost 61c70545f0 Merge pull request 'Delete '.gitlab-ci.yml'' (#162) from norm/pleroma-fe:delete-gitlab-ci into develop
Reviewed-on: AkkomaGang/pleroma-fe#162
2022-09-11 19:17:42 +00:00
Norm ad8be6b199 Merge branch 'develop' into delete-gitlab-ci 2022-09-10 04:03:58 +00:00
Norm dd89735008 Delete '.gitlab-ci.yml'
This file obviously doesn't serve a purpose since we're not using Gitlab CI.
2022-09-09 23:05:10 +00:00
Weblate 3c780adeb2 Translated using Weblate (Japanese (ja_PEDANTIC))
Currently translated at 100.0% (910 of 910 strings)

Co-authored-by: Weblate Admin <hannah.ward9001@gmail.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/ja_PEDANTIC/
Translation: Pleroma fe/pleroma-fe
2022-09-08 10:18:49 +00:00
Weblate d813a8528a Translated using Weblate (French)
Currently translated at 92.6% (843 of 910 strings)

Translated using Weblate (French)

Currently translated at 92.6% (843 of 910 strings)

Co-authored-by: Thomate <thomas@burdick.fr>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/fr/
Translation: Pleroma fe/pleroma-fe
2022-09-08 10:18:49 +00:00
Weblate 58f6dfebe9 Translated using Weblate (English)
Currently translated at 100.0% (910 of 910 strings)

Co-authored-by: Thomate <thomas@burdick.fr>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/en/
Translation: Pleroma fe/pleroma-fe
2022-09-08 10:18:49 +00:00
FloatingGhost da4b315d69 Merge remote-tracking branch 'origin/translations' into develop 2022-09-08 11:17:40 +01:00
FloatingGhost b980d5b2ef use with-direction in edited timeago
Fixes #159
2022-09-07 12:55:03 +01:00
Weblate 9447b7eaea Merge branch 'origin/develop' into Weblate. 2022-09-06 19:25:07 +00:00
floatingghost 2da92fcd13 editing (#158)
Co-authored-by: Sean King <seanking2919@protonmail.com>
Co-authored-by: Tusooa Zhu <tusooa@kazv.moe>
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: AkkomaGang/pleroma-fe#158
2022-09-06 19:25:03 +00:00
Weblate 6aadbcecfa Translated using Weblate (Japanese (ja_PEDANTIC))
Currently translated at 100.0% (903 of 903 strings)

Co-authored-by: Weblate Admin <hannah.ward9001@gmail.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/ja_PEDANTIC/
Translation: Pleroma fe/pleroma-fe
2022-09-06 17:00:17 +00:00
floatingghost 6084cbbb00 collapse statuses with CWs by default (#157)
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: AkkomaGang/pleroma-fe#157
2022-09-06 17:00:15 +00:00
FloatingGhost bd868e47de don't use bare @ 2022-09-06 11:44:53 +01:00
FloatingGhost 1cce6969cc make linter happy 2022-09-06 11:38:23 +01:00
Weblate ebdcb31c12 Translated using Weblate (Japanese (ja_PEDANTIC))
Currently translated at 100.0% (903 of 903 strings)

Co-authored-by: Weblate Admin <hannah.ward9001@gmail.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/ja_PEDANTIC/
Translation: Pleroma fe/pleroma-fe
2022-09-06 10:35:03 +00:00
Weblate d42b207b64 Translated using Weblate (English)
Currently translated at 100.0% (903 of 903 strings)

Co-authored-by: Weblate Admin <hannah.ward9001@gmail.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/en/
Translation: Pleroma fe/pleroma-fe
2022-09-06 10:30:23 +00:00
Weblate 4f1d85b054 Translated using Weblate (French)
Currently translated at 94.9% (857 of 903 strings)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Weblate Admin <hannah.ward9001@gmail.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/fr/
Translation: Pleroma fe/pleroma-fe
2022-09-05 17:24:25 +00:00
Weblate cffc073aa7 Translated using Weblate (Japanese (ja_PEDANTIC))
Currently translated at 90.2% (816 of 904 strings)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Weblate Admin <hannah.ward9001@gmail.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/ja_PEDANTIC/
Translation: Pleroma fe/pleroma-fe
2022-09-05 17:24:25 +00:00
Weblate d6bbbea5dc Translated using Weblate (Slovak)
Currently translated at 41.4% (374 of 903 strings)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Weblate Admin <hannah.ward9001@gmail.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/sk/
Translation: Pleroma fe/pleroma-fe
2022-09-05 17:24:25 +00:00
Weblate b5f90a96cc Translated using Weblate (Dutch)
Currently translated at 95.7% (865 of 903 strings)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Weblate Admin <hannah.ward9001@gmail.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/nl/
Translation: Pleroma fe/pleroma-fe
2022-09-05 17:24:25 +00:00
Weblate 9220c3859a Translated using Weblate (Catalan)
Currently translated at 94.9% (857 of 903 strings)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Weblate Admin <hannah.ward9001@gmail.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/ca/
Translation: Pleroma fe/pleroma-fe
2022-09-05 17:24:25 +00:00
Weblate aecb9f6e2a Translated using Weblate (English)
Currently translated at 99.5% (900 of 904 strings)

Translated using Weblate (English)

Currently translated at 99.5% (900 of 904 strings)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Weblate Admin <hannah.ward9001@gmail.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/en/
Translation: Pleroma fe/pleroma-fe
2022-09-05 17:24:25 +00:00
floatingghost ae1b6ad887 Customisation of default profile tab, clean up settings (#156)
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: AkkomaGang/pleroma-fe#156
2022-09-05 17:02:16 +00:00
floatingghost c301daa276 Merge pull request 'Jump to Top on New *only* in non-profiles' (#154) from Mergan/pleroma-fe:develop into develop
Reviewed-on: AkkomaGang/pleroma-fe#154
2022-09-05 00:31:06 +00:00
FloatingGhost 8e2a4a9f7b remove unused method 2022-09-05 01:30:32 +01:00
David 948436ad3e Jump to Top on New *only* in non-profiles 2022-09-02 17:05:42 -07:00
floatingghost 301a32991b Merge pull request 'Fix Announcements Title Style' (#152) from Mergan/pleroma-fe:develop into develop
Reviewed-on: AkkomaGang/pleroma-fe#152
2022-09-02 09:25:08 +00:00
David 91357aad88 Fix Announcements Title Style 2022-09-01 22:35:42 -07:00
FloatingGhost c97cd56439 only clear timelines on new profile 2022-08-31 23:32:02 +01:00
Weblate 49875ef601 Translated using Weblate (Dutch)
Currently translated at 96.7% (868 of 897 strings)

Co-authored-by: Fristi <fristi@subcon.town>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/nl/
Translation: Pleroma fe/pleroma-fe
2022-08-31 16:45:29 +00:00
Weblate a234cd3f00 Translated using Weblate (Japanese (ja_PEDANTIC))
Currently translated at 89.3% (806 of 902 strings)

Co-authored-by: Weblate Admin <hannah.ward9001@gmail.com>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/pleroma-fe/ja_PEDANTIC/
Translation: Pleroma fe/pleroma-fe
2022-08-31 16:45:29 +00:00
floatingghost 6f2058a8fc ensure timelines only start fetching on click (#150)
no more parallel fetching

Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: AkkomaGang/pleroma-fe#150
2022-08-31 15:44:58 +00:00
floatingghost 064b8ba7f7 Merge pull request 'Make "Copy link" copy external URL if external post' (#144) from eris/pleroma-fe:copy-url-fix into develop
Reviewed-on: AkkomaGang/pleroma-fe#144
2022-08-31 15:43:37 +00:00
Mergan 48826ede36 Separated Posts & Replies (#145) (#148)
Co-authored-by: David <dmgf2008@hotmail.com>
Reviewed-on: AkkomaGang/pleroma-fe#148
Co-authored-by: Mergan <mergan@noreply.akkoma>
Co-committed-by: Mergan <mergan@noreply.akkoma>
2022-08-31 15:28:09 +00:00
FloatingGhost 7dc0464094 split translation language by source and dest 2022-08-30 17:46:54 +01:00
FloatingGhost 6440e51b7e allow translating to any other language 2022-08-30 15:43:57 +01:00
FloatingGhost ef50c63dc7 use supported languages from service 2022-08-30 14:37:36 +01:00
FloatingGhost 59eb434840 allow modal to expand with content 2022-08-30 10:32:34 +01:00
eris bd4e8271df Dont copy local URL if external post 2022-08-30 08:54:08 +00:00
floatingghost 08d4b3b885 Merge pull request 'allow selecting languages for translation' (#143) from translation-language-selection into develop
Reviewed-on: AkkomaGang/pleroma-fe#143
2022-08-29 21:17:41 +00:00
FloatingGhost e7c21ffbd7 allow selecting languages for translation 2022-08-29 22:16:59 +01:00
floatingghost 9b4cddd2e9 Merge pull request 'Add ability to translate statuses' (#142) from machine-translation into develop
Reviewed-on: AkkomaGang/pleroma-fe#142
2022-08-29 19:41:50 +00:00
floatingghost cd20e45157 Merge pull request 'Fix MRF transparency panel showing without transparency enabled' (#141) from eris/pleroma-fe:mrf-panel-fix into develop
Reviewed-on: AkkomaGang/pleroma-fe#141
2022-08-29 19:29:57 +00:00
FloatingGhost 48a11cb9d1 add translation options 2022-08-29 20:02:34 +01:00
eris e67d94f73d Fix MRF transparency panel showing without transparency 2022-08-28 10:09:56 +00:00
53 changed files with 1195 additions and 236 deletions

View file

@ -1,47 +0,0 @@
# This file is a template, and might need editing before it works on your project.
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:12
stages:
- lint
- build
- test
- deploy
lint:
stage: lint
script:
- yarn
- npm run lint
- npm run stylelint
test:
stage: test
variables:
APT_CACHE_DIR: apt-cache
script:
- mkdir -pv $APT_CACHE_DIR && apt-get -qq update
- apt install firefox-esr -y --no-install-recommends
- firefox --version
- yarn
- yarn unit
build:
stage: build
script:
- yarn
- npm run build
artifacts:
paths:
- dist/
docs-deploy:
stage: deploy
image: alpine:latest
only:
- develop@pleroma/pleroma-fe
before_script:
- apk add curl
script:
- curl -X POST -F"token=$DOCS_PIPELINE_TRIGGER" -F'ref=master' https://git.pleroma.social/api/v4/projects/673/trigger/pipeline

View file

@ -10,3 +10,5 @@ Contributors of this project.
- shpuld (shpuld@shitposter.club): CSS and styling - shpuld (shpuld@shitposter.club): CSS and styling
- Vincent Guth (https://unsplash.com/photos/XrwVIFy6rTw): Background images. - Vincent Guth (https://unsplash.com/photos/XrwVIFy6rTw): Background images.
- hj (hj@shigusegubu.club): Code - hj (hj@shigusegubu.club): Code
- Sean King (seanking@freespeechextremist.com): Code
- Tusooa Zhu (tusooa@kazv.moe): Code

4
config/ihba.json Normal file
View file

@ -0,0 +1,4 @@
{
"target": "https://ihatebeinga.live",
"staticConfigPreference": false
}

View file

@ -41,7 +41,7 @@
"qrcode": "1", "qrcode": "1",
"ruffle-mirror": "2021.12.31", "ruffle-mirror": "2021.12.31",
"vue": "^3.2.31", "vue": "^3.2.31",
"vue-i18n": "^9.2.0-beta.39", "vue-i18n": "^9.2.2",
"vue-router": "4.0.14", "vue-router": "4.0.14",
"vue-template-compiler": "2.6.11", "vue-template-compiler": "2.6.11",
"vuex": "4.0.2" "vuex": "4.0.2"

View file

@ -10,7 +10,9 @@ import MobilePostStatusButton from './components/mobile_post_status_button/mobil
import MobileNav from './components/mobile_nav/mobile_nav.vue' import MobileNav from './components/mobile_nav/mobile_nav.vue'
import DesktopNav from './components/desktop_nav/desktop_nav.vue' import DesktopNav from './components/desktop_nav/desktop_nav.vue'
import UserReportingModal from './components/user_reporting_modal/user_reporting_modal.vue' import UserReportingModal from './components/user_reporting_modal/user_reporting_modal.vue'
import EditStatusModal from './components/edit_status_modal/edit_status_modal.vue'
import PostStatusModal from './components/post_status_modal/post_status_modal.vue' import PostStatusModal from './components/post_status_modal/post_status_modal.vue'
import StatusHistoryModal from './components/status_history_modal/status_history_modal.vue'
import GlobalNoticeList from './components/global_notice_list/global_notice_list.vue' import GlobalNoticeList from './components/global_notice_list/global_notice_list.vue'
import { windowWidth, windowHeight } from './services/window_utils/window_utils' import { windowWidth, windowHeight } from './services/window_utils/window_utils'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@ -33,6 +35,8 @@ export default {
SettingsModal, SettingsModal,
UserReportingModal, UserReportingModal,
PostStatusModal, PostStatusModal,
EditStatusModal,
StatusHistoryModal,
GlobalNoticeList GlobalNoticeList
}, },
data: () => ({ data: () => ({
@ -83,6 +87,7 @@ export default {
return this.$store.getters.mergedConfig.alwaysShowNewPostButton || this.layoutType === 'mobile' return this.$store.getters.mergedConfig.alwaysShowNewPostButton || this.layoutType === 'mobile'
}, },
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel }, showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
editingAvailable () { return this.$store.state.instance.editingAvailable },
layoutType () { return this.$store.state.interface.layoutType }, layoutType () { return this.$store.state.interface.layoutType },
privateMode () { return this.$store.state.instance.private }, privateMode () { return this.$store.state.instance.private },
reverseLayout () { reverseLayout () {

View file

@ -58,6 +58,8 @@
<MobilePostStatusButton /> <MobilePostStatusButton />
<UserReportingModal /> <UserReportingModal />
<PostStatusModal /> <PostStatusModal />
<EditStatusModal v-if="editingAvailable" />
<StatusHistoryModal v-if="editingAvailable" />
<SettingsModal /> <SettingsModal />
<UpdateNotification /> <UpdateNotification />
<GlobalNoticeList /> <GlobalNoticeList />

View file

@ -275,8 +275,10 @@ const getNodeInfo = async ({ store }) => {
store.dispatch('setInstanceOption', { name: 'mediaProxyAvailable', value: features.includes('media_proxy') }) store.dispatch('setInstanceOption', { name: 'mediaProxyAvailable', value: features.includes('media_proxy') })
store.dispatch('setInstanceOption', { name: 'safeDM', value: features.includes('safe_dm_mentions') }) store.dispatch('setInstanceOption', { name: 'safeDM', value: features.includes('safe_dm_mentions') })
store.dispatch('setInstanceOption', { name: 'pollsAvailable', value: features.includes('polls') }) store.dispatch('setInstanceOption', { name: 'pollsAvailable', value: features.includes('polls') })
store.dispatch('setInstanceOption', { name: 'editingAvailable', value: features.includes('editing') })
store.dispatch('setInstanceOption', { name: 'pollLimits', value: metadata.pollLimits }) store.dispatch('setInstanceOption', { name: 'pollLimits', value: metadata.pollLimits })
store.dispatch('setInstanceOption', { name: 'mailerEnabled', value: metadata.mailerEnabled }) store.dispatch('setInstanceOption', { name: 'mailerEnabled', value: metadata.mailerEnabled })
store.dispatch('setInstanceOption', { name: 'translationEnabled', value: features.includes('akkoma:machine_translation') })
const uploadLimits = metadata.uploadLimits const uploadLimits = metadata.uploadLimits
store.dispatch('setInstanceOption', { name: 'uploadlimit', value: parseInt(uploadLimits.general) }) store.dispatch('setInstanceOption', { name: 'uploadlimit', value: parseInt(uploadLimits.general) })
@ -398,6 +400,7 @@ const afterStoreSetup = async ({ store, i18n }) => {
store.dispatch('startFetchingAnnouncements') store.dispatch('startFetchingAnnouncements')
getTOS({ store }) getTOS({ store })
getStickers({ store }) getStickers({ store })
store.dispatch('getSupportedTranslationlanguages')
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(),

View file

@ -1,9 +1,9 @@
<template> <template>
<div class="panel panel-default announcements-page"> <div class="panel panel-default announcements-page">
<div class="panel-heading"> <div class="panel-heading">
<span> <div class="title">
{{ $t('announcements.page_header') }} {{ $t('announcements.page_header') }}
</span> </div>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<section <section

View file

@ -130,6 +130,9 @@ const Attachment = {
...mapGetters(['mergedConfig']) ...mapGetters(['mergedConfig'])
}, },
watch: { watch: {
'attachment.description' (newVal) {
this.localDescription = newVal
},
localDescription (newVal) { localDescription (newVal) {
this.onEdit(newVal) this.onEdit(newVal)
} }

View file

@ -1,6 +1,8 @@
import { reduce, filter, findIndex, clone, get } from 'lodash' import { reduce, filter, findIndex, clone, get } from 'lodash'
import Status from '../status/status.vue' import Status from '../status/status.vue'
import ThreadTree from '../thread_tree/thread_tree.vue' import ThreadTree from '../thread_tree/thread_tree.vue'
import { WSConnectionStatus } from '../../services/api/api.service.js'
import { mapGetters, mapState } from 'vuex'
import { library } from '@fortawesome/fontawesome-svg-core' import { library } from '@fortawesome/fontawesome-svg-core'
import { import {
@ -77,6 +79,9 @@ const conversation = {
const maxDepth = this.$store.getters.mergedConfig.maxDepthInThread - 2 const maxDepth = this.$store.getters.mergedConfig.maxDepthInThread - 2
return maxDepth >= 1 ? maxDepth : 1 return maxDepth >= 1 ? maxDepth : 1
}, },
streamingEnabled () {
return this.mergedConfig.useStreamingApi && this.mastoUserSocketStatus === WSConnectionStatus.JOINED
},
displayStyle () { displayStyle () {
return this.$store.getters.mergedConfig.conversationDisplay return this.$store.getters.mergedConfig.conversationDisplay
}, },
@ -339,7 +344,11 @@ const conversation = {
}, },
maybeHighlight () { maybeHighlight () {
return this.isExpanded ? this.highlight : null return this.isExpanded ? this.highlight : null
} },
...mapGetters(['mergedConfig']),
...mapState({
mastoUserSocketStatus: state => state.api.mastoUserSocketStatus
})
}, },
components: { components: {
Status, Status,
@ -395,6 +404,11 @@ const conversation = {
setHighlight (id) { setHighlight (id) {
if (!id) return if (!id) return
this.highlight = id this.highlight = id
if (!this.streamingEnabled) {
this.$store.dispatch('fetchStatus', id)
}
this.$store.dispatch('fetchFavsAndRepeats', id) this.$store.dispatch('fetchFavsAndRepeats', id)
this.$store.dispatch('fetchEmojiReactionsBy', id) this.$store.dispatch('fetchEmojiReactionsBy', id)
}, },

View file

@ -104,8 +104,8 @@
class="nav-items right" class="nav-items right"
> >
<router-link <router-link
class="nav-icon"
v-if="currentUser" v-if="currentUser"
class="nav-icon"
:to="{ name: 'interactions', params: { username: currentUser.screen_name } }" :to="{ name: 'interactions', params: { username: currentUser.screen_name } }"
> >
<FAIcon <FAIcon

View file

@ -54,6 +54,7 @@
z-index: 2001; z-index: 2001;
cursor: default; cursor: default;
display: block; display: block;
width: max-content;
background-color: $fallback--bg; background-color: $fallback--bg;
background-color: var(--bg, $fallback--bg); background-color: var(--bg, $fallback--bg);

View file

@ -0,0 +1,75 @@
import PostStatusForm from '../post_status_form/post_status_form.vue'
import Modal from '../modal/modal.vue'
import statusPosterService from '../../services/status_poster/status_poster.service.js'
import get from 'lodash/get'
const EditStatusModal = {
components: {
PostStatusForm,
Modal
},
data () {
return {
resettingForm: false
}
},
computed: {
isLoggedIn () {
return !!this.$store.state.users.currentUser
},
modalActivated () {
return this.$store.state.editStatus.modalActivated
},
isFormVisible () {
return this.isLoggedIn && !this.resettingForm && this.modalActivated
},
params () {
return this.$store.state.editStatus.params || {}
}
},
watch: {
params (newVal, oldVal) {
if (get(newVal, 'statusId') !== get(oldVal, 'statusId')) {
this.resettingForm = true
this.$nextTick(() => {
this.resettingForm = false
})
}
},
isFormVisible (val) {
if (val) {
this.$nextTick(() => this.$el && this.$el.querySelector('textarea').focus())
}
}
},
methods: {
doEditStatus ({ status, spoilerText, sensitive, media, contentType, poll }) {
const params = {
store: this.$store,
statusId: this.$store.state.editStatus.params.statusId,
status,
spoilerText,
sensitive,
poll,
media,
contentType
}
return statusPosterService.editStatus(params)
.then((data) => {
return data
})
.catch((err) => {
console.error('Error editing status', err)
return {
error: err.message
}
})
},
closeModal () {
this.$store.dispatch('closeEditStatusModal')
}
}
}
export default EditStatusModal

View file

@ -0,0 +1,48 @@
<template>
<Modal
v-if="isFormVisible"
class="edit-form-modal-view"
@backdropClicked="closeModal"
>
<div class="edit-form-modal-panel panel">
<div class="panel-heading">
{{ $t('post_status.edit_status') }}
</div>
<PostStatusForm
class="panel-body"
v-bind="params"
@posted="closeModal"
:disablePolls="true"
:disableVisibilitySelector="true"
:post-handler="doEditStatus"
/>
</div>
</Modal>
</template>
<script src="./edit_status_modal.js"></script>
<style lang="scss">
.modal-view.edit-form-modal-view {
align-items: flex-start;
}
.edit-form-modal-panel {
flex-shrink: 0;
margin-top: 25%;
margin-bottom: 2em;
width: 100%;
max-width: 700px;
@media (orientation: landscape) {
margin-top: 8%;
}
.form-bottom-left {
max-width: 6.5em;
.emoji-icon {
justify-content: right;
}
}
}
</style>

View file

@ -46,14 +46,6 @@ const EmojiReactions = {
reactedWith (emoji) { reactedWith (emoji) {
return this.status.emoji_reactions.find(r => r.name === emoji).me return this.status.emoji_reactions.find(r => r.name === emoji).me
}, },
isLocalReaction (emojiUrl) {
if (!emojiUrl) return true
const reacted = this.accountsForEmoji[emojiUrl]
if (reacted.length === 0) {
return true
}
return reacted[0].is_local
},
fetchEmojiReactionsByIfMissing () { fetchEmojiReactionsByIfMissing () {
const hasNoAccounts = this.status.emoji_reactions.find(r => !r.accounts) const hasNoAccounts = this.status.emoji_reactions.find(r => !r.accounts)
if (hasNoAccounts) { if (hasNoAccounts) {

View file

@ -8,7 +8,6 @@
<button <button
class="emoji-reaction btn button-default" class="emoji-reaction btn button-default"
:class="{ 'picked-reaction': reactedWith(reaction.name), 'not-clickable': !loggedIn }" :class="{ 'picked-reaction': reactedWith(reaction.name), 'not-clickable': !loggedIn }"
:disabled="!isLocalReaction(reaction.url)"
@click="emojiOnClick(reaction.name, $event)" @click="emojiOnClick(reaction.name, $event)"
@mouseenter="fetchEmojiReactionsByIfMissing()" @mouseenter="fetchEmojiReactionsByIfMissing()"
> >

View file

@ -7,7 +7,8 @@ import {
faEyeSlash, faEyeSlash,
faThumbtack, faThumbtack,
faShareAlt, faShareAlt,
faExternalLinkAlt faExternalLinkAlt,
faHistory
} from '@fortawesome/free-solid-svg-icons' } from '@fortawesome/free-solid-svg-icons'
import { import {
faBookmark as faBookmarkReg, faBookmark as faBookmarkReg,
@ -22,7 +23,8 @@ library.add(
faThumbtack, faThumbtack,
faShareAlt, faShareAlt,
faExternalLinkAlt, faExternalLinkAlt,
faFlag faFlag,
faHistory
) )
const ExtraButtons = { const ExtraButtons = {
@ -55,6 +57,15 @@ const ExtraButtons = {
hideDeleteStatusConfirmDialog () { hideDeleteStatusConfirmDialog () {
this.showingDeleteDialog = false this.showingDeleteDialog = false
}, },
translateStatus () {
if (this.noTranslationTargetSet) {
this.$store.dispatch('pushGlobalNotice', { messageKey: 'toast.no_translation_target_set', level: 'info' })
}
const translateTo = this.$store.getters.mergedConfig.translationLanguage || this.$store.state.instance.interfaceLanguage
this.$store.dispatch('translateStatus', { id: this.status.id, language: translateTo })
.then(() => this.$emit('onSuccess'))
.catch(err => this.$emit('onError', err.error.error))
},
pinStatus () { pinStatus () {
this.$store.dispatch('pinStatus', this.status.id) this.$store.dispatch('pinStatus', this.status.id)
.then(() => this.$emit('onSuccess')) .then(() => this.$emit('onSuccess'))
@ -92,6 +103,25 @@ const ExtraButtons = {
}, },
reportStatus () { reportStatus () {
this.$store.dispatch('openUserReportingModal', { userId: this.status.user.id, statusIds: [this.status.id] }) this.$store.dispatch('openUserReportingModal', { userId: this.status.user.id, statusIds: [this.status.id] })
},
editStatus () {
this.$store.dispatch('fetchStatusSource', { id: this.status.id })
.then(data => this.$store.dispatch('openEditStatusModal', {
statusId: this.status.id,
subject: data.spoiler_text,
statusText: data.text,
statusIsSensitive: this.status.nsfw,
statusPoll: this.status.poll,
statusFiles: [...this.status.attachments],
visibility: this.status.visibility,
statusContentType: data.content_type
}))
},
showStatusHistory () {
const originalStatus = { ...this.status }
const stripFieldsList = ['attachments', 'created_at', 'emojis', 'text', 'raw_html', 'nsfw', 'poll', 'summary', 'summary_raw_html']
stripFieldsList.forEach(p => delete originalStatus[p])
this.$store.dispatch('openStatusHistoryModal', originalStatus)
} }
}, },
computed: { computed: {
@ -110,12 +140,26 @@ const ExtraButtons = {
canMute () { canMute () {
return !!this.currentUser return !!this.currentUser
}, },
canTranslate () {
return this.$store.state.instance.translationEnabled === true
},
noTranslationTargetSet () {
return this.$store.getters.mergedConfig.translationLanguage === undefined
},
statusLink () { statusLink () {
return `${this.$store.state.instance.server}${this.$router.resolve({ name: 'conversation', params: { id: this.status.id } }).href}` if (this.status.is_local) {
return `${this.$store.state.instance.server}${this.$router.resolve({ name: 'conversation', params: { id: this.status.id } }).href}`
} else {
return this.status.external_url
}
}, },
shouldConfirmDelete () { shouldConfirmDelete () {
return this.$store.getters.mergedConfig.modalOnDelete return this.$store.getters.mergedConfig.modalOnDelete
} },
isEdited () {
return this.status.edited_at !== null
},
editingAvailable () { return this.$store.state.instance.editingAvailable }
} }
} }

View file

@ -73,6 +73,28 @@
icon="bookmark" icon="bookmark"
/><span>{{ $t("status.unbookmark") }}</span> /><span>{{ $t("status.unbookmark") }}</span>
</button> </button>
<button
v-if="ownStatus && editingAvailable"
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="editStatus"
@click="close"
>
<FAIcon
fixed-width
icon="pen"
/><span>{{ $t("status.edit") }}</span>
</button>
<button
v-if="isEdited && editingAvailable"
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="showStatusHistory"
@click="close"
>
<FAIcon
fixed-width
icon="history"
/><span>{{ $t("status.edit_history") }}</span>
</button>
<button <button
v-if="canDelete" v-if="canDelete"
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
@ -116,6 +138,27 @@
:icon="['far', 'flag']" :icon="['far', 'flag']"
/><span>{{ $t("user_card.report") }}</span> /><span>{{ $t("user_card.report") }}</span>
</button> </button>
<button
v-if="canTranslate"
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="translateStatus"
@click="close"
>
<FAIcon
fixed-width
icon="globe"
/><span>{{ $t("status.translate") }}</span>
<template v-if="noTranslationTargetSet">
<span class="dropdown-item-icon__badge warning">
<FAIcon
fixed-width
icon="exclamation-triangle"
name="test"
/>
</span>
</template>
</button>
</div> </div>
</template> </template>
<template v-slot:trigger> <template v-slot:trigger>

View file

@ -1,6 +1,10 @@
<template> <template>
<div> <div>
<FAIcon icon="globe" /> {{ ' ' }} <FAIcon
v-if="globeIcon"
icon="globe"
/>
{{ ' ' }}
<label for="interface-language-switcher"> <label for="interface-language-switcher">
{{ promptText }} {{ promptText }}
</label> </label>
@ -40,6 +44,10 @@ export default {
setLanguage: { setLanguage: {
type: Function, type: Function,
required: true required: true
},
globeIcon: {
type: Boolean,
default: true
} }
}, },
computed: { computed: {

View file

@ -1,6 +1,6 @@
<template> <template>
<div <div
v-if="federationPolicy" v-if="hasInstanceSpecificPolicies"
class="mrf-transparency-panel" class="mrf-transparency-panel"
> >
<div class="panel panel-default base01-background"> <div class="panel panel-default base01-background">

View file

@ -55,6 +55,14 @@ const pxStringToNumber = (str) => {
const PostStatusForm = { const PostStatusForm = {
props: [ props: [
'statusId',
'statusText',
'statusIsSensitive',
'statusPoll',
'statusFiles',
'statusMediaDescriptions',
'statusScope',
'statusContentType',
'replyTo', 'replyTo',
'quoteId', 'quoteId',
'repliedUser', 'repliedUser',
@ -63,6 +71,7 @@ const PostStatusForm = {
'subject', 'subject',
'disableSubject', 'disableSubject',
'disableScopeSelector', 'disableScopeSelector',
'disableVisibilitySelector',
'disableNotice', 'disableNotice',
'disableLockWarning', 'disableLockWarning',
'disablePolls', 'disablePolls',
@ -120,23 +129,40 @@ const PostStatusForm = {
const { postContentType: contentType, sensitiveByDefault, sensitiveIfSubject } = this.$store.getters.mergedConfig const { postContentType: contentType, sensitiveByDefault, sensitiveIfSubject } = this.$store.getters.mergedConfig
let statusParams = {
spoilerText: this.subject || '',
status: statusText,
sensitiveByDefault,
nsfw: !!sensitiveByDefault,
files: [],
poll: {},
mediaDescriptions: {},
visibility: this.suggestedVisibility(),
contentType
}
if (this.statusId) {
const statusContentType = this.statusContentType || contentType
statusParams = {
spoilerText: this.subject || '',
status: this.statusText || '',
sensitiveIfSubject,
nsfw: this.statusIsSensitive || !!sensitiveByDefault,
files: this.statusFiles || [],
poll: this.statusPoll || {},
mediaDescriptions: this.statusMediaDescriptions || {},
visibility: this.statusScope || this.suggestedVisibility(),
contentType: statusContentType
}
}
return { return {
dropFiles: [], dropFiles: [],
uploadingFiles: false, uploadingFiles: false,
error: null, error: null,
posting: false, posting: false,
highlighted: 0, highlighted: 0,
newStatus: { newStatus: statusParams,
spoilerText: this.subject || '',
status: statusText,
sensitiveIfSubject,
nsfw: !!sensitiveByDefault,
files: [],
poll: {},
mediaDescriptions: {},
visibility: this.suggestedVisibility(),
contentType
},
caret: 0, caret: 0,
pollFormVisible: false, pollFormVisible: false,
showDropIcon: 'hide', showDropIcon: 'hide',
@ -232,6 +258,9 @@ const PostStatusForm = {
uploadFileLimitReached () { uploadFileLimitReached () {
return this.newStatus.files.length >= this.fileLimit return this.newStatus.files.length >= this.fileLimit
}, },
isEdit () {
return typeof this.statusId !== 'undefined' && this.statusId.trim() !== ''
},
...mapGetters(['mergedConfig']), ...mapGetters(['mergedConfig']),
...mapState({ ...mapState({
mobileLayout: state => state.interface.mobileLayout mobileLayout: state => state.interface.mobileLayout

View file

@ -66,6 +66,13 @@
<span v-if="safeDMEnabled">{{ $t('post_status.direct_warning_to_first_only') }}</span> <span v-if="safeDMEnabled">{{ $t('post_status.direct_warning_to_first_only') }}</span>
<span v-else>{{ $t('post_status.direct_warning_to_all') }}</span> <span v-else>{{ $t('post_status.direct_warning_to_all') }}</span>
</p> </p>
<div
v-if="isEdit"
class="visibility-notice edit-warning"
>
<p>{{ $t('post_status.edit_remote_warning') }}</p>
<p>{{ $t('post_status.edit_unsupported_warning') }}</p>
</div>
<div <div
v-if="!disablePreview" v-if="!disablePreview"
class="preview-heading faint" class="preview-heading faint"
@ -180,6 +187,7 @@
class="visibility-tray" class="visibility-tray"
> >
<scope-selector <scope-selector
v-if="!disableVisibilitySelector"
:show-all="showAllScopes" :show-all="showAllScopes"
:user-default="userDefaultScope" :user-default="userDefaultScope"
:original-scope="copyMessageScope" :original-scope="copyMessageScope"
@ -420,6 +428,16 @@
align-items: baseline; align-items: baseline;
} }
.visibility-notice.edit-warning {
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
}
.media-upload-icon, .poll-icon, .emoji-icon { .media-upload-icon, .poll-icon, .emoji-icon {
font-size: 1.85em; font-size: 1.85em;
line-height: 1.1; line-height: 1.1;

View file

@ -43,6 +43,11 @@ const GeneralTab = {
value: mode, value: mode,
label: this.$t(`settings.third_column_mode_${mode}`) label: this.$t(`settings.third_column_mode_${mode}`)
})), })),
userProfileDefaultTabOptions: ['statuses', 'replies'].map(tab => ({
key: tab,
value: tab,
label: this.$t(`user_card.${tab}`)
})),
loopSilentAvailable: loopSilentAvailable:
// Firefox // Firefox
Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype, 'mozHasAudio') || Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype, 'mozHasAudio') ||
@ -50,6 +55,7 @@ const GeneralTab = {
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'webkitAudioDecodedByteCount') || Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'webkitAudioDecodedByteCount') ||
// Future spec, still not supported in Nightly 63 as of 08/2018 // Future spec, still not supported in Nightly 63 as of 08/2018
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks') Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks')
} }
}, },
components: { components: {
@ -82,11 +88,23 @@ const GeneralTab = {
this.$store.dispatch('setOption', { name: 'interfaceLanguage', value: val }) this.$store.dispatch('setOption', { name: 'interfaceLanguage', value: val })
} }
}, },
translationLanguages () {
return (this.$store.getters.mergedConfig.supportedTranslationLanguages.target || []).map(lang => ({ key: lang.code, value: lang.code, label: lang.name }))
},
translationLanguage: {
get: function () { return this.$store.getters.mergedConfig.translationLanguage },
set: function (val) {
this.$store.dispatch('setOption', { name: 'translationLanguage', value: val })
}
},
...SharedComputedObject() ...SharedComputedObject()
}, },
methods: { methods: {
changeDefaultScope (value) { changeDefaultScope (value) {
this.$store.dispatch('setServerSideOption', { name: 'defaultScope', value }) this.$store.dispatch('setServerSideOption', { name: 'defaultScope', value })
},
setTranslationLanguage (value) {
this.$store.dispatch('setOption', { name: 'translationLanguage', value })
} }
} }
} }

View file

@ -129,41 +129,7 @@
{{ $t('settings.virtual_scrolling') }} {{ $t('settings.virtual_scrolling') }}
</BooleanSetting> </BooleanSetting>
</li> </li>
<li>
<BooleanSetting path="disableStickyHeaders">
{{ $t('settings.disable_sticky_headers') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting path="showScrollbars">
{{ $t('settings.show_scrollbars') }}
</BooleanSetting>
</li>
<li>
<ChoiceSetting
v-if="user"
id="thirdColumnMode"
path="thirdColumnMode"
:options="thirdColumnModeOptions"
>
{{ $t('settings.third_column_mode') }}
</ChoiceSetting>
</li>
<li>
<BooleanSetting path="minimalScopesMode">
{{ $t('settings.minimal_scopes_mode') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting path="sensitiveByDefault">
{{ $t('settings.sensitive_by_default') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting path="sensitiveIfSubject">
{{ $t('settings.sensitive_if_subject') }}
</BooleanSetting>
</li>
<li> <li>
<BooleanSetting path="renderMisskeyMarkdown"> <BooleanSetting path="renderMisskeyMarkdown">
{{ $t('settings.render_mfm') }} {{ $t('settings.render_mfm') }}
@ -181,6 +147,25 @@
</li> </li>
</ul> </ul>
</li> </li>
<li>
<ChoiceSetting
id="userProfileDefaultTab"
path="userProfileDefaultTab"
:options="userProfileDefaultTabOptions"
>
{{ $t('settings.user_profile_default_tab') }}
</ChoiceSetting>
</li>
<li>
<ChoiceSetting
v-if="user && (translationLanguages.length > 0)"
id="translationLanguage"
path="translationLanguage"
:options="translationLanguages"
>
{{ $t('settings.translation_language') }}
</ChoiceSetting>
</li>
<li> <li>
<BooleanSetting <BooleanSetting
path="alwaysShowNewPostButton" path="alwaysShowNewPostButton"
@ -502,12 +487,22 @@
/> />
</label> </label>
</li> </li>
<li>
<BooleanSetting path="minimalScopesMode">
{{ $t('settings.minimal_scopes_mode') }}
</BooleanSetting>
</li>
<li> <li>
<!-- <BooleanSetting path="serverSide_defaultNSFW"> --> <!-- <BooleanSetting path="serverSide_defaultNSFW"> -->
<BooleanSetting path="sensitiveByDefault"> <BooleanSetting path="sensitiveByDefault">
{{ $t('settings.sensitive_by_default') }} {{ $t('settings.sensitive_by_default') }}
</BooleanSetting> </BooleanSetting>
</li> </li>
<li>
<BooleanSetting path="sensitiveIfSubject">
{{ $t('settings.sensitive_if_subject') }}
</BooleanSetting>
</li>
<li> <li>
<BooleanSetting <BooleanSetting
path="scopeCopy" path="scopeCopy"

View file

@ -437,6 +437,12 @@ const Status = {
}, },
visibilityLocalized () { visibilityLocalized () {
return this.$i18n.t('general.scope_in_timeline.' + this.status.visibility) return this.$i18n.t('general.scope_in_timeline.' + this.status.visibility)
},
isEdited () {
return this.status.edited_at !== null
},
editingAvailable () {
return this.$store.state.instance.editingAvailable
} }
}, },
methods: { methods: {

View file

@ -160,7 +160,8 @@
margin-right: 0.2em; margin-right: 0.2em;
} }
& .heading-reply-row { & .heading-reply-row,
& .heading-edited-row {
position: relative; position: relative;
align-content: baseline; align-content: baseline;
font-size: 0.85em; font-size: 0.85em;

View file

@ -329,6 +329,24 @@
class="mentions-line" class="mentions-line"
/> />
</div> </div>
<div
v-if="isEdited && editingAvailable && !isPreview"
class="heading-edited-row"
>
<i18n-t
keypath="status.edited_at"
tag="span"
>
<template #time>
<Timeago
:time="status.edited_at"
:auto-update="60"
:long-format="true"
:with-direction="true"
/>
</template>
</i18n-t>
</div>
</div> </div>
<StatusContent <StatusContent

View file

@ -9,6 +9,7 @@ import {
faLink, faLink,
faPollH faPollH
} from '@fortawesome/free-solid-svg-icons' } from '@fortawesome/free-solid-svg-icons'
import Select from 'src/components/select/select.vue'
library.add( library.add(
faFile, faFile,
@ -39,7 +40,8 @@ const StatusContent = {
return { return {
postLength: this.status.text.length, postLength: this.status.text.length,
parseReadyDone: false, parseReadyDone: false,
renderMisskeyMarkdown renderMisskeyMarkdown,
translateFrom: null
} }
}, },
computed: { computed: {
@ -80,10 +82,14 @@ const StatusContent = {
attachmentTypes () { attachmentTypes () {
return this.status.attachments.map(file => fileType.fileType(file.mimetype)) return this.status.attachments.map(file => fileType.fileType(file.mimetype))
}, },
translationLanguages () {
return (this.$store.getters.mergedConfig.supportedTranslationLanguages.source || []).map(lang => ({ key: lang.code, value: lang.code, label: lang.name }))
},
...mapGetters(['mergedConfig']) ...mapGetters(['mergedConfig'])
}, },
components: { components: {
RichContent RichContent,
Select
}, },
mounted () { mounted () {
this.status.attentions && this.status.attentions.forEach(attn => { this.status.attentions && this.status.attentions.forEach(attn => {
@ -126,6 +132,10 @@ const StatusContent = {
}, },
generateTagLink (tag) { generateTagLink (tag) {
return `/tag/${tag}` return `/tag/${tag}`
},
translateStatus () {
const translateTo = this.$store.getters.mergedConfig.translationLanguage || this.$store.state.instance.interfaceLanguage
this.$store.dispatch('translateStatus', { id: this.status.id, language: translateTo, from: this.translateFrom })
} }
} }
} }

View file

@ -4,6 +4,12 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.translation {
border: 1px solid var(--accent, $fallback--link);
border-radius: var(--panelRadius, $fallback--panelRadius);
margin-top: 1em;
padding: 0.5em;
}
.emoji { .emoji {
--_still_image-label-scale: 0.5; --_still_image-label-scale: 0.5;
--emoji-size: 38px; --emoji-size: 38px;

View file

@ -56,6 +56,44 @@
:attentions="status.attentions" :attentions="status.attentions"
@parseReady="onParseReady" @parseReady="onParseReady"
/> />
<div
v-if="status.translation"
class="translation"
>
<h4>{{ $t(`languages.translated_from.${status.translation.detected_language.toLowerCase()}`) }}</h4>
<RichContent
:class="{ '-single-line': singleLine }"
class="text media-body"
:html="status.translation.text"
:emoji="status.emojis"
:handle-links="true"
:mfm="renderMisskeyMarkdown && (status.media_type === 'text/x.misskeymarkdown')"
:greentext="mergedConfig.greentext"
:attentions="status.attentions"
@parseReady="onParseReady"
/>
<div>
<label class="label">{{ $t('status.override_translation_source_language') }}</label>
{{ ' ' }}
<Select
id="source-language-switcher"
v-model="translateFrom"
class="preset-switcher"
>
<option
v-for="language in translationLanguages"
:key="language.key"
:value="language.value"
>
{{ $t(`languages.${language.value.toLowerCase()}`) }}
</option>
</Select>
{{ ' ' }}
<button @click="translateStatus" class="btn button-default">
{{ $t('status.translate') }}
</button>
</div>
</div>
</div> </div>
<button <button
v-show="hideSubjectStatus" v-show="hideSubjectStatus"

View file

@ -0,0 +1,60 @@
import { get } from 'lodash'
import Modal from '../modal/modal.vue'
import Status from '../status/status.vue'
const StatusHistoryModal = {
components: {
Modal,
Status
},
data () {
return {
statuses: []
}
},
computed: {
modalActivated () {
return this.$store.state.statusHistory.modalActivated
},
params () {
return this.$store.state.statusHistory.params
},
statusId () {
return this.params.id
},
historyCount () {
return this.statuses.length
},
history () {
return this.statuses
}
},
watch: {
params (newVal, oldVal) {
const newStatusId = get(newVal, 'id') !== get(oldVal, 'id')
if (newStatusId) {
this.resetHistory()
}
if (newStatusId || get(newVal, 'edited_at') !== get(oldVal, 'edited_at')) {
this.fetchStatusHistory()
}
}
},
methods: {
resetHistory () {
this.statuses = []
},
fetchStatusHistory () {
this.$store.dispatch('fetchStatusHistory', this.params)
.then(data => {
this.statuses = data
})
},
closeModal () {
this.$store.dispatch('closeStatusHistoryModal')
}
}
}
export default StatusHistoryModal

View file

@ -0,0 +1,46 @@
<template>
<Modal
v-if="modalActivated"
class="status-history-modal-view"
@backdropClicked="closeModal"
>
<div class="status-history-modal-panel panel">
<div class="panel-heading">
{{ $tc('status.edit_history_modal_title', historyCount - 1, { historyCount: historyCount - 1 }) }}
</div>
<div class="panel-body">
<div
v-if="historyCount > 0"
class="history-body"
>
<status
v-for="status in history"
:key="status.id"
:statusoid="status"
:isPreview="true"
class="conversation-status status-fadein panel-body"
/>
</div>
</div>
</div>
</Modal>
</template>
<script src="./status_history_modal.js"></script>
<style lang="scss">
.modal-view.status-history-modal-view {
align-items: flex-start;
}
.status-history-modal-panel {
flex-shrink: 0;
margin-top: 25%;
margin-bottom: 2em;
width: 100%;
max-width: 700px;
@media (orientation: landscape) {
margin-top: 8%;
}
}
</style>

View file

@ -150,6 +150,9 @@ const Timeline = {
this.$store.commit('showNewStatuses', { timeline: this.timelineName }) this.$store.commit('showNewStatuses', { timeline: this.timelineName })
this.paused = false this.paused = false
} }
if (!this.inProfile) {
window.scrollTo({ top: 0 })
}
}, },
fetchOlderStatuses: throttle(function () { fetchOlderStatuses: throttle(function () {
const store = this.$store const store = this.$store

View file

@ -33,23 +33,23 @@ const FriendList = withLoadMore({
additionalPropNames: ['userId'] additionalPropNames: ['userId']
})(List) })(List)
const defaultTabKey = 'statuses'
const UserProfile = { const UserProfile = {
data () { data () {
return { return {
error: false, error: false,
userId: null, userId: null,
tab: defaultTabKey, tab: 'statuses',
footerRef: null, footerRef: null,
note: null, note: null,
noteLoading: false noteLoading: false
} }
}, },
created () { created () {
const defaultTabKey = this.defaultTabKey
const routeParams = this.$route.params const routeParams = this.$route.params
const hash = (get(this.$route, 'hash') || defaultTabKey).replace(/^#/, '')
if (hash !== '') this.tab = hash
this.load(routeParams.name || routeParams.id) this.load(routeParams.name || routeParams.id)
this.tab = get(this.$route, 'query.hash', defaultTabKey).replace(/^#/, '')
}, },
unmounted () { unmounted () {
this.stopFetching() this.stopFetching()
@ -58,6 +58,9 @@ const UserProfile = {
timeline () { timeline () {
return this.$store.state.statuses.timelines.user return this.$store.state.statuses.timelines.user
}, },
replies () {
return this.$store.state.statuses.timelines.replies
},
favorites () { favorites () {
return this.$store.state.statuses.timelines.favorites return this.$store.state.statuses.timelines.favorites
}, },
@ -82,28 +85,39 @@ const UserProfile = {
}, },
currentUser () { currentUser () {
return this.$store.state.users.currentUser return this.$store.state.users.currentUser
},
defaultTabKey () {
return this.$store.getters.mergedConfig.userProfileDefaultTab || 'statuses'
} }
}, },
methods: { methods: {
setFooterRef (el) { setFooterRef (el) {
this.footerRef = el this.footerRef = el
}, },
load (userNameOrId) { onRouteChange (previousTab, nextTab) {
const startFetchingTimeline = (timeline, userId) => { const timelineTabMap = {
// Clear timeline only if load another user's profile statuses: 'user',
if (userId !== this.$store.state.statuses.timelines[timeline].userId) { replies: 'replies',
this.$store.commit('clearTimeline', { timeline }) media: 'media'
}
this.$store.dispatch('startFetchingTimeline', { timeline, userId })
} }
// only we can see our own favourites
if (this.isUs) timelineTabMap['favorites'] = 'favorites'
const timeline = timelineTabMap[nextTab]
if (timeline) {
this.stopFetching()
this.$store.dispatch('startFetchingTimeline', { timeline: timeline, userId: this.userId })
}
},
load (userNameOrId) {
const loadById = (userId) => { const loadById = (userId) => {
this.userId = userId this.userId = userId
startFetchingTimeline('user', userId) const timelines = ['user', 'favorites', 'replies', 'media']
startFetchingTimeline('media', userId) timelines.forEach((timeline) => {
if (this.isUs) { this.$store.commit('clearTimeline', { timeline: timeline })
startFetchingTimeline('favorites', userId) })
} this.onRouteChange(null, this.tab)
// Fetch all pinned statuses immediately // Fetch all pinned statuses immediately
this.$store.dispatch('fetchPinnedStatuses', userId) this.$store.dispatch('fetchPinnedStatuses', userId)
} }
@ -137,6 +151,7 @@ const UserProfile = {
}, },
stopFetching () { stopFetching () {
this.$store.dispatch('stopFetchingTimeline', 'user') this.$store.dispatch('stopFetchingTimeline', 'user')
this.$store.dispatch('stopFetchingTimeline', 'replies')
this.$store.dispatch('stopFetchingTimeline', 'favorites') this.$store.dispatch('stopFetchingTimeline', 'favorites')
this.$store.dispatch('stopFetchingTimeline', 'media') this.$store.dispatch('stopFetchingTimeline', 'media')
}, },
@ -177,7 +192,9 @@ const UserProfile = {
} }
}, },
'$route.hash': function (newVal) { '$route.hash': function (newVal) {
this.tab = newVal.replace(/^#/, '') || defaultTabKey const oldTab = this.tab
this.tab = newVal.replace(/^#/, '') || this.defaultTabKey
this.onRouteChange(oldTab, this.tab)
} }
}, },
components: { components: {

View file

@ -79,6 +79,18 @@
:in-profile="true" :in-profile="true"
:footer-slipgate="footerRef" :footer-slipgate="footerRef"
/> />
<Timeline
key="replies"
:label="$t('user_card.replies')"
:count="user.statuses_count"
:embedded="true"
:title="$t('user_card.replies')"
:timeline="replies"
timeline-name="replies"
:user-id="userId"
:in-profile="true"
:footer-slipgate="footerRef"
/>
<div <div
v-if="followsTabVisible" v-if="followsTabVisible"
key="followees" key="followees"
@ -109,7 +121,6 @@
<Timeline <Timeline
key="media" key="media"
:label="$t('user_card.media')" :label="$t('user_card.media')"
:disabled="!media.visibleStatuses.length"
:embedded="true" :embedded="true"
:title="$t('user_card.media')" :title="$t('user_card.media')"
timeline-name="media" timeline-name="media"
@ -122,7 +133,7 @@
v-if="isUs" v-if="isUs"
key="favorites" key="favorites"
:label="$t('user_card.favorites')" :label="$t('user_card.favorites')"
:disabled="!favorites.visibleStatuses.length" :disabled="!isUs"
:embedded="true" :embedded="true"
:title="$t('user_card.favorites')" :title="$t('user_card.favorites')"
timeline-name="favorites" timeline-name="favorites"

View file

@ -98,7 +98,6 @@
"features_panel": { "features_panel": {
"media_proxy": "Proxy per multimèdia", "media_proxy": "Proxy per multimèdia",
"scope_options": "Opcions d'abast", "scope_options": "Opcions d'abast",
"shout": "Altaveu",
"text_limit": "Límit de text", "text_limit": "Límit de text",
"title": "Funcionalitats", "title": "Funcionalitats",
"upload_limit": "Límit de càrrega", "upload_limit": "Límit de càrrega",

View file

@ -98,7 +98,6 @@
"features_panel": { "features_panel": {
"media_proxy": "Media proxy", "media_proxy": "Media proxy",
"scope_options": "Scope options", "scope_options": "Scope options",
"shout": "Shoutbox",
"text_limit": "Text limit", "text_limit": "Text limit",
"title": "Features", "title": "Features",
"upload_limit": "Upload limit", "upload_limit": "Upload limit",
@ -165,6 +164,74 @@
"load_older": "Load older interactions", "load_older": "Load older interactions",
"moves": "User migrates" "moves": "User migrates"
}, },
"languages": {
"bg": "Bulgarian",
"en": "English",
"ar": "Arabic",
"az": "Azerbaijani",
"zh": "Chinese",
"cs": "Czech",
"da": "Danish",
"nl": "Dutch",
"eo": "Esperanto",
"fi": "Finnish",
"fr": "French",
"de": "German",
"el": "Greek",
"he": "Hebrew",
"hi": "Hindi",
"hu": "Hungarian",
"id": "Indonesian",
"ga": "Irish",
"it": "Italian",
"ja": "Japanese",
"ko": "Korean",
"fa": "Persian",
"pl": "Polish",
"pt": "Portuguese",
"ru": "Russian",
"sk": "Slovak",
"es": "Spanish",
"sv": "Swedish",
"tr": "Turkish",
"uk": "Ukrainian",
"lt": "Lithuanian",
"lv": "Latvian",
"translated_from": {
"bg": "Translated from @:languages.bg",
"en": "Translated from @:languages.en",
"ar": "Translated from @:languages.ar",
"az": "Translated from @:languages.az",
"zh": "Translated from @:languages.zh",
"cs": "Translated from @:languages.cs",
"da": "Translated from @:languages.da",
"nl": "Translated from @:languages.nl",
"eo": "Translated from @:languages.eo",
"fi": "Translated from @:languages.fi",
"fr": "Translated from @:languages.fr",
"de": "Translated from @:languages.de",
"el": "Translated from @:languages.el",
"he": "Translated from @:languages.he",
"hi": "Translated from @:languages.hi",
"hu": "Translated from @:languages.hu",
"id": "Translated from @:languages.id",
"ga": "Translated from @:languages.ga",
"it": "Translated from @:languages.it",
"ja": "Translated from @:languages.ja",
"ko": "Translated from @:languages.ko",
"fa": "Translated from @:languages.fa",
"pl": "Translated from @:languages.pl",
"pt": "Translated from @:languages.pt",
"ru": "Translated from @:languages.ru",
"sk": "Translated from @:languages.sk",
"es": "Translated from @:languages.es",
"sv": "Translated from @:languages.sv",
"tr": "Translated from @:languages.tr",
"uk": "Translated from @:languages.uk",
"lt": "Translated from @:languages.lt",
"lv": "Translated from @:languages.lv"
}
},
"lists": { "lists": {
"create": "Create", "create": "Create",
"delete": "Delete list", "delete": "Delete list",
@ -280,10 +347,13 @@
"text/plain": "Plain text", "text/plain": "Plain text",
"text/x.misskeymarkdown": "MFM" "text/x.misskeymarkdown": "MFM"
}, },
"content_warning": "Subject (optional)", "content_warning": "Content Warning (optional)",
"default": "Just arrived at Luna Nova Academy", "default": "Just arrived at Luna Nova Academy",
"direct_warning_to_all": "This post will be visible to all the mentioned users.", "direct_warning_to_all": "This post will be visible to all the mentioned users.",
"direct_warning_to_first_only": "This post will only be visible to the mentioned users at the beginning of the message.", "direct_warning_to_first_only": "This post will only be visible to the mentioned users at the beginning of the message.",
"edit_remote_warning": "Changes made to the post may not be visible on some instances!",
"edit_status": "Edit Status",
"edit_unsupported_warning": "Polls and mentions will not be changed by editing.",
"empty_status_error": "Can't send a post with no content and no files", "empty_status_error": "Can't send a post with no content and no files",
"media_description": "Media description", "media_description": "Media description",
"media_description_error": "Failed to update media, try again", "media_description_error": "Failed to update media, try again",
@ -314,7 +384,7 @@
"email": "Email", "email": "Email",
"email_language": "In which language do you want to receive emails from the server?", "email_language": "In which language do you want to receive emails from the server?",
"fullname": "Display name", "fullname": "Display name",
"fullname_placeholder": "e.g. Lain Iwakura", "fullname_placeholder": "e.g. Atsuko Kagari",
"new_captcha": "Click the image to get a new captcha", "new_captcha": "Click the image to get a new captcha",
"password_confirm": "Password confirmation", "password_confirm": "Password confirmation",
"reason": "Reason to register", "reason": "Reason to register",
@ -322,7 +392,7 @@
"register": "Register", "register": "Register",
"registration": "Registration", "registration": "Registration",
"token": "Invite token", "token": "Invite token",
"username_placeholder": "e.g. lain", "username_placeholder": "e.g. akko",
"validations": { "validations": {
"email_required": "cannot be left blank", "email_required": "cannot be left blank",
"fullname_required": "cannot be left blank", "fullname_required": "cannot be left blank",
@ -393,19 +463,19 @@
"changed_password": "Password changed successfully!", "changed_password": "Password changed successfully!",
"chatMessageRadius": "Chat message", "chatMessageRadius": "Chat message",
"checkboxRadius": "Checkboxes", "checkboxRadius": "Checkboxes",
"collapse_subject": "Collapse posts with subjects", "collapse_subject": "Collapse posts with content warnings",
"columns": "Columns", "columns": "Columns",
"composing": "Composing", "composing": "Composing",
"confirmation_dialogs": "Confirmation options",
"confirm_dialogs": "Require confirmation for:", "confirm_dialogs": "Require confirmation for:",
"confirm_dialogs_approve_follow": "Accepting a follow request",
"confirm_dialogs_block": "Blocking someone",
"confirm_dialogs_delete": "Deleting a post",
"confirm_dialogs_deny_follow": "Rejecting a follow request",
"confirm_dialogs_mute": "Muting someone",
"confirm_dialogs_repeat": "Repeating a post", "confirm_dialogs_repeat": "Repeating a post",
"confirm_dialogs_unfollow": "Unfollowing someone", "confirm_dialogs_unfollow": "Unfollowing someone",
"confirm_dialogs_block": "Blocking someone",
"confirm_dialogs_mute": "Muting someone",
"confirm_dialogs_delete": "Deleting a post",
"confirm_dialogs_approve_follow": "Accepting a follow request",
"confirm_dialogs_deny_follow": "Rejecting a follow request",
"confirm_new_password": "Confirm new password", "confirm_new_password": "Confirm new password",
"confirmation_dialogs": "Confirmation options",
"conversation_display": "Conversation display style", "conversation_display": "Conversation display style",
"conversation_display_linear": "Linear-style", "conversation_display_linear": "Linear-style",
"conversation_display_tree": "Tree-style", "conversation_display_tree": "Tree-style",
@ -437,8 +507,8 @@
"backup_settings_theme": "Backup settings and theme to file", "backup_settings_theme": "Backup settings and theme to file",
"errors": { "errors": {
"file_slightly_new": "File minor version is different, some settings might not load", "file_slightly_new": "File minor version is different, some settings might not load",
"file_too_new": "Incompatile major version: {fileMajor}, this PleromaFE (settings ver {feMajor}) is too old to handle it", "file_too_new": "Incompatible major version: {fileMajor}, this PleromaFE (settings ver {feMajor}) is too old to handle it",
"file_too_old": "Incompatile major version: {fileMajor}, file version is too old and not supported (min. set. ver. {feMajor})", "file_too_old": "Incompatible major version: {fileMajor}, file version is too old and not supported (min. set. ver. {feMajor})",
"invalid_file": "The selected file is not a supported Pleroma settings backup. No changes were made." "invalid_file": "The selected file is not a supported Pleroma settings backup. No changes were made."
}, },
"restore_settings": "Restore settings from file" "restore_settings": "Restore settings from file"
@ -531,7 +601,7 @@
"more_settings": "More settings", "more_settings": "More settings",
"move_account": "Move account", "move_account": "Move account",
"move_account_error": "Error moving account: {error}", "move_account_error": "Error moving account: {error}",
"move_account_notes": "If you want to move the account somewhere else, you must go to your target account and add an alias pointing here.", "move_account_notes": "If you want to move this account somewhere else, you must go to your target account and add an alias pointing here.",
"move_account_target": "Target account (e.g. {example})", "move_account_target": "Target account (e.g. {example})",
"moved_account": "Account is moved.", "moved_account": "Account is moved.",
"mute_bot_posts": "Mute bot posts", "mute_bot_posts": "Mute bot posts",
@ -615,7 +685,7 @@
"security": "Security", "security": "Security",
"security_tab": "Security", "security_tab": "Security",
"sensitive_by_default": "Mark posts as sensitive by default", "sensitive_by_default": "Mark posts as sensitive by default",
"sensitive_if_subject": "Automatically mark images as sensitive if a subject line is specified", "sensitive_if_subject": "Automatically mark images as sensitive if a content warning is specified",
"set_new_avatar": "Set new avatar", "set_new_avatar": "Set new avatar",
"set_new_mascot": "Set new mascot", "set_new_mascot": "Set new mascot",
"set_new_profile_background": "Set new profile background", "set_new_profile_background": "Set new profile background",
@ -778,9 +848,9 @@
"use_source": "New version" "use_source": "New version"
} }
}, },
"subject_input_always_show": "Always show subject field", "subject_input_always_show": "Always show content warning field",
"subject_line_behavior": "Copy subject when replying", "subject_line_behavior": "Copy content warning when replying",
"subject_line_email": "Like email: \"re: subject\"", "subject_line_email": "Like email: \"re: warning\"",
"subject_line_mastodon": "Like mastodon: copy as is", "subject_line_mastodon": "Like mastodon: copy as is",
"subject_line_noop": "Do not copy", "subject_line_noop": "Do not copy",
"text": "Text", "text": "Text",
@ -794,7 +864,8 @@
"third_column_mode_postform": "Main post form and navigation", "third_column_mode_postform": "Main post form and navigation",
"token": "Token", "token": "Token",
"tooltipRadius": "Tooltips/alerts", "tooltipRadius": "Tooltips/alerts",
"tree_advanced": "Allow more flexible navigation in tree view", "translation_language": "Automatic Translation Language",
"tree_advanced": "Display extra buttons to open and close reply chains in threads",
"tree_fade_ancestors": "Display ancestors of the current post in faint text", "tree_fade_ancestors": "Display ancestors of the current post in faint text",
"type_domains_to_mute": "Search domains to mute", "type_domains_to_mute": "Search domains to mute",
"upload_a_photo": "Upload a photo", "upload_a_photo": "Upload a photo",
@ -804,6 +875,7 @@
"use_contain_fit": "Don't crop the attachment in thumbnails", "use_contain_fit": "Don't crop the attachment in thumbnails",
"use_one_click_nsfw": "Open NSFW attachments with just one click", "use_one_click_nsfw": "Open NSFW attachments with just one click",
"user_mutes": "Users", "user_mutes": "Users",
"user_profile_default_tab": "Default Tab on User Profile",
"user_profiles": "User Profiles", "user_profiles": "User Profiles",
"user_settings": "User Settings", "user_settings": "User Settings",
"valid_until": "Valid until", "valid_until": "Valid until",
@ -829,15 +901,19 @@
"copy_link": "Copy link to post", "copy_link": "Copy link to post",
"delete": "Delete post", "delete": "Delete post",
"delete_confirm": "Do you really want to delete this post?", "delete_confirm": "Do you really want to delete this post?",
"delete_confirm_title": "Confirm deletion",
"delete_confirm_accept_button": "Yes, delete it", "delete_confirm_accept_button": "Yes, delete it",
"delete_confirm_cancel_button": "No, keep it", "delete_confirm_cancel_button": "No, keep it",
"delete_confirm_title": "Confirm deletion",
"edit": "Edit",
"edit_history": "Edit History",
"edit_history_modal_title": "Edited {historyCount} time | Edited {historyCount} times",
"edited_at": "Edited {time}",
"expand": "Expand", "expand": "Expand",
"external_source": "External source", "external_source": "External source",
"favorites": "Favorites", "favorites": "Favorites",
"hide_attachment": "Hide attachment", "hide_attachment": "Hide attachment",
"hide_content": "Hide content", "hide_content": "Hide content",
"hide_full_subject": "Hide full subject", "hide_full_subject": "Hide full content warning",
"many_attachments": "Post has {number} attachment | Post has {number} attachments", "many_attachments": "Post has {number} attachment | Post has {number} attachments",
"mentions": "Mentions", "mentions": "Mentions",
"move_down": "Shift attachment right", "move_down": "Shift attachment right",
@ -845,36 +921,39 @@
"mute_conversation": "Mute conversation", "mute_conversation": "Mute conversation",
"nsfw": "NSFW", "nsfw": "NSFW",
"open_gallery": "Open gallery", "open_gallery": "Open gallery",
"override_translation_source_language": "Override source language",
"pin": "Pin on profile", "pin": "Pin on profile",
"pinned": "Pinned", "pinned": "Pinned",
"plus_more": "+{number} more", "plus_more": "+{number} more",
"remove_attachment": "Remove attachment", "remove_attachment": "Remove attachment",
"repeats": "Repeats",
"replies_list": "Replies:",
"replies_list_with_others": "Replies (+{numReplies} other): | Replies (+{numReplies} others):",
"reply_to": "Reply to",
"repeat_confirm": "Do you really want to repeat this post?", "repeat_confirm": "Do you really want to repeat this post?",
"repeat_confirm_title": "Confirm repeat",
"repeat_confirm_accept_button": "Yes, repeat it", "repeat_confirm_accept_button": "Yes, repeat it",
"repeat_confirm_cancel_button": "No, don't repeat", "repeat_confirm_cancel_button": "No, don't repeat",
"repeat_confirm_title": "Confirm repeat",
"repeats": "Repeats",
"replies_list": "Replies:",
"replies_list_with_others": "View {numReplies} more reply | View {numReplies} more replies",
"reply_to": "Reply to",
"show_all_attachments": "Show all attachments", "show_all_attachments": "Show all attachments",
"show_all_conversation": "Show full conversation ({numStatus} other post) | Show full conversation ({numStatus} other posts)", "show_all_conversation": "Show full conversation ({numStatus} other post) | Show full conversation ({numStatus} other posts)",
"show_all_conversation_with_icon": "{icon} {text}", "show_all_conversation_with_icon": "{icon} {text}",
"show_attachment_description": "Preview description (open attachment for full description)", "show_attachment_description": "Preview description (open attachment for full description)",
"show_attachment_in_modal": "Show in media modal", "show_attachment_in_modal": "Show attachment in a window",
"show_content": "Show content", "show_content": "Show content",
"show_full_subject": "Show full subject", "show_full_subject": "Show full content warning",
"show_only_conversation_under_this": "Only show replies to this post", "show_only_conversation_under_this": "Only show replies to this post",
"status_deleted": "This post was deleted", "status_deleted": "This post was deleted",
"status_unavailable": "Post unavailable", "status_unavailable": "Post unavailable",
"thread_follow": "See the remaining part of this thread ({numStatus} post in total) | See the remaining part of this thread ({numStatus} posts in total)", "thread_follow": "View {numStatus} more reply | View {numStatus} more replies",
"thread_follow_with_icon": "{icon} {text}", "thread_follow_with_icon": "{icon} {text}",
"thread_hide": "Hide this thread", "thread_hide": "Hide this thread",
"thread_muted": "Thread muted", "thread_muted": "Thread muted",
"thread_muted_and_words": ", has words:", "thread_muted_and_words": ", has words:",
"thread_show": "Show this thread", "thread_show": "Show this thread",
"thread_show_full": "Show everything under this thread ({numStatus} post in total, max depth {depth}) | Show everything under this thread ({numStatus} posts in total, max depth {depth})", "thread_show_full": "Show {numStatus} reply | Show all {numStatus} replies",
"thread_show_full_with_icon": "{icon} {text}", "thread_show_full_with_icon": "{icon} {text}",
"translate": "Translate",
"translated_from": "Translated from {language}",
"unbookmark": "Unbookmark", "unbookmark": "Unbookmark",
"unmute_conversation": "Unmute conversation", "unmute_conversation": "Unmute conversation",
"unpin": "Unpin from profile", "unpin": "Unpin from profile",
@ -917,6 +996,9 @@
"socket_reconnected": "Realtime connection established", "socket_reconnected": "Realtime connection established",
"up_to_date": "Up-to-date" "up_to_date": "Up-to-date"
}, },
"toast": {
"no_translation_target_set": "No translation target language set - this may fail. Please set a target language in your settings."
},
"tool_tip": { "tool_tip": {
"accept_follow_request": "Accept follow request", "accept_follow_request": "Accept follow request",
"add_reaction": "Add Reaction", "add_reaction": "Add Reaction",
@ -965,24 +1047,24 @@
"strip_media": "Remove media from posts" "strip_media": "Remove media from posts"
}, },
"approve": "Approve", "approve": "Approve",
"approve_confirm_title": "Approve follow request",
"approve_confirm": "Are you sure you want to let this user follow you?", "approve_confirm": "Are you sure you want to let this user follow you?",
"approve_confirm_accept_button": "Yes, accept", "approve_confirm_accept_button": "Yes, accept",
"approve_confirm_cancel_button": "No, cancel", "approve_confirm_cancel_button": "No, cancel",
"approve_confirm_title": "Approve follow request",
"block": "Block", "block": "Block",
"block_confirm": "Are you sure you want to block {user}?", "block_confirm": "Are you sure you want to block {user}?",
"block_confirm_title": "Block user",
"block_confirm_cancel_button": "No, don't block",
"block_confirm_accept_button": "Yes, block", "block_confirm_accept_button": "Yes, block",
"block_confirm_cancel_button": "No, don't block",
"block_confirm_title": "Block user",
"block_progress": "Blocking…", "block_progress": "Blocking…",
"blocked": "Blocked!", "blocked": "Blocked!",
"bot": "Bot", "bot": "Bot",
"deactivated": "Deactivated", "deactivated": "Deactivated",
"deny": "Deny", "deny": "Deny",
"deny_confirm_title": "Deny follow request",
"deny_confirm": "Are you sure you want to deny this user's follow request?", "deny_confirm": "Are you sure you want to deny this user's follow request?",
"deny_confirm_accept_button": "Yes, deny", "deny_confirm_accept_button": "Yes, deny",
"deny_confirm_cancel_button": "No, cancel", "deny_confirm_cancel_button": "No, cancel",
"deny_confirm_title": "Deny follow request",
"domain_muted": "Unblock domain", "domain_muted": "Unblock domain",
"edit_profile": "Edit profile", "edit_profile": "Edit profile",
"favorites": "Favorites", "favorites": "Favorites",
@ -1009,15 +1091,16 @@
"message": "Message", "message": "Message",
"mute": "Mute", "mute": "Mute",
"mute_confirm": "Are you sure you want to mute {user}?", "mute_confirm": "Are you sure you want to mute {user}?",
"mute_confirm_title": "Mute user",
"mute_confirm_cancel_button": "No, don't mute",
"mute_confirm_accept_button": "Yes, mute", "mute_confirm_accept_button": "Yes, mute",
"mute_confirm_cancel_button": "No, don't mute",
"mute_confirm_title": "Mute user",
"mute_domain": "Block domain", "mute_domain": "Block domain",
"mute_progress": "Muting…", "mute_progress": "Muting…",
"muted": "Muted", "muted": "Muted",
"note": "Private note", "note": "Private note",
"per_day": "per day", "per_day": "per day",
"remote_follow": "Remote follow", "remote_follow": "Remote follow",
"replies": "With Replies",
"report": "Report", "report": "Report",
"show_repeats": "Show repeats", "show_repeats": "Show repeats",
"statuses": "Posts", "statuses": "Posts",
@ -1025,9 +1108,9 @@
"unblock": "Unblock", "unblock": "Unblock",
"unblock_progress": "Unblocking…", "unblock_progress": "Unblocking…",
"unfollow_confirm": "Are you sure you want to unfollow {user}?", "unfollow_confirm": "Are you sure you want to unfollow {user}?",
"unfollow_confirm_title": "Unfollow user",
"unfollow_confirm_cancel_button": "No, don't unfollow",
"unfollow_confirm_accept_button": "Yes, unfollow", "unfollow_confirm_accept_button": "Yes, unfollow",
"unfollow_confirm_cancel_button": "No, don't unfollow",
"unfollow_confirm_title": "Unfollow user",
"unmute": "Unmute", "unmute": "Unmute",
"unmute_progress": "Unmuting…", "unmute_progress": "Unmuting…",
"unsubscribe": "Unsubscribe" "unsubscribe": "Unsubscribe"

View file

@ -98,7 +98,6 @@
"features_panel": { "features_panel": {
"media_proxy": "Proxy pièce-jointes", "media_proxy": "Proxy pièce-jointes",
"scope_options": "Options de visibilité", "scope_options": "Options de visibilité",
"shout": "Shoutbox",
"text_limit": "Limite du texte", "text_limit": "Limite du texte",
"title": "Fonctionnalités", "title": "Fonctionnalités",
"upload_limit": "Limite de téléversement", "upload_limit": "Limite de téléversement",
@ -280,10 +279,12 @@
"text/plain": "Texte brut", "text/plain": "Texte brut",
"text/x.misskeymarkdown": "Markdown (Misskey)" "text/x.misskeymarkdown": "Markdown (Misskey)"
}, },
"content_warning": "Sujet (optionnel)", "content_warning": "Avertissement (optionnel)",
"default": "Je viens d'arriver au QG de la NERV", "default": "Je viens d'arriver au QG de la NERV",
"direct_warning_to_all": "Ce message sera visible pour toutes les personnes mentionnées.", "direct_warning_to_all": "Ce message sera visible pour toutes les personnes mentionnées.",
"direct_warning_to_first_only": "Ce message sera visible uniquement pour personnes mentionnées au début du message.", "direct_warning_to_first_only": "Ce message sera visible uniquement pour personnes mentionnées au début du message.",
"edit_remote_warning": "Les modifications apportées au status pourraient ne pas être visible sur certaines instances !",
"edit_status": "Modifier le statut",
"empty_status_error": "Impossible de publier un statut vide sans pièces-jointes", "empty_status_error": "Impossible de publier un statut vide sans pièces-jointes",
"media_description": "Description de la pièce-jointe", "media_description": "Description de la pièce-jointe",
"media_description_error": "Échec de téléversement du media, essayez encore", "media_description_error": "Échec de téléversement du media, essayez encore",

View file

@ -42,6 +42,7 @@
"edit_action": "更新", "edit_action": "更新",
"end_time_display": "{time}に終わる", "end_time_display": "{time}に終わる",
"end_time_prompt": "終了時間 ", "end_time_prompt": "終了時間 ",
"inactive_message": "無効",
"mark_as_read_action": "読んだ", "mark_as_read_action": "読んだ",
"page_header": "お知らせ", "page_header": "お知らせ",
"post_action": "投稿", "post_action": "投稿",
@ -51,6 +52,7 @@
"published_time_display": "{time}に告知されました", "published_time_display": "{time}に告知されました",
"start_time_display": "{time}で始まる", "start_time_display": "{time}で始まる",
"start_time_prompt": "開始時間 ", "start_time_prompt": "開始時間 ",
"submit_edit_action": "OK",
"title": "お知らせ" "title": "お知らせ"
}, },
"chats": { "chats": {
@ -162,6 +164,14 @@
"load_older": "古いインタラクションを見る", "load_older": "古いインタラクションを見る",
"moves": "ユーザーの引っ越し" "moves": "ユーザーの引っ越し"
}, },
"languages": {
"en": "英語",
"ja": "日本語",
"zh": "中国語",
"translated_from": {
"en": "英語から翻訳しました"
}
},
"lists": { "lists": {
"create": "作成", "create": "作成",
"delete": "削除", "delete": "削除",
@ -226,7 +236,7 @@
"notifications": { "notifications": {
"broken_favorite": "投稿が見つかりません。探しています…", "broken_favorite": "投稿が見つかりません。探しています…",
"error": "通知の取得に失敗しました: {0}", "error": "通知の取得に失敗しました: {0}",
"favorited_you": "あなたの投稿がいいねされました", "favorited_you": "投稿がお気に入りに登録されました",
"follow_request": "あなたをフォローしたいです", "follow_request": "あなたをフォローしたいです",
"followed_you": "フォローされました", "followed_you": "フォローされました",
"load_older": "古い通知をみる", "load_older": "古い通知をみる",
@ -236,7 +246,7 @@
"poll_ended": "投票終了", "poll_ended": "投票終了",
"reacted_with": "{0} でリアクションしました", "reacted_with": "{0} でリアクションしました",
"read": "読んだ!", "read": "読んだ!",
"repeated_you": "あなたの投稿がリピートされました" "repeated_you": "投稿がリピートされました"
}, },
"password_reset": { "password_reset": {
"check_email": "パスワードをリセットするためのリンクが記載されたメールが届いているか確認してください。", "check_email": "パスワードをリセットするためのリンクが記載されたメールが届いているか確認してください。",
@ -259,7 +269,7 @@
"multiple_choices": "複数選択式", "multiple_choices": "複数選択式",
"not_enough_options": "相異なる選択肢が不足しています", "not_enough_options": "相異なる選択肢が不足しています",
"option": "選択肢", "option": "選択肢",
"people_voted_count": "{count} 人投票 | {count} 人投票", "people_voted_count": "{count} 人投票",
"single_choice": "択一式", "single_choice": "択一式",
"type": "投票の形式", "type": "投票の形式",
"vote": "投票", "vote": "投票",
@ -267,7 +277,7 @@
"votes_count": "{count} 票 | {count} 票" "votes_count": "{count} 票 | {count} 票"
}, },
"post_status": { "post_status": {
"account_not_locked_warning": "あなたのアカウントは {0} ではありません。あなたをフォローすれば、誰でも、フォロワー限定のステータスを読むことができます。", "account_not_locked_warning": "あなたのアカウントは {0} ではありません。あなたをフォローすれば、誰でも、フォロワー限定の投稿を読むことができます。",
"account_not_locked_warning_link": "ロックされたアカウント", "account_not_locked_warning_link": "ロックされたアカウント",
"attachments_sensitive": "ファイルをNSFWにする", "attachments_sensitive": "ファイルをNSFWにする",
"content_type": { "content_type": {
@ -277,10 +287,13 @@
"text/plain": "プレーンテキスト", "text/plain": "プレーンテキスト",
"text/x.misskeymarkdown": "MFM" "text/x.misskeymarkdown": "MFM"
}, },
"content_warning": "説明 (省略可)", "content_warning": "警告 (省略可)",
"default": "羽田空港に着きました。", "default": "ただいまルーナノヴァ魔法学校に到着しました",
"direct_warning_to_all": "この投稿は、メンションされたすべてのユーザーが、見ることができます。", "direct_warning_to_all": "この投稿は、メンションされたすべてのユーザーが、見ることができます。",
"direct_warning_to_first_only": "この投稿は、メッセージの冒頭でメンションされたユーザーだけが、見ることができます。", "direct_warning_to_first_only": "この投稿は、メッセージの冒頭でメンションされたユーザーだけが、見ることができます。",
"edit_remote_warning": "注意:リモートインスタンスには、編集した投稿が見えないかもしれません",
"edit_status": "編集",
"edit_unsupported_warning": "編集しても投票やメンションが更新されません",
"empty_status_error": "投稿内容を入力してください", "empty_status_error": "投稿内容を入力してください",
"media_description": "メディアの説明", "media_description": "メディアの説明",
"media_description_error": "メディアのアップロードに失敗しました。もう一度お試しください", "media_description_error": "メディアのアップロードに失敗しました。もう一度お試しください",
@ -346,11 +359,17 @@
}, },
"settings": { "settings": {
"accent": "アクセント", "accent": "アクセント",
"account_alias": "アカウントのエイリアス名",
"account_alias_table_head": "エイリアス名",
"account_backup": "アカウントのバックアップ", "account_backup": "アカウントのバックアップ",
"account_backup_description": "投稿やアカウント情報をダウンロードできますが、インポートすることがまだできません", "account_backup_description": "投稿やアカウント情報をダウンロードできますが、インポートすることがまだできません",
"account_backup_table_head": "バックアップ", "account_backup_table_head": "バックアップ",
"account_privacy": "プライバシー", "account_privacy": "プライバシー",
"add_alias_error": "エイリアス名を参加できませんでした:{error}",
"add_backup": "バックアップ作成", "add_backup": "バックアップ作成",
"add_backup_error": "バックアップを作成できませんでした:{error}",
"added_alias": "エイリアス名を参加しました",
"added_backup": "バックアップを作成しました",
"allow_following_move": "フォロー中のアカウントが引っ越したとき、自動フォローを許可する", "allow_following_move": "フォロー中のアカウントが引っ越したとき、自動フォローを許可する",
"always_show_post_button": "投稿ボタンを常に表示", "always_show_post_button": "投稿ボタンを常に表示",
"app_name": "アプリの名称", "app_name": "アプリの名称",
@ -362,6 +381,7 @@
"avatarRadius": "アバター", "avatarRadius": "アバター",
"avatar_size_instruction": "アバターの大きさは、150×150ピクセルか、それよりも大きくするといいです。", "avatar_size_instruction": "アバターの大きさは、150×150ピクセルか、それよりも大きくするといいです。",
"background": "バックグラウンド", "background": "バックグラウンド",
"backup_not_ready": "バックアップはまだ完成していません",
"bio": "プロフィール", "bio": "プロフィール",
"block_export": "ブロックのエクスポート", "block_export": "ブロックのエクスポート",
"block_export_button": "ブロックをCSVファイルにエクスポートする", "block_export_button": "ブロックをCSVファイルにエクスポートする",
@ -383,7 +403,7 @@
"changed_password": "パスワードが、変わりました!", "changed_password": "パスワードが、変わりました!",
"chatMessageRadius": "チャットメッセージ", "chatMessageRadius": "チャットメッセージ",
"checkboxRadius": "チェックボックス", "checkboxRadius": "チェックボックス",
"collapse_subject": "説明のある投稿をたたむ", "collapse_subject": "警告のある投稿をたたむ",
"columns": "カラム", "columns": "カラム",
"composing": "投稿", "composing": "投稿",
"confirm_dialogs": "選択しているアクションは確認必要があります", "confirm_dialogs": "選択しているアクションは確認必要があります",
@ -399,7 +419,11 @@
"conversation_display": "スレッドの表示モード", "conversation_display": "スレッドの表示モード",
"conversation_display_linear": "リニアー", "conversation_display_linear": "リニアー",
"conversation_display_tree": "ツリー", "conversation_display_tree": "ツリー",
"conversation_other_replies_button": "「別の返信」のボタンは",
"conversation_other_replies_button_below": "投稿の下",
"conversation_other_replies_button_inside": "投稿の中",
"current_avatar": "現在のアバター", "current_avatar": "現在のアバター",
"current_mascot": "現在のマスコット",
"current_password": "現在のパスワード", "current_password": "現在のパスワード",
"data_import_export_tab": "インポートとエクスポート", "data_import_export_tab": "インポートとエクスポート",
"default_vis": "デフォルトの公開範囲", "default_vis": "デフォルトの公開範囲",
@ -423,6 +447,8 @@
"backup_settings_theme": "テーマを含む設定をファイルにバックアップする", "backup_settings_theme": "テーマを含む設定をファイルにバックアップする",
"errors": { "errors": {
"file_slightly_new": "ファイルのマイナーバージョンが異なり、一部の設定が読み込まれないことがあります", "file_slightly_new": "ファイルのマイナーバージョンが異なり、一部の設定が読み込まれないことがあります",
"file_too_new": "非対応Pleroma-FE v{feMajor}は古すぎて、v{fileMajor}の設定を読み込めません",
"file_too_old": "非対応:設定ファイル v{fileMajor}は古すぎて、Pleroma-FE v{feMajor}が読み込めません",
"invalid_file": "これはPleromaの設定をバックアップしたファイルではありません。" "invalid_file": "これはPleromaの設定をバックアップしたファイルではありません。"
}, },
"restore_settings": "設定をファイルから復元する" "restore_settings": "設定をファイルから復元する"
@ -441,17 +467,23 @@
"hide_all_muted_posts": "ミュートした投稿を隠す", "hide_all_muted_posts": "ミュートした投稿を隠す",
"hide_attachments_in_convo": "スレッドのファイルを隠す", "hide_attachments_in_convo": "スレッドのファイルを隠す",
"hide_attachments_in_tl": "タイムラインのファイルを隠す", "hide_attachments_in_tl": "タイムラインのファイルを隠す",
"hide_bot_indication": "botマークを隠す",
"hide_favorites_description": "お気に入りリストを隠す",
"hide_filtered_statuses": "フィルターされた投稿を隠す", "hide_filtered_statuses": "フィルターされた投稿を隠す",
"hide_followers_count_description": "フォロワーの数を見せない", "hide_followers_count_description": "フォロワーの数を見せない",
"hide_followers_description": "フォロワーを見せない", "hide_followers_description": "フォロワーを見せない",
"hide_follows_count_description": "フォローしている人の数を見せない", "hide_follows_count_description": "フォローしている人の数を見せない",
"hide_follows_description": "フォローしている人を見せない", "hide_follows_description": "フォローしている人を見せない",
"hide_isp": "インスタンス固有パネルを隠す", "hide_isp": "インスタンス固有パネルを隠す",
"hide_list_aliases_error_action": "閉じる",
"hide_media_previews": "メディアのプレビューを隠す", "hide_media_previews": "メディアのプレビューを隠す",
"hide_muted_posts": "ミュートしているユーザーの投稿を隠す", "hide_muted_posts": "ミュートしているユーザーの投稿を隠す",
"hide_muted_threads": "ミュートしているスレを隠す", "hide_muted_threads": "ミュートしているスレを隠す",
"hide_post_stats": "投稿の統計を隠す (例: お気に入りの数)", "hide_post_stats": "投稿の統計を隠す (例: お気に入りの数)",
"hide_shoutbox": "Shoutboxを表示しない", "hide_shoutbox": "Shoutboxを表示しない",
"hide_site_favicon": "ページ上にアイコンを隠す",
"hide_site_name": "インスタンス名を隠す",
"hide_threads_with_blocked_users": "ブロックしているユーザーをメンションする投稿を隠す",
"hide_user_stats": "ユーザーの統計を隠す (例: フォロワーの数)", "hide_user_stats": "ユーザーの統計を隠す (例: フォロワーの数)",
"hide_wallpaper": "インスタンスのバックグラウンドを隠す", "hide_wallpaper": "インスタンスのバックグラウンドを隠す",
"hide_wordfiltered_statuses": "単語フィルタに一致する投稿を隠す", "hide_wordfiltered_statuses": "単語フィルタに一致する投稿を隠す",
@ -467,14 +499,22 @@
"invalid_theme_imported": "このファイルはPleromaのテーマではありません。テーマは変更されませんでした。", "invalid_theme_imported": "このファイルはPleromaのテーマではありません。テーマは変更されませんでした。",
"limited_availability": "あなたのブラウザではできません", "limited_availability": "あなたのブラウザではできません",
"links": "リンク", "links": "リンク",
"list_aliases_error": "エイリアス を読み込めませんでした:{error}",
"list_backups_error": "バクアップを読み込めませんでした:{error}",
"lock_account_description": "あなたが認めた人だけ、あなたのアカウントをフォローできる", "lock_account_description": "あなたが認めた人だけ、あなたのアカウントをフォローできる",
"loop_video": "ビデオを繰り返す", "loop_video": "ビデオを繰り返す",
"loop_video_silent_only": "音のないビデオだけ繰り返す", "loop_video_silent_only": "音のないビデオだけ繰り返す",
"mascot": "マストドンFEのマスコット",
"max_depth_in_thread": "スレッドの初期の最大レベル数",
"max_thumbnails": "投稿に含まれるサムネイルの最大数", "max_thumbnails": "投稿に含まれるサムネイルの最大数",
"mention_link_bolden_you": "メンションされたら、強調にする",
"mention_link_display": "メンションリンクの表示モード", "mention_link_display": "メンションリンクの表示モード",
"mention_link_display_full": "名前とドメイン、例: {'@'}foo{'@'}example.org", "mention_link_display_full": "名前とドメイン、例: {'@'}foo{'@'}example.org",
"mention_link_display_full_for_remote": "ローカルユーザー: 名前のみ、リモートユーザー: 名前とドメイン", "mention_link_display_full_for_remote": "ローカルユーザー: 名前のみ、リモートユーザー: 名前とドメイン",
"mention_link_display_short": "名前のみ、例:{'@'}foo", "mention_link_display_short": "名前のみ、例:{'@'}foo",
"mention_link_fade_domain": "ドメインを色あせる",
"mention_link_show_avatar": "メンションの側にアバターを表示",
"mention_link_show_tooltip": "リモートユーザに名前とドメインのツールチップを付ける",
"mention_links": "メンションリンク", "mention_links": "メンションリンク",
"mfa": { "mfa": {
"authentication_methods": "認証方法", "authentication_methods": "認証方法",
@ -499,6 +539,12 @@
}, },
"minimal_scopes_mode": "公開範囲選択オプションを最小にする", "minimal_scopes_mode": "公開範囲選択オプションを最小にする",
"more_settings": "その他の設定", "more_settings": "その他の設定",
"move_account": "アカウントの引っ越し",
"move_account_error": "引っ越しできませんでした:{error}",
"move_account_notes": "アカウントを引っ越ししたいなら、先のアカウントでアカウントエイリアスを作成してください",
"move_account_target": "引っ越し先",
"moved_account": "引っ越ししました",
"mute_bot_posts": "botの投稿をミュート",
"mute_export": "ミュートのエクスポート", "mute_export": "ミュートのエクスポート",
"mute_export_button": "ミュートをCSVファイルにエクスポートする", "mute_export_button": "ミュートをCSVファイルにエクスポートする",
"mute_import": "ミュートのインポート", "mute_import": "ミュートのインポート",
@ -508,6 +554,7 @@
"mutes_tab": "ミュート", "mutes_tab": "ミュート",
"name": "名前", "name": "名前",
"name_bio": "名前とプロフィール", "name_bio": "名前とプロフィール",
"new_alias_target": "アカウントエイリアスを作成",
"new_email": "新しいメールアドレス", "new_email": "新しいメールアドレス",
"new_password": "新しいパスワード", "new_password": "新しいパスワード",
"no_blocks": "ブロックはありません", "no_blocks": "ブロックはありません",
@ -517,6 +564,7 @@
"notification_mutes": "特定のユーザーからの通知を止めるには、ミュートしてください。", "notification_mutes": "特定のユーザーからの通知を止めるには、ミュートしてください。",
"notification_setting_block_from_strangers": "フォローしていないユーザーからの通知を拒否する", "notification_setting_block_from_strangers": "フォローしていないユーザーからの通知を拒否する",
"notification_setting_filters": "フィルター", "notification_setting_filters": "フィルター",
"notification_setting_hide_if_cw": "説明がつけたら、プッシュ通知で投稿を隠す",
"notification_setting_hide_notification_contents": "送った人と内容を、プッシュ通知に表示しない", "notification_setting_hide_notification_contents": "送った人と内容を、プッシュ通知に表示しない",
"notification_setting_privacy": "プライバシー", "notification_setting_privacy": "プライバシー",
"notification_visibility": "表示する通知", "notification_visibility": "表示する通知",
@ -525,6 +573,7 @@
"notification_visibility_likes": "お気に入り", "notification_visibility_likes": "お気に入り",
"notification_visibility_mentions": "メンション", "notification_visibility_mentions": "メンション",
"notification_visibility_moves": "ユーザーの引っ越し", "notification_visibility_moves": "ユーザーの引っ越し",
"notification_visibility_polls": "参加した投票の結果",
"notification_visibility_repeats": "リピート", "notification_visibility_repeats": "リピート",
"notifications": "通知", "notifications": "通知",
"nsfw_clickthrough": "NSFWなファイルを隠す", "nsfw_clickthrough": "NSFWなファイルを隠す",
@ -535,6 +584,7 @@
"play_videos_in_modal": "ビデオをメディアビューアーで見る", "play_videos_in_modal": "ビデオをメディアビューアーで見る",
"post_look_feel": "投稿の見た目", "post_look_feel": "投稿の見た目",
"post_status_content_type": "投稿のコンテントタイプ", "post_status_content_type": "投稿のコンテントタイプ",
"posts": "投稿",
"preload_images": "画像を先読みする", "preload_images": "画像を先読みする",
"presets": "プリセット", "presets": "プリセット",
"profile_background": "プロフィールの背景", "profile_background": "プロフィールの背景",
@ -548,7 +598,10 @@
"profile_tab": "プロフィール", "profile_tab": "プロフィール",
"radii_help": "インターフェースの丸さを設定する", "radii_help": "インターフェースの丸さを設定する",
"refresh_token": "トークンを更新", "refresh_token": "トークンを更新",
"remove_alias": "削除",
"remove_backup": "削除",
"render_mfm": "Misskey Markdownを表示", "render_mfm": "Misskey Markdownを表示",
"render_mfm_on_hover": "マウスポインタを置いていないMFMアニメーションを停止",
"replies_in_timeline": "タイムラインのリプライ", "replies_in_timeline": "タイムラインのリプライ",
"reply_visibility_all": "すべてのリプライを見る", "reply_visibility_all": "すべてのリプライを見る",
"reply_visibility_following": "私に宛てられたリプライと、フォローしている人からのリプライを見る", "reply_visibility_following": "私に宛てられたリプライと、フォローしている人からのリプライを見る",
@ -572,15 +625,21 @@
"security": "セキュリティ", "security": "セキュリティ",
"security_tab": "セキュリティ", "security_tab": "セキュリティ",
"sensitive_by_default": "はじめから投稿をセンシティブとして設定", "sensitive_by_default": "はじめから投稿をセンシティブとして設定",
"sensitive_if_subject": "ステータスにサブジェクトをついたらNSFWにする", "sensitive_if_subject": "投稿に警告をついたらNSFWにする",
"set_new_avatar": "新しいアバターを設定する", "set_new_avatar": "新しいアバターを設定する",
"set_new_mascot": "マスコットを更新",
"set_new_profile_background": "新しいプロフィールのバックグラウンドを設定する", "set_new_profile_background": "新しいプロフィールのバックグラウンドを設定する",
"set_new_profile_banner": "新しいプロフィールバナーを設定する", "set_new_profile_banner": "新しいプロフィールバナーを設定する",
"setting_changed": "規定の設定と異なっています", "setting_changed": "規定の設定と異なっています",
"setting_server_side": "この設定は、全クライエントに適用します",
"settings": "設定", "settings": "設定",
"show_admin_badge": "\"管理者\"のバッジを見せる", "show_admin_badge": "\"管理者\"のバッジを見せる",
"show_moderator_badge": "\"モデレーター\"のバッジを見せる", "show_moderator_badge": "\"モデレーター\"のバッジを見せる",
"show_nav_shortcuts": "ページ上にショートカットを追加",
"show_panel_nav_shortcuts": "ページ上にタイムラインショートカットを追加",
"show_scrollbars": "カラムのスクロールバーを表示", "show_scrollbars": "カラムのスクロールバーを表示",
"show_wider_shortcuts": "ページ上にショートカット間のスペースを増大",
"show_yous": "メンション側に「(あなた)」を表示",
"stop_gifs": "カーソルを重ねたとき、GIFを動かす", "stop_gifs": "カーソルを重ねたとき、GIFを動かす",
"streaming": "上までスクロールしたとき、自動的にストリーミングする", "streaming": "上までスクロールしたとき、自動的にストリーミングする",
"style": { "style": {
@ -662,7 +721,7 @@
"fine_print": "私たちの{0}を、読まないでください!", "fine_print": "私たちの{0}を、読まないでください!",
"header": "プレビュー", "header": "プレビュー",
"header_faint": "エラーではありません", "header_faint": "エラーではありません",
"input": "羽田空港に着きました。", "input": "ただいまルーナノヴァ魔法学校に到着しました",
"link": "ハイパーリンク", "link": "ハイパーリンク",
"mono": "monospace", "mono": "monospace",
"text": "これは{0}と{1}の例です" "text": "これは{0}と{1}の例です"
@ -729,9 +788,9 @@
"use_source": "新しいバージョン" "use_source": "新しいバージョン"
} }
}, },
"subject_input_always_show": "サブジェクトフィールドをいつでも表示する", "subject_input_always_show": "警告入力をいつでも表示する",
"subject_line_behavior": "返信するときサブジェクトをコピーする", "subject_line_behavior": "返信するとき警告をコピーする",
"subject_line_email": "メール風: \"re: サブジェクト\"", "subject_line_email": "メール風: \"re: 警告\"",
"subject_line_mastodon": "マストドン風: そのままコピー", "subject_line_mastodon": "マストドン風: そのままコピー",
"subject_line_noop": "コピーしない", "subject_line_noop": "コピーしない",
"text": "文字", "text": "文字",
@ -745,13 +804,19 @@
"third_column_mode_postform": "で投稿フォームを表示", "third_column_mode_postform": "で投稿フォームを表示",
"token": "トークン", "token": "トークン",
"tooltipRadius": "ツールチップとアラート", "tooltipRadius": "ツールチップとアラート",
"translation_language": "翻訳先言語",
"tree_advanced": "スレッドで「返信を見る」、「閉じる」ボタンを表示",
"tree_fade_ancestors": "見ている投稿の親投稿を色あせる",
"type_domains_to_mute": "ミュートしたいドメインを検索", "type_domains_to_mute": "ミュートしたいドメインを検索",
"upload_a_photo": "画像をアップロード", "upload_a_photo": "画像をアップロード",
"useStreamingApi": "投稿と通知を、すぐに受け取る", "useStreamingApi": "投稿と通知を、すぐに受け取る",
"useStreamingApiWarning": "(実験中で、投稿を取りこぼすかもしれないので、おすすめしません)", "useStreamingApiWarning": "(実験中で、投稿を取りこぼすかもしれないので、おすすめしません)",
"use_at_icon": "{'@'}マークをアイコンにする",
"use_contain_fit": "画像のサムネイルを、切り抜かない", "use_contain_fit": "画像のサムネイルを、切り抜かない",
"use_one_click_nsfw": "NSFWなファイルを1クリックで開く", "use_one_click_nsfw": "NSFWなファイルを1クリックで開く",
"user_mutes": "ユーザー", "user_mutes": "ユーザー",
"user_profile_default_tab": "ユーザープロファイルの初期タブ",
"user_profiles": "ユーザーのプロファイル",
"user_settings": "ユーザー設定", "user_settings": "ユーザー設定",
"valid_until": "まで有効", "valid_until": "まで有効",
"values": { "values": {
@ -764,33 +829,71 @@
"title": "バージョン" "title": "バージョン"
}, },
"virtual_scrolling": "タイムラインの描画を最適化する", "virtual_scrolling": "タイムラインの描画を最適化する",
"word_filter": "単語フィルタ" "word_filter": "単語フィルタ",
"wordfilter": "単語フィルター"
}, },
"status": { "status": {
"ancestor_follow": "{numReplies}件の返信を見る",
"ancestor_follow_with_icon": "{icon} {text}",
"attachment_stop_flash": "フラッシュを停止",
"bookmark": "ブックマーク", "bookmark": "ブックマーク",
"collapse_attachments": "ファイルを隠す",
"copy_link": "リンクをコピー", "copy_link": "リンクをコピー",
"delete": "ステータスを削除", "delete": "投稿を削除",
"delete_confirm": "本当にこのステータスを削除してもよろしいですか?", "delete_confirm": "投稿を削除しますか?",
"delete_confirm_accept_button": "削除",
"delete_confirm_cancel_button": "キャンセル",
"delete_confirm_title": "削除を確認してください",
"edit": "編集",
"edit_history": "編集履歴",
"edit_history_modal_title": "{historyCount}回編集",
"edited_at": "{time}に編集",
"expand": "広げる", "expand": "広げる",
"external_source": "外部ソース", "external_source": "外部ソース",
"favorites": "お気に入り", "favorites": "お気に入り",
"hide_attachment": "ファイルを隠す",
"hide_content": "隠す", "hide_content": "隠す",
"hide_full_subject": "隠す", "hide_full_subject": "警告を隠す",
"many_attachments": "ファイルは{number}件があります",
"mentions": "メンション", "mentions": "メンション",
"move_down": "右に移動",
"move_up": "左に移動",
"mute_conversation": "スレッドをミュート", "mute_conversation": "スレッドをミュート",
"nsfw": "閲覧注意", "nsfw": "閲覧注意",
"open_gallery": "ギャラリーを見る",
"override_translation_source_language": "翻訳元言語",
"pin": "プロフィールにピン留め", "pin": "プロフィールにピン留め",
"pinned": "ピン留め", "pinned": "ピン留め",
"plus_more": "ほか{number}件", "plus_more": "ほか{number}件",
"remove_attachment": "削除",
"repeat_confirm": "リピートしますか?",
"repeat_confirm_accept_button": "リピート",
"repeat_confirm_cancel_button": "キャンセル",
"repeat_confirm_title": "リピートを確認してください",
"repeats": "リピート", "repeats": "リピート",
"replies_list": "返信:", "replies_list": "返信:",
"replies_list_with_others": "{numReplies}件の返信を見る",
"reply_to": "返信", "reply_to": "返信",
"show_all_attachments": "全ファイルを表示",
"show_all_conversation": "スレッドの全部を見る",
"show_all_conversation_with_icon": "{icon} {text}",
"show_attachment_description": "説明の略を見る",
"show_attachment_in_modal": "ファイルをウインドウで見る",
"show_content": "見る", "show_content": "見る",
"show_full_subject": "全部見る", "show_full_subject": "警告を見る",
"show_only_conversation_under_this": "この投稿を返信する投稿のみ",
"status_deleted": "この投稿は削除されました", "status_deleted": "この投稿は削除されました",
"status_unavailable": "利用できません", "status_unavailable": "利用できません",
"thread_follow": "{numStatus}件の返信を見る",
"thread_follow_with_icon": "{icon} {text}",
"thread_hide": "スレッドを隠す",
"thread_muted": "ミュートされたスレッド", "thread_muted": "ミュートされたスレッド",
"thread_muted_and_words": "以下の単語を含むため:", "thread_muted_and_words": "以下の単語を含むため:",
"thread_show": "スレッドを表示",
"thread_show_full": "{numStatus}件の返信を見る",
"thread_show_full_with_icon": "{icon} {text}",
"translate": "翻訳",
"translated_from": "{language}から翻訳されました",
"unbookmark": "ブックマーク解除", "unbookmark": "ブックマーク解除",
"unmute_conversation": "スレッドのミュートを解除", "unmute_conversation": "スレッドのミュートを解除",
"unpin": "プロフィールのピン留めを外す", "unpin": "プロフィールのピン留めを外す",
@ -822,10 +925,10 @@
"collapse": "たたむ", "collapse": "たたむ",
"conversation": "スレッド", "conversation": "スレッド",
"error": "タイムラインの読み込みに失敗しました: {0}", "error": "タイムラインの読み込みに失敗しました: {0}",
"load_older": "古いステータス", "load_older": "古い投稿",
"no_more_statuses": "これで終わりです", "no_more_statuses": "これで終わりです",
"no_retweet_hint": "投稿を「フォロワーのみ」または「ダイレクト」にすると、リピートできなくなります", "no_retweet_hint": "投稿を「フォロワーのみ」または「ダイレクト」にすると、リピートできなくなります",
"no_statuses": "ステータスはありません", "no_statuses": "投稿はありません",
"reload": "再読み込み", "reload": "再読み込み",
"repeated": "リピート", "repeated": "リピート",
"show_new": "読み込み", "show_new": "読み込み",
@ -833,12 +936,16 @@
"socket_reconnected": "リアルタイム接続が確立されました", "socket_reconnected": "リアルタイム接続が確立されました",
"up_to_date": "最新" "up_to_date": "最新"
}, },
"toast": {
"no_translation_target_set": "翻訳先言語の設定していません、設定をしてください"
},
"tool_tip": { "tool_tip": {
"accept_follow_request": "フォローリクエストを許可", "accept_follow_request": "フォローリクエストを許可",
"add_reaction": "リアクションを追加", "add_reaction": "リアクションを追加",
"bookmark": "ブックマーク", "bookmark": "ブックマーク",
"favorite": "お気に入り", "favorite": "お気に入り",
"media_upload": "メディアをアップロード", "media_upload": "メディアをアップロード",
"quote": "参照",
"reject_follow_request": "フォローリクエストを拒否", "reject_follow_request": "フォローリクエストを拒否",
"repeat": "リピート", "repeat": "リピート",
"reply": "返信", "reply": "返信",
@ -865,6 +972,7 @@
"deactivate_account": "アカウントをアクティブでなくする", "deactivate_account": "アカウントをアクティブでなくする",
"delete_account": "アカウントを削除", "delete_account": "アカウントを削除",
"delete_user": "ユーザーを削除", "delete_user": "ユーザーを削除",
"delete_user_data_and_deactivate_confirmation": "本当に削除しますか?削除したら、絶対に取り返せません",
"disable_any_subscription": "フォローされないようにする", "disable_any_subscription": "フォローされないようにする",
"disable_remote_subscription": "他のインスタンスからフォローされないようにする", "disable_remote_subscription": "他のインスタンスからフォローされないようにする",
"force_nsfw": "すべての投稿をNSFWにする", "force_nsfw": "すべての投稿をNSFWにする",
@ -879,14 +987,29 @@
"strip_media": "投稿からメディアを除去する" "strip_media": "投稿からメディアを除去する"
}, },
"approve": "受け入れ", "approve": "受け入れ",
"approve_confirm": "フォローリクエストを受け入れますか?",
"approve_confirm_accept_button": "受け入れる",
"approve_confirm_cancel_button": "キャンセル",
"approve_confirm_title": "受け入れを確認してください",
"block": "ブロック", "block": "ブロック",
"block_confirm": "{user}をブロックしますか?",
"block_confirm_accept_button": "ブロック",
"block_confirm_cancel_button": "キャンセル",
"block_confirm_title": "ブロックを確認してください",
"block_progress": "ブロックしています…", "block_progress": "ブロックしています…",
"blocked": "ブロックしています!", "blocked": "ブロックしています!",
"bot": "bot", "bot": "bot",
"deactivated": "無効",
"deny": "お断り", "deny": "お断り",
"deny_confirm": "フォローリクエストを断りますか?",
"deny_confirm_accept_button": "お断り",
"deny_confirm_cancel_button": "キャンセル",
"deny_confirm_title": "お断りを確認してください",
"domain_muted": "ドメインブロックをやめる",
"edit_profile": "プロフィールを編集", "edit_profile": "プロフィールを編集",
"favorites": "お気に入り", "favorites": "お気に入り",
"follow": "フォロー", "follow": "フォロー",
"follow_cancel": "フォローリクエストを取り消す",
"follow_progress": "リクエストしています…", "follow_progress": "リクエストしています…",
"follow_sent": "リクエストを送りました!", "follow_sent": "リクエストを送りました!",
"follow_unfollow": "フォローをやめる", "follow_unfollow": "フォローをやめる",
@ -907,17 +1030,27 @@
"mention": "メンション", "mention": "メンション",
"message": "メッセージ", "message": "メッセージ",
"mute": "ミュート", "mute": "ミュート",
"mute_confirm": "{user}をミュートしますか?",
"mute_confirm_accept_button": "ミュート",
"mute_confirm_cancel_button": "キャンセル",
"mute_confirm_title": "ユーザーをミュート",
"mute_domain": "ドメインをブロック",
"mute_progress": "ミュートしています…", "mute_progress": "ミュートしています…",
"muted": "ミュートしています", "muted": "ミュートしています",
"note": "私的なメモ", "note": "私的なメモ",
"per_day": "/日", "per_day": "/日",
"remote_follow": "リモートフォロー", "remote_follow": "リモートフォロー",
"replies": "投稿と返信",
"report": "通報", "report": "通報",
"show_repeats": "リピートを見る", "show_repeats": "リピートを見る",
"statuses": "ステータス", "statuses": "投稿",
"subscribe": "購読", "subscribe": "購読",
"unblock": "ブロック解除", "unblock": "ブロック解除",
"unblock_progress": "ブロックを解除しています…", "unblock_progress": "ブロックを解除しています…",
"unfollow_confirm": "{user}のフォローをやめますか?",
"unfollow_confirm_accept_button": "やめる",
"unfollow_confirm_cancel_button": "キャンセル",
"unfollow_confirm_title": "フォローをやめる",
"unmute": "ミュート解除", "unmute": "ミュート解除",
"unmute_progress": "ミュートを解除しています…", "unmute_progress": "ミュートを解除しています…",
"unsubscribe": "購読を解除" "unsubscribe": "購読を解除"

View file

@ -98,7 +98,6 @@
"features_panel": { "features_panel": {
"media_proxy": "Mediaproxy", "media_proxy": "Mediaproxy",
"scope_options": "Zichtbaarheidsopties", "scope_options": "Zichtbaarheidsopties",
"shout": "Shoutbox",
"text_limit": "Tekstlimiet", "text_limit": "Tekstlimiet",
"title": "Functies", "title": "Functies",
"upload_limit": "Upload limiet", "upload_limit": "Upload limiet",
@ -394,8 +393,16 @@
"chatMessageRadius": "Chatbericht", "chatMessageRadius": "Chatbericht",
"checkboxRadius": "Checkboxen", "checkboxRadius": "Checkboxen",
"collapse_subject": "Berichten met een onderwerp inklappen", "collapse_subject": "Berichten met een onderwerp inklappen",
"columns": "Kolommen",
"composing": "Opstellen", "composing": "Opstellen",
"confirm_dialogs": "Bevestiging vereisen voor:",
"confirm_dialogs_block": "Iemand blokkeren",
"confirm_dialogs_delete": "Een bericht verwijderen",
"confirm_dialogs_mute": "Iemand negeren",
"confirm_dialogs_repeat": "Herhalen van een bericht",
"confirm_dialogs_unfollow": "Iemand ontvolgen",
"confirm_new_password": "Nieuw wachtwoord bevestigen", "confirm_new_password": "Nieuw wachtwoord bevestigen",
"confirmation_dialogs": "Bevestigingsopties",
"conversation_display": "Gespreksweergave stijl", "conversation_display": "Gespreksweergave stijl",
"conversation_display_linear": "Lineaire weergave", "conversation_display_linear": "Lineaire weergave",
"conversation_display_tree": "Boom weergave", "conversation_display_tree": "Boom weergave",

View file

@ -75,7 +75,6 @@
"features_panel": { "features_panel": {
"media_proxy": "Proxy pre médiá", "media_proxy": "Proxy pre médiá",
"scope_options": "Nastavenia rámca", "scope_options": "Nastavenia rámca",
"shout": "Verejné fórum",
"text_limit": "Limit počtu znakov", "text_limit": "Limit počtu znakov",
"title": "Vlastnosti", "title": "Vlastnosti",
"upload_limit": "Limit nahrávania", "upload_limit": "Limit nahrávania",
@ -491,4 +490,4 @@
"more": "Viac", "more": "Viac",
"who_to_follow": "Koho nasledovať" "who_to_follow": "Koho nasledovať"
} }
} }

View file

@ -19,6 +19,8 @@ import reportsModule from './modules/reports.js'
import pollsModule from './modules/polls.js' import pollsModule from './modules/polls.js'
import postStatusModule from './modules/postStatus.js' import postStatusModule from './modules/postStatus.js'
import announcementsModule from './modules/announcements.js' import announcementsModule from './modules/announcements.js'
import editStatusModule from './modules/editStatus.js'
import statusHistoryModule from './modules/statusHistory.js'
import { createI18n } from 'vue-i18n' import { createI18n } from 'vue-i18n'
@ -81,7 +83,9 @@ const persistedStateOptions = {
reports: reportsModule, reports: reportsModule,
polls: pollsModule, polls: pollsModule,
postStatus: postStatusModule, postStatus: postStatusModule,
announcements: announcementsModule announcements: announcementsModule,
editStatus: editStatusModule,
statusHistory: statusHistoryModule
}, },
plugins, plugins,
strict: false // Socket modifies itself, let's ignore this for now. strict: false // Socket modifies itself, let's ignore this for now.

View file

@ -98,6 +98,13 @@ const api = {
showImmediately: timelineData.visibleStatuses.length === 0, showImmediately: timelineData.visibleStatuses.length === 0,
timeline: 'friends' timeline: 'friends'
}) })
} else if (message.event === 'status.update') {
dispatch('addNewStatuses', {
statuses: [message.status],
userId: false,
showImmediately: message.status.id in timelineData.visibleStatusesObject,
timeline: 'friends'
})
} else if (message.event === 'delete') { } else if (message.event === 'delete') {
dispatch('deleteStatusById', message.id) dispatch('deleteStatusById', message.id)
} }
@ -252,6 +259,12 @@ const api = {
if (!fetcher) return if (!fetcher) return
store.commit('removeFetcher', { fetcherName: 'announcements', fetcher }) store.commit('removeFetcher', { fetcherName: 'announcements', fetcher })
}, },
getSupportedTranslationlanguages (store) {
store.state.backendInteractor.getSupportedTranslationlanguages({ store })
.then((data) => {
store.dispatch('setOption', { name: 'supportedTranslationLanguages', value: data })
})
},
// Pleroma websocket // Pleroma websocket
setWsToken (store, token) { setWsToken (store, token) {

View file

@ -37,7 +37,7 @@ export const defaultState = {
hideThreadsWithBlockedUsers: undefined, // instance default hideThreadsWithBlockedUsers: undefined, // instance default
hideWordFilteredPosts: undefined, // instance default hideWordFilteredPosts: undefined, // instance default
muteBotStatuses: undefined, // instance default muteBotStatuses: undefined, // instance default
collapseMessageWithSubject: undefined, // instance default collapseMessageWithSubject: true, // instance default
padEmoji: true, padEmoji: true,
swapReacts: true, swapReacts: true,
showNavShortcuts: undefined, // instance default showNavShortcuts: undefined, // instance default
@ -118,7 +118,10 @@ export const defaultState = {
conversationTreeAdvanced: undefined, // instance default conversationTreeAdvanced: undefined, // instance default
conversationOtherRepliesButton: undefined, // instance default conversationOtherRepliesButton: undefined, // instance default
conversationTreeFadeAncestors: undefined, // instance default conversationTreeFadeAncestors: undefined, // instance default
maxDepthInThread: undefined // instance default maxDepthInThread: undefined, // instance default
translationLanguage: undefined, // instance default,
supportedTranslationLanguages: {}, // instance default
userProfileDefaultTab: 'statuses'
} }
// caching the instance default properties // caching the instance default properties
@ -191,6 +194,7 @@ const config = {
case 'interfaceLanguage': case 'interfaceLanguage':
messages.setLanguage(this.getters.i18n, value) messages.setLanguage(this.getters.i18n, value)
Cookies.set(BACKEND_LANGUAGE_COOKIE_NAME, localeService.internalToBackendLocale(value)) Cookies.set(BACKEND_LANGUAGE_COOKIE_NAME, localeService.internalToBackendLocale(value))
dispatch('setInstanceOption', { name: 'interfaceLanguage', value })
break break
case 'thirdColumnMode': case 'thirdColumnMode':
dispatch('setLayoutWidth', undefined) dispatch('setLayoutWidth', undefined)

25
src/modules/editStatus.js Normal file
View file

@ -0,0 +1,25 @@
const editStatus = {
state: {
params: null,
modalActivated: false
},
mutations: {
openEditStatusModal (state, params) {
state.params = params
state.modalActivated = true
},
closeEditStatusModal (state) {
state.modalActivated = false
}
},
actions: {
openEditStatusModal ({ commit }, params) {
commit('openEditStatusModal', params)
},
closeEditStatusModal ({ commit }) {
commit('closeEditStatusModal')
}
}
}
export default editStatus

View file

@ -17,7 +17,7 @@ const defaultState = {
defaultAvatar: '/images/avi.png', defaultAvatar: '/images/avi.png',
defaultBanner: '/images/banner.png', defaultBanner: '/images/banner.png',
background: '/static/aurora_borealis.jpg', background: '/static/aurora_borealis.jpg',
collapseMessageWithSubject: false, collapseMessageWithSubject: true,
greentext: false, greentext: false,
useAtIcon: false, useAtIcon: false,
mentionLinkDisplay: 'short', mentionLinkDisplay: 'short',

View file

@ -0,0 +1,25 @@
const statusHistory = {
state: {
params: {},
modalActivated: false
},
mutations: {
openStatusHistoryModal (state, params) {
state.params = params
state.modalActivated = true
},
closeStatusHistoryModal (state) {
state.modalActivated = false
}
},
actions: {
openStatusHistoryModal ({ commit }, params) {
commit('openStatusHistoryModal', params)
},
closeStatusHistoryModal ({ commit }) {
commit('closeStatusHistoryModal')
}
}
}
export default statusHistory

View file

@ -64,7 +64,8 @@ export const defaultState = () => ({
dms: emptyTl(), dms: emptyTl(),
bookmarks: emptyTl(), bookmarks: emptyTl(),
list: emptyTl(), list: emptyTl(),
bubble: emptyTl() bubble: emptyTl(),
replies: emptyTl()
} }
}) })
@ -183,7 +184,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
// This makes sure that user timeline won't get data meant for other // This makes sure that user timeline won't get data meant for other
// user. I.e. opening different user profiles makes request which could // user. I.e. opening different user profiles makes request which could
// return data late after user already viewing different user profile // return data late after user already viewing different user profile
if ((timeline === 'user' || timeline === 'media') && timelineObject.userId !== userId) { if ((timeline === 'user' || timeline === 'media' || timeline === 'replies') && timelineObject.userId !== userId) {
return return
} }
@ -250,6 +251,9 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
'status': (status) => { 'status': (status) => {
addStatus(status, showImmediately) addStatus(status, showImmediately)
}, },
'edit': (status) => {
addStatus(status, showImmediately)
},
'retweet': (status) => { 'retweet': (status) => {
// RetweetedStatuses are never shown immediately // RetweetedStatuses are never shown immediately
const retweetedStatus = addStatus(status.retweeted_status, false, false) const retweetedStatus = addStatus(status.retweeted_status, false, false)
@ -425,6 +429,10 @@ export const mutations = {
state.conversationsObject[newStatus.statusnet_conversation_id].forEach(status => { status.thread_muted = newStatus.thread_muted }) state.conversationsObject[newStatus.statusnet_conversation_id].forEach(status => { status.thread_muted = newStatus.thread_muted })
} }
}, },
setTranslatedStatus (state, { id, translation }) {
const newStatus = state.allStatusesObject[id]
newStatus.translation = translation
},
setRetweeted (state, { status, value }) { setRetweeted (state, { status, value }) {
const newStatus = state.allStatusesObject[status.id] const newStatus = state.allStatusesObject[status.id]
@ -602,6 +610,12 @@ const statuses = {
return rootState.api.backendInteractor.fetchStatus({ id }) return rootState.api.backendInteractor.fetchStatus({ id })
.then((status) => dispatch('addNewStatuses', { statuses: [status] })) .then((status) => dispatch('addNewStatuses', { statuses: [status] }))
}, },
fetchStatusSource ({ rootState, dispatch }, status) {
return apiService.fetchStatusSource({ id: status.id, credentials: rootState.users.currentUser.credentials })
},
fetchStatusHistory ({ rootState, dispatch }, status) {
return apiService.fetchStatusHistory({ status })
},
deleteStatus ({ rootState, commit }, status) { deleteStatus ({ rootState, commit }, status) {
commit('setDeleted', { status }) commit('setDeleted', { status })
apiService.deleteStatus({ id: status.id, credentials: rootState.users.currentUser.credentials }) apiService.deleteStatus({ id: status.id, credentials: rootState.users.currentUser.credentials })
@ -637,6 +651,10 @@ const statuses = {
rootState.api.backendInteractor.unpinOwnStatus({ id: statusId }) rootState.api.backendInteractor.unpinOwnStatus({ id: statusId })
.then((status) => dispatch('addNewStatuses', { statuses: [status] })) .then((status) => dispatch('addNewStatuses', { statuses: [status] }))
}, },
translateStatus ({ rootState, commit }, { id, translation, language, from }) {
return rootState.api.backendInteractor.translateStatus({ id: id, translation, language, from })
.then((translation) => commit('setTranslatedStatus', { id, translation }))
},
muteConversation ({ rootState, commit }, statusId) { muteConversation ({ rootState, commit }, statusId) {
return rootState.api.backendInteractor.muteConversation({ id: statusId }) return rootState.api.backendInteractor.muteConversation({ id: statusId })
.then((status) => commit('setMutedStatus', status)) .then((status) => commit('setMutedStatus', status))

View file

@ -1,5 +1,5 @@
import { each, map, concat, last, get } from 'lodash' import { each, map, concat, last, get } from 'lodash'
import { parseStatus, parseUser, parseNotification, parseAttachment, parseLinkHeaderPagination } from '../entity_normalizer/entity_normalizer.service.js' import { parseStatus, parseSource, parseUser, parseNotification, parseAttachment, parseLinkHeaderPagination } from '../entity_normalizer/entity_normalizer.service.js'
import { RegistrationError, StatusCodeError } from '../errors/errors' import { RegistrationError, StatusCodeError } from '../errors/errors'
/* eslint-env browser */ /* eslint-env browser */
@ -31,6 +31,8 @@ const MASTODON_LOGIN_URL = '/api/v1/accounts/verify_credentials'
const MASTODON_REGISTRATION_URL = '/api/v1/accounts' const MASTODON_REGISTRATION_URL = '/api/v1/accounts'
const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites' const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites'
const MASTODON_USER_NOTIFICATIONS_URL = '/api/v1/notifications' const MASTODON_USER_NOTIFICATIONS_URL = '/api/v1/notifications'
const AKKOMA_LANGUAGES_URL = '/api/v1/akkoma/translation/languages'
const AKKOMA_TRANSLATE_URL = (id, lang) => `/api/v1/statuses/${id}/translations/${lang}`
const MASTODON_DISMISS_NOTIFICATION_URL = id => `/api/v1/notifications/${id}/dismiss` const MASTODON_DISMISS_NOTIFICATION_URL = id => `/api/v1/notifications/${id}/dismiss`
const MASTODON_FAVORITE_URL = id => `/api/v1/statuses/${id}/favourite` const MASTODON_FAVORITE_URL = id => `/api/v1/statuses/${id}/favourite`
const MASTODON_UNFAVORITE_URL = id => `/api/v1/statuses/${id}/unfavourite` const MASTODON_UNFAVORITE_URL = id => `/api/v1/statuses/${id}/unfavourite`
@ -50,6 +52,8 @@ const MASTODON_USER_HOME_TIMELINE_URL = '/api/v1/timelines/home'
const AKKOMA_BUBBLE_TIMELINE_URL = '/api/v1/timelines/bubble' const AKKOMA_BUBBLE_TIMELINE_URL = '/api/v1/timelines/bubble'
const MASTODON_STATUS_URL = id => `/api/v1/statuses/${id}` const MASTODON_STATUS_URL = id => `/api/v1/statuses/${id}`
const MASTODON_STATUS_CONTEXT_URL = id => `/api/v1/statuses/${id}/context` const MASTODON_STATUS_CONTEXT_URL = id => `/api/v1/statuses/${id}/context`
const MASTODON_STATUS_SOURCE_URL = id => `/api/v1/statuses/${id}/source`
const MASTODON_STATUS_HISTORY_URL = id => `/api/v1/statuses/${id}/history`
const MASTODON_USER_URL = id => `/api/v1/accounts/${id}?with_relationships=true` const MASTODON_USER_URL = id => `/api/v1/accounts/${id}?with_relationships=true`
const MASTODON_USER_RELATIONSHIPS_URL = '/api/v1/accounts/relationships' const MASTODON_USER_RELATIONSHIPS_URL = '/api/v1/accounts/relationships'
const MASTODON_USER_TIMELINE_URL = id => `/api/v1/accounts/${id}/statuses` const MASTODON_USER_TIMELINE_URL = id => `/api/v1/accounts/${id}/statuses`
@ -510,6 +514,31 @@ const fetchStatus = ({ id, credentials }) => {
.then((data) => parseStatus(data)) .then((data) => parseStatus(data))
} }
const fetchStatusSource = ({ id, credentials }) => {
let url = MASTODON_STATUS_SOURCE_URL(id)
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => {
if (data.ok) {
return data
}
throw new Error('Error fetching source', data)
})
.then((data) => data.json())
.then((data) => parseSource(data))
}
const fetchStatusHistory = ({ status, credentials }) => {
let url = MASTODON_STATUS_HISTORY_URL(status.id)
return promisedRequest({ url, credentials })
.then((data) => {
data.reverse()
return data.map((item) => {
item.originalStatus = status
return parseStatus(item)
})
})
}
const tagUser = ({ tag, credentials, user }) => { const tagUser = ({ tag, credentials, user }) => {
const screenName = user.screen_name const screenName = user.screen_name
const form = { const form = {
@ -615,6 +644,7 @@ const fetchTimeline = ({
notifications: MASTODON_USER_NOTIFICATIONS_URL, notifications: MASTODON_USER_NOTIFICATIONS_URL,
'publicAndExternal': MASTODON_PUBLIC_TIMELINE, 'publicAndExternal': MASTODON_PUBLIC_TIMELINE,
user: MASTODON_USER_TIMELINE_URL, user: MASTODON_USER_TIMELINE_URL,
replies: MASTODON_USER_TIMELINE_URL,
media: MASTODON_USER_TIMELINE_URL, media: MASTODON_USER_TIMELINE_URL,
list: MASTODON_LIST_TIMELINE_URL, list: MASTODON_LIST_TIMELINE_URL,
favorites: MASTODON_USER_FAVORITES_TIMELINE_URL, favorites: MASTODON_USER_FAVORITES_TIMELINE_URL,
@ -626,7 +656,7 @@ const fetchTimeline = ({
let url = timelineUrls[timeline] let url = timelineUrls[timeline]
if (timeline === 'user' || timeline === 'media') { if (timeline === 'user' || timeline === 'media' || timeline === 'replies') {
url = url(userId) url = url(userId)
} }
@ -658,6 +688,9 @@ const fetchTimeline = ({
if (replyVisibility !== 'all') { if (replyVisibility !== 'all') {
params.push(['reply_visibility', replyVisibility]) params.push(['reply_visibility', replyVisibility])
} }
if (timeline === 'user') {
params.push(['exclude_replies', 1])
}
params.push(['limit', 20]) params.push(['limit', 20])
@ -738,6 +771,18 @@ const unretweet = ({ id, credentials }) => {
.then((data) => parseStatus(data)) .then((data) => parseStatus(data))
} }
const getSupportedTranslationlanguages = ({ credentials }) => {
return promisedRequest({ url: AKKOMA_LANGUAGES_URL, credentials })
}
const translateStatus = ({ id, credentials, language, from }) => {
const queryString = from ? `?from=${from}` : ''
return promisedRequest({ url: AKKOMA_TRANSLATE_URL(id, language) + queryString, method: 'GET', credentials })
.then((data) => {
return data
})
}
const bookmarkStatus = ({ id, credentials }) => { const bookmarkStatus = ({ id, credentials }) => {
return promisedRequest({ return promisedRequest({
url: MASTODON_BOOKMARK_STATUS_URL(id), url: MASTODON_BOOKMARK_STATUS_URL(id),
@ -819,6 +864,54 @@ const postStatus = ({
.then((data) => data.error ? data : parseStatus(data)) .then((data) => data.error ? data : parseStatus(data))
} }
const editStatus = ({
id,
credentials,
status,
spoilerText,
sensitive,
poll,
mediaIds = [],
contentType
}) => {
const form = new FormData()
const pollOptions = poll.options || []
form.append('status', status)
if (spoilerText) form.append('spoiler_text', spoilerText)
if (sensitive) form.append('sensitive', sensitive)
if (contentType) form.append('content_type', contentType)
mediaIds.forEach(val => {
form.append('media_ids[]', val)
})
if (pollOptions.some(option => option !== '')) {
const normalizedPoll = {
expires_in: poll.expiresIn,
multiple: poll.multiple
}
Object.keys(normalizedPoll).forEach(key => {
form.append(`poll[${key}]`, normalizedPoll[key])
})
pollOptions.forEach(option => {
form.append('poll[options][]', option)
})
}
let putHeaders = authHeaders(credentials)
return fetch(MASTODON_STATUS_URL(id), {
body: form,
method: 'PUT',
headers: putHeaders
})
.then((response) => {
return response.json()
})
.then((data) => data.error ? data : parseStatus(data))
}
const deleteStatus = ({ id, credentials }) => { const deleteStatus = ({ id, credentials }) => {
return fetch(MASTODON_DELETE_URL(id), { return fetch(MASTODON_DELETE_URL(id), {
headers: authHeaders(credentials), headers: authHeaders(credentials),
@ -1375,7 +1468,8 @@ const MASTODON_STREAMING_EVENTS = new Set([
'update', 'update',
'notification', 'notification',
'delete', 'delete',
'filters_changed' 'filters_changed',
'status.update'
]) ])
const PLEROMA_STREAMING_EVENTS = new Set([ const PLEROMA_STREAMING_EVENTS = new Set([
@ -1456,6 +1550,8 @@ export const handleMastoWS = (wsEvent) => {
const data = payload ? JSON.parse(payload) : null const data = payload ? JSON.parse(payload) : null
if (event === 'update') { if (event === 'update') {
return { event, status: parseStatus(data) } return { event, status: parseStatus(data) }
} else if (event === 'status.update') {
return { event, status: parseStatus(data) }
} else if (event === 'notification') { } else if (event === 'notification') {
return { event, notification: parseNotification(data) } return { event, notification: parseNotification(data) }
} }
@ -1480,6 +1576,8 @@ const apiService = {
fetchPinnedStatuses, fetchPinnedStatuses,
fetchConversation, fetchConversation,
fetchStatus, fetchStatus,
fetchStatusSource,
fetchStatusHistory,
fetchFriends, fetchFriends,
exportFriends, exportFriends,
fetchFollowers, fetchFollowers,
@ -1500,6 +1598,7 @@ const apiService = {
bookmarkStatus, bookmarkStatus,
unbookmarkStatus, unbookmarkStatus,
postStatus, postStatus,
editStatus,
deleteStatus, deleteStatus,
uploadMedia, uploadMedia,
setMediaDescription, setMediaDescription,
@ -1576,7 +1675,9 @@ const apiService = {
postAnnouncement, postAnnouncement,
editAnnouncement, editAnnouncement,
deleteAnnouncement, deleteAnnouncement,
adminFetchAnnouncements adminFetchAnnouncements,
translateStatus,
getSupportedTranslationlanguages
} }
export default apiService export default apiService

View file

@ -40,6 +40,10 @@ const backendInteractorService = credentials => ({
return ProcessedWS({ url, id: 'User' }) return ProcessedWS({ url, id: 'User' })
}, },
getSupportedTranslationlanguages ({ store }) {
return apiService.getSupportedTranslationlanguages({ store, credentials })
},
...Object.entries(apiService).reduce((acc, [key, func]) => { ...Object.entries(apiService).reduce((acc, [key, func]) => {
return { return {
...acc, ...acc,

View file

@ -242,6 +242,16 @@ export const parseAttachment = (data) => {
return output return output
} }
export const parseSource = (data) => {
const output = {}
output.text = data.text
output.spoiler_text = data.spoiler_text
output.content_type = data.content_type
return output
}
export const parseStatus = (data) => { export const parseStatus = (data) => {
const output = {} const output = {}
const masto = data.hasOwnProperty('account') const masto = data.hasOwnProperty('account')
@ -263,6 +273,8 @@ export const parseStatus = (data) => {
output.tags = data.tags output.tags = data.tags
output.edited_at = data.edited_at
if (data.pleroma) { if (data.pleroma) {
const { pleroma } = data const { pleroma } = data
output.text = pleroma.content ? data.pleroma.content['text/plain'] : data.content output.text = pleroma.content ? data.pleroma.content['text/plain'] : data.content
@ -374,6 +386,10 @@ export const parseStatus = (data) => {
output.favoritedBy = [] output.favoritedBy = []
output.rebloggedBy = [] output.rebloggedBy = []
if (data.hasOwnProperty('originalStatus')) {
Object.assign(output, data.originalStatus)
}
return output return output
} }

View file

@ -49,6 +49,47 @@ const postStatus = ({
}) })
} }
const editStatus = ({
store,
statusId,
status,
spoilerText,
sensitive,
poll,
media = [],
contentType = 'text/plain'
}) => {
const mediaIds = map(media, 'id')
return apiService.editStatus({
id: statusId,
credentials: store.state.users.currentUser.credentials,
status,
spoilerText,
sensitive,
poll,
mediaIds,
contentType
})
.then((data) => {
if (!data.error) {
store.dispatch('addNewStatuses', {
statuses: [data],
timeline: 'friends',
showImmediately: true,
noIdUpdate: true // To prevent missing notices on next pull.
})
}
return data
})
.catch((err) => {
console.error('Error editing status', err)
return {
error: err.message
}
})
}
const uploadMedia = ({ store, formData }) => { const uploadMedia = ({ store, formData }) => {
const credentials = store.state.users.currentUser.credentials const credentials = store.state.users.currentUser.credentials
return apiService.uploadMedia({ credentials, formData }) return apiService.uploadMedia({ credentials, formData })
@ -61,6 +102,7 @@ const setMediaDescription = ({ store, id, description }) => {
const statusPosterService = { const statusPosterService = {
postStatus, postStatus,
editStatus,
uploadMedia, uploadMedia,
setMediaDescription setMediaDescription
} }

View file

@ -1156,24 +1156,32 @@
source-map "0.6.1" source-map "0.6.1"
yaml-eslint-parser "^0.3.2" yaml-eslint-parser "^0.3.2"
"@intlify/core-base@9.2.0-beta.40": "@intlify/core-base@9.2.2":
version "9.2.0-beta.40" version "9.2.2"
resolved "https://registry.yarnpkg.com/@intlify/core-base/-/core-base-9.2.0-beta.40.tgz#85df2e183b2102716c5d40795848fc2359354580" resolved "https://registry.yarnpkg.com/@intlify/core-base/-/core-base-9.2.2.tgz#5353369b05cc9fe35cab95fe20afeb8a4481f939"
integrity sha512-vOR0lHgtJ3IkzvXLeMQeNeYreFSKG9v3SU8QOD//WKHdBy4QPISs9CZJkYzBeBVCJVZ/eM6OTSbXF8M2k53iCw== integrity sha512-JjUpQtNfn+joMbrXvpR4hTF8iJQ2sEFzzK3KIESOx+f+uwIjgw20igOyaIdhfsVVBCds8ZM64MoeNSx+PHQMkA==
dependencies: dependencies:
"@intlify/devtools-if" "9.2.0-beta.40" "@intlify/devtools-if" "9.2.2"
"@intlify/message-compiler" "9.2.0-beta.40" "@intlify/message-compiler" "9.2.2"
"@intlify/shared" "9.2.0-beta.40" "@intlify/shared" "9.2.2"
"@intlify/vue-devtools" "9.2.0-beta.40" "@intlify/vue-devtools" "9.2.2"
"@intlify/devtools-if@9.2.0-beta.40": "@intlify/devtools-if@9.2.2":
version "9.2.0-beta.40" version "9.2.2"
resolved "https://registry.yarnpkg.com/@intlify/devtools-if/-/devtools-if-9.2.0-beta.40.tgz#bee42fefaaaa590aa5ac7fe2a98777fb84bfaf5e" resolved "https://registry.yarnpkg.com/@intlify/devtools-if/-/devtools-if-9.2.2.tgz#b13d9ac4b4e2fe6d2e7daa556517a8061fe8bd39"
integrity sha512-EUiuLxlgortD1dhT0btm3YYIs2vk9kMdcGXiYYbHWRTylc8Iv7Yz47y5Y+IlbZzk51h/nYvuqXE1h9diZZWAvQ== integrity sha512-4ttr/FNO29w+kBbU7HZ/U0Lzuh2cRDhP8UlWOtV9ERcjHzuyXVZmjyleESK6eVP60tGC9QtQW9yZE+JeRhDHkg==
dependencies: dependencies:
"@intlify/shared" "9.2.0-beta.40" "@intlify/shared" "9.2.2"
"@intlify/message-compiler@9.2.0-beta.40", "@intlify/message-compiler@next": "@intlify/message-compiler@9.2.2":
version "9.2.2"
resolved "https://registry.yarnpkg.com/@intlify/message-compiler/-/message-compiler-9.2.2.tgz#e42ab6939b8ae5b3d21faf6a44045667a18bba1c"
integrity sha512-IUrQW7byAKN2fMBe8z6sK6riG1pue95e5jfokn8hA5Q3Bqy4MBJ5lJAofUsawQJYHeoPJ7svMDyBaVJ4d0GTtA==
dependencies:
"@intlify/shared" "9.2.2"
source-map "0.6.1"
"@intlify/message-compiler@next":
version "9.2.0-beta.40" version "9.2.0-beta.40"
resolved "https://registry.yarnpkg.com/@intlify/message-compiler/-/message-compiler-9.2.0-beta.40.tgz#d5d0c5652b9e74e0b4da07a2b8731e1f0e729029" resolved "https://registry.yarnpkg.com/@intlify/message-compiler/-/message-compiler-9.2.0-beta.40.tgz#d5d0c5652b9e74e0b4da07a2b8731e1f0e729029"
integrity sha512-6QWTSYewmkew4nsRqgkwTVuGFKzxVCOK8EXsPt15N+tN1g+OYjC3PfGA2dPB6cVkNxqA9mV/hNK02uHPWU9t0A== integrity sha512-6QWTSYewmkew4nsRqgkwTVuGFKzxVCOK8EXsPt15N+tN1g+OYjC3PfGA2dPB6cVkNxqA9mV/hNK02uHPWU9t0A==
@ -1186,13 +1194,18 @@
resolved "https://registry.yarnpkg.com/@intlify/shared/-/shared-9.2.0-beta.40.tgz#a850936008e6e865310b2a49136d494dd326faab" resolved "https://registry.yarnpkg.com/@intlify/shared/-/shared-9.2.0-beta.40.tgz#a850936008e6e865310b2a49136d494dd326faab"
integrity sha512-xWz+SFjgt/LfaSbbHVn+V7gmvX4ZNP3cIFta790GWZ/tEgwJeC3tkV7i45iUbZ4ZimOerFgKH05b7qvJlKb6RQ== integrity sha512-xWz+SFjgt/LfaSbbHVn+V7gmvX4ZNP3cIFta790GWZ/tEgwJeC3tkV7i45iUbZ4ZimOerFgKH05b7qvJlKb6RQ==
"@intlify/vue-devtools@9.2.0-beta.40": "@intlify/shared@9.2.2":
version "9.2.0-beta.40" version "9.2.2"
resolved "https://registry.yarnpkg.com/@intlify/vue-devtools/-/vue-devtools-9.2.0-beta.40.tgz#37457fd719b0b6afb0679c33ceb47b0ac77f457c" resolved "https://registry.yarnpkg.com/@intlify/shared/-/shared-9.2.2.tgz#5011be9ca2b4ab86f8660739286e2707f9abb4a5"
integrity sha512-3A0D/E9quf+KWonzXUDk3xNP0+d1DMdtAwyXNTjzFcQPvjugC2Xn6fmsd0kNn7nHjgpB+vwIuamGiuE+S+OULw== integrity sha512-wRwTpsslgZS5HNyM7uDQYZtxnbI12aGiBZURX3BTR9RFIKKRWpllTsgzHWvj3HKm3Y2Sh5LPC1r0PDCKEhVn9Q==
"@intlify/vue-devtools@9.2.2":
version "9.2.2"
resolved "https://registry.yarnpkg.com/@intlify/vue-devtools/-/vue-devtools-9.2.2.tgz#b95701556daf7ebb3a2d45aa3ae9e6415aed8317"
integrity sha512-+dUyqyCHWHb/UcvY1MlIpO87munedm3Gn6E9WWYdWrMuYLcoIoOEVDWSS8xSwtlPU+kA+MEQTP6Q1iI/ocusJg==
dependencies: dependencies:
"@intlify/core-base" "9.2.0-beta.40" "@intlify/core-base" "9.2.2"
"@intlify/shared" "9.2.0-beta.40" "@intlify/shared" "9.2.2"
"@intlify/vue-i18n-loader@^5.0.0": "@intlify/vue-i18n-loader@^5.0.0":
version "5.0.0" version "5.0.0"
@ -11415,14 +11428,14 @@ vue-eslint-parser@^5.0.0:
esquery "^1.0.1" esquery "^1.0.1"
lodash "^4.17.11" lodash "^4.17.11"
vue-i18n@^9.2.0-beta.39: vue-i18n@^9.2.2:
version "9.2.0-beta.40" version "9.2.2"
resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-9.2.0-beta.40.tgz#8088b19d619f47bf0e0f529f9bd1413460f2ff56" resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-9.2.2.tgz#aeb49d9424923c77e0d6441e3f21dafcecd0e666"
integrity sha512-UwcGsbTTaDJry6BbFFzt115EVHN/bXi07DyUIZ4zrYeGMBPp2QAptMwVaGUQid1gaMmUreAKarGIqw46oCQEvg== integrity sha512-yswpwtj89rTBhegUAv9Mu37LNznyu3NpyLQmozF3i1hYOhwpG8RjcjIFIIfnu+2MDZJGSZPXaKWvnQA71Yv9TQ==
dependencies: dependencies:
"@intlify/core-base" "9.2.0-beta.40" "@intlify/core-base" "9.2.2"
"@intlify/shared" "9.2.0-beta.40" "@intlify/shared" "9.2.2"
"@intlify/vue-devtools" "9.2.0-beta.40" "@intlify/vue-devtools" "9.2.2"
"@vue/devtools-api" "^6.2.1" "@vue/devtools-api" "^6.2.1"
vue-loader@^16.0.0: vue-loader@^16.0.0: