Skip to content

Commit

Permalink
nuxt migration
Browse files Browse the repository at this point in the history
  • Loading branch information
sawich committed Dec 8, 2023
1 parent 68a46f7 commit d04548b
Show file tree
Hide file tree
Showing 80 changed files with 6,883 additions and 28,020 deletions.
17 changes: 9 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,24 @@
},

"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@nuxt/eslint-config",

"plugin:perfectionist/recommended-natural",
"plugin:perfectionist/recommended-line-length",

"plugin:sonarjs/recommended",

"@vue/eslint-config-prettier/skip-formatting",
"@vue/eslint-config-typescript",
"@vue/eslint-config-prettier/skip-formatting"

"plugin:tailwindcss/recommended"
],

"plugins": ["perfectionist", "sonarjs", "@typescript-eslint"],
"plugins": ["perfectionist", "sonarjs"],
"files": ["*.vue"],
"parser": "@typescript-eslint/parser",

"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error"
"vue/attributes-order": "off"
}
},
{
Expand All @@ -39,9 +38,11 @@
},

"extends": [
"eslint:recommended",
"@nuxt/eslint-config",

"plugin:perfectionist/recommended-natural",
"plugin:perfectionist/recommended-line-length",

"plugin:sonarjs/recommended"
],

Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"semi": true,
"trailingComma": "es5",
"singleQuote": false,
"tabWidth": 2
"tabWidth": 2,
"plugins": ["prettier-plugin-tailwindcss"]
}
7 changes: 0 additions & 7 deletions .prettierrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"Vue.volar",
"Vue.vscode-typescript-vue-plugin",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss"
]
}
13 changes: 0 additions & 13 deletions LICENSE

This file was deleted.

77 changes: 67 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,75 @@
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct-single.svg)](https://stand-with-ukraine.pp.ua)
# Nuxt 3 Minimal Starter

# SoulWorker Items Viever
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/SpaceAfterYou/soulworker-items-viewer?style=for-the-badge) ![Lines of code](https://img.shields.io/tokei/lines/github/SpaceAfterYou/soulworker-items-viewer?style=for-the-badge) ![MatWorker](https://img.shields.io/badge/Mat-Worker-lightgrey?style=for-the-badge&logo=data:image/webp;base64,UklGRtYFAABXRUJQVlA4WAoAAAAQAAAALwAALwAAQUxQSCUAAAABQNu2bTbfnm7xofYL2bUXiIgJkHPgWnvwCS33vQ8tS3tySbUAAFZQOCCKBQAA0BcAnQEqMAAwAACACCWMAgruMlHcYmEBtj/Mb+yXroehnzjuoU5872F/3N9IT//3SjwZ72vdH2A0APlt9z+zL2A3g7+F/1L8ff3K/2u2Z+Q78o/tX5Lf1X9pfXC1Ar0fxM/CSoAeRb+q/7P/D/lF7GvyD+p/4r8wf719gP8b/l/9u/uv7T/2//+f8TmbP2jOzkvth/gp6IN0b1HpI0Zi9FRb20qHf42zrs8XziCziO+IZj78YEtEuOFVXwF8dWzO/ft1EfNQAAD+//5u2nhm8KyQOJ1BVnQLTkfeGlnzLEfT8MEuHGFyRuzLHk8rd9KvSrvbJjWzkwfR7piYfgt6VWAEW6ZwlM/F2SbIVGl2ESNx807sTCEvJ8kayYZcWxm3mVcKBup23B7GxmRY17Xxu9B46VQwC471zhiFif7F1HXODOzERU/GtDOApvNkVDI5b7YNQHrEMLtADlEtp5/BTeTvqHKY7bgRfYlQCLW1oBqrckq1Zde2tWWUuYZjOWObXn/+KGniEdV+BnYcGmEJ3180EVDBB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bgJxxeNveuRTvZk1nHhq4X/1S6OmQSAxonMA4b0HtKpZ9BjmC/v0tR3sfyggQGqI1VJetVurjQXDEJS2ZHH5PwDn5Ha8Qh3zPOt9Ktmt27yU4ZorOpp4NaO8fZJf/q9P/hiHSwwmMvdluGsv8A96sEQDbGAU//xXGio/MSZ7H1Oh4lyfN9YB1yqLt3wCIiNMOdtbz/3NU/zGf5P4tmHFt6uZt78RofTR0HRkczFSAU3ShsEifDV9X5DnLQ9xgLzSaC+MMaO93nswEAszHycVUAAAAA=) ![Discord](https://img.shields.io/discord/606442027873206292?style=for-the-badge) ![Twitch Status](https://img.shields.io/twitch/status/sawich?style=for-the-badge)
## Setup

## Chat 🙋
Make sure to install the dependencies:

Wanna chat with us, talk about changes, or just hang out? ~~We~~(I'm) have a Discord server just for that.
```bash
# npm
npm install

[![!](https://invidget.switchblade.xyz/SequFJP)](http://discord.gg/SequFJP)
# pnpm
pnpm install

## Contributors ❤️
# yarn
yarn install

### My regards:
# bun
bun install
```

- @abchsr
- @prozaks
## Development Server

Start the development server on `http://localhost:3000`:

```bash
# npm
npm run dev

# pnpm
pnpm run dev

# yarn
yarn dev

# bun
bun run dev
```

## Production

Build the application for production:

```bash
# npm
npm run build

# pnpm
pnpm run build

# yarn
yarn build

# bun
bun run build
```

Locally preview production build:

```bash
# npm
npm run preview

# pnpm
pnpm run preview

# yarn
yarn preview

# bun
bun run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
11 changes: 11 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<template>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>

<style>
* {
@apply text-white/90 outline-none;
}
</style>
7 changes: 7 additions & 0 deletions assets/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

a {
@apply no-underline hover:text-pink-500 ease-in-out transition-colors;
}
63 changes: 63 additions & 0 deletions components/items/search/input.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<script lang="ts" setup>
const request = ref("");
const type = [
{ value: "includes", name: "Includes" },
{ value: "starts-with", name: "Starts with" },
];
const where = [
{ value: "any-of", name: "Any of" },
{ value: "id", name: "Id" },
{ value: "name", name: "Name" },
{ value: "description", name: "Description" },
];
const selectedType = ref(type[0].value);
const selectedWhere = ref(where[0].value);
</script>

<template>
<form class="flex gap-4">
<input
class="w-full rounded bg-neutral-700 px-4"
placeholder="Search request..."
v-model="request"
type="text"
/>

<ItemsSearchSelectBadge>
<template #head> method </template>

<template #body>
<ItemsSearchSelect v-model="selectedType">
<ItemsSearchSelectOption
v-for="{ name, value } of type"
:value="value"
:key="value"
>
{{ name }}
</ItemsSearchSelectOption>
</ItemsSearchSelect>
</template>
</ItemsSearchSelectBadge>

<ItemsSearchSelectBadge>
<template #head> where </template>

<template #body>
<ItemsSearchSelect v-model="selectedWhere">
<ItemsSearchSelectOption
v-for="{ name, value } of where"
:value="value"
:key="value"
>
{{ name }}
</ItemsSearchSelectOption>
</ItemsSearchSelect>
</template>
</ItemsSearchSelectBadge>
</form>

<!-- https://youtu.be/5pxpOYSERz4 -->
</template>
Empty file.
9 changes: 9 additions & 0 deletions components/items/search/select/badge.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<div class="flex gap-2 rounded bg-black/50">
<span class="self-center pl-2">
<slot name="head" />
</span>

<slot name="body" />
</div>
</template>
11 changes: 11 additions & 0 deletions components/items/search/select/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script lang="ts" setup>
const value = defineModel();
</script>

<template>
<div class="flex gap-2 rounded bg-black/50">
<select class="rounded bg-neutral-700 px-2 text-white" v-model="value">
<slot />
</select>
</div>
</template>
11 changes: 11 additions & 0 deletions components/items/search/select/option.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script lang="ts" setup>
type Props = { value: string | number };
defineProps<Props>();
</script>

<template>
<option :value="value">
<slot />
</option>
</template>
15 changes: 15 additions & 0 deletions components/items/sidebar/gain-types.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script lang="ts" setup>
import { useGainTypes } from "@/stores/gain-types";
const { selectedGainTypes, gainTypes } = storeToRefs(useGainTypes());
</script>

<template>
<div>
<ItemsSidebarTogglableBlock
:selected="selectedGainTypes"
:locale-path="'gainType'"
:values="gainTypes"
/>
</div>
</template>
16 changes: 16 additions & 0 deletions components/items/sidebar/inventory-types.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<script lang="ts" setup>
import { useInventoryTypes } from "@/stores/inventory-types";
const { selectedInventoryTypes, inventoryType } =
storeToRefs(useInventoryTypes());
</script>

<template>
<div>
<ItemsSidebarTogglableBlock
:selected="selectedInventoryTypes"
:locale-path="'inventoryType'"
:values="inventoryType"
/>
</div>
</template>
15 changes: 15 additions & 0 deletions components/items/sidebar/slot-types.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script lang="ts" setup>
import { useSlotTypes } from "@/stores/slot-types";
const { selectedSlotTypes, slotTypes } = storeToRefs(useSlotTypes());
</script>

<template>
<div>
<ItemsSidebarTogglableBlock
:selected="selectedSlotTypes"
:locale-path="'slotType'"
:values="slotTypes"
/>
</div>
</template>
30 changes: 30 additions & 0 deletions components/items/sidebar/togglable-block.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<script lang="ts" setup>
type Props = { selected: Set<number>; localePath: string; values: number[] };
const props = defineProps<Props>();
function toggle(value: number) {
if (!props.selected.delete(value)) {
props.selected.add(value);
}
}
</script>

<template>
<SidebarTitledBlock>
<template #head> {{ $t(`${localePath}.name`) }} </template>

<template #body>
<section class="flex flex-wrap gap-2">
<SidebarToggleButton
:is-active="selected.has(value)"
v-for="value of values"
@click="toggle(value)"
:key="value"
>
{{ $t(`${localePath}.values.${value}`) }}
</SidebarToggleButton>
</section>
</template>
</SidebarTitledBlock>
</template>
11 changes: 11 additions & 0 deletions components/layout/footer-link.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script lang="ts" setup>
type Props = { href: string };
defineProps<Props>();
</script>

<template>
<a class="lowercase" :href="href">
<slot />
</a>
</template>
15 changes: 15 additions & 0 deletions components/layout/footer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script lang="ts" setup>
//
</script>

<template>
<section class="flex justify-center gap-8 bg-black/40 py-8">
<LayoutFooterLink href="https://github.com/sawich/soulworker-items-viewer">
GitHub
</LayoutFooterLink>

<LayoutFooterLink href="http://discord.gg/SequFJP">
Discord
</LayoutFooterLink>
</section>
</template>
Loading

0 comments on commit d04548b

Please sign in to comment.