Skip to content

Commit dec89a2

Browse files
authored
Merge pull request #125 from netervati/feat/revamp
[Revamp] Improve the product design
2 parents 5e973ac + 02d958b commit dec89a2

File tree

126 files changed

+2129
-3320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+2129
-3320
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
NUXT_PUBLIC_ON_MAINTENANCE=
22
SUPABASE_KEY=
3+
SUPABASE_SERVICE_KEY=
34
SUPABASE_URL=

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Ignore artifacts:
22
build
33
coverage
4+
types/supabase.ts

.prettierrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ module.exports = {
33
trailingComma: 'es5',
44
semi: true,
55
singleQuote: true,
6-
vueIndentScriptAndStyle: true
6+
vueIndentScriptAndStyle: true,
7+
endOfLine: 'auto'
78
};

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
[Gateway](https://gateway.pseudorestapi.com/) |
88
[Official Documentation](https://pseudorestapi.com/docs)
99

10+
> ⚠️ I'm currently reworking this project.
11+
1012
**PseudoRESTAPI** is a tool that enables you to create mock REST APIs quickly and easily, without requiring any language or framework skills.
1113

1214
- Create API endpoints for your mock server

components/api/table.vue

Lines changed: 0 additions & 100 deletions
This file was deleted.

components/app/grid.vue

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<script lang="ts" setup>
2+
import useApp from '~~/stores/useApp';
3+
import { AppWithAppKey } from '~~/types/models';
4+
5+
const appStore = useApp();
6+
7+
const handleOpen = (app: AppWithAppKey) => {
8+
/**
9+
We can directly assign the app to the target here
10+
to reduce backend requests.
11+
*/
12+
appStore.setTarget(app);
13+
14+
navigateTo(`/dashboard/app/${app.app_keys[0].api_key}/models`);
15+
};
16+
</script>
17+
18+
<template>
19+
<section class="gap-4 grid grid-cols-1 md:grid-cols-2 mt-4">
20+
<article
21+
v-for="app in appStore.list"
22+
:key="app.id"
23+
class="card border border-gray-300 hover:bg-gray-300"
24+
@click="handleOpen(app)"
25+
>
26+
<div class="card-body cursor-pointer">
27+
<h3 class="text-lg font-medium">{{ app.title }}</h3>
28+
</div>
29+
</article>
30+
</section>
31+
</template>

components/project/secretKeyBox.vue renamed to components/app/secretKeyBox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
sure to copy this!
1515
</p>
1616
<div class="mt-2">
17-
<input class="bg-emerald-300 input w-full" :value="secretKey" />
17+
<input class="bg-emerald-300 input w-full" readonly :value="secretKey" />
1818
</div>
1919
</article>
2020
</template>

components/footer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<footer class="footer border-b-8 border-violet-600 items-center p-6 md:text-lg">
33
<aside class="items-center grid-flow-col">
4-
<p>© 2023 PseudoRESTAPI - All right reserved.</p>
4+
<p>© 2023 PseudoRESTAPI - All rights reserved.</p>
55
</aside>
66
<nav class="grid-flow-col gap-4 md:place-self-center md:justify-self-end">
77
<p>Built by <NuxtLink class="text-violet-600 font-bold" to="https://www.christophertabula.net/">Christopher Tabula</NuxtLink></p>

components/form/input.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@
55
(e: 'change', value: string): void;
66
}>();
77
8-
const props = defineProps<{
8+
interface Props {
99
disabled: boolean;
1010
name: string;
1111
placeholder: string;
1212
rules?: FormRuleSchema;
13+
type?: 'text' | 'number';
1314
value?: string;
14-
}>();
15+
}
16+
17+
const props = withDefaults(defineProps<Props>(), {
18+
type: 'text',
19+
});
1520
1621
const validate = !props.rules ? () => true : runValidations(props.rules);
1722
const { value, errorMessage } = useField(() => props.name, validate);
@@ -29,6 +34,7 @@
2934
:disabled="props.disabled"
3035
:error="errorMessage !== undefined"
3136
:placeholder="props.placeholder"
37+
:type="props.type"
3238
@change="emit('change', value)"
3339
/>
3440
<p class="text-red-600">

components/input.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010
error?: boolean;
1111
modelValue: string;
1212
placeholder?: string;
13+
type?: 'text' | 'number';
1314
}
1415
1516
const props = withDefaults(defineProps<Props>(), {
1617
class: '',
1718
disabled: false,
1819
error: false,
1920
placeholder: '',
21+
type: 'text',
2022
});
2123
2224
const mergedClass = computed(() => {
@@ -41,7 +43,7 @@
4143
<input
4244
v-model="inputValue"
4345
class="input input-bordered w-full max-w-vs"
44-
type="text"
46+
:type="props.type"
4547
:class="mergedClass"
4648
:disabled="disabled"
4749
:placeholder="placeholder"

0 commit comments

Comments
 (0)