refactor: remove icons from toast

This commit is contained in:
liyasthomas
2021-11-19 21:13:58 +05:30
parent cad8f3e856
commit 26429466e9
58 changed files with 156 additions and 425 deletions

View File

@@ -44,7 +44,7 @@
v-if="team.myRole === 'OWNER'"
svg="edit"
class="rounded-none"
:label="$t('action.edit').toString()"
:label="$t('action.edit')"
@click.native="
() => {
$emit('edit-team')
@@ -75,7 +75,7 @@
<SmartItem
v-if="team.myRole === 'OWNER'"
svg="edit"
:label="$t('action.edit').toString()"
:label="$t('action.edit')"
@click.native="
() => {
$emit('edit-team')
@@ -87,7 +87,7 @@
v-if="team.myRole === 'OWNER'"
svg="trash-2"
color="red"
:label="$t('action.delete').toString()"
:label="$t('action.delete')"
@click.native="
() => {
deleteTeam()
@@ -98,7 +98,7 @@
<SmartItem
v-if="!(team.myRole === 'OWNER' && team.ownersCount == 1)"
svg="trash"
:label="$t('team.exit').toString()"
:label="$t('team.exit')"
@click.native="
() => {
exitTeam()
@@ -150,22 +150,18 @@ const {
const t = i18n.t.bind(i18n)
const deleteTeam = () => {
if (!confirm(t("confirm.remove_team").toString())) return
if (!confirm(`${t("confirm.remove_team")}`)) return
pipe(
backendDeleteTeam(props.teamID),
TE.match(
(err) => {
// TODO: Better errors ? We know the possible errors now
$toast.error(t("error.something_went_wrong").toString(), {
icon: "error_outline",
})
$toast.error(`${t("error.something_went_wrong")}`)
console.error(err)
},
() => {
$toast.success(t("team.deleted").toString(), {
icon: "done",
})
$toast.success(`${t("team.deleted")}`)
}
)
)() // Tasks (and TEs) are lazy, so call the function returned
@@ -179,23 +175,17 @@ const exitTeam = () => {
TE.match(
(err) => {
// TODO: Better errors ?
$toast.error(t("error.something_went_wrong").toString(), {
icon: "error_outline",
})
$toast.error(`${t("error.something_went_wrong")}`)
console.error(err)
},
() => {
$toast.success(t("team.left").toString(), {
icon: "done",
})
$toast.success(`${t("team.left")}`)
}
)
)() // Tasks (and TEs) are lazy, so call the function returned
}
const noPermission = () => {
$toast.error(t("profile.no_permission").toString(), {
icon: "error_outline",
})
$toast.error(`${t("profile.no_permission")}`)
}
</script>