forked from AkkomaGang/akkoma-fe
migrate to eslint 9 syntax
This commit is contained in:
parent
5848c18ec8
commit
8fa24d0c40
85 changed files with 215 additions and 197 deletions
|
@ -1,2 +0,0 @@
|
|||
build/*.js
|
||||
config/*.js
|
30
.eslintrc.js
30
.eslintrc.js
|
@ -1,30 +0,0 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser',
|
||||
sourceType: 'module'
|
||||
},
|
||||
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
|
||||
extends: [
|
||||
'plugin:vue/recommended'
|
||||
],
|
||||
// required to lint *.vue files
|
||||
plugins: [
|
||||
'vue',
|
||||
'import'
|
||||
],
|
||||
// add your custom rules here
|
||||
rules: {
|
||||
// allow paren-less arrow functions
|
||||
'arrow-parens': 0,
|
||||
// allow async-await
|
||||
'generator-star-spacing': 0,
|
||||
// allow debugger during development
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
'vue/require-prop-types': 0,
|
||||
'vue/no-unused-vars': 0,
|
||||
'no-tabs': 0,
|
||||
'vue/multi-word-component-names': 0,
|
||||
'vue/no-reserved-component-names': 0
|
||||
}
|
||||
}
|
31
eslint.config.js
Normal file
31
eslint.config.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
const pluginVue = require('eslint-plugin-vue')
|
||||
const pluginImport = require('eslint-plugin-import')
|
||||
|
||||
module.exports = [
|
||||
...pluginVue.configs['flat/recommended'],
|
||||
{
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser',
|
||||
sourceType: 'module'
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
// allow paren-less arrow functions
|
||||
'arrow-parens': 0,
|
||||
// allow async-await
|
||||
'generator-star-spacing': 0,
|
||||
// allow debugger during development
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
'vue/require-prop-types': 0,
|
||||
'vue/no-unused-vars': 0,
|
||||
'no-tabs': 0,
|
||||
'vue/multi-word-component-names': 0,
|
||||
'vue/no-reserved-component-names': 0
|
||||
},
|
||||
ignores: [
|
||||
'build/*.js',
|
||||
'config/*.js'
|
||||
]
|
||||
}
|
||||
]
|
|
@ -6,7 +6,7 @@
|
|||
:bound-to="{ x: 'container' }"
|
||||
remove-padding
|
||||
>
|
||||
<template v-slot:content>
|
||||
<template #content>
|
||||
<div class="dropdown-menu">
|
||||
<template v-if="relationship.following">
|
||||
<button
|
||||
|
@ -71,7 +71,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
<button class="button-unstyled ellipsis-button">
|
||||
<FAIcon
|
||||
class="icon"
|
||||
|
@ -93,7 +93,7 @@
|
|||
keypath="user_card.block_confirm"
|
||||
tag="span"
|
||||
>
|
||||
<template v-slot:user>
|
||||
<template #user>
|
||||
<span
|
||||
v-text="user.screen_name_ui"
|
||||
/>
|
||||
|
|
|
@ -246,8 +246,8 @@
|
|||
ref="flash"
|
||||
class="flash"
|
||||
:src="attachment.large_thumb_url || attachment.url"
|
||||
@playerOpened="setFlashLoaded(true)"
|
||||
@playerClosed="setFlashLoaded(false)"
|
||||
@player-opened="setFlashLoaded(true)"
|
||||
@player-closed="setFlashLoaded(false)"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
|
||||
<script>
|
||||
export default {
|
||||
emits: ['update:modelValue'],
|
||||
props: [
|
||||
'modelValue',
|
||||
'indeterminate',
|
||||
'disabled'
|
||||
]
|
||||
],
|
||||
emits: ['update:modelValue']
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
:model-value="present"
|
||||
:disabled="disabled"
|
||||
class="opt"
|
||||
@update:modelValue="$emit('update:modelValue', typeof modelValue === 'undefined' ? fallback : undefined)"
|
||||
@update:model-value="$emit('update:modelValue', typeof modelValue === 'undefined' ? fallback : undefined)"
|
||||
/>
|
||||
<div class="input color-input-field">
|
||||
<input
|
||||
|
@ -46,7 +46,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss" src="./color_input.scss"></style>
|
||||
<script>
|
||||
import Checkbox from '../checkbox/checkbox.vue'
|
||||
import { hex2rgb } from '../../services/color_convert/color_convert.js'
|
||||
|
@ -108,6 +107,7 @@ export default {
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" src="./color_input.scss"></style>
|
||||
|
||||
<style lang="scss">
|
||||
.color-control {
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
</dialog-modal>
|
||||
</template>
|
||||
|
||||
<script src="./confirm_modal.js"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '../../_variables';
|
||||
|
||||
|
@ -35,5 +37,3 @@
|
|||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="./confirm_modal.js"></script>
|
||||
|
|
|
@ -267,11 +267,11 @@ const conversation = {
|
|||
},
|
||||
replies () {
|
||||
let i = 1
|
||||
// eslint-disable-next-line camelcase
|
||||
|
||||
return reduce(this.conversation, (result, { id, in_reply_to_status_id }) => {
|
||||
/* eslint-disable camelcase */
|
||||
|
||||
const irid = in_reply_to_status_id
|
||||
/* eslint-enable camelcase */
|
||||
|
||||
if (irid) {
|
||||
result[irid] = result[irid] || []
|
||||
result[irid].push({
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
:controlled-set-media-playing="(newVal) => toggleStatusContentProperty(status.id, 'mediaPlaying', newVal)"
|
||||
|
||||
@goto="setHighlight"
|
||||
@toggleExpanded="toggleExpanded"
|
||||
@toggle-expanded="toggleExpanded"
|
||||
/>
|
||||
<div
|
||||
v-if="showOtherRepliesButtonBelowStatus && getReplies(status.id).length > 1"
|
||||
|
@ -184,7 +184,7 @@
|
|||
:toggle-status-content-property="toggleStatusContentProperty"
|
||||
|
||||
@goto="setHighlight"
|
||||
@toggleExpanded="toggleExpanded"
|
||||
@toggle-expanded="toggleExpanded"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -44,9 +44,9 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="publicTimelineVisible"
|
||||
:to="{ name: 'public-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="publicTimelineVisible"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
@ -68,9 +68,9 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="federatedTimelineVisible"
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="federatedTimelineVisible"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
class="btn button-default"
|
||||
>
|
||||
{{ $t('domain_mute_card.unmute') }}
|
||||
<template v-slot:progress>
|
||||
<template #progress>
|
||||
{{ $t('domain_mute_card.unmute_progress') }}
|
||||
</template>
|
||||
</ProgressButton>
|
||||
|
@ -19,7 +19,7 @@
|
|||
class="btn button-default"
|
||||
>
|
||||
{{ $t('domain_mute_card.mute') }}
|
||||
<template v-slot:progress>
|
||||
<template #progress>
|
||||
{{ $t('domain_mute_card.mute_progress') }}
|
||||
</template>
|
||||
</ProgressButton>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<Modal
|
||||
v-if="isFormVisible"
|
||||
class="edit-form-modal-view"
|
||||
@backdropClicked="closeModal"
|
||||
@backdrop-clicked="closeModal"
|
||||
>
|
||||
<div class="edit-form-modal-panel panel">
|
||||
<div class="panel-heading">
|
||||
|
@ -11,10 +11,10 @@
|
|||
<PostStatusForm
|
||||
class="panel-body"
|
||||
v-bind="params"
|
||||
@posted="closeModal"
|
||||
:disablePolls="true"
|
||||
:disableVisibilitySelector="true"
|
||||
:disable-polls="true"
|
||||
:disable-visibility-selector="true"
|
||||
:post-handler="doEditStatus"
|
||||
@posted="closeModal"
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
|
|
|
@ -43,7 +43,10 @@
|
|||
:class="{ highlighted: index === highlighted }"
|
||||
@click.stop.prevent="onClick($event, suggestion)"
|
||||
>
|
||||
<span v-if="!suggestion.mfm" class="image">
|
||||
<span
|
||||
v-if="!suggestion.mfm"
|
||||
class="image"
|
||||
>
|
||||
<img
|
||||
v-if="suggestion.img"
|
||||
:src="suggestion.img"
|
||||
|
|
|
@ -122,14 +122,14 @@ export const suggestUsers = ({ dispatch, state }) => {
|
|||
const screenNameAlphabetically = a.screen_name > b.screen_name ? 1 : -1
|
||||
|
||||
return diff + nameAlphabetically + screenNameAlphabetically
|
||||
/* eslint-disable camelcase */
|
||||
|
||||
}).map(({ screen_name, screen_name_ui, name, profile_image_url_original }) => ({
|
||||
displayText: screen_name_ui,
|
||||
detailText: name,
|
||||
imageUrl: profile_image_url_original,
|
||||
replacement: '@' + screen_name + ' '
|
||||
}))
|
||||
/* eslint-enable camelcase */
|
||||
|
||||
|
||||
suggestions = newSuggestions || []
|
||||
return suggestions
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
:bound-to="{ x: 'container' }"
|
||||
remove-padding
|
||||
>
|
||||
<template v-slot:content="{close}">
|
||||
<template #content="{close}">
|
||||
<div class="dropdown-menu">
|
||||
<button
|
||||
v-if="canMute && !status.thread_muted"
|
||||
|
@ -172,7 +172,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
<button class="button-unstyled popover-trigger">
|
||||
<FAIcon
|
||||
class="fa-scale-110 fa-old-padding"
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<basic-user-card :user="user" v-if="show">
|
||||
<basic-user-card
|
||||
v-if="show"
|
||||
:user="user"
|
||||
>
|
||||
<div class="follow-request-card-content-container">
|
||||
<button
|
||||
class="btn button-default"
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
:description="descriptions && descriptions[attachment.id]"
|
||||
:hide-description="size === 'small' || tooManyAttachments && hidingLong"
|
||||
:style="itemStyle(attachment.id, row.items)"
|
||||
@setMedia="onMedia"
|
||||
@naturalSizeLoad="onNaturalSizeLoad"
|
||||
@set-media="onMedia"
|
||||
@natural-size-load="onNaturalSizeLoad"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<Modal
|
||||
v-if="showing"
|
||||
class="media-modal-view"
|
||||
@backdropClicked="hideIfNotSwiped"
|
||||
@backdrop-clicked="hideIfNotSwiped"
|
||||
>
|
||||
<SwipeClick
|
||||
v-if="type === 'image'"
|
||||
|
|
|
@ -42,7 +42,7 @@ const mediaUpload = {
|
|||
.then((fileData) => {
|
||||
self.$emit('uploaded', fileData)
|
||||
self.decreaseUploadCount()
|
||||
}, (error) => { // eslint-disable-line handle-callback-err
|
||||
}, (error) => {
|
||||
self.$emit('upload-failed', 'default')
|
||||
self.decreaseUploadCount()
|
||||
})
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
class="panel-heading"
|
||||
@click="toggleHidden"
|
||||
>
|
||||
<h4>{{ $t('moderation.reports.report') + ' ' + this.account.screen_name }}</h4>
|
||||
<h4>{{ $t('moderation.reports.report') + ' ' + account.screen_name }}</h4>
|
||||
<button
|
||||
v-if="isOpen"
|
||||
class="button-default"
|
||||
|
@ -35,7 +35,10 @@
|
|||
<div v-if="content">
|
||||
{{ decode(content) }}
|
||||
</div>
|
||||
<i v-else class="faint">
|
||||
<i
|
||||
v-else
|
||||
class="faint"
|
||||
>
|
||||
{{ $t('moderation.reports.no_content') }}
|
||||
</i>
|
||||
<div class="report-author">
|
||||
|
@ -43,12 +46,12 @@
|
|||
class="small-avatar"
|
||||
:user="actor"
|
||||
/>
|
||||
{{ this.actor.screen_name }}
|
||||
{{ actor.screen_name }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="!hidden && statuses.length > 0"
|
||||
class="dropdown"
|
||||
v-if="!hidden && this.statuses.length > 0"
|
||||
>
|
||||
<button
|
||||
class="button button-unstyled dropdown-header"
|
||||
|
@ -74,8 +77,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="!hidden && notes.length > 0"
|
||||
class="dropdown"
|
||||
v-if="!hidden && this.notes.length > 0"
|
||||
>
|
||||
<button
|
||||
class="button button-unstyled dropdown-header"
|
||||
|
@ -99,9 +102,9 @@
|
|||
</div>
|
||||
<div class="report-add-note">
|
||||
<textarea
|
||||
v-model.trim="note"
|
||||
rows="1"
|
||||
cols="1"
|
||||
v-model.trim="note"
|
||||
:placeholder="$t('moderation.reports.note_placeholder')"
|
||||
/>
|
||||
<button
|
||||
|
@ -134,7 +137,7 @@
|
|||
:offset="{ y: 5 }"
|
||||
remove-padding
|
||||
>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
<button
|
||||
class="btn button-default"
|
||||
:disabled="!tagPolicyEnabled"
|
||||
|
@ -147,7 +150,7 @@
|
|||
/>
|
||||
</button>
|
||||
</template>
|
||||
<template v-slot:content="{close}">
|
||||
<template #content="{close}">
|
||||
<div
|
||||
class="dropdown-menu"
|
||||
:disabled="!tagPolicyEnabled"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
class="small-avatar"
|
||||
:user="user"
|
||||
/>
|
||||
{{ this.user.screen_name }}
|
||||
{{ user.screen_name }}
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<Timeago
|
||||
|
|
|
@ -22,6 +22,9 @@ export default {
|
|||
default: false
|
||||
}
|
||||
},
|
||||
emits: [
|
||||
'backdropClicked',
|
||||
],
|
||||
computed: {
|
||||
classes () {
|
||||
return {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
@show="setToggled(true)"
|
||||
@close="setToggled(false)"
|
||||
>
|
||||
<template v-slot:content>
|
||||
<template #content>
|
||||
<div class="dropdown-menu">
|
||||
<span v-if="user.is_local">
|
||||
<button
|
||||
|
@ -122,7 +122,7 @@
|
|||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
<button
|
||||
class="btn button-default btn-block moderation-tools-button"
|
||||
:class="{ toggled }"
|
||||
|
@ -137,11 +137,11 @@
|
|||
v-if="showDeleteUserDialog"
|
||||
:on-cancel="deleteUserDialog.bind(this, false)"
|
||||
>
|
||||
<template v-slot:header>
|
||||
<template #header>
|
||||
{{ $t('user_card.admin_menu.delete_user') }}
|
||||
</template>
|
||||
<p>{{ $t('user_card.admin_menu.delete_user_confirmation') }}</p>
|
||||
<template v-slot:footer>
|
||||
<template #footer>
|
||||
<button
|
||||
class="btn button-default"
|
||||
@click="deleteUserDialog(false)"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
placement="bottom"
|
||||
:bound-to="{ x: 'container' }"
|
||||
>
|
||||
<template v-slot:content>
|
||||
<template #content>
|
||||
<div class="dropdown-menu">
|
||||
<button
|
||||
class="button-default dropdown-item"
|
||||
|
@ -72,7 +72,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
<button class="filter-trigger-button button-unstyled">
|
||||
<FAIcon icon="filter" />
|
||||
</button>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
:model-value="present"
|
||||
:disabled="disabled"
|
||||
class="opt"
|
||||
@update:modelValue="$emit('update:modelValue', !present ? fallback : undefined)"
|
||||
@update:model-value="$emit('update:modelValue', !present ? fallback : undefined)"
|
||||
/>
|
||||
<input
|
||||
:id="name"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<pinch-zoom
|
||||
class="pinch-zoom-parent"
|
||||
v-bind="$attrs"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<slot />
|
||||
</pinch-zoom>
|
||||
|
|
|
@ -118,8 +118,8 @@
|
|||
/>
|
||||
</div>
|
||||
<EmojiInput
|
||||
ref="subject-emoji-input"
|
||||
v-if="subjectVisible"
|
||||
ref="subject-emoji-input"
|
||||
v-model="newStatus.spoilerText"
|
||||
enable-emoji-picker
|
||||
hide-emoji-button
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
v-if="isLoggedIn && !resettingForm"
|
||||
:is-open="modalActivated"
|
||||
class="post-form-modal-view"
|
||||
@backdropClicked="closeModal"
|
||||
@backdrop-clicked="closeModal"
|
||||
>
|
||||
<div class="post-form-modal-panel panel">
|
||||
<div class="panel-heading">
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
remove-padding
|
||||
@show="focusInput"
|
||||
>
|
||||
<template v-slot:content="{close}">
|
||||
<template #content="{close}">
|
||||
<EmojiPicker
|
||||
:enable-sticker-picker="false"
|
||||
@emoji="addReaction($event, close)"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
<button
|
||||
class="button-unstyled popover-trigger"
|
||||
:title="$t('tool_tip.add_reaction')"
|
||||
|
|
|
@ -2,7 +2,7 @@ export default {
|
|||
props: [ 'user' ],
|
||||
computed: {
|
||||
subscribeUrl () {
|
||||
// eslint-disable-next-line no-undef
|
||||
|
||||
const serverUrl = new URL(this.user.statusnet_profile_url)
|
||||
return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus`
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
:items="items"
|
||||
:get-key="getKey"
|
||||
>
|
||||
<template v-slot:item="{item}">
|
||||
<template #item="{item}">
|
||||
<div
|
||||
class="selectable-list-item-inner"
|
||||
:class="{ 'selectable-list-item-selected-inner': isSelected(item) }"
|
||||
|
@ -41,7 +41,7 @@
|
|||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:empty>
|
||||
<template #empty>
|
||||
<slot name="empty" />
|
||||
</template>
|
||||
</List>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<Checkbox
|
||||
:model-value="state"
|
||||
:disabled="disabled"
|
||||
@update:modelValue="update"
|
||||
@update:model-value="update"
|
||||
>
|
||||
<span
|
||||
v-if="!!$slots.default"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<Select
|
||||
:model-value="state"
|
||||
:disabled="disabled"
|
||||
@update:modelValue="update"
|
||||
@update:model-value="update"
|
||||
>
|
||||
<option
|
||||
v-for="option in options"
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
<Popover
|
||||
trigger="hover"
|
||||
>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
|
||||
<FAIcon
|
||||
icon="wrench"
|
||||
:aria-label="$t('settings.setting_changed')"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:content>
|
||||
<template #content>
|
||||
<div class="modified-tooltip">
|
||||
{{ $t('settings.setting_changed') }}
|
||||
</div>
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
<Popover
|
||||
trigger="hover"
|
||||
>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
|
||||
<FAIcon
|
||||
icon="server"
|
||||
:aria-label="$t('settings.setting_server_side')"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:content>
|
||||
<template #content>
|
||||
<div class="serverside-tooltip">
|
||||
{{ $t('settings.setting_server_side') }}
|
||||
</div>
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
<Checkbox
|
||||
:model-value="!!expertLevel"
|
||||
class="expertMode"
|
||||
@update:modelValue="expertLevel = Number($event)"
|
||||
@update:model-value="expertLevel = Number($event)"
|
||||
>
|
||||
{{ $t("settings.expert_mode") }}
|
||||
</Checkbox>
|
||||
|
|
|
@ -72,7 +72,7 @@ const DataImportExportTab = {
|
|||
// check is it's a local user
|
||||
if (user && user.is_local) {
|
||||
// append the instance address
|
||||
// eslint-disable-next-line no-undef
|
||||
|
||||
return user.screen_name + '@' + location.hostname
|
||||
}
|
||||
return user.screen_name
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
<template
|
||||
v-if="profilesExpanded"
|
||||
>
|
||||
|
||||
<div
|
||||
v-for="profile in settingsProfiles"
|
||||
:key="profile.id"
|
||||
|
@ -73,15 +72,24 @@
|
|||
</button>
|
||||
</template>
|
||||
</div>
|
||||
<button class="btn button-default" @click="refreshProfiles()">
|
||||
<button
|
||||
class="btn button-default"
|
||||
@click="refreshProfiles()"
|
||||
>
|
||||
{{ $t('settings.settings_profiles_refresh') }}
|
||||
<FAIcon icon="sync" @click="refreshProfiles()" />
|
||||
<FAIcon
|
||||
icon="sync"
|
||||
@click="refreshProfiles()"
|
||||
/>
|
||||
</button>
|
||||
<h3>{{ $t('settings.settings_profile_creation') }}</h3>
|
||||
<label for="settings-profile-new-name">
|
||||
{{ $t('settings.settings_profile_creation_new_name_label') }}
|
||||
</label>
|
||||
<input v-model="newProfileName" id="settings-profile-new-name">
|
||||
<input
|
||||
id="settings-profile-new-name"
|
||||
v-model="newProfileName"
|
||||
>
|
||||
<button
|
||||
class="btn button-default"
|
||||
@click="createSettingsProfile"
|
||||
|
|
|
@ -85,7 +85,7 @@ const MutesAndBlocks = {
|
|||
// check is it's a local user
|
||||
if (user && user.is_local) {
|
||||
// append the instance address
|
||||
// eslint-disable-next-line no-undef
|
||||
|
||||
return user.screen_name + '@' + location.hostname
|
||||
}
|
||||
return user.screen_name
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
:query="queryUserIds"
|
||||
:placeholder="$t('settings.search_user_to_block')"
|
||||
>
|
||||
<template v-slot="row">
|
||||
<template #default="row">
|
||||
<BlockCard
|
||||
:user-id="row.item"
|
||||
/>
|
||||
|
@ -21,7 +21,7 @@
|
|||
:refresh="true"
|
||||
:get-key="i => i"
|
||||
>
|
||||
<template v-slot:header="{selected}">
|
||||
<template #header="{selected}">
|
||||
<div class="bulk-actions">
|
||||
<ProgressButton
|
||||
v-if="selected.length > 0"
|
||||
|
@ -29,7 +29,7 @@
|
|||
:click="() => blockUsers(selected)"
|
||||
>
|
||||
{{ $t('user_card.block') }}
|
||||
<template v-slot:progress>
|
||||
<template #progress>
|
||||
{{ $t('user_card.block_progress') }}
|
||||
</template>
|
||||
</ProgressButton>
|
||||
|
@ -39,16 +39,16 @@
|
|||
:click="() => unblockUsers(selected)"
|
||||
>
|
||||
{{ $t('user_card.unblock') }}
|
||||
<template v-slot:progress>
|
||||
<template #progress>
|
||||
{{ $t('user_card.unblock_progress') }}
|
||||
</template>
|
||||
</ProgressButton>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:item="{item}">
|
||||
<template #item="{item}">
|
||||
<BlockCard :user-id="item" />
|
||||
</template>
|
||||
<template v-slot:empty>
|
||||
<template #empty>
|
||||
{{ $t('settings.no_blocks') }}
|
||||
</template>
|
||||
</BlockList>
|
||||
|
@ -63,7 +63,7 @@
|
|||
:query="queryUserIds"
|
||||
:placeholder="$t('settings.search_user_to_mute')"
|
||||
>
|
||||
<template v-slot="row">
|
||||
<template #default="row">
|
||||
<MuteCard
|
||||
:user-id="row.item"
|
||||
/>
|
||||
|
@ -74,7 +74,7 @@
|
|||
:refresh="true"
|
||||
:get-key="i => i"
|
||||
>
|
||||
<template v-slot:header="{selected}">
|
||||
<template #header="{selected}">
|
||||
<div class="bulk-actions">
|
||||
<ProgressButton
|
||||
v-if="selected.length > 0"
|
||||
|
@ -82,7 +82,7 @@
|
|||
:click="() => muteUsers(selected)"
|
||||
>
|
||||
{{ $t('user_card.mute') }}
|
||||
<template v-slot:progress>
|
||||
<template #progress>
|
||||
{{ $t('user_card.mute_progress') }}
|
||||
</template>
|
||||
</ProgressButton>
|
||||
|
@ -92,16 +92,16 @@
|
|||
:click="() => unmuteUsers(selected)"
|
||||
>
|
||||
{{ $t('user_card.unmute') }}
|
||||
<template v-slot:progress>
|
||||
<template #progress>
|
||||
{{ $t('user_card.unmute_progress') }}
|
||||
</template>
|
||||
</ProgressButton>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:item="{item}">
|
||||
<template #item="{item}">
|
||||
<MuteCard :user-id="item" />
|
||||
</template>
|
||||
<template v-slot:empty>
|
||||
<template #empty>
|
||||
{{ $t('settings.no_mutes') }}
|
||||
</template>
|
||||
</MuteList>
|
||||
|
@ -114,7 +114,7 @@
|
|||
:query="queryKnownDomains"
|
||||
:placeholder="$t('settings.type_domains_to_mute')"
|
||||
>
|
||||
<template v-slot="row">
|
||||
<template #default="row">
|
||||
<DomainMuteCard
|
||||
:domain="row.item"
|
||||
/>
|
||||
|
@ -125,7 +125,7 @@
|
|||
:refresh="true"
|
||||
:get-key="i => i"
|
||||
>
|
||||
<template v-slot:header="{selected}">
|
||||
<template #header="{selected}">
|
||||
<div class="bulk-actions">
|
||||
<ProgressButton
|
||||
v-if="selected.length > 0"
|
||||
|
@ -133,16 +133,16 @@
|
|||
:click="() => unmuteDomains(selected)"
|
||||
>
|
||||
{{ $t('domain_mute_card.unmute') }}
|
||||
<template v-slot:progress>
|
||||
<template #progress>
|
||||
{{ $t('domain_mute_card.unmute_progress') }}
|
||||
</template>
|
||||
</ProgressButton>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:item="{item}">
|
||||
<template #item="{item}">
|
||||
<DomainMuteCard :domain="item" />
|
||||
</template>
|
||||
<template v-slot:empty>
|
||||
<template #empty>
|
||||
{{ $t('settings.no_mutes') }}
|
||||
</template>
|
||||
</DomainMuteList>
|
||||
|
|
|
@ -130,7 +130,7 @@ const ProfileTab = {
|
|||
note: this.newBio,
|
||||
locked: this.newLocked,
|
||||
// Backend notation.
|
||||
/* eslint-disable camelcase */
|
||||
|
||||
display_name: this.newName,
|
||||
fields_attributes: this.newFields.filter(el => el != null),
|
||||
bot: this.bot,
|
||||
|
@ -138,7 +138,7 @@ const ProfileTab = {
|
|||
status_ttl_days: this.expirePosts ? this.newPostTTLDays : -1,
|
||||
permit_followback: this.permit_followback,
|
||||
accepts_direct_messages_from: this.userAcceptsDirectMessagesFrom
|
||||
/* eslint-enable camelcase */
|
||||
|
||||
}
|
||||
|
||||
if (this.emailLanguage) {
|
||||
|
@ -187,7 +187,7 @@ const ProfileTab = {
|
|||
})
|
||||
return
|
||||
}
|
||||
// eslint-disable-next-line no-undef
|
||||
|
||||
const reader = new FileReader()
|
||||
reader.onload = ({ target }) => {
|
||||
const img = target.result
|
||||
|
|
|
@ -110,11 +110,9 @@
|
|||
max="730"
|
||||
class="expire-posts-days"
|
||||
:placeholder="$t('settings.expire_posts_input_placeholder')"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
>
|
||||
</p>
|
||||
<p />
|
||||
<p>
|
||||
<interface-language-switcher
|
||||
:prompt-text="$t('settings.email_language')"
|
||||
|
|
|
@ -368,7 +368,7 @@
|
|||
:controlled-toggle-showing-long-subject="controlledToggleShowingLongSubject"
|
||||
@mediaplay="addMediaPlaying($event)"
|
||||
@mediapause="removeMediaPlaying($event)"
|
||||
@parseReady="setHeadTailLinks"
|
||||
@parse-ready="setHeadTailLinks"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -476,8 +476,8 @@
|
|||
/>
|
||||
<extra-buttons
|
||||
:status="status"
|
||||
@onError="showError"
|
||||
@onSuccess="clearError"
|
||||
@on-error="showError"
|
||||
@on-success="clearError"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
:mfm="renderMisskeyMarkdown && (status.media_type === 'text/x.misskeymarkdown')"
|
||||
:greentext="mergedConfig.greentext"
|
||||
:attentions="status.attentions"
|
||||
@parseReady="onParseReady"
|
||||
@parse-ready="onParseReady"
|
||||
/>
|
||||
<div
|
||||
v-if="status.translation"
|
||||
|
@ -70,7 +70,7 @@
|
|||
:mfm="renderMisskeyMarkdown && (status.media_type === 'text/x.misskeymarkdown')"
|
||||
:greentext="mergedConfig.greentext"
|
||||
:attentions="status.attentions"
|
||||
@parseReady="onParseReady"
|
||||
@parse-ready="onParseReady"
|
||||
/>
|
||||
<div>
|
||||
<label class="label">{{ $t('status.override_translation_source_language') }}</label>
|
||||
|
@ -89,7 +89,10 @@
|
|||
</option>
|
||||
</Select>
|
||||
{{ ' ' }}
|
||||
<button @click="translateStatus" class="btn button-default">
|
||||
<button
|
||||
class="btn button-default"
|
||||
@click="translateStatus"
|
||||
>
|
||||
{{ $t('status.translate') }}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
:toggle-showing-tall="toggleShowingTall"
|
||||
:toggle-expanding-subject="toggleExpandingSubject"
|
||||
:toggle-showing-long-subject="toggleShowingLongSubject"
|
||||
@parseReady="$emit('parseReady', $event)"
|
||||
@parse-ready="$emit('parseReady', $event)"
|
||||
>
|
||||
<div v-if="status.poll && status.poll.options && !compact">
|
||||
<Poll
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<Modal
|
||||
v-if="modalActivated"
|
||||
class="status-history-modal-view"
|
||||
@backdropClicked="closeModal"
|
||||
@backdrop-clicked="closeModal"
|
||||
>
|
||||
<div class="status-history-modal-panel panel">
|
||||
<div class="panel-heading">
|
||||
|
@ -17,7 +17,7 @@
|
|||
v-for="status in history"
|
||||
:key="status.id"
|
||||
:statusoid="status"
|
||||
:isPreview="true"
|
||||
:is-preview="true"
|
||||
class="conversation-status status-fadein panel-body"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
:bound-to="{ x: 'container' }"
|
||||
@show="enter"
|
||||
>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
<slot />
|
||||
</template>
|
||||
<template v-slot:content>
|
||||
<template #content>
|
||||
<Status
|
||||
v-if="status"
|
||||
:is-preview="true"
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
>
|
||||
<div
|
||||
v-if="animated && imageTypeLabel"
|
||||
class="image-type-label">
|
||||
class="image-type-label"
|
||||
>
|
||||
{{ imageTypeLabel }}
|
||||
</div>
|
||||
<canvas
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
:dive="dive ? () => dive(status.id) : undefined"
|
||||
|
||||
@goto="setHighlight"
|
||||
@toggleExpanded="toggleExpanded"
|
||||
@toggle-expanded="toggleExpanded"
|
||||
/>
|
||||
<div
|
||||
v-if="currentReplies.length && threadShowing"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
class="TimelineQuickSettings"
|
||||
:bound-to="{ x: 'container' }"
|
||||
>
|
||||
<template v-slot:content>
|
||||
<template #content>
|
||||
<div class="dropdown-menu">
|
||||
<div v-if="loggedIn">
|
||||
<button
|
||||
|
@ -80,7 +80,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
<button class="button-unstyled">
|
||||
<FAIcon icon="filter" />
|
||||
</button>
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
@show="openMenu"
|
||||
@close="() => isOpen = false"
|
||||
>
|
||||
<template v-slot:content>
|
||||
<template #content>
|
||||
<div class="timeline-menu-popover popover-default">
|
||||
<TimelineMenuContent />
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
<button class="button-unstyled title timeline-menu-title">
|
||||
<span class="timeline-title">{{ timelineName() }}</span>
|
||||
<span>
|
||||
|
|
|
@ -62,7 +62,6 @@
|
|||
:title="$t('nav.twkn_timeline_description')"
|
||||
:aria-label="$t('nav.twkn_timeline_description')"
|
||||
>{{ $t("nav.twkn") }}</span>
|
||||
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="currentUser">
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="publicTimelineVisible"
|
||||
:to="{ name: 'public-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="publicTimelineVisible"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
@ -40,9 +40,9 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="federatedTimelineVisible"
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="federatedTimelineVisible"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
|
|
@ -66,7 +66,7 @@ export default {
|
|||
return this.user.id !== this.$store.state.users.currentUser.id
|
||||
},
|
||||
subscribeUrl () {
|
||||
// eslint-disable-next-line no-undef
|
||||
|
||||
const serverUrl = new URL(this.user.statusnet_profile_url)
|
||||
return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus`
|
||||
},
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
placement="top"
|
||||
:offset="{ y: 5 }"
|
||||
>
|
||||
<template v-slot:trigger>
|
||||
<template #trigger>
|
||||
<slot />
|
||||
</template>
|
||||
<template v-slot:content>
|
||||
<template #content>
|
||||
<div class="user-list-popover">
|
||||
<template v-if="users.length">
|
||||
<div
|
||||
|
|
|
@ -121,8 +121,8 @@
|
|||
</FriendList>
|
||||
</div>
|
||||
<div
|
||||
key="tags"
|
||||
v-if="isUs"
|
||||
key="tags"
|
||||
:label="$t('user_card.followed_tags')"
|
||||
>
|
||||
<FollowedTagList
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<Modal
|
||||
v-if="isOpen"
|
||||
@backdropClicked="closeModal"
|
||||
@backdrop-clicked="closeModal"
|
||||
>
|
||||
<div class="user-reporting-panel panel">
|
||||
<div class="panel-heading">
|
||||
|
@ -45,7 +45,7 @@
|
|||
</div>
|
||||
<div class="user-reporting-panel-right">
|
||||
<List :items="statuses">
|
||||
<template v-slot:item="{item}">
|
||||
<template #item="{item}">
|
||||
<div class="status-fadein user-reporting-panel-sitem">
|
||||
<Status
|
||||
:in-conversation="false"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable import/no-webpack-loader-syntax */
|
||||
// This module exports only the notification part of the i18n,
|
||||
// which is useful for the service worker
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import EventTargetPolyfill from '@ungap/event-target'
|
||||
|
||||
try {
|
||||
/* eslint-disable no-new */
|
||||
|
||||
new EventTarget()
|
||||
/* eslint-enable no-new */
|
||||
|
||||
} catch (e) {
|
||||
window.EventTarget = EventTargetPolyfill
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ const persistedStateOptions = {
|
|||
})()
|
||||
|
||||
// These are inlined by webpack's DefinePlugin
|
||||
/* eslint-disable */
|
||||
|
||||
window.___pleromafe_mode = process.env
|
||||
window.___pleromafe_commit_hash = COMMIT_HASH
|
||||
window.___pleromafe_dev_overrides = DEV_OVERRIDES
|
||||
|
|
|
@ -67,7 +67,7 @@ const mutations = {
|
|||
|
||||
// actions
|
||||
const actions = {
|
||||
// eslint-disable-next-line camelcase
|
||||
|
||||
async login ({ state, dispatch, commit }, { access_token }) {
|
||||
commit('setToken', access_token, { root: true })
|
||||
await dispatch('loginUser', access_token, { root: true })
|
||||
|
|
|
@ -29,7 +29,7 @@ export const newImporter = ({
|
|||
|
||||
filePicker.addEventListener('change', event => {
|
||||
if (event.target.files[0]) {
|
||||
// eslint-disable-next-line no-undef
|
||||
|
||||
const reader = new FileReader()
|
||||
reader.onload = ({ target }) => {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue