This commit is contained in:
ThatOneCalculator 2022-09-15 14:00:50 -07:00
parent 4ab7615290
commit 926bd25a40
7 changed files with 37 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "12.119.0-calc.1-rc.2", "version": "12.119.0-calc.1-rc.3",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -120,8 +120,13 @@ const props = withDefaults(defineProps<{
}); });
let stats = $ref(null); let stats = $ref(null);
let tab = $ref(props.initialTab);
let tabs = ['overview', 'emojis','charts']; let tabs = ['overview', 'emojis','charts'];
let tab = $computed({
get: () => props.initialTab,
set: (x) => {
syncSlide(tabs.indexOf(x));
},
});
if (iAmModerator) tabs.push('federation'); if (iAmModerator) tabs.push('federation');
const initStats = () => os.api('stats', { const initStats = () => os.api('stats', {

View file

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

View file

@ -69,8 +69,13 @@ const props = defineProps<{
tag?: string; tag?: string;
}>(); }>();
let tab = $ref('explore');
const tabs = ['explore', 'liked', 'my']; const tabs = ['explore', 'liked', 'my'];
let tab = $computed({
get: () => tabs[0],
set: (x) => {
syncSlide(tabs.indexOf(x));
},
});
let tagsRef = $ref(); let tagsRef = $ref();
const recentPostsPagination = { const recentPostsPagination = {

View file

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

View file

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

View file

@ -67,7 +67,6 @@ const props = withDefaults(defineProps<{
const router = useRouter(); const router = useRouter();
let tab = $ref(props.page);
let tabs = ['home']; let tabs = ['home'];
let user = $ref<null | misskey.entities.UserDetailed>(null); let user = $ref<null | misskey.entities.UserDetailed>(null);
if (($i && ($i.id === user?.id)) || user?.publicReactions) { if (($i && ($i.id === user?.id)) || user?.publicReactions) {
@ -76,6 +75,12 @@ if (($i && ($i.id === user?.id)) || user?.publicReactions) {
if ((user?.instance != null)) { if ((user?.instance != null)) {
tabs.push('clips', 'pages', 'gallery'); tabs.push('clips', 'pages', 'gallery');
} }
let tab = $computed({
get: () => tabs[0],
set: (x) => {
syncSlide(tabs.indexOf(x));
},
});
let error = $ref(null); let error = $ref(null);
function fetchUser(): void { function fetchUser(): void {