Merge remote-tracking branch 'upstream/develop' into bnakkoma
This commit is contained in:
commit
c889e88e45
14 changed files with 359 additions and 34 deletions
1
.tool-versions
Normal file
1
.tool-versions
Normal file
|
@ -0,0 +1 @@
|
|||
nodejs 20.12.2
|
|
@ -1,10 +1,12 @@
|
|||
labels:
|
||||
platform: linux/amd64
|
||||
pipeline:
|
||||
|
||||
steps:
|
||||
lint:
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
image: node:18
|
||||
image: node:20
|
||||
commands:
|
||||
- yarn
|
||||
- yarn lint
|
||||
|
@ -14,7 +16,7 @@ pipeline:
|
|||
when:
|
||||
event:
|
||||
- pull_request
|
||||
image: node:18
|
||||
image: node:20
|
||||
commands:
|
||||
- apt update
|
||||
- apt install firefox-esr -y --no-install-recommends
|
||||
|
@ -28,7 +30,7 @@ pipeline:
|
|||
branch:
|
||||
- develop
|
||||
- stable
|
||||
image: node:18
|
||||
image: node:20
|
||||
commands:
|
||||
- yarn
|
||||
- yarn build
|
||||
|
@ -40,15 +42,15 @@ pipeline:
|
|||
branch:
|
||||
- develop
|
||||
- stable
|
||||
image: node:18
|
||||
image: node:20
|
||||
secrets:
|
||||
- SCW_ACCESS_KEY
|
||||
- SCW_SECRET_KEY
|
||||
- SCW_DEFAULT_ORGANIZATION_ID
|
||||
commands:
|
||||
- apt-get update && apt-get install -y rclone wget zip
|
||||
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
|
||||
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
|
||||
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.30.0/scaleway-cli_2.30.0_linux_amd64
|
||||
- mv scaleway-cli_2.30.0_linux_amd64 scaleway-cli
|
||||
- chmod +x scaleway-cli
|
||||
- ./scaleway-cli object config install type=rclone
|
||||
- zip akkoma-fe.zip -r dist
|
||||
|
@ -70,8 +72,8 @@ pipeline:
|
|||
- SCW_DEFAULT_ORGANIZATION_ID
|
||||
commands:
|
||||
- apt-get update && apt-get install -y rclone wget git zip
|
||||
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
|
||||
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
|
||||
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.30.0/scaleway-cli_2.30.0_linux_amd64
|
||||
- mv scaleway-cli_2.30.0_linux_amd64 scaleway-cli
|
||||
- chmod +x scaleway-cli
|
||||
- ./scaleway-cli object config install type=rclone
|
||||
- cd docs
|
||||
|
|
|
@ -6,6 +6,7 @@ import UserCard from '../user_card/user_card.vue'
|
|||
import Timeago from '../timeago/timeago.vue'
|
||||
import RichContent from 'src/components/rich_content/rich_content.jsx'
|
||||
import ConfirmModal from '../confirm_modal/confirm_modal.vue'
|
||||
import StillImage from '../still-image/still-image.vue'
|
||||
import { isStatusNotification } from '../../services/notification_utils/notification_utils.js'
|
||||
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
|
||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||
|
@ -50,7 +51,8 @@ const Notification = {
|
|||
Timeago,
|
||||
Status,
|
||||
RichContent,
|
||||
ConfirmModal
|
||||
ConfirmModal,
|
||||
StillImage
|
||||
},
|
||||
methods: {
|
||||
toggleUserExpanded () {
|
||||
|
|
|
@ -116,12 +116,13 @@
|
|||
scope="global"
|
||||
keypath="notifications.reacted_with"
|
||||
>
|
||||
<img
|
||||
<still-image
|
||||
v-if="notification.emoji_url !== null"
|
||||
class="notification-reaction-emoji"
|
||||
:src="notification.emoji_url"
|
||||
:name="notification.emoji"
|
||||
>
|
||||
:title="notification.emoji"
|
||||
:alt="notification.emoji"
|
||||
/>
|
||||
<span
|
||||
v-else
|
||||
class="emoji-reaction-emoji"
|
||||
|
|
|
@ -9,11 +9,12 @@ import StatusContent from '../status_content/status_content.vue'
|
|||
import fileTypeService from '../../services/file_type/file_type.service.js'
|
||||
import { findOffset } from '../../services/offset_finder/offset_finder.service.js'
|
||||
import { reject, map, uniqBy, debounce } from 'lodash'
|
||||
import { usePostLanguageOptions } from 'src/lib/post_language'
|
||||
import suggestor from '../emoji_input/suggestor.js'
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import Checkbox from '../checkbox/checkbox.vue'
|
||||
import Select from '../select/select.vue'
|
||||
import iso6391 from 'iso-639-1'
|
||||
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
@ -62,6 +63,13 @@ const deleteDraft = (draftKey) => {
|
|||
localStorage.setItem('drafts', JSON.stringify(draftData));
|
||||
}
|
||||
|
||||
const interfaceToISOLanguage = (ilang) => {
|
||||
const sep = ilang.indexOf("_");
|
||||
return sep < 0 ?
|
||||
ilang :
|
||||
ilang.substr(0, sep);
|
||||
}
|
||||
|
||||
const PostStatusForm = {
|
||||
props: [
|
||||
'statusId',
|
||||
|
@ -129,6 +137,13 @@ const PostStatusForm = {
|
|||
this.$refs.textarea.focus()
|
||||
}
|
||||
},
|
||||
setup() {
|
||||
const {postLanguageOptions} = usePostLanguageOptions()
|
||||
|
||||
return {
|
||||
postLanguageOptions,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
const preset = this.$route.query.message
|
||||
let statusText = preset || ''
|
||||
|
@ -140,11 +155,13 @@ const PostStatusForm = {
|
|||
|
||||
const {
|
||||
postContentType: contentType,
|
||||
postLanguage: language,
|
||||
postLanguage: defaultPostLanguage,
|
||||
sensitiveByDefault,
|
||||
sensitiveIfSubject,
|
||||
interfaceLanguage,
|
||||
alwaysShowSubjectInput,
|
||||
} = this.$store.getters.mergedConfig
|
||||
const postLanguage = defaultPostLanguage || interfaceToISOLanguage(interfaceLanguage)
|
||||
|
||||
let statusParams = {
|
||||
spoilerText: this.subject || '',
|
||||
|
@ -155,8 +172,8 @@ const PostStatusForm = {
|
|||
poll: {},
|
||||
mediaDescriptions: {},
|
||||
visibility: this.suggestedVisibility(),
|
||||
contentType,
|
||||
language
|
||||
language: postLanguage,
|
||||
contentType
|
||||
}
|
||||
|
||||
if (this.statusId || this.isRedraft) {
|
||||
|
@ -171,8 +188,8 @@ const PostStatusForm = {
|
|||
poll: this.statusPoll || {},
|
||||
mediaDescriptions: this.statusMediaDescriptions || {},
|
||||
visibility: this.statusScope || this.suggestedVisibility(),
|
||||
contentType: statusContentType,
|
||||
language: statusLanguage
|
||||
language: this.statusLanguage || postLanguage,
|
||||
contentType: statusContentType
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -316,9 +333,6 @@ const PostStatusForm = {
|
|||
...mapState({
|
||||
mobileLayout: state => state.interface.mobileLayout
|
||||
}),
|
||||
isoLanguages () {
|
||||
return iso6391.getAllCodes();
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'newStatus': {
|
||||
|
|
|
@ -212,11 +212,11 @@
|
|||
class="form-control"
|
||||
>
|
||||
<option
|
||||
v-for="language in isoLanguages"
|
||||
:key="language"
|
||||
:value="language"
|
||||
v-for="language in postLanguageOptions"
|
||||
:key="language.key"
|
||||
:value="language.value"
|
||||
>
|
||||
{{ language }}
|
||||
{{ language.label }}
|
||||
</option>
|
||||
</Select>
|
||||
</div>
|
||||
|
|
|
@ -4,6 +4,7 @@ import ScopeSelector from 'src/components/scope_selector/scope_selector.vue'
|
|||
import IntegerSetting from '../helpers/integer_setting.vue'
|
||||
import InterfaceLanguageSwitcher from 'src/components/interface_language_switcher/interface_language_switcher.vue'
|
||||
|
||||
import { usePostLanguageOptions } from 'src/lib/post_language'
|
||||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
import ServerSideIndicator from '../helpers/server_side_indicator.vue'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
|
@ -18,6 +19,11 @@ library.add(
|
|||
)
|
||||
|
||||
const GeneralTab = {
|
||||
setup() {
|
||||
const {postLanguageOptions} = usePostLanguageOptions()
|
||||
|
||||
return {postLanguageOptions}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
subjectLineOptions: ['email', 'noop', 'masto'].map(mode => ({
|
||||
|
@ -128,6 +134,12 @@ const GeneralTab = {
|
|||
this.$store.dispatch('setOption', { name: 'translationLanguage', value: val })
|
||||
}
|
||||
},
|
||||
postLanguage: {
|
||||
get: function () { return this.$store.getters.mergedConfig.postLanguage },
|
||||
set: function (val) {
|
||||
this.$store.dispatch('setOption', { name: 'postLanguage', value: val })
|
||||
}
|
||||
},
|
||||
...SharedComputedObject()
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -602,6 +602,15 @@
|
|||
{{ $t('settings.post_status_content_type') }}
|
||||
</ChoiceSetting>
|
||||
</li>
|
||||
<li>
|
||||
<ChoiceSetting
|
||||
id="postLanguage"
|
||||
path="postLanguage"
|
||||
:options="postLanguageOptions"
|
||||
>
|
||||
{{ $t('settings.post_language') }}
|
||||
</ChoiceSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path="alwaysShowNewPostButton"
|
||||
|
|
|
@ -687,7 +687,7 @@
|
|||
"play_videos_in_modal": "Play videos in a popup frame",
|
||||
"post_look_feel": "Posts Look & Feel",
|
||||
"post_status_content_type": "Default post content type",
|
||||
"post_status_language": "Default post language",
|
||||
"post_language": "Default post language",
|
||||
"posts": "Posts",
|
||||
"preload_images": "Preload images",
|
||||
"presets": "Presets",
|
||||
|
|
|
@ -685,7 +685,7 @@
|
|||
"play_videos_in_modal": "ビデオをメディアビューアーで見る",
|
||||
"post_look_feel": "投稿の見た目",
|
||||
"post_status_content_type": "投稿のコンテントタイプ",
|
||||
"post_status_language": "投稿の言語",
|
||||
"post_language": "投稿の言語",
|
||||
"posts": "投稿",
|
||||
"preload_images": "画像をあらかじめ読み込む",
|
||||
"presets": "プリセット",
|
||||
|
|
16
src/lib/post_language.js
Normal file
16
src/lib/post_language.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import iso6391 from 'iso-639-1'
|
||||
import { computed } from 'vue'
|
||||
|
||||
export const usePostLanguageOptions = () => {
|
||||
const postLanguageOptions = computed(() => {
|
||||
return iso6391.getAllCodes().map(lang => ({
|
||||
key: lang,
|
||||
value: lang,
|
||||
label: lang,
|
||||
}));
|
||||
})
|
||||
|
||||
return {
|
||||
postLanguageOptions,
|
||||
}
|
||||
}
|
|
@ -118,6 +118,7 @@ export const defaultState = {
|
|||
conversationTreeFadeAncestors: undefined, // instance default
|
||||
maxDepthInThread: undefined, // instance default
|
||||
translationLanguage: undefined, // instance default,
|
||||
postLanguage: undefined, // instance default,
|
||||
supportedTranslationLanguages: {}, // instance default
|
||||
userProfileDefaultTab: 'statuses',
|
||||
useBlurhash: true,
|
||||
|
|
|
@ -314,7 +314,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
|||
})
|
||||
|
||||
// Keep the visible statuses sorted
|
||||
if (timeline && !(timeline === 'bookmarks')) {
|
||||
if (timeline && !(['bookmarks', 'favorites'].includes(timeline))) {
|
||||
sortTimeline(timelineObject)
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue