Skip to content

Commit

Permalink
Some Fixes and Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
yossTheDev committed Aug 29, 2023
1 parent 9a31569 commit e2805e6
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
1 change: 1 addition & 0 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ android {

apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-community-keep-awake')
implementation project(':capacitor-app')
implementation project(':capacitor-status-bar')

Expand Down
3 changes: 3 additions & 0 deletions android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')

include ':capacitor-community-keep-awake'
project(':capacitor-community-keep-awake').projectDir = new File('../node_modules/@capacitor-community/keep-awake/android')

include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')

Expand Down
8 changes: 5 additions & 3 deletions src/components/EbookReader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,13 @@ function toggleChapters() {
:show="!isReady"
class="z-50"
>
<div class="absolute z-50 flex h-full w-full bg-md-dark-surface">
<div
class="absolute z-50 flex h-full w-full bg-md-light-surface dark:bg-md-dark-surface"
>
<div class="my-auto mx-auto flex flex-col text-center">
<p class="text-xl">Processing Book</p>
<p class="mb-3">It may take a while the fist time</p>
<kPreloader size="w-12 h-12 mx-auto"></kPreloader>
<p class="mb-4">It may take a while the fist time</p>
<kPreloader size="w-8 h-8 mx-auto"></kPreloader>
</div>
</div>
</TransitionRoot>
Expand Down
3 changes: 2 additions & 1 deletion src/components/Popups/StatsPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
kPage,
kPopup,
kBlock,
kLink,
} from 'konsta/vue';
// eslint-disable-next-line no-unused-vars
import { DateTime, Duration, Interval } from 'luxon';
Expand Down Expand Up @@ -47,7 +48,7 @@ onMounted(() => {
<kPage>
<kNavbar large title="Stats">
<template #right>
<div class="fixed right-0 mr-1 md:mr-3">
<div class="fixed right-0 mr-1">
<kLink @click="$router.replace('/')" navbar>Cancel</kLink>
</div></template
>
Expand Down
4 changes: 4 additions & 0 deletions src/pages/BookPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useAppStore } from '../stores/AppStore';
import { DateTime, Duration, Interval } from 'luxon';
import { kPage } from 'konsta/vue';
import { StatusBar } from '@capacitor/status-bar';
import { KeepAwake } from '@capacitor-community/keep-awake';
/* App Store */
const store = useAppStore();
Expand Down Expand Up @@ -46,6 +47,9 @@ onMounted(() => {
/* Hide Status Bar */
StatusBar.hide();
StatusBar.setOverlaysWebView({ overlay: true });
/* Enable Keep Awake */
KeepAwake.keepAwake();
});
onUnmounted(() => {
Expand Down
8 changes: 6 additions & 2 deletions src/pages/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import BookList from '../components/BookList.vue';
import StatsPopup from '../components/Popups/StatsPopup.vue';
import SpinnerItem from '../components/SpinnerItem.vue';
import { useAppStore } from '../stores/AppStore';
import { KeepAwake } from '@capacitor-community/keep-awake';
const store = useAppStore();
const router = useRouter();
Expand Down Expand Up @@ -136,6 +137,9 @@ watch(message, () => {
onMounted(() => {
StatusBar.show();
StatusBar.setOverlaysWebView({ overlay: false });
/* Disable Keep Awake */
KeepAwake.allowSleep();
});
</script>

Expand Down Expand Up @@ -237,7 +241,7 @@ onMounted(() => {
<kBlock>
<div
class="flex w-full gap-2 rounded-full bg-md-light-surface-3 px-3 dark:bg-md-dark-surface-1"
class="flex max-h-12 w-full rounded-full bg-md-light-surface-3 px-3 dark:bg-md-dark-surface-1"
>
<div class="ml-2 flex w-full">
<kSearchbar
Expand Down Expand Up @@ -353,7 +357,7 @@ onMounted(() => {
<!-- Search Bar -->
<kBlock class="hidden gap-2 md:flex">
<div
class="flex w-full gap-2 rounded-full bg-md-light-surface-3 px-3 dark:bg-md-dark-surface-1"
class="flex max-h-14 w-full gap-2 rounded-full bg-md-light-surface-3 px-3 dark:bg-md-dark-surface-1"
>
<div class="ml-2 flex w-full">
<kSearchbar
Expand Down

0 comments on commit e2805e6

Please sign in to comment.