Skip to content

Commit

Permalink
fix: make TOU and citation text identical
Browse files Browse the repository at this point in the history
have an update problem here but extracting the citation itself into a
reusable component e.g., CitationCard.vue, is making it render eagerly
within the dialog so it shows up embedded in the Footer
  • Loading branch information
alee committed Oct 11, 2023
1 parent f7613d8 commit 31895d6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
5 changes: 2 additions & 3 deletions app/components/Citation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@

<h2>Example Citation (click text to copy)</h2>
<v-textarea
v-model="citationText"
class="blockquote"
readonly
no-resize
v-model="citationText"
@click="copyToClipboard"
>
</v-textarea>
<h2>BibTeX (click text to copy)</h2>
<v-textarea
v-model="citationBibTex"
class="blockquote"
readonly
no-resize
v-model="citationBibTex"
@click="copyToClipboard"
>
</v-textarea>
Expand Down Expand Up @@ -83,7 +83,6 @@ class Citation extends Vue {
copyToClipboard(evt, data) {
const srcElement = evt.srcElement;
const citationText = srcElement.value;
console.log("citation text: ", citationText);
navigator.clipboard.writeText(citationText).then(() => {
srcElement.select();
this.clipboardMessage = true;
Expand Down
35 changes: 28 additions & 7 deletions app/components/TermsOfUse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,24 @@
itself.
</p>

<h2>Example reference</h2>
<p class="text-body-1">(SKOPE 2022)</p>

<h2>Example Citation</h2>
<blockquote class="blockquote">{{ citationText }}</blockquote>
<h2>BibTeX</h2>
<blockquote class="blockquote">{{ citationBibTex }}</blockquote>
<h2>Example Citation (click text to copy)</h2>
<v-textarea
v-model="citationText"
class="blockquote"
readonly
no-resize
@click="copyToClipboard"
>
</v-textarea>
<h2>BibTeX (click text to copy)</h2>
<v-textarea
v-model="citationBibTex"
class="blockquote"
readonly
no-resize
@click="copyToClipboard"
>
</v-textarea>

<h2>Contact us</h2>
<p class="text-body-1">
Expand Down Expand Up @@ -74,6 +85,7 @@ import { CITATION_TXT, CITATION_BIB } from "@/store/modules/_constants";
@Component()
class TermsOfUse extends Vue {
showTerms = true;
clipboardMessage = false;
created() {
if (process.client) {
Expand Down Expand Up @@ -101,6 +113,15 @@ class TermsOfUse extends Vue {
declineTerms() {
this.$warehouse.remove(this.termsAcceptedWarehouseKey);
}
copyToClipboard(evt, data) {
const srcElement = evt.srcElement;
const citationText = srcElement.value;
navigator.clipboard.writeText(citationText).then(() => {
srcElement.select();
this.clipboardMessage = true;
});
}
}
export default TermsOfUse;
Expand Down

0 comments on commit 31895d6

Please sign in to comment.