Skip to content

Commit

Permalink
Merge pull request #6 from Anime-Manga/dev
Browse files Browse the repository at this point in the history
## [2.0.1] - 17-06-2023
  • Loading branch information
cesxhin authored Jun 17, 2023
2 parents f466e2d + 935df60 commit b12df6a
Show file tree
Hide file tree
Showing 32 changed files with 420 additions and 286 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ example:
NUXT_PUBLIC_WEB_BASE: "http://localhost:33333" #http://localhost:3000 [default]

#--- AUTH ---
NUXT_PUBLIC_AUTH_ORIGIN: "http://<your-ip>:3000" #http://localhost:3000
NUXT_SECRET: "secret" #animemanga [default]
NUXT_PUBLIC_SECRET: "secret" #animemanga [default]
```
16 changes: 14 additions & 2 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Released]
## [2.0.1] - 17-06-2023
### Added
- use default cookie for set auth with encryption
- If problem certificate, show for accept certificate

### Fixed
- GUI of the description
- When is set fullscreen by mobile for read book, hide menu for sideMenu

### Removed
- Lib for auth

## [2.0.0] - 28-05-2023
### Add
### Added
- Account for tracer of book/video
- New manga for adult
- All cards set icon for set if video or book
Expand All @@ -22,7 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0


## [1.0.2] - 26-12-2022
### Add
### Added
- Read page or list

### Changed
Expand Down
4 changes: 2 additions & 2 deletions src/components/card/details/descriptionDynamic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ function check(index) {
color: white;
padding: 5px;
top: -1;
left: -6px;
left: -7px;
border-top-left-radius: 6px;
border-bottom-left-radius: 1px;
border-bottom-left-radius: 6px;
}
}
Expand Down
10 changes: 3 additions & 7 deletions src/components/card/details/detailsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</v-icon>
</template>
</v-btn>
<template v-if="!isNil(account?.user) || !isNil(item.watchList)">
<template v-if="!isNil(store.getUser) || !isNil(item.watchList)">
<v-btn
color="info ml-1"
@click="setWatchList(item.watchList)"
Expand Down Expand Up @@ -115,7 +115,7 @@
:item="item"
/>
<getStarted
v-if="status === 'authenticated'"
v-if="!isNil(store.getUser)"
class="mt-2"
:item="item"
:contents="contents"
Expand All @@ -129,13 +129,9 @@
</v-dialog>
</template>
<script setup>
import {useStore} from "~/store";
//store
const store = useStore();
//user
const {data: account, status} = useAuth();
//api
const {downloadContent, reDownloadContent, removeContent, addWatchList, removeWatchList, getStatus} = useApi();
Expand Down Expand Up @@ -231,7 +227,7 @@ function close(){
}
async function setWatchList(state){
let username = account.value.user.name;
let username = store.getUser?.username;
try {
if(state === true)
await removeWatchList(username, item.value.name_id, item.value.nameCfg);
Expand Down
9 changes: 4 additions & 5 deletions src/components/card/details/getStarted.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,11 @@ const props = defineProps({
})
const {item, contents} = toRefs(props);
//user
const {data: account, status} = useAuth();
//api
const {getProgress} = useApi();
const store = useStore();
const progressTracker = ref(null);
const foundProgress = ref(null);
const foundMedia = ref(null);
Expand Down Expand Up @@ -115,10 +114,10 @@ watch(foundMedia, (newVal, oldVal) => {
}, {deep: true})
async function setProgress(){
if(status.value === 'authenticated' && isNil(item.value.urlPageDownload))
if(!isNil(store.getUser) && isNil(item.value.urlPageDownload))
{
try{
progressTracker.value = await getProgress(item.value.type, item.value.name_id, account.value.user.name, item.value.nameCfg);
progressTracker.value = await getProgress(item.value.type, item.value.name_id, store.getUser?.username, item.value.nameCfg);
foundProgress.value = true;
}catch(err){
if(err.response.status === 404)
Expand Down
1 change: 0 additions & 1 deletion src/components/card/preview/previewCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
<script setup>
import {Buffer} from 'buffer'
import _ from 'lodash'
import {useStore} from "~/store";
const {isNil} = useLodash();
//store
const store = useStore();
Expand Down
64 changes: 64 additions & 0 deletions src/components/elements/fastDialog.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<template>
<ClientOnly>
<v-dialog
v-bind:model-value="modelValue"
>
<v-card>
<v-card-title>{{ title }}</v-card-title>
<v-card-text
v-html="text"
>
</v-card-text>
<v-card-actions>
<v-btn
color="error"
@click="close()"
>
Close
</v-btn>
<v-spacer></v-spacer>
<v-btn
color="primary"
@click="actionButton"
>
{{ textBtn }}
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</ClientOnly>
</template>

<script setup>
const emit = defineEmits(['update:modelValue'])
const props = defineProps({
modelValue:{
type: Boolean,
default: false
},
title:{
type: String,
required: true
},
text:{
type: String,
required: true
},
actionButton:{
type: Function,
required: true
},
textBtn:{
type: String,
default: 'confirm'
}
});
function close(){
emit('update:modelValue', false);
}
</script>

<style lang="scss" scoped>
</style>
1 change: 0 additions & 1 deletion src/components/elements/notify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
</template>

<script setup>
import {useStore} from "~/store";
const store = useStore();
const getNotifications = computed(() => store.getNotifications);
Expand Down
133 changes: 67 additions & 66 deletions src/components/listNavigation.vue
Original file line number Diff line number Diff line change
@@ -1,58 +1,55 @@
<template>
<v-app-bar
color="primary"
density="compact"
collapse
elevation="0"
floating
>
<ClientOnly>
<v-app-bar
id="menu"
color="primary"
density="compact"
collapse
elevation="0"
floating
>

<v-icon
<v-icon
class="ml-4"
@click="show = !show"
>
$menu
</v-icon>
</v-app-bar>
<v-navigation-drawer
expand-on-hover
color="#363636"
rail
temporary
v-model="show"
>
<v-list
density="compact"
class="list-items"
:selected="select"
nav
@click="show = !show"
size="24"
>
$menu
</v-icon>
</v-app-bar>
<v-navigation-drawer
expand-on-hover
color="#363636"
rail
temporary
v-model="show"
>
<v-list-item
v-for="item in getSchemas"
:key="item.id"
:value="item"
:to="item.route"
<v-list
density="compact"
class="list-items"
:selected="select"
nav
>
<template
v-slot:prepend
<v-list-item
v-for="item in items"
:key="item.id"
:to="item.route"
>
<v-icon>{{item.icon}}</v-icon>
</template>

<v-list-item-title v-text="item.text" class="text-capitalize" />
<v-list-item-action
<template
v-slot:prepend
>
<v-icon size="24">{{item.icon}}</v-icon>
</template>

/>
</v-list-item>
</v-list>
</v-navigation-drawer>
<v-list-item-title v-text="item.text" class="text-capitalize" />
</v-list-item>
</v-list>
</v-navigation-drawer>
</ClientOnly>
</template>

<script setup>
const {
status
} = useAuth()
import {useStore} from "~/store";
//variables
const select = ref();
Expand All @@ -64,6 +61,8 @@ const store = useStore();
//api
const {getCfg} = useApi();
const items = ref([]);
const result = await getCfg();
store.setSchemas(result);
Expand All @@ -80,59 +79,61 @@ function getIcon(id){
}
}
const getSchemas = computed(() => {
const items = [{
watch(() => store.getUser, () => {
items.value = [{
id:'all',
text:'All local DB',
icon:'$database',
route: '/search/all'
},
{
id:'local',
text:'Search local DB',
icon:'$search',
route: '/search/search-local'
}]
{
id:'local',
text:'Search local DB',
icon:'$search',
route: '/search/search-local'
}]
let schemas = store.getSchemas;
for (const key in schemas) {
items.push({
items.value.push({
'id':`search-${schemas[key].name}`,
text:`Search ${schemas[key].name}`,
icon: getIcon(schemas[key].name),
route: `/search/search-${schemas[key].name}`
})
}
if(status.value === 'authenticated')
if(!isNil(store.getUser))
{
items.push({
'id':`watchList`,
text:`WatchList`,
items.value.push({
id:'watchList',
text:'WatchList',
icon: '$saved',
route: '/search/search-watchlist'
},{
'id':`logout`,
text:`Logout`,
id:'logout',
text:'Logout',
icon: '$logout',
route: '/auth/logout'
})
}else{
items.push({
'id':`login`,
text:`Login`,
items.value.push({
id:'login',
text:'Login',
icon: '$login',
route: '/auth/login'
})
}
return items;
})
}, {immediate: true})
</script>

<style lang="scss" scoped>
.list-items{
color: white !important;
}
#menu{
z-index: 2 !important;
}
</style>
Loading

0 comments on commit b12df6a

Please sign in to comment.