From c63c36b526f67208ff625a0f3aa314980c5b6bfb Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 8 Aug 2024 17:57:37 +0200 Subject: [PATCH] refactor: Adjust code for some Typescript errors Signed-off-by: Ferdinand Thiessen --- src/actions/DownloadLimitAction.ts | 6 +++--- src/admin.ts | 4 ++-- src/components/DownloadLimitEntry.vue | 19 +++++++++++-------- src/public.ts | 2 +- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/actions/DownloadLimitAction.ts b/src/actions/DownloadLimitAction.ts index e3ab702b..c37c5011 100644 --- a/src/actions/DownloadLimitAction.ts +++ b/src/actions/DownloadLimitAction.ts @@ -4,7 +4,7 @@ */ import { getCurrentUser } from '@nextcloud/auth' -import { Type as ShareType } from '@nextcloud/sharing' +import { ShareType } from '@nextcloud/sharing' import DownloadLimitEntry from '../components/DownloadLimitEntry.vue' @@ -22,8 +22,8 @@ export class DownloadLimitAction { get shareType() { return [ - ShareType.SHARE_TYPE_LINK, - ShareType.SHARE_TYPE_EMAIL, + ShareType.Link, + ShareType.Email, ] } diff --git a/src/admin.ts b/src/admin.ts index 778aa6ee..16deb063 100644 --- a/src/admin.ts +++ b/src/admin.ts @@ -7,7 +7,7 @@ import Vue from 'vue' import AdminSettings from './views/AdminSettings.vue' -new Vue({ - el: '#admin-download-limit', +const instance = new Vue({ render: h => h(AdminSettings), }) +instance.$mount('#admin-download-limit') diff --git a/src/components/DownloadLimitEntry.vue b/src/components/DownloadLimitEntry.vue index 29076dae..720a581c 100644 --- a/src/components/DownloadLimitEntry.vue +++ b/src/components/DownloadLimitEntry.vue @@ -34,10 +34,11 @@