Skip to content

Commit

Permalink
fixing print settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinodh Rajan committed Jun 21, 2023
1 parent 364a408 commit 5066808
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion aksharamukha-front/src/components/ConverterMenu.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<span v-if="$q.platform.is.desktop">
<span v-if="$q.platform.is.desktop" class="print-hide">
<q-btn-group>
<q-btn color="grey-8" :flat="!(highlight == 'texts')" icon="notes" label="Text" to="/converter"/>
<q-btn color="grey-8" :flat="!(highlight == 'composer')" icon="language" label="Multi-Script" to="/composer" />
Expand Down
4 changes: 2 additions & 2 deletions aksharamukha-front/src/components/ListChar.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div class="row">
<div v-for="(char, index) in chars2" :key="char+index" class="col-xs-2 col-lg-1 q-mb-lg">
<span :class="script2.toLowerCase()"> {{char}} </span> <br/>
<span :class="getOutputClass(script2, [], char)"> {{char}} </span> <br/>
<span :class="checkDiacritics(chars1[index]) ? 'text-blue-4' : ''">
<span :class="script1.toLowerCase()">
<span :class="getOutputClass(script1, [], chars1[index])">
<span class="letter" :class="charsIr[index] !== chars[index] ? 'text-red-2' : ''"> {{chars1[index]}}
</span>
</span>
Expand Down
2 changes: 1 addition & 1 deletion aksharamukha-front/src/components/OutputOptions.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<q-collapsible :sublabel="label"
icon="settings" dense class="q-mb-xs q-mt-xs"
icon="settings" dense class="q-mb-xs q-mt-xs print-hide"
:style="{'visibility': optionCount === 0 ? 'hidden' : '', 'display': hideSourcePreserve && optionCount === 0 ? 'none' : ''}" ref="collapse"
>
<div class="col-xs-12 col-md-12 print-hide">
Expand Down
9 changes: 8 additions & 1 deletion aksharamukha-front/src/mixins/ScriptMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const ScriptMixin = {
apiCall: this.$axios.create({
// Always use http://localhost:8085/api/ (with a leading slash)
// http://localhost:8085/api/
baseURL: 'https://aksharamukha.appspot.com/api/',
baseURL: 'http://localhost:8085/api/',
timeout: 100000
}),
wikipediaCall: this.$axios.create({
Expand Down Expand Up @@ -290,6 +290,7 @@ export const ScriptMixin = {
'Bengali': [
{ label: 'Schwa deletion (Only word-final) <br/><small><div class="q-mt-sm">রাম → rām</div></small>', value: 'SchwaFinalBengali' },
{ label: 'য → ẏa & য় → ya', value: 'BengaliSwitchYaYYa' },
{ label: 'স্ব দ্ব → sva dva', value: 'BengaliSubojinedVa' },
{ label: 'Show Khanda TA <br/><small><div class="q-mt-sm">উৎকল → utˍkala</div></small>', value: 'ShowKhandaTa' }
],
'Gurmukhi': [
Expand Down Expand Up @@ -565,6 +566,7 @@ export const ScriptMixin = {
{ label: 'Use Jain OM<br/><small>ॐ → ꣽ</small>', value: 'jainomDevangari' },
{ label: 'ऍ → ॲ', value: 'DevanagariACandra' },
{ label: 'Use Anusvara to nasalize<br/><small>पञ्चगङ्गा → पंचगंगा</small>', value: 'DevanagariAnusvara' },
{ label: 'Show explicit schwa (Hindi) <small><div class="q-mt-sm">rāma → राम॔, viracita → विर॔॔चित॔</div></small>', value: 'ShowSchwaHindi' },
{ label: 'Prishthamatra orthography<br/><small>के कै को कौ → कॎ कॎे कॎा कॎो</small>', value: 'DevanagariPrishtamatra' }
],
'Dogra': [
Expand Down Expand Up @@ -705,6 +707,11 @@ export const ScriptMixin = {
],
'RomanReadable': [
{ label: 'Alternate long/short e/o <br/><small>e\' e o\' o → e ae o oa</small>', value: 'RomanReadableLongEO' },
{ label: 'Anusvara as n <br/><small>m\' → n\'</small>', value: 'AnusvaraAsN' },
{ label: 'Capitalize sentences', value: 'capitalizeSentence' }
],
'RomanColloquial': [
{ label: 'Anusvara as n <br/><small>maim → main</small>', value: 'AnusvaraAsN' },
{ label: 'Capitalize sentences', value: 'capitalizeSentence' }
],
'Khojki': [
Expand Down
10 changes: 8 additions & 2 deletions aksharamukha-front/src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@
</div>
</transition>
<a :href="brahmiImg" ref="imgDownload" :style="{'display': 'none'}" download="text.png"><button>Download</button></a>
<q-page-sticky position="top-right" :offset="[18, 18]" v-show="scrollExists">
<q-page-sticky position="top-right" :offset="[18, 18]" v-show="scrollExists" class="print-hide">
<span><q-btn round color="dark" @click="scrolldown" icon="arrow_downward" v-show="!scrolled"/><q-tooltip>Scroll down</q-tooltip> </span>
</q-page-sticky>
<q-page-sticky position="bottom-right" :offset="[18, 18]" v-back-to-top>
<span><q-btn round color="dark" @click="scrollup" icon="arrow_upward"/><q-tooltip>Scroll Up</q-tooltip> </span>
<span><q-btn round color="dark" @click="scrollup" icon="arrow_upward" class="print-hide"/><q-tooltip>Scroll Up</q-tooltip> </span>
</q-page-sticky>
</q-page>
</template>
Expand Down Expand Up @@ -629,6 +629,12 @@ export default {
printDocument: function () {
// manually hide the side menu while printing and bring it back when printing is complete
window.print()
this.$q.notify({
type: 'info',
message: 'Consider hiding the side-menu before attempting to print by clicking on the icon next to the logo.',
position: 'center',
timeout: 5000
})
},
getScript: async function (text) {
var data = {
Expand Down

0 comments on commit 5066808

Please sign in to comment.