From ad7cd1c50ddfa67813f1c1767965e27aabaa0520 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 19 Mar 2024 12:48:32 -0700 Subject: [PATCH] face: use dialog for prompt Signed-off-by: Varun Patil --- CHANGELOG.md | 1 + src/components/modal/FaceList.vue | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a82c68a2d..730b9d188 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file. - **Feature**: Improve UX of image editor especially on mobile - **Fix**: The cover photo of clusters will now update automatically when files are moved ([#1071](https://github.com/pulsejet/memories/issues/1071), [#458](https://github.com/pulsejet/memories/issues/458), [#661](https://github.com/pulsejet/memories/issues/661), [#1025](https://github.com/pulsejet/memories/issues/1025), [#761](https://github.com/pulsejet/memories/issues/761), [#665](https://github.com/pulsejet/memories/issues/665)) - **Fix**: Query performance improvements for MySQL and MariaDB with very large folders +- **Fix**: Allow face creation on Android ([#934](https://github.com/pulsejet/memories/issues/934)) ## [v6.2.2] - 2024-01-10 diff --git a/src/components/modal/FaceList.vue b/src/components/modal/FaceList.vue index 9365837f1..d07868a1b 100644 --- a/src/components/modal/FaceList.vue +++ b/src/components/modal/FaceList.vue @@ -37,6 +37,7 @@ const NcTextField = () => import('@nextcloud/vue/dist/Components/NcTextField.js' import ClusterGrid from '@components/ClusterGrid.vue'; import * as dav from '@services/dav'; +import * as utils from '@services/utils'; import type { ICluster, IFace } from '@typings'; @@ -107,8 +108,13 @@ export default defineComponent({ let name = String(); try { - // TODO: use a proper dialog - name = window.prompt(this.t('memories', 'Enter name of the new face'), String()) ?? String(); + const input = await utils.prompt({ + message: this.t('memories', 'Create a new face with this name?'), + title: this.t('memories', 'Create new face'), + name: this.t('memories', 'Name'), + }); + + name = input?.trim() ?? String(); if (!name) return; // Create new directory in WebDAV