Skip to content

Commit

Permalink
fixup! Migrate icons to material design icons
Browse files Browse the repository at this point in the history
Signed-off-by: greta <gretadoci@gmail.com>
  • Loading branch information
GretaD committed Aug 15, 2022
1 parent 535b7b0 commit 2e3dce7
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 20 deletions.
6 changes: 3 additions & 3 deletions src/components/AccountForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,17 @@
<div class="account-form__submit-buttons">
<ButtonVue v-if="mode === 'auto'"
class="account-form__submit-button"
type="primary submit"
type="primary"
:disabled="isDisabledAuto"
@click.prevent="onSubmit">
<IconLoading v-if="loading" class="account-form__submit-button__spinner" />
<IconLoading v-if="loading" class="account-form__submit-button__spinner" :size="20" />
<IconCheck v-else class="account-form__submit-button__spinner" :size="20" />
{{ submitButtonText }}
</ButtonVue>

<ButtonVue v-else-if="mode === 'manual'"
class="account-form__submit-button"
type="submit primary"
type="primary"
:disabled="isDisabledManual"
@click.prevent="onSubmit">
<template #icon>
Expand Down
48 changes: 35 additions & 13 deletions src/components/AliasForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,57 @@
required>
</div>
<div class="button-group">
<button
class="icon"
type="submit"
:class="loading ? 'icon-loading-small-dark' : 'icon-checkmark'"
:title="t('mail', 'Update alias')" />
<ButtonVue
type="tertiary-no-background"
:title="t('mail', 'Update alias')">
<template #icon>
<IconLoading v-if="loading" :size="20" />
<IconCheck v-else :size="20" />
</template>
</ButtonVue>
</div>
</form>
<div v-else class="alias-item">
<p><strong>{{ alias.name }}</strong> &lt;{{ alias.alias }}&gt;</p>
<div class="button-group">
<button
class="icon icon-rename"
<ButtonVue
type="tertiary-no-background"
:title="t('mail', 'Show update alias form')"
@click="showForm = true" />
<button v-if="!alias.provisioned"
class="icon"
@click="showForm = true">
<template #icon>
<IconRename :size="20" />
</template>
</ButtonVue>
<ButtonVue v-if="!alias.provisioned"
type="tertiary-no-background"
:title="t('mail', 'Delete alias')"
:class="loading ? 'icon-loading-small-dark' : 'icon-delete'"
@click="deleteAlias" />
@click="deleteAlias">
<template #icon>
<IconLoading v-if="loading" :size="20" />
<IconDelete v-else :size="20" />
</template>
</ButtonVue>
</div>
</div>
</div>
</template>

<script>
import logger from '../logger'

import ButtonVue from '@nextcloud/vue/dist/Components/ButtonVue'
import IconLoading from '@nextcloud/vue/dist/Components/LoadingIcon'
import IconDelete from 'vue-material-design-icons/Delete'
import IconRename from 'vue-material-design-icons/Pencil'
import IconCheck from 'vue-material-design-icons/Check'
export default {
name: 'AliasForm',
components: {
ButtonVue,
IconRename,
IconLoading,
IconDelete,
IconCheck,
},
props: {
account: {
type: Object,
Expand Down
2 changes: 1 addition & 1 deletion src/components/AliasSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</ButtonVue>

<ButtonVue v-if="showForm"
type="primary submit"
type="primary"
form="createAliasForm"
:disabled="loading">
<template #icon>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Envelope.vue
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ export default {
.junk-icon-style {
opacity: .2;
display: flex;
top: 9px;
top: 14px;
left: 34px;
background-size: 16px;
height: 20px;
Expand Down Expand Up @@ -739,7 +739,7 @@ list-item-style.draft .app-content-list-item-line-two {
}
::v-deep.icon-important.app-content-list-item-star {
position: absolute;
top: 9px;
top: 14px;
z-index: 1;
}
.app-content-list-item-star.favorite-icon-style {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SieveAccountForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
{{ t('mail', 'Oh Snap!') }}
{{ errorMessage }}
</p>
<ButtonVue type="primary submit"
<ButtonVue type="primary"
:disabled="loading"
@click.prevent="onSubmit">
{{ t('mail', 'Save sieve settings') }}
Expand Down

0 comments on commit 2e3dce7

Please sign in to comment.