Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Språksamlingane
beta.ordbok.uib.no
Commits
f5735a14
Commit
f5735a14
authored
Nov 18, 2021
by
Henrik Askjer
Browse files
add copy notification
parent
30c5ab92
Changes
1
Show whitespace changes
Inline
Side-by-side
src/components/ArticleFooter.vue
View file @
f5735a14
<
template
>
<div
class=
"article_footer"
>
<v-snackbar
center
left
light
v-model=
'copy_popup'
timeout=
"2000"
>
<span
class=
"text-center"
>
Kopiert til utklippstavla
</span>
<template
v-slot:action=
"
{ attrs }">
<v-btn
color=
"primary"
text
v-bind=
"attrs"
@
click=
"copy_popup = false"
>
<v-icon>
close
</v-icon>
</v-btn>
</
template
>
</v-snackbar>
<v-btn
v-if=
"!webShareApiSupported || $vuetify.breakpoint.mdAndUp"
x-small
depressed
class=
"toolbar-button"
rounded
tabindex=
"0"
@
click=
"copy_link"
>
<v-icon
small
>
link
</v-icon>
<span
class =
"button-text"
>
Kopier lenke
</span>
<v-btn
v-if=
"!webShareApiSupported || $vuetify.breakpoint.mdAndUp"
x-small
depressed
class=
"toolbar-button"
rounded
tabindex=
"0"
@
click=
"copy_link"
>
<v-icon
small
>
link
</v-icon><span
class =
"button-text"
>
Kopier lenke
</span>
</v-btn>
<v-btn
v-if=
"webShareApiSupported"
depressed
x-small
class=
"toolbar-button"
rounded
tabindex=
"0"
@
click=
"shareViaWebShare"
>
<v-icon
x-small
>
share
</v-icon><span
class =
"button-text"
>
Del ordet
</span>
</v-btn>
...
...
@@ -52,6 +70,7 @@ export default {
},
data
:
function
()
{
return
{
copy_popup
:
false
,
citation_dialog
:
false
}
...
...
@@ -85,12 +104,15 @@ export default {
},
copy_link
()
{
navigator
.
clipboard
.
writeText
(
this
.
create_link
());
this
.
copy_popup
=
true
},
copy_citation
()
{
let
citation
=
document
.
getElementById
(
"
citation
"
).
textContent
;
navigator
.
clipboard
.
writeText
(
citation
)
this
.
citation_dialog
=
false
this
.
copy_popup
=
true
},
close_citation_dialog
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment