Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Merge requests
!1204
Resolve "Move UpdateIndicator from Alsijil"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Move UpdateIndicator from Alsijil"
827-move-updateindicator-from-alsijil-2
into
820-supply-room-id-and-name-via-graphql
Overview
4
Commits
1
Pipelines
4
Changes
3
Merged
Julian
requested to merge
827-move-updateindicator-from-alsijil-2
into
820-supply-room-id-and-name-via-graphql
2 years ago
Overview
4
Commits
1
Pipelines
4
Changes
3
Expand
Closes
#827 (closed)
0
0
Merge request reports
Compare
820-supply-room-id-and-name-via-graphql
version 2
5cc002a5
2 years ago
version 1
8a84b4c5
2 years ago
820-supply-room-id-and-name-via-graphql (base)
and
latest version
latest version
02da999f
1 commit,
2 years ago
version 2
5cc002a5
1 commit,
2 years ago
version 1
8a84b4c5
1 commit,
2 years ago
3 files
+
92
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
aleksis/core/frontend/components/generic/UpdateIndicator.vue
0 → 100644
+
85
−
0
Options
<
template
>
<v-tooltip
bottom
>
<template
#activator
="
{ on, attrs }">
<v-btn
right
icon
v-bind=
"attrs"
v-on=
"on"
@
click=
"handleClick"
:loading=
"status === $options.UPDATING"
>
<v-icon
v-if=
"status !== $options.UPDATING"
:color=
"color"
>
{{
icon
}}
</v-icon>
</v-btn>
</
template
>
<span>
{{ text }}
</span>
</v-tooltip>
</template>
<
script
>
export
default
{
ERROR
:
"
ERROR
"
,
// Something went wrong
SAVED
:
"
SAVED
"
,
// Everything alright
UPDATING
:
"
UPDATING
"
,
// We are sending something to the server
CHANGES
:
"
CHANGES
"
,
// the user changed something, but it has not been saved yet
name
:
"
UpdateIndicator
"
,
emits
:
[
"
manual-update
"
],
props
:
{
status
:
{
type
:
String
,
required
:
true
,
},
},
computed
:
{
text
()
{
switch
(
this
.
status
)
{
case
this
.
$options
.
SAVED
:
return
this
.
$t
(
"
status.saved
"
);
case
this
.
$options
.
UPDATING
:
return
this
.
$t
(
"
status.updating
"
);
case
this
.
$options
.
CHANGES
:
return
this
.
$t
(
"
status.changes
"
);
default
:
return
this
.
$t
(
"
status.error
"
);
}
},
color
()
{
switch
(
this
.
status
)
{
case
this
.
$options
.
SAVED
:
return
"
success
"
;
case
this
.
$options
.
CHANGES
:
return
"
secondary
"
;
case
this
.
$options
.
UPDATING
:
return
"
secondary
"
;
default
:
return
"
error
"
;
}
},
icon
()
{
switch
(
this
.
status
)
{
case
this
.
$options
.
SAVED
:
return
"
$success
"
;
case
this
.
$options
.
CHANGES
:
return
"
mdi-dots-horizontal
"
;
default
:
return
"
$warning
"
;
}
},
isAbleToClick
()
{
return
(
this
.
status
===
this
.
$options
.
CHANGES
||
this
.
status
===
this
.
$options
.
ERROR
);
},
},
methods
:
{
handleClick
()
{
if
(
this
.
isAbleToClick
)
{
emit
(
'
manual-update
'
);
}
}
}
};
</
script
>
Loading