refactor: better toast messages + minor ui improvements

This commit is contained in:
liyasthomas
2021-08-11 16:57:40 +05:30
parent 829e116e04
commit 0738ad1c15
52 changed files with 300 additions and 275 deletions

View File

@@ -32,7 +32,7 @@
v-tippy="{ theme: 'tooltip' }"
icon="create_new_folder"
:title="$t('folder.new')"
class="group-hover:inline-flex hidden"
class="hidden group-hover:inline-flex"
@click.native="$emit('add-folder', { folder, path: folderPath })"
/>
<tippy
@@ -219,18 +219,16 @@ export default {
teamUtils
.deleteCollection(this.$apollo, this.folder.id)
.then(() => {
// Result
this.$toast.success(this.$t("deleted"), {
this.$toast.error(this.$t("deleted"), {
icon: "delete",
})
this.$emit("update-team-collections")
})
.catch((error) => {
// Error
this.$toast.error(this.$t("error_occurred"), {
icon: "done",
.catch((e) => {
this.$toast.error(this.$t("error.something_went_wrong"), {
icon: "error",
})
console.error(error)
console.error(e)
})
this.$emit("update-team-collections")
}