fix lint errors in SkRemoteFollowersWarning.vue and MkInfo.vue

This commit is contained in:
Hazelnoot 2025-04-02 09:36:18 -04:00
parent 1840aad741
commit 2eae1797cb
2 changed files with 6 additions and 5 deletions

View file

@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<i v-if="warn" class="ti ti-alert-triangle" :class="$style.i"></i> <i v-if="warn" class="ti ti-alert-triangle" :class="$style.i"></i>
<i v-else class="ti ti-info-circle" :class="$style.i"></i> <i v-else class="ti ti-info-circle" :class="$style.i"></i>
<div><slot></slot></div> <div><slot></slot></div>
<button v-if="closable" :class="$style.button" class="_button" @click="close()"><i class="ti ti-x"></i></button> <button v-if="closable" :class="$style.button" class="_button" @click="closeInfo()"><i class="ti ti-x"></i></button>
</div> </div>
</template> </template>
@ -24,7 +24,7 @@ const emit = defineEmits<{
(ev: 'close'): void; (ev: 'close'): void;
}>(); }>();
function close() { function closeInfo() {
// //
emit('close'); emit('close');
} }

View file

@ -4,16 +4,17 @@ SPDX-License-Identifier: AGPL-3.0-only
--> -->
<template> <template>
<MkInfo v-if="showRemoteWarning" warn closable @close="close"> <MkInfo v-if="showRemoteWarning" warn closable @close="closeWarning">
{{ i18n.ts.remoteFollowersWarning }} {{ i18n.ts.remoteFollowersWarning }}
</MkInfo> </MkInfo>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'; import { computed } from 'vue';
import type { FollowingFeedModel } from '@/utility/following-feed-utils.js';
import { i18n } from '@/i18n.js'; import { i18n } from '@/i18n.js';
import MkInfo from '@/components/MkInfo.vue'; import MkInfo from '@/components/MkInfo.vue';
import { followersTab, FollowingFeedModel } from '@/utility/following-feed-utils.js'; import { followersTab } from '@/utility/following-feed-utils.js';
const props = defineProps<{ const props = defineProps<{
model: FollowingFeedModel, model: FollowingFeedModel,
@ -26,7 +27,7 @@ const showRemoteWarning = computed(
() => userList.value === followersTab && !remoteWarningDismissed.value, () => userList.value === followersTab && !remoteWarningDismissed.value,
); );
function close() { function closeWarning() {
remoteWarningDismissed.value = true; remoteWarningDismissed.value = true;
} }
</script> </script>