mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 05:43:09 +02:00
refactor
This commit is contained in:
parent
f96d50bc07
commit
861d028d09
35 changed files with 50 additions and 50 deletions
|
@ -95,7 +95,7 @@ export default defineComponent({
|
||||||
reporterOrigin: 'combined',
|
reporterOrigin: 'combined',
|
||||||
targetUserOrigin: 'combined',
|
targetUserOrigin: 'combined',
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'admin/abuse-user-reports',
|
endpoint: 'admin/abuse-user-reports' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
state: this.state,
|
state: this.state,
|
||||||
|
|
|
@ -85,7 +85,7 @@ const selectMode = ref(false);
|
||||||
const selectedEmojis = ref<string[]>([]);
|
const selectedEmojis = ref<string[]>([]);
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'admin/emoji/list',
|
endpoint: 'admin/emoji/list' as const,
|
||||||
limit: 30,
|
limit: 30,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
query: (query.value && query.value !== '') ? query.value : null,
|
query: (query.value && query.value !== '') ? query.value : null,
|
||||||
|
@ -93,7 +93,7 @@ const pagination = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const remotePagination = {
|
const remotePagination = {
|
||||||
endpoint: 'admin/emoji/list-remote',
|
endpoint: 'admin/emoji/list-remote' as const,
|
||||||
limit: 30,
|
limit: 30,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
query: (queryRemote.value && queryRemote.value !== '') ? queryRemote.value : null,
|
query: (queryRemote.value && queryRemote.value !== '') ? queryRemote.value : null,
|
||||||
|
|
|
@ -95,7 +95,7 @@ export default defineComponent({
|
||||||
type: null,
|
type: null,
|
||||||
searchHost: '',
|
searchHost: '',
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'admin/drive/files',
|
endpoint: 'admin/drive/files' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
type: (this.type && this.type !== '') ? this.type : null,
|
type: (this.type && this.type !== '') ? this.type : null,
|
||||||
|
|
|
@ -110,7 +110,7 @@ export default defineComponent({
|
||||||
searchUsername: '',
|
searchUsername: '',
|
||||||
searchHost: '',
|
searchHost: '',
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'admin/show-users',
|
endpoint: 'admin/show-users' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
sort: this.sort,
|
sort: this.sort,
|
||||||
|
|
|
@ -36,7 +36,7 @@ export default defineComponent({
|
||||||
bg: 'var(--bg)',
|
bg: 'var(--bg)',
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'announcements',
|
endpoint: 'announcements' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -67,7 +67,7 @@ export default defineComponent({
|
||||||
channel: null,
|
channel: null,
|
||||||
showBanner: true,
|
showBanner: true,
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'channels/timeline',
|
endpoint: 'channels/timeline' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
channelId: this.channelId,
|
channelId: this.channelId,
|
||||||
|
|
|
@ -60,15 +60,15 @@ export default defineComponent({
|
||||||
})),
|
})),
|
||||||
tab: 'featured',
|
tab: 'featured',
|
||||||
featuredPagination: {
|
featuredPagination: {
|
||||||
endpoint: 'channels/featured',
|
endpoint: 'channels/featured' as const,
|
||||||
noPaging: true,
|
noPaging: true,
|
||||||
},
|
},
|
||||||
followingPagination: {
|
followingPagination: {
|
||||||
endpoint: 'channels/followed',
|
endpoint: 'channels/followed' as const,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
},
|
},
|
||||||
ownedPagination: {
|
ownedPagination: {
|
||||||
endpoint: 'channels/owned',
|
endpoint: 'channels/owned' as const,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,7 +50,7 @@ export default defineComponent({
|
||||||
} : null),
|
} : null),
|
||||||
clip: null,
|
clip: null,
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'clips/notes',
|
endpoint: 'clips/notes' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
clipId: this.clipId,
|
clipId: this.clipId,
|
||||||
|
|
|
@ -156,7 +156,7 @@ export default defineComponent({
|
||||||
sort: '+createdAt',
|
sort: '+createdAt',
|
||||||
} },
|
} },
|
||||||
searchPagination: {
|
searchPagination: {
|
||||||
endpoint: 'users/search',
|
endpoint: 'users/search' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: computed(() => (this.searchQuery && this.searchQuery !== '') ? {
|
params: computed(() => (this.searchQuery && this.searchQuery !== '') ? {
|
||||||
query: this.searchQuery,
|
query: this.searchQuery,
|
||||||
|
@ -178,7 +178,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
tagUsers(): any {
|
tagUsers(): any {
|
||||||
return {
|
return {
|
||||||
endpoint: 'hashtags/users',
|
endpoint: 'hashtags/users' as const,
|
||||||
limit: 30,
|
limit: 30,
|
||||||
params: {
|
params: {
|
||||||
tag: this.tag,
|
tag: this.tag,
|
||||||
|
|
|
@ -10,7 +10,7 @@ import * as symbols from '@/symbols';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'notes/featured',
|
endpoint: 'notes/featured' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
offsetMode: true,
|
offsetMode: true,
|
||||||
};
|
};
|
||||||
|
|
|
@ -127,7 +127,7 @@ export default defineComponent({
|
||||||
state: 'federating',
|
state: 'federating',
|
||||||
sort: '+pubSub',
|
sort: '+pubSub',
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'federation/instances',
|
endpoint: 'federation/instances' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
offsetMode: true,
|
offsetMode: true,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
|
|
|
@ -42,7 +42,7 @@ import { i18n } from '@/i18n';
|
||||||
const paginationComponent = ref<InstanceType<typeof MkPagination>>();
|
const paginationComponent = ref<InstanceType<typeof MkPagination>>();
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'following/requests/list',
|
endpoint: 'following/requests/list' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -81,19 +81,19 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
tab: 'explore',
|
tab: 'explore',
|
||||||
recentPostsPagination: {
|
recentPostsPagination: {
|
||||||
endpoint: 'gallery/posts',
|
endpoint: 'gallery/posts' as const,
|
||||||
limit: 6,
|
limit: 6,
|
||||||
},
|
},
|
||||||
popularPostsPagination: {
|
popularPostsPagination: {
|
||||||
endpoint: 'gallery/featured',
|
endpoint: 'gallery/featured' as const,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
},
|
},
|
||||||
myPostsPagination: {
|
myPostsPagination: {
|
||||||
endpoint: 'i/gallery/posts',
|
endpoint: 'i/gallery/posts' as const,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
},
|
},
|
||||||
likedPostsPagination: {
|
likedPostsPagination: {
|
||||||
endpoint: 'i/gallery/likes',
|
endpoint: 'i/gallery/likes' as const,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
},
|
},
|
||||||
tags: [],
|
tags: [],
|
||||||
|
@ -106,7 +106,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
tagUsers(): any {
|
tagUsers(): any {
|
||||||
return {
|
return {
|
||||||
endpoint: 'hashtags/users',
|
endpoint: 'hashtags/users' as const,
|
||||||
limit: 30,
|
limit: 30,
|
||||||
params: {
|
params: {
|
||||||
tag: this.tag,
|
tag: this.tag,
|
||||||
|
|
|
@ -93,7 +93,7 @@ export default defineComponent({
|
||||||
}]
|
}]
|
||||||
} : null),
|
} : null),
|
||||||
otherPostsPagination: {
|
otherPostsPagination: {
|
||||||
endpoint: 'users/gallery/posts',
|
endpoint: 'users/gallery/posts' as const,
|
||||||
limit: 6,
|
limit: 6,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
userId: this.post.user.id
|
userId: this.post.user.id
|
||||||
|
|
|
@ -10,7 +10,7 @@ import * as symbols from '@/symbols';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'notes/mentions',
|
endpoint: 'notes/mentions' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import * as symbols from '@/symbols';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'notes/mentions',
|
endpoint: 'notes/mentions' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: () => ({
|
params: () => ({
|
||||||
visibility: 'specified'
|
visibility: 'specified'
|
||||||
|
|
|
@ -38,7 +38,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'antennas/list',
|
endpoint: 'antennas/list' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,7 +38,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'clips/list',
|
endpoint: 'clips/list' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
draft: null,
|
draft: null,
|
||||||
|
|
|
@ -87,15 +87,15 @@ export default defineComponent({
|
||||||
})),
|
})),
|
||||||
tab: 'owned',
|
tab: 'owned',
|
||||||
ownedPagination: {
|
ownedPagination: {
|
||||||
endpoint: 'users/groups/owned',
|
endpoint: 'users/groups/owned' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
joinedPagination: {
|
joinedPagination: {
|
||||||
endpoint: 'users/groups/joined',
|
endpoint: 'users/groups/joined' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
invitationPagination: {
|
invitationPagination: {
|
||||||
endpoint: 'i/user-group-invites',
|
endpoint: 'i/user-group-invites' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,7 +40,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'users/lists/list',
|
endpoint: 'users/lists/list' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -82,7 +82,7 @@ export default defineComponent({
|
||||||
showNext: false,
|
showNext: false,
|
||||||
error: null,
|
error: null,
|
||||||
prev: {
|
prev: {
|
||||||
endpoint: 'users/notes',
|
endpoint: 'users/notes' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: init => ({
|
params: init => ({
|
||||||
userId: this.note.userId,
|
userId: this.note.userId,
|
||||||
|
@ -91,7 +91,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
next: {
|
next: {
|
||||||
reversed: true,
|
reversed: true,
|
||||||
endpoint: 'users/notes',
|
endpoint: 'users/notes' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: init => ({
|
params: init => ({
|
||||||
userId: this.note.userId,
|
userId: this.note.userId,
|
||||||
|
|
|
@ -106,7 +106,7 @@ export default defineComponent({
|
||||||
page: null,
|
page: null,
|
||||||
error: null,
|
error: null,
|
||||||
otherPostsPagination: {
|
otherPostsPagination: {
|
||||||
endpoint: 'users/pages',
|
endpoint: 'users/pages' as const,
|
||||||
limit: 6,
|
limit: 6,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
userId: this.page.user.id
|
userId: this.page.user.id
|
||||||
|
|
|
@ -62,15 +62,15 @@ export default defineComponent({
|
||||||
})),
|
})),
|
||||||
tab: 'featured',
|
tab: 'featured',
|
||||||
featuredPagesPagination: {
|
featuredPagesPagination: {
|
||||||
endpoint: 'pages/featured',
|
endpoint: 'pages/featured' as const,
|
||||||
noPaging: true,
|
noPaging: true,
|
||||||
},
|
},
|
||||||
myPagesPagination: {
|
myPagesPagination: {
|
||||||
endpoint: 'i/pages',
|
endpoint: 'i/pages' as const,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
},
|
},
|
||||||
likedPagesPagination: {
|
likedPagesPagination: {
|
||||||
endpoint: 'i/page-likes',
|
endpoint: 'i/page-likes' as const,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,7 @@ const props = defineProps<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'notes/search',
|
endpoint: 'notes/search' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
query: props.query,
|
query: props.query,
|
||||||
|
|
|
@ -58,7 +58,7 @@ export default defineComponent({
|
||||||
bg: 'var(--bg)',
|
bg: 'var(--bg)',
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'i/apps',
|
endpoint: 'i/apps' as const,
|
||||||
limit: 100,
|
limit: 100,
|
||||||
params: {
|
params: {
|
||||||
sort: '+lastUsedAt'
|
sort: '+lastUsedAt'
|
||||||
|
|
|
@ -56,11 +56,11 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
tab: 'mute',
|
tab: 'mute',
|
||||||
mutingPagination: {
|
mutingPagination: {
|
||||||
endpoint: 'mute/list',
|
endpoint: 'mute/list' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
blockingPagination: {
|
blockingPagination: {
|
||||||
endpoint: 'blocking/list',
|
endpoint: 'blocking/list' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ export default defineComponent({
|
||||||
bg: 'var(--bg)',
|
bg: 'var(--bg)',
|
||||||
},
|
},
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'i/signin-history',
|
endpoint: 'i/signin-history' as const,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ const props = defineProps<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'notes/search-by-tag',
|
endpoint: 'notes/search-by-tag' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
tag: props.tag,
|
tag: props.tag,
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'users/clips',
|
endpoint: 'users/clips' as const,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
params: {
|
params: {
|
||||||
userId: this.user.id,
|
userId: this.user.id,
|
||||||
|
|
|
@ -33,14 +33,14 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
followingPagination: {
|
followingPagination: {
|
||||||
endpoint: 'users/following',
|
endpoint: 'users/following' as const,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
userId: this.user.id,
|
userId: this.user.id,
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
followersPagination: {
|
followersPagination: {
|
||||||
endpoint: 'users/followers',
|
endpoint: 'users/followers' as const,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
userId: this.user.id,
|
userId: this.user.id,
|
||||||
|
|
|
@ -29,7 +29,7 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'users/gallery/posts',
|
endpoint: 'users/gallery/posts' as const,
|
||||||
limit: 6,
|
limit: 6,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
userId: this.user.id
|
userId: this.user.id
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'users/pages',
|
endpoint: 'users/pages' as const,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
userId: this.user.id,
|
userId: this.user.id,
|
||||||
|
|
|
@ -36,7 +36,7 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'users/reactions',
|
endpoint: 'users/reactions' as const,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
userId: this.user.id,
|
userId: this.user.id,
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'notes/mentions',
|
endpoint: 'notes/mentions' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
visibility: 'specified'
|
visibility: 'specified'
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pagination: {
|
pagination: {
|
||||||
endpoint: 'notes/mentions',
|
endpoint: 'notes/mentions' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue