tab swipe fix

This commit is contained in:
ThatOneCalculator 2022-10-25 19:19:42 -07:00
parent e93f0939bd
commit bf2b518489
6 changed files with 18 additions and 36 deletions

View File

@ -102,12 +102,9 @@ import 'swiper/scss/virtual';
let tabs = ['overview'];
if (iAmModerator) tabs.push('ip');
tabs.push('raw');
let tab = $computed({
get: () => tabs[0],
set: (x) => {
syncSlide(tabs.indexOf(x));
},
});
let tab = $ref(tabs[0]);
watch($$(tab), () => (syncSlide(tabs.indexOf(tab))));
let file: any = $ref(null);
let info: any = $ref(null);
let isSensitive: boolean = $ref(false);

View File

@ -55,12 +55,9 @@ import 'swiper/scss/virtual';
const router = useRouter();
const tabs = ['featured', 'following', 'owned'];
let tab = $computed({
get: () => tabs[0],
set: (x) => {
syncSlide(tabs.indexOf(x));
},
});
let tab = $ref(tabs[0]);
watch($$(tab), () => (syncSlide(tabs.indexOf(tab))));
const featuredPagination = {
endpoint: 'channels/featured' as const,

View File

@ -70,12 +70,9 @@ const props = defineProps<{
}>();
const tabs = ['explore', 'liked', 'my'];
let tab = $computed({
get: () => tabs[0],
set: (x) => {
syncSlide(tabs.indexOf(x));
},
});
let tab = $ref(tabs[0]);
watch($$(tab), () => (syncSlide(tabs.indexOf(tab))));
let tagsRef = $ref();
const recentPostsPagination = {

View File

@ -164,12 +164,9 @@ const props = defineProps<{
let tabs = ['overview'];
if (iAmModerator) tabs.push('chart', 'users', 'raw');
let tab = $computed({
get: () => tabs[0],
set: (x) => {
syncSlide(tabs.indexOf(x));
},
});
let tab = $ref(tabs[0]);
watch($$(tab), () => (syncSlide(tabs.indexOf(tab))));
let chartSrc = $ref('instance-requests');
let meta = $ref<misskey.entities.DetailedInstanceMetadata | null>(null);
let instance = $ref<misskey.entities.Instance | null>(null);

View File

@ -50,12 +50,9 @@ import 'swiper/scss';
import 'swiper/scss/virtual';
const tabs = ['all', 'unread', 'mentions', 'directNotes'];
let tab = $computed({
get: () => tabs[0],
set: (x) => {
syncSlide(tabs.indexOf(x));
},
});
let tab = $ref(tabs[0]);
watch($$(tab), () => (syncSlide(tabs.indexOf(tab))));
let includeTypes = $ref<string[] | null>(null);
let unreadOnly = $computed(() => tab === 'unread');
os.api('notifications/mark-all-as-read');

View File

@ -75,12 +75,9 @@ if (($i && ($i.id === user?.id)) || user?.publicReactions) {
if ((user?.instance != null)) {
tabs.push('clips', 'pages', 'gallery');
}
let tab = $computed({
get: () => tabs[0],
set: (x) => {
syncSlide(tabs.indexOf(x));
},
});
let tab = $ref(tabs[0]);
watch($$(tab), () => (syncSlide(tabs.indexOf(tab))));
let error = $ref(null);
function fetchUser(): void {