-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from codedthemes/package-updates
custom class remove, footer add, eslint any error solved and all pack…
- Loading branch information
Showing
22 changed files
with
1,938 additions
and
1,706 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<script setup lang="ts"> | ||
import { shallowRef } from 'vue'; | ||
const footerLink = shallowRef([ | ||
{ | ||
title: 'Home', | ||
url: '/' | ||
}, | ||
{ | ||
title: 'Documentation', | ||
url: 'https://codedthemes.gitbook.io/berry-vuetify/' | ||
}, | ||
{ | ||
title: 'Support', | ||
url: 'https://codedthemes.support-hub.io/' | ||
} | ||
]); | ||
</script> | ||
<template> | ||
<v-footer class="px-0 footer mt-2"> | ||
<v-row justify="center" align="center" no-gutters> | ||
<v-col cols="12" sm="6"> | ||
<p class="text-body-1 mb-0 text-sm-left text-center"> | ||
Berry ♥ crafted by Team | ||
<a href="https://themeforest.net/user/codedthemes" class="text-darkText text-decoration-none" target="_blank">Codedthemes</a> | ||
</p> | ||
</v-col> | ||
<v-col class="text-sm-right text-center" cols="12" sm="6"> | ||
<a | ||
v-for="(item, i) in footerLink" | ||
:key="i" | ||
class="mx-2 text-body-1 text-darkText text-decoration-none" | ||
target="_blank" | ||
:href="item.url" | ||
> | ||
{{ item.title }} | ||
</a> | ||
</v-col> | ||
</v-row> | ||
</v-footer> | ||
</template> | ||
|
||
<style lang="scss"> | ||
.v-footer { | ||
position: unset; | ||
} | ||
footer { | ||
a { | ||
&:hover { | ||
color: rgb(var(--v-theme-primary)) !important; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,3 @@ | |
} | ||
} | ||
|
||
.rounded-square { | ||
width: 20px; | ||
height: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module 'vue3-apexcharts'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
export { fakeBackend }; | ||
|
||
interface User { | ||
id: number; | ||
username: string; | ||
password: string; | ||
firstName: string; | ||
lastName: string; | ||
} | ||
|
||
interface ResponseBody { | ||
id: number; | ||
username: string; | ||
firstName: string; | ||
lastName: string; | ||
token: string; | ||
} | ||
|
||
function fakeBackend() { | ||
const users = [{ id: 1, username: '[email protected]', password: 'admin123', firstName: 'Codedthemes', lastName: '.com' }]; | ||
const users: User[] = [{ id: 1, username: '[email protected]', password: 'admin123', firstName: 'Codedthemes', lastName: '.com' }]; | ||
const realFetch = window.fetch; | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
window.fetch = function (url: any, opts: any) { | ||
return new Promise((resolve: any, reject) => { | ||
|
||
window.fetch = function (url: string, opts: { method: string; headers: { [key: string]: string }; body?: string }) { | ||
return new Promise<Response>((resolve, reject) => { | ||
// wrap in timeout to simulate server api call | ||
setTimeout(handleRoute, 500); | ||
|
||
|
@@ -24,13 +40,10 @@ function fakeBackend() { | |
} | ||
|
||
// route functions | ||
|
||
function authenticate() { | ||
const { username, password } = body(); | ||
const user: any = users.find((x) => x.username === username && x.password === password); | ||
|
||
const user = users.find((x) => x.username === username && x.password === password); | ||
if (!user) return error('Username or password is incorrect'); | ||
|
||
return ok({ | ||
id: user.id, | ||
username: user.username, | ||
|
@@ -46,17 +59,16 @@ function fakeBackend() { | |
} | ||
|
||
// helper functions | ||
|
||
function ok(body: any) { | ||
resolve({ ok: true, text: () => Promise.resolve(JSON.stringify(body)) }); | ||
function ok(body: User[] | ResponseBody): void { | ||
resolve({ ok: true, text: () => Promise.resolve(JSON.stringify(body)) } as Response); | ||
} | ||
|
||
function unauthorized() { | ||
resolve({ status: 401, text: () => Promise.resolve(JSON.stringify({ message: 'Unauthorized' })) }); | ||
resolve({ status: 401, text: () => Promise.resolve(JSON.stringify({ message: 'Unauthorized' })) } as Response); | ||
} | ||
|
||
function error(message: string) { | ||
resolve({ status: 400, text: () => Promise.resolve(JSON.stringify({ message })) }); | ||
resolve({ status: 400, text: () => Promise.resolve(JSON.stringify({ message })) } as Response); | ||
} | ||
|
||
function isAuthenticated() { | ||
|
@@ -67,5 +79,5 @@ function fakeBackend() { | |
return opts.body && JSON.parse(opts.body); | ||
} | ||
}); | ||
}; | ||
} as typeof window.fetch; // Type assertion here | ||
} |
Oops, something went wrong.