Skip to content
Snippets Groups Projects
Verified Commit e384aff5 authored by Julian's avatar Julian Committed by magicfelix
Browse files

Use a FAB for the update indicator

parent 521eee80
No related branches found
No related tags found
1 merge request!284Draft: Redesign entering of lesson documentation
import {ERROR, SAVED, UPDATING, CHANGES} from "../../alsijil/UpdateStatuses.js"; import {CHANGES, ERROR, SAVED, UPDATING} from "../../alsijil/UpdateStatuses.js";
export default { export default {
created() { created() {
...@@ -44,28 +44,33 @@ export default { ...@@ -44,28 +44,33 @@ export default {
default: default:
return "mdi-alert-outline"; return "mdi-alert-outline";
} }
},
isAbleToClick() {
return this.status === CHANGES || this.status === ERROR;
} }
}, },
template: ` template: `
<v-tooltip bottom> <v-tooltip bottom>
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<div <v-btn
v-bind="attrs" absolute
v-on="on" fab
right
icon
v-bind="attrs"
v-on="on"
@click="() => {isAbleToClick ? $emit('manual-update') : null}"
:loading="status === UPDATING"
> >
<v-icon <v-icon
v-if="status !== UPDATING" v-if="status !== UPDATING"
@click="() => {status === SAVED ? null : $emit('manual-update')}"
:color="color" :color="color"
> >
{{ icon }} {{ icon }}
</v-icon> </v-icon>
<v-progress-circular </v-btn>
v-else
indeterminate
:color="color"
></v-progress-circular>
</div>
</template> </template>
<span>{{ text }}</span> <span>{{ text }}</span>
</v-tooltip> </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