-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7c39a5
commit 7b0dc88
Showing
1 changed file
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,41 @@ | ||
<template> | ||
<div> | ||
<oc-button id="survey" appearance="raw" variation="inverse" href="https://indico.cern.ch/event/1315215/" target="_blank" type="a" v-oc-tooltip="'Usability survey for CERNBox Web'"> | ||
<oc-button | ||
id="survey" | ||
ref="surveyButton" | ||
appearance="raw" | ||
variation="inverse" | ||
href="https://indico.cern.ch/event/1315215/" | ||
target="_blank" | ||
type="a" | ||
v-oc-tooltip="'Share Your Feedback! Fill out our usability survey and help us improve.'" | ||
> | ||
<oc-icon name="survey" /> | ||
<span>Survey</span> | ||
</oc-button> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss"> | ||
</style> | ||
<script lang="ts"> | ||
export default { | ||
name: 'Survey', | ||
mounted() { | ||
const surveyButton = this.$refs.surveyButton.$el | ||
if (localStorage.getItem('mouseOverDoneSurvey') !== 'true') { | ||
surveyButton.focus() | ||
// Wait for 7 seconds, then trigger a blur event to unfocus the element | ||
setTimeout(() => { | ||
surveyButton.blur() | ||
}, 7000) | ||
// Update local storage to indicate that the event has been done. | ||
localStorage.setItem('mouseOverDoneSurvey', 'true') | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss"></style> |