refactor: add typing to emits
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/877/head
parent
080bf1358d
commit
74b6d9c5f2
|
@ -61,6 +61,11 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
click: (item: ICluster) => true,
|
||||
plus: () => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
recyclerWidth: 300,
|
||||
}),
|
||||
|
|
|
@ -90,6 +90,10 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
interactend: () => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
/** Last known height at adjustment */
|
||||
lastAdjustHeight: 0,
|
||||
|
|
|
@ -165,6 +165,10 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
updateLoading: (delta: number) => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
show: false,
|
||||
size: 0,
|
||||
|
|
|
@ -187,6 +187,10 @@ export default defineComponent({
|
|||
|
||||
mixins: [UserConfig],
|
||||
|
||||
emits: {
|
||||
'update:open': (open: boolean) => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
localFolders: [] as nativex.LocalFolderConfig[],
|
||||
}),
|
||||
|
|
|
@ -44,24 +44,25 @@
|
|||
@click="selectionManager().selectHead(item)"
|
||||
/>
|
||||
|
||||
<Photo
|
||||
class="photo"
|
||||
v-else
|
||||
v-for="photo of item.photos"
|
||||
:key="photo.key"
|
||||
:style="{
|
||||
height: `${photo.dispH}px`,
|
||||
width: `${photo.dispW}px`,
|
||||
transform: `translate(${photo.dispX}px, ${photo.dispY}px)`,
|
||||
}"
|
||||
:data="photo"
|
||||
:day="item.day"
|
||||
@select="selectionManager().clickSelectionIcon(photo, $event, index)"
|
||||
@pointerdown="selectionManager().clickPhoto(photo, $event, index)"
|
||||
@touchstart="selectionManager().touchstartPhoto(photo, $event, index)"
|
||||
@touchend="selectionManager().touchendPhoto(photo, $event, index)"
|
||||
@touchmove="selectionManager().touchmovePhoto(photo, $event, index)"
|
||||
/>
|
||||
<template v-else>
|
||||
<Photo
|
||||
class="photo"
|
||||
v-for="photo of item.photos"
|
||||
:key="photo.key"
|
||||
:style="{
|
||||
height: `${photo.dispH}px`,
|
||||
width: `${photo.dispW}px`,
|
||||
transform: `translate(${photo.dispX}px, ${photo.dispY}px)`,
|
||||
}"
|
||||
:data="photo"
|
||||
:day="item.day"
|
||||
@select="selectionManager().clickSelectionIcon(photo, $event, index)"
|
||||
@pointerdown="selectionManager().clickPhoto(photo, $event, index)"
|
||||
@touchstart="selectionManager().touchstartPhoto(photo, $event, index)"
|
||||
@touchend="selectionManager().touchendPhoto(photo, $event, index)"
|
||||
@touchmove="selectionManager().touchmovePhoto(photo, $event, index)"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
</RecycleScroller>
|
||||
|
||||
|
@ -135,6 +136,10 @@ export default defineComponent({
|
|||
|
||||
mixins: [UserConfig],
|
||||
|
||||
emits: {
|
||||
daysLoaded: (stats: { count: number }) => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
/** Loading days response */
|
||||
loading: 0,
|
||||
|
|
|
@ -33,6 +33,10 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
update: (key: keyof ISystemConfig, value: any) => true,
|
||||
},
|
||||
|
||||
methods: {
|
||||
update(key: keyof ISystemConfig, value: any = null) {
|
||||
this.$emit('update', key, value);
|
||||
|
|
|
@ -62,6 +62,10 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
click: (item: ICluster) => true,
|
||||
},
|
||||
|
||||
computed: {
|
||||
previewUrl() {
|
||||
if (this.error) return errorsvg;
|
||||
|
|
|
@ -96,6 +96,14 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
select: (e: PointerEvent) => true,
|
||||
pointerdown: (e: PointerEvent) => true,
|
||||
touchstart: (e: TouchEvent) => true,
|
||||
touchmove: (e: TouchEvent) => true,
|
||||
touchend: (e: TouchEvent) => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
touchTimer: 0,
|
||||
faceSrc: null as string | null,
|
||||
|
|
|
@ -36,6 +36,10 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
click: (item: IHeadRow) => true,
|
||||
},
|
||||
|
||||
computed: {
|
||||
name() {
|
||||
// Check cache
|
||||
|
|
|
@ -29,6 +29,11 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
load: (src: string) => true,
|
||||
error: (error: Error) => true,
|
||||
},
|
||||
|
||||
data: () => {
|
||||
return {
|
||||
dataSrc: BLANK_IMG,
|
||||
|
|
|
@ -37,6 +37,8 @@ export default defineComponent({
|
|||
AlbumPicker,
|
||||
},
|
||||
|
||||
emits: [],
|
||||
|
||||
data: () => ({
|
||||
show: false,
|
||||
photos: [] as IPhoto[],
|
||||
|
@ -66,7 +68,6 @@ export default defineComponent({
|
|||
this.show = false;
|
||||
this.photos = [];
|
||||
this.opsTotal = 0;
|
||||
this.$emit('close');
|
||||
},
|
||||
|
||||
routeIsAlbum(album: IAlbum) {
|
||||
|
|
|
@ -31,6 +31,8 @@ export default defineComponent({
|
|||
AlbumForm,
|
||||
},
|
||||
|
||||
emits: [],
|
||||
|
||||
data: () => ({
|
||||
show: false,
|
||||
album: null as any,
|
||||
|
@ -59,7 +61,6 @@ export default defineComponent({
|
|||
|
||||
close() {
|
||||
this.show = false;
|
||||
this.$emit('close');
|
||||
},
|
||||
|
||||
done({ album }: { album: { basename: string; filename: string } }) {
|
||||
|
|
|
@ -40,6 +40,8 @@ export default defineComponent({
|
|||
Modal,
|
||||
},
|
||||
|
||||
emits: [],
|
||||
|
||||
data: () => ({
|
||||
show: false,
|
||||
user: '',
|
||||
|
@ -65,7 +67,6 @@ export default defineComponent({
|
|||
methods: {
|
||||
close() {
|
||||
this.show = false;
|
||||
this.$emit('close');
|
||||
},
|
||||
|
||||
open() {
|
||||
|
|
|
@ -124,6 +124,11 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
done: (album: any) => true,
|
||||
back: () => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
collaborators: [],
|
||||
showCollaboratorView: false,
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<span class="remove-notice" v-if="deselection.size > 0">
|
||||
{{
|
||||
n('memories', 'Removed from {n} album', 'Removed from {n} albums', deselection.size, {
|
||||
n: this.deselection.size,
|
||||
n: deselection.size,
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
|
@ -106,6 +106,11 @@ export default defineComponent({
|
|||
default: false,
|
||||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
select: (selection: IAlbum[], deselection: IAlbum[]) => true,
|
||||
},
|
||||
|
||||
components: {
|
||||
AlbumForm,
|
||||
AlbumsList,
|
||||
|
|
|
@ -47,6 +47,8 @@ export default defineComponent({
|
|||
AlbumCollaborators,
|
||||
},
|
||||
|
||||
emits: [],
|
||||
|
||||
data: () => ({
|
||||
album: null as any,
|
||||
show: false,
|
||||
|
@ -58,7 +60,6 @@ export default defineComponent({
|
|||
close() {
|
||||
this.show = false;
|
||||
this.album = null;
|
||||
this.$emit('close');
|
||||
},
|
||||
|
||||
async open() {
|
||||
|
|
|
@ -63,6 +63,10 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
click: (item: IAlbum) => true,
|
||||
},
|
||||
|
||||
methods: {
|
||||
click($event: Event, album: IAlbum) {
|
||||
if (!this.link) {
|
||||
|
|
|
@ -50,6 +50,10 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
save: () => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
exif: null as Record<keyof IExif, string> | null,
|
||||
dirty: {} as Record<keyof IExif, boolean>,
|
||||
|
|
|
@ -35,6 +35,8 @@ export default defineComponent({
|
|||
Modal,
|
||||
},
|
||||
|
||||
emits: [],
|
||||
|
||||
data: () => ({
|
||||
show: false,
|
||||
user: '',
|
||||
|
@ -54,7 +56,6 @@ export default defineComponent({
|
|||
methods: {
|
||||
close() {
|
||||
this.show = false;
|
||||
this.$emit('close');
|
||||
},
|
||||
|
||||
open() {
|
||||
|
|
|
@ -45,6 +45,8 @@ export default defineComponent({
|
|||
Modal,
|
||||
},
|
||||
|
||||
emits: [],
|
||||
|
||||
data: () => ({
|
||||
show: false,
|
||||
user: '',
|
||||
|
@ -71,7 +73,6 @@ export default defineComponent({
|
|||
methods: {
|
||||
close() {
|
||||
this.show = false;
|
||||
this.$emit('close');
|
||||
},
|
||||
|
||||
open() {
|
||||
|
|
|
@ -54,6 +54,10 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
select: (face: IFace) => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
user: String(),
|
||||
name: String(),
|
||||
|
@ -80,10 +84,6 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('close');
|
||||
},
|
||||
|
||||
async refreshParams() {
|
||||
this.user = <string>this.$route.params.user || '';
|
||||
this.name = <string>this.$route.params.name || '';
|
||||
|
|
|
@ -48,6 +48,8 @@ export default defineComponent({
|
|||
FaceList,
|
||||
},
|
||||
|
||||
emits: [],
|
||||
|
||||
data: () => ({
|
||||
processing: 0,
|
||||
processingTotal: 0,
|
||||
|
@ -57,7 +59,6 @@ export default defineComponent({
|
|||
methods: {
|
||||
close() {
|
||||
this.show = false;
|
||||
this.$emit('close');
|
||||
},
|
||||
|
||||
open() {
|
||||
|
|
|
@ -41,6 +41,8 @@ export default defineComponent({
|
|||
FaceList,
|
||||
},
|
||||
|
||||
emits: [],
|
||||
|
||||
data: () => ({
|
||||
show: false,
|
||||
photos: [] as IPhoto[],
|
||||
|
@ -76,7 +78,6 @@ export default defineComponent({
|
|||
close() {
|
||||
this.photos = [];
|
||||
this.show = false;
|
||||
this.$emit('close');
|
||||
},
|
||||
|
||||
moved(photos: IPhoto[]) {
|
||||
|
|
|
@ -26,6 +26,8 @@ import { defineComponent } from 'vue';
|
|||
|
||||
import * as utils from '../../services/utils';
|
||||
|
||||
import type { PropType } from 'vue';
|
||||
|
||||
const NcModal = () => import('@nextcloud/vue/dist/Components/NcModal');
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -40,7 +42,7 @@ export default defineComponent({
|
|||
default: 'small',
|
||||
},
|
||||
sidebar: {
|
||||
type: String,
|
||||
type: String as PropType<string | null>,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -58,6 +58,10 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
close: (list: string[]) => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
show: false,
|
||||
paths: [] as string[],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<Modal @close="close" size="normal" v-if="show" :sidebar="!isRoot && !isMobile ? this.filename : null">
|
||||
<Modal @close="close" size="normal" v-if="show" :sidebar="!isRoot && !isMobile ? filename : null">
|
||||
<template #title>
|
||||
{{ t('memories', 'Link Sharing') }}
|
||||
</template>
|
||||
|
@ -102,6 +102,8 @@ export default defineComponent({
|
|||
|
||||
mixins: [UserConfig],
|
||||
|
||||
emits: [],
|
||||
|
||||
data: () => ({
|
||||
show: false,
|
||||
filename: '',
|
||||
|
@ -158,7 +160,6 @@ export default defineComponent({
|
|||
|
||||
close() {
|
||||
this.show = false;
|
||||
this.$emit('close');
|
||||
},
|
||||
|
||||
async refreshUrls() {
|
||||
|
|
|
@ -23,6 +23,10 @@ export default defineComponent({
|
|||
|
||||
mixins: [UserMixin],
|
||||
|
||||
emits: {
|
||||
load: () => true,
|
||||
},
|
||||
|
||||
computed: {
|
||||
currentmatter(): Component | null {
|
||||
if (this.routeIsFolders) {
|
||||
|
|
|
@ -59,6 +59,10 @@ export default defineComponent({
|
|||
RightMoveIcon,
|
||||
},
|
||||
|
||||
emits: {
|
||||
load: () => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
years: [] as IYear[],
|
||||
hasRight: false,
|
||||
|
|
|
@ -44,6 +44,10 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
|
||||
emits: {
|
||||
close: () => true,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
exif: null as Object | null,
|
||||
imageEditor: null as FilerobotImageEditor | null,
|
||||
|
|
Loading…
Reference in New Issue