Set `operator-linebreak` to `before`
This commit is contained in:
parent
998c7e1c09
commit
bd1a92c5f1
|
@ -23,6 +23,9 @@ module.exports = {
|
|||
'vue'
|
||||
],
|
||||
rules: {
|
||||
// NOTE: Nicer for the eye
|
||||
'operator-linebreak': ['error', 'before'],
|
||||
|
||||
// NOTE: Handled by typescript
|
||||
'no-undef': 'off',
|
||||
'no-unused-vars': 'off',
|
||||
|
|
|
@ -89,9 +89,9 @@ watchEffect(() => {
|
|||
})
|
||||
|
||||
const moderationNotifications = computed(() =>
|
||||
store.state.ui.notifications.pendingReviewEdits +
|
||||
store.state.ui.notifications.pendingReviewReports +
|
||||
store.state.ui.notifications.pendingReviewRequests
|
||||
store.state.ui.notifications.pendingReviewEdits
|
||||
+ store.state.ui.notifications.pendingReviewReports
|
||||
+ store.state.ui.notifications.pendingReviewRequests
|
||||
)
|
||||
|
||||
onMounted(async () => {
|
||||
|
|
|
@ -252,8 +252,8 @@ export default {
|
|||
if (!this.$store.state.auth.authenticated) return false
|
||||
|
||||
// TODO (wvffle): Is it better to compare ids? Is full_username unique?
|
||||
return this.obj.created_by.full_username === this.$store.state.auth.fullUsername ||
|
||||
this.$store.state.auth.availablePermissions.library
|
||||
return this.obj.created_by.full_username === this.$store.state.auth.fullUsername
|
||||
|| this.$store.state.auth.availablePermissions.library
|
||||
},
|
||||
previousState () {
|
||||
if (this.obj.is_applied) {
|
||||
|
|
|
@ -287,9 +287,9 @@ export default {
|
|||
canEdit () {
|
||||
if (!this.$store.state.auth.authenticated) return false
|
||||
|
||||
const isOwner = this.object.attributed_to &&
|
||||
const isOwner = this.object.attributed_to
|
||||
// TODO (wvffle): Is it better to compare ids? Is full_username unique?
|
||||
this.$store.state.auth.fullUsername === this.object.attributed_to.full_username
|
||||
&& this.$store.state.auth.fullUsername === this.object.attributed_to.full_username
|
||||
|
||||
return isOwner || this.$store.state.auth.availablePermissions.library
|
||||
},
|
||||
|
|
|
@ -418,11 +418,11 @@ export default {
|
|||
},
|
||||
processableFiles () {
|
||||
return (
|
||||
this.uploads.pending +
|
||||
this.uploads.skipped +
|
||||
this.uploads.errored +
|
||||
this.uploads.finished +
|
||||
this.uploadedFilesCount
|
||||
this.uploads.pending
|
||||
+ this.uploads.skipped
|
||||
+ this.uploads.errored
|
||||
+ this.uploads.finished
|
||||
+ this.uploadedFilesCount
|
||||
)
|
||||
},
|
||||
processedFilesCount () {
|
||||
|
|
|
@ -27,11 +27,11 @@ const running = computed(() => {
|
|||
return false
|
||||
}
|
||||
|
||||
return store.state.radios.current?.type === props.type &&
|
||||
store.state.radios.current?.customRadioId === props.customRadioId &&
|
||||
(
|
||||
typeof props.objectId === 'string' ||
|
||||
store.state.radios.current?.objectId?.fullUsername === props.objectId?.fullUsername
|
||||
return store.state.radios.current?.type === props.type
|
||||
&& store.state.radios.current?.customRadioId === props.customRadioId
|
||||
&& (
|
||||
typeof props.objectId === 'string'
|
||||
|| store.state.radios.current?.objectId?.fullUsername === props.objectId?.fullUsername
|
||||
)
|
||||
})
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ export default (props: PlayOptionsProps) => {
|
|||
if (props.track) {
|
||||
return props.track.uploads?.length > 0
|
||||
} else if (props.artist) {
|
||||
return props.artist.tracks_count > 0 ||
|
||||
props.artist.albums.some((album) => album.is_playable === true)
|
||||
return props.artist.tracks_count > 0
|
||||
|| props.artist?.albums.some((album) => album.is_playable === true)
|
||||
} else if (props.tracks) {
|
||||
return props.tracks.some((track) => (track.uploads?.length ?? 0) > 0)
|
||||
}
|
||||
|
|
|
@ -111,8 +111,8 @@ export interface Channel {
|
|||
itunes_category?: unknown
|
||||
itunes_subcategory?: unknown
|
||||
language?: string
|
||||
owner_name: string
|
||||
owner_email: string
|
||||
owner_name?: string
|
||||
owner_email?: string
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ export function truncate (str: string, max = 100, ellipsis = '…', middle = fal
|
|||
if (!middle) return str.slice(0, max) + ellipsis
|
||||
|
||||
const charsToShow = max - ellipsis.length
|
||||
return str.slice(0, Math.ceil(charsToShow / 2)) +
|
||||
ellipsis +
|
||||
str.slice(-Math.floor(charsToShow / 2))
|
||||
return str.slice(0, Math.ceil(charsToShow / 2))
|
||||
+ ellipsis
|
||||
+ str.slice(-Math.floor(charsToShow / 2))
|
||||
}
|
||||
|
||||
export function momentFormat (date: Date, format = 'lll') {
|
||||
|
|
|
@ -34,8 +34,8 @@ const scanProgress = computed(() => Math.min(latestScan.value.processed_files *
|
|||
const scanStatus = computed(() => latestScan.value?.status ?? 'unknown')
|
||||
const canLaunchScan = computed(() => scanStatus.value !== 'pending' && scanStatus.value !== 'scanning')
|
||||
const radioPlayable = computed(() => (
|
||||
(library.value.actor.is_local || scanStatus.value === 'finished') &&
|
||||
(library.value.privacy_level === 'everyone' || library.value.follow?.approved)
|
||||
(library.value.actor.is_local || scanStatus.value === 'finished')
|
||||
&& (library.value.privacy_level === 'everyone' || library.value.follow?.approved)
|
||||
))
|
||||
|
||||
const { $pgettext } = useGettext()
|
||||
|
|
|
@ -25,10 +25,10 @@ const object = ref<Library | null>(null)
|
|||
|
||||
const isOwner = computed(() => store.state.auth.authenticated && object.value?.actor.full_username === store.state.auth.fullUsername)
|
||||
const isPlayable = computed(() => (object.value?.uploads_count ?? 0) > 0 && (
|
||||
isOwner.value ||
|
||||
object.value?.privacy_level === 'everyone' ||
|
||||
(object.value?.privacy_level === 'instance' && store.state.auth.authenticated && object.value.actor.domain === store.getters['instance/domain']) ||
|
||||
(store.getters['libraries/follow'](object.value?.uuid) || {}).approved === true
|
||||
isOwner.value
|
||||
|| object.value?.privacy_level === 'everyone'
|
||||
|| (object.value?.privacy_level === 'instance' && store.state.auth.authenticated && object.value.actor.domain === store.getters['instance/domain'])
|
||||
|| (store.getters['libraries/follow'](object.value?.uuid) || {}).approved === true
|
||||
))
|
||||
|
||||
const { $pgettext } = useGettext()
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.web.json",
|
||||
"compilerOptions": {
|
||||
"lib": ["webworker"],
|
||||
"baseUrl": ".",
|
||||
"sourceMap": true,
|
||||
"allowJs": true,
|
||||
|
|
Loading…
Reference in New Issue