Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More vue updates #193

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
that.font = fondue;
that.$nextTick(() => {
that.working = false;
document.getElementById("Fontreport").scrollIntoView();
document.getElementById("report").scrollIntoView();
});
})
.catch(function () {
Expand Down
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
@drop.prevent="getFont"
@dragover.prevent="dragStatus(true)"
@mouseout="dragStatus(false)"
@keydown.esc="toggleModal(true)"
@keydown.esc="toggleInfoModal(true)"
tabindex="0"
:class="{ dragging, working }"
>
<TheFondue
@getFont="getFont"
@getExampleFont="getExampleFont"
@toggleModal="toggleModal"
@toggleInfoModal="toggleInfoModal"
:error="error"
/>
<FontReport :font="font" :isExamplefont="isExamplefont" />
<InfoModal v-if="showModal" @toggleModal="toggleModal" />
<InfoModal v-if="showInfoModal" @toggleInfoModal="toggleInfoModal" />
<div class="beta-message">
Heya! You’re looking at the beta site. Comments, bugs or feedback?
<a href="mailto:[email protected]">Let me know!</a>
Expand Down
4 changes: 2 additions & 2 deletions src/components/InfoModal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import toggleModal from "../mixins/toggleModal.js";
import toggleInfoModal from "../mixins/toggleInfoModal.js";

export default {
mixins: [toggleModal],
mixins: [toggleInfoModal],
};
2 changes: 1 addition & 1 deletion src/components/InfoModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
type="button"
aria-label="Info"
class="info"
@click="toggleModal"
@click="toggleInfoModal"
></button>
<div class="modal-content">
<p class="modal-title">Wakamai Fondue</p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/TheFondue.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import toggleModal from "../mixins/toggleModal.js";
import toggleInfoModal from "../mixins/toggleInfoModal.js";
import FileDrop from "./FileDrop.vue";

export default {
mixins: [toggleModal],
mixins: [toggleInfoModal],
props: ["error"],
components: {
FileDrop,
Expand Down
2 changes: 1 addition & 1 deletion src/components/TheFondue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
type="button"
aria-label="Info"
class="info"
@click="toggleModal"
@click="toggleInfoModal"
></button>
<FileDrop :error="error" />
<a href="https://pixelambacht.nl" target="_blank" class="logo"
Expand Down
3 changes: 0 additions & 3 deletions src/components/report/FontSummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ export default {
};
},
computed: {
hasLocalization() {
return this.font.languageSystems.length > 0;
},
featureLength() {
return this.font.features.length || "no";
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/report/FontSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
)
}}.
</p>
<template v-if="hasLocalization">
<template v-if="localizations.length > 0">
<h3>Localization</h3>
<p>{{ $filters.listify(localizations) }}.</p>
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/mixins/toggleModal.js → src/mixins/toggleInfoModal.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export default {
methods: {
toggleModal() {
toggleInfoModal() {
// Quick and clean way to emit to grandparent
// that modal should be opened/closed
let vm = this;
while (vm) {
vm.$emit("toggleModal");
vm.$emit("toggleInfoModal");
vm = vm.$parent;
}
},
Expand Down