Skip to content
Snippets Groups Projects
Commit d8673aba authored by Julian's avatar Julian
Browse files

Use a FAB for the update indicator

parent d3632d87
No related branches found
No related tags found
No related merge requests found
Pipeline #79462 failed
import {ERROR, SAVED, UPDATING, CHANGES} from "../../alsijil/UpdateStatuses.js";
import {CHANGES, ERROR, SAVED, UPDATING} from "../../alsijil/UpdateStatuses.js";
export default {
created() {
......@@ -44,28 +44,33 @@ export default {
default:
return "mdi-alert-outline";
}
},
isAbleToClick() {
return this.status === CHANGES || this.status === ERROR;
}
},
template: `
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<div
v-bind="attrs"
v-on="on"
<v-btn
absolute
fab
right
icon
v-bind="attrs"
v-on="on"
@click="() => {isAbleToClick ? $emit('manual-update') : null}"
:loading="status === UPDATING"
>
<v-icon
v-if="status !== UPDATING"
@click="() => {status === SAVED ? null : $emit('manual-update')}"
:color="color"
>
{{ icon }}
</v-icon>
<v-progress-circular
v-else
indeterminate
:color="color"
></v-progress-circular>
</div>
</v-btn>
</template>
<span>{{ text }}</span>
</v-tooltip>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment