web/satellite/vuetify-poc: another round of small improvements
break text of download notification (e.g. when you download from preview) hide right/left buttons in object preview if there are not next/previous items add counter property to project name in "project create". Set max length so that user cannot type additional characters Issue: https://github.com/storj/storj/issues/6268 Change-Id: Icff95427a5c73c2fb5bb014ff09150283cc49e83
This commit is contained in:
parent
9a06de9058
commit
4a9d5edbfc
@ -21,13 +21,13 @@ export class Notificator {
|
|||||||
|
|
||||||
if (error instanceof APIError) {
|
if (error instanceof APIError) {
|
||||||
let template = `
|
let template = `
|
||||||
<p class="message-title">${error.message}</p>
|
<p class="message-title">${error.message}</p>
|
||||||
`;
|
`;
|
||||||
if (error.requestID) {
|
if (error.requestID) {
|
||||||
template = `
|
template = `
|
||||||
${template}
|
${template}
|
||||||
<p class="message-footer">Request ID: ${error.requestID}</p>
|
<p class="message-footer text-caption">Request ID: ${error.requestID}</p>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
notificationsStore.notifyError({ message: '', source }, template);
|
notificationsStore.notifyError({ message: '', source }, template);
|
||||||
return;
|
return;
|
||||||
|
@ -148,11 +148,18 @@ const isDeleting = computed((): boolean => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function onDownloadClick(): Promise<void> {
|
async function onDownloadClick(): Promise<void> {
|
||||||
|
if (isDownloading.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
isDownloading.value = true;
|
isDownloading.value = true;
|
||||||
await obStore.download(props.file).catch((err: Error) => {
|
try {
|
||||||
err.message = `Error downloading file. ${err.message}`;
|
await obStore.download(props.file);
|
||||||
notify.notifyError(err, AnalyticsErrorEventSource.FILE_BROWSER_ENTRY);
|
notify.success('', `<p>Keep this download link private.<br>If you want to share, use the Share option.</p>`);
|
||||||
});
|
} catch (error) {
|
||||||
|
error.message = `Error downloading file. ${error.message}`;
|
||||||
|
notify.notifyError(error, AnalyticsErrorEventSource.FILE_BROWSER_ENTRY);
|
||||||
|
}
|
||||||
isDownloading.value = false;
|
isDownloading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
:rules="nameRules"
|
:rules="nameRules"
|
||||||
label="Project Name"
|
label="Project Name"
|
||||||
:counter="MAX_NAME_LENGTH"
|
:counter="MAX_NAME_LENGTH"
|
||||||
|
:maxlength="MAX_NAME_LENGTH"
|
||||||
persistent-counter
|
persistent-counter
|
||||||
:hide-details="false"
|
:hide-details="false"
|
||||||
autofocus
|
autofocus
|
||||||
@ -68,6 +69,7 @@
|
|||||||
:hide-details="false"
|
:hide-details="false"
|
||||||
label="Project Description (Optional)"
|
label="Project Description (Optional)"
|
||||||
:counter="MAX_DESCRIPTION_LENGTH"
|
:counter="MAX_DESCRIPTION_LENGTH"
|
||||||
|
:maxlength="MAX_DESCRIPTION_LENGTH"
|
||||||
persistent-counter
|
persistent-counter
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<v-carousel v-model="constCarouselIndex" hide-delimiters show-arrows="hover" height="100vh">
|
<v-carousel v-model="constCarouselIndex" hide-delimiters show-arrows="hover" height="100vh">
|
||||||
<template #prev>
|
<template #prev>
|
||||||
<v-btn
|
<v-btn
|
||||||
|
v-if="files.length > 1"
|
||||||
color="default"
|
color="default"
|
||||||
class="rounded-circle"
|
class="rounded-circle"
|
||||||
icon
|
icon
|
||||||
@ -17,6 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #next>
|
<template #next>
|
||||||
<v-btn
|
<v-btn
|
||||||
|
v-if="files.length > 1"
|
||||||
color="default"
|
color="default"
|
||||||
class="rounded-circle"
|
class="rounded-circle"
|
||||||
icon
|
icon
|
||||||
@ -195,12 +197,14 @@ async function download(): Promise<void> {
|
|||||||
if (isDownloading.value) {
|
if (isDownloading.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
isDownloading.value = true;
|
isDownloading.value = true;
|
||||||
try {
|
try {
|
||||||
await obStore.download(currentFile.value);
|
await obStore.download(currentFile.value);
|
||||||
notify.success('Keep this download link private. If you want to share, use the Share option.');
|
notify.success('', `<p>Keep this download link private.<br>If you want to share, use the Share option.</p>`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notify.error('Can not download your file', AnalyticsErrorEventSource.OBJECT_DETAILS_MODAL);
|
error.message = `Error downloading file. ${error.message}`;
|
||||||
|
notify.notifyError(error, AnalyticsErrorEventSource.OBJECT_DETAILS_MODAL);
|
||||||
}
|
}
|
||||||
isDownloading.value = false;
|
isDownloading.value = false;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
closable
|
closable
|
||||||
variant="elevated"
|
variant="elevated"
|
||||||
:title="title(item.type)"
|
:title="title(item.type)"
|
||||||
:text="item.message"
|
:text="item.messageNode ? '' : item.message"
|
||||||
:type="getType(item.type)"
|
:type="getType(item.type)"
|
||||||
rounded="lg"
|
rounded="lg"
|
||||||
class="my-2"
|
class="my-2"
|
||||||
@ -23,7 +23,12 @@
|
|||||||
@mouseover="() => onMouseOver(item.id)"
|
@mouseover="() => onMouseOver(item.id)"
|
||||||
@mouseleave="() => onMouseLeave(item.id)"
|
@mouseleave="() => onMouseLeave(item.id)"
|
||||||
@click:close="() => onCloseClick(item.id)"
|
@click:close="() => onCloseClick(item.id)"
|
||||||
/>
|
>
|
||||||
|
<template #default>
|
||||||
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||||
|
<div v-if="item.messageNode" v-html="item.messageNode" />
|
||||||
|
</template>
|
||||||
|
</v-alert>
|
||||||
</v-snackbar>
|
</v-snackbar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user