Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: fixvue/no-ref-as-operand andvue/return-in-computed-property ESLint errors#2679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletionscomponents/command/CommandPanel.vue
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@ onMounted(() => {

const commandMode = computed(() => input.value.startsWith('>'))

const query = computed(() => commandMode ? '' : input.value.trim())
const query = computed(() => commandMode.value ? '' : input.value.trim())

const { accounts, hashtags, loading } = useSearch(query)

Expand DownExpand Up@@ -61,7 +61,7 @@ const searchResult = computed<QueryResult>(() => {
}
})

const result = computed<QueryResult>(() => commandMode
const result = computed<QueryResult>(() => commandMode.value
? registry.query(scopes.value.map(s => s.id).join('.'), input.value.slice(1).trim())
: searchResult.value,
)
Expand Down
2 changes: 1 addition & 1 deletioncomponents/list/ListEntry.vue
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -92,7 +92,7 @@ async function removeList() {
async function clearError() {
actionError.value = undefined
await nextTick()
if (isEditing)
if (isEditing.value)
input.value?.focus()
else
deleteBtn.value?.focus()
Expand Down
2 changes: 1 addition & 1 deletioncomponents/modal/ModalConfirm.vue
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,7 @@ const isMute = computed(() => props.extraOptionType === 'mute')
function handleChoice(choice: ConfirmDialogChoice['choice']) {
const dialogChoice = {
choice,
...isMute && {
...isMute.value && {
extraOptions: {
mute: {
duration: hasDuration.value ? duration.value : 0,
Expand Down
2 changes: 1 addition & 1 deletioncomponents/user/UserSignIn.vue
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -72,7 +72,7 @@ function onEnter(e: KeyboardEvent) {
}

function escapeAutocomplete(evt: KeyboardEvent) {
if (!autocompleteShow)
if (!autocompleteShow.value)
return
autocompleteShow.value = false
evt.stopPropagation()
Expand Down
4 changes: 2 additions & 2 deletionscomposables/masto/search.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,7 @@ export function useSearch(query: MaybeRefOrGetter<string>, options: UseSearchOpt
}

watch(() => resolveUnref(query), () => {
loading.value = !!(q && isHydrated.value)
loading.value = !!(q.value && isHydrated.value)
})

debouncedWatch(() => resolveUnref(query), async () => {
Expand DownExpand Up@@ -87,7 +87,7 @@ export function useSearch(query: MaybeRefOrGetter<string>, options: UseSearchOpt
}, { debounce: 300 })

const next = async () => {
if (!q || !isHydrated.value || !paginator)
if (!q.value || !isHydrated.value || !paginator)
return

loading.value = true
Expand Down
4 changes: 2 additions & 2 deletionscomposables/push-notifications/usePushManager.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,7 @@ export function usePushManager() {
policy?: mastodon.v1.WebPushSubscriptionPolicy,
force?: boolean,
): Promise<SubscriptionResult> => {
if (!isSupported)
if (!isSupported.value)
return 'not-supported'

if (!currentUser.value)
Expand DownExpand Up@@ -112,7 +112,7 @@ export function usePushManager() {
}

const unsubscribe = async () => {
if (!isSupported || !isSubscribed || !currentUser.value)
if (!isSupported.value || !isSubscribed.value || !currentUser.value)
return false

await removePushNotifications(currentUser.value)
Expand Down
2 changes: 1 addition & 1 deletionpages/[[server]]/@[account]/[status].vue
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,7 @@ const { data: status, pending, refresh: refreshStatus } = useAsyncData(
)
const { client } = useMasto()
const { data: context, pending: pendingContext, refresh: refreshContext } = useAsyncData(
`context:${id}`,
`context:${id.value}`,
async () => client.value.v1.statuses.$select(id.value).context.fetch(),
{ watch: [isHydrated], immediate: isHydrated.value, lazy: true, default: () => shallowRef() },
)
Expand Down
2 changes: 2 additions & 0 deletionspages/notifications.vue
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,6 +32,8 @@ const filter = computed<mastodon.v1.NotificationType | undefined>(() => {
const actualFilter = Array.isArray(rawFilter) ? rawFilter[0] : rawFilter
if (isNotificationFilter(actualFilter))
return actualFilter

return undefined
})

const filterIconMap: Record<mastodon.v1.NotificationType, string> = {
Expand Down
2 changes: 2 additions & 0 deletionspages/notifications/[filter].vue
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,8 @@ const filter = computed<mastodon.v1.NotificationType | undefined>(() => {
const actualFilter = Array.isArray(rawFilter) ? rawFilter[0] : rawFilter
if (isNotification(actualFilter))
return actualFilter

return undefined
})

useHydratedHead({
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp