Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.10.0 릴리즈 #264

Merged
merged 59 commits into from
Sep 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
fa379e7
fix: count handler
EATSTEAK Sep 8, 2022
4deee13
fix: zod schema in `/locker/count`
EATSTEAK Sep 8, 2022
997e03f
fix: transform DepartmentLockerCount
EATSTEAK Sep 8, 2022
a46dae3
fix: tab selection in `LockerStatus`
EATSTEAK Sep 8, 2022
cc7e87e
fix: error message in reserve
EATSTEAK Sep 8, 2022
8e4c389
feat: create `CantUnclaimError` type
EATSTEAK Sep 8, 2022
aefeccd
feat: create `CantUnclaimError` class
EATSTEAK Sep 8, 2022
fd9cd9f
feat: return CantUnclaim instead of CanClaim in `/locker/unclaim`
EATSTEAK Sep 8, 2022
e7b9952
feat: add `CantUnclaimErrorSchema` zod schema
EATSTEAK Sep 8, 2022
f936f7d
refactor: change return error type from CantClaim to CantUnclaim in `…
EATSTEAK Sep 8, 2022
de34d2d
fix: change floormap background img to png from svg
EATSTEAK Sep 8, 2022
b5794ca
Merge pull request #243 from EATSTEAK/fix/locker_count
Twince Sep 8, 2022
7ab98e3
Merge pull request #244 from EATSTEAK/feat/unclaim_error
Twince Sep 8, 2022
984be6c
Merge pull request #245 from EATSTEAK/fix/reserve_error_message
Twince Sep 8, 2022
a13af16
Merge pull request #246 from EATSTEAK/fix/floormap_png
Twince Sep 8, 2022
87d38dd
chore: fix readme link and add deploy shield
EATSTEAK Sep 9, 2022
0c730c2
Merge pull request #247 from EATSTEAK/chore/readme
Twince Sep 9, 2022
901f693
chore: add `--resolve-s3` in deploy command and remove hardcoded `s3_…
EATSTEAK Sep 10, 2022
366c215
feat: create `deploy.js` for argument passing in server deployment
EATSTEAK Sep 10, 2022
f7b8e0a
chore: edit resource comment
EATSTEAK Sep 10, 2022
87890ef
fix(skeleton): allow dynamic skeleton size
EATSTEAK Sep 11, 2022
76ac996
refactor(floormap_skeleton): to use skeleton component
EATSTEAK Sep 11, 2022
f201339
feat(favicon): create favicon
EATSTEAK Sep 11, 2022
45638d9
Merge pull request #248 from EATSTEAK/feat/easy_deploy
Twince Sep 11, 2022
b475a25
Merge pull request #251 from EATSTEAK/fix/skeleton_dynamic_size
Twince Sep 11, 2022
02c9218
Merge pull request #252 from EATSTEAK/feat/favicon
Twince Sep 11, 2022
2cea9c2
feat(config): add `alert` field to `ServiceConfig` and `ServiceConfig…
EATSTEAK Sep 11, 2022
966f9b2
refactor(client/config): check schema in `getServiceConfig`, `getDepa…
EATSTEAK Sep 11, 2022
05337c9
feat(config): add `alert`(shorthand `a`) in `ServiceConfigResponse`, …
EATSTEAK Sep 11, 2022
cf94836
feat(config/data): add `alert` in dao conversion functions
EATSTEAK Sep 11, 2022
ac48816
feat(type): add `alert` in `ConfigUpdateRequest`
EATSTEAK Sep 11, 2022
f10b6fd
fix(client/config): ServiceConfigSchema
EATSTEAK Sep 11, 2022
9e2e172
feat(icons): add `Info` icon
EATSTEAK Sep 11, 2022
4a67026
feat(admin): add `alert` field to ServiceSettings
EATSTEAK Sep 11, 2022
0f5033c
feat(shell): add `alert` area
EATSTEAK Sep 11, 2022
2790483
design: 로그아웃 아이콘 방향 변경
Twince Sep 11, 2022
5477103
Merge branch 'dev' into feat/alert
EATSTEAK Sep 11, 2022
ae811f6
design: uniform margin and padding to constant look
EATSTEAK Sep 11, 2022
31a723b
fix: remove absolute on top to smooth scroll
EATSTEAK Sep 11, 2022
40f3db7
feat(login): remove login block when department reserve is blocked
EATSTEAK Sep 11, 2022
c9e8a93
refactor(admin): change logout button icon to left
EATSTEAK Sep 11, 2022
766f48a
Merge pull request #254 from EATSTEAK/refactor/logout_btn_layout
EATSTEAK Sep 11, 2022
60f02dc
fix: 좁은 화면에서도 `SelectedLockerAlert`가 정상적으로 표시되도록 수정
Twince Sep 11, 2022
b79f4b0
chore: indent 수정 (prettier 적용)
Twince Sep 11, 2022
4cda3d0
Merge pull request #258 from EATSTEAK/fix/selected_locker_alert
EATSTEAK Sep 11, 2022
b209081
Merge pull request #255 from EATSTEAK/feat/alert
Twince Sep 11, 2022
42c4007
Merge pull request #256 from EATSTEAK/fix/navigation_top
Twince Sep 11, 2022
a05fe7e
refactor: remove apply in possible situation
EATSTEAK Sep 11, 2022
74939a7
chore: reformat code
EATSTEAK Sep 11, 2022
7ec6e42
Merge branch 'dev' into chore/remove_apply
EATSTEAK Sep 11, 2022
de7f384
Merge pull request #260 from EATSTEAK/chore/remove_apply
Twince Sep 11, 2022
f6b0715
Merge pull request #257 from EATSTEAK/feat/unblock_login
EATSTEAK Sep 11, 2022
75aee77
fix(floormap): url formatting error
EATSTEAK Sep 11, 2022
123e8be
Merge pull request #261 from EATSTEAK/fix/floor_map
Twince Sep 11, 2022
68de736
design: `UserReservedLocker`에 건물과 층이 표시되도록 표기
Twince Sep 11, 2022
08be55d
chore: 사용하지 않는 코드 정리
Twince Sep 11, 2022
61bbe63
Merge pull request #262 from EATSTEAK/feat/add_floor_on_userReservedL…
EATSTEAK Sep 11, 2022
aec144a
chore: update to v0.10.0
EATSTEAK Sep 11, 2022
bc6eb9c
Merge pull request #263 from EATSTEAK/chore/0.10.0
EATSTEAK Sep 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<a href="https://github.com/EATSTEAK/lockerweb/LICENSE.md"><img alt="License" src="https://img.shields.io/github/license/EATSTEAK/lockerweb?style=for-the-badge"></a>
<a href="https://eatsteak.github.io/lockerweb"><img alt="API Docs" src="https://img.shields.io/badge/API%20Docs-v1-%2389bf04?style=for-the-badge&logo=Swagger"></a>
<a href="https://ssuitlocker.com"><img alt="Website" src="https://img.shields.io/website?down_color=red&down_message=%EC%A0%91%EC%86%8D%20%EB%B6%88%EA%B0%80&label=IT%EB%8C%80%ED%95%99%20%EC%82%AC%EB%AC%BC%ED%95%A8%20%EC%98%88%EC%95%BD%20%EC%8B%9C%EC%8A%A4%ED%85%9C&style=for-the-badge&up_color=%2300a3c9&up_message=%EC%A0%91%EC%86%8D%20%EA%B0%80%EB%8A%A5&url=https%3A%2F%2Fssuitlocker.com"></a>
<a href="https://github.com/EATSTEAK/lockerweb/actions/workflows/aws-deploy.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/EATSTEAK/lockerweb/Deploy%20to%20AWS?label=Deploy&logo=github&style=for-the-badge"></a>
</p>

-----
Expand All @@ -15,7 +16,7 @@

## 서비스 배포 및 설정

서비스를 설정하고 배포하려는 운영자라면 [서비스 배포 및 설정]([https://github.com/EATSTEAK/lockerweb/wiki/%EC%84%9C%EB%B9%84%EC%8A%A4-%EC%84%A4%EC%A0%95-%EB%B0%8F-%EB%B0%B0%ED%8F%AC](https://github.com/EATSTEAK/lockerweb/wiki/%EC%84%9C%EB%B9%84%EC%8A%A4-%EB%B0%B0%ED%8F%AC-%EB%B0%8F-%EC%84%A4%EC%A0%95))를 참고하세요.
서비스를 설정하고 배포하려는 운영자라면 [서비스 배포 및 설정](https://github.com/EATSTEAK/lockerweb/wiki/%EC%84%9C%EB%B9%84%EC%8A%A4-%EB%B0%B0%ED%8F%AC-%EB%B0%8F-%EC%84%A4%EC%A0%95) 참고하세요.

## 개발하기

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "lockerweb",
"version": "0.9.1",
"version": "0.10.0",
"description": "SSU IT Collage Locker system.",
"private": true,
"scripts": {
"build": "concurrently -p \"[{name} / {time}]\" -c \"green,magenta\" -n \"client,server\" \"pnpm run -r --filter=client build \" \"pnpm run -r -filter=server build\"",
"dev": "concurrently -p \"[{name} / {time}]\" -c \"green,magenta\" -n \"client,server\" \"pnpm run -r --filter=client dev \" \"pnpm run -r -filter=server dev\"",
"delete": "pnpm run --filter=client delete && pnpm run --filter=server delete",
"deploy": "pnpm run --filter=server deploy && pnpm run --filter=client deploy"
"deploy": "node ./scripts/deploy.js"
},
"repository": {
"type": "git",
Expand Down
10 changes: 9 additions & 1 deletion packages/client/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['plugin:import/recommended', 'plugin:import/typescript', 'plugin:tailwindcss/recommended', 'eslint:recommended', 'airbnb-typescript/base', 'plugin:@typescript-eslint/recommended', 'prettier'],
extends: [
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:tailwindcss/recommended',
'eslint:recommended',
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'prettier'
],
plugins: ['svelte3', '@typescript-eslint', 'tailwindcss'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "client",
"version": "0.9.1",
"version": "0.10.0",
"scripts": {
"dev": "cross-env VITE_BASE_URL=http://localhost:3000 vite dev --port 5002 --host 0.0.0.0",
"build": "vite build",
Expand Down
15 changes: 10 additions & 5 deletions packages/client/src/app.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Write your global styles here, in PostCSS syntax */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/variable/pretendardvariable.css");
@import url('https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/variable/pretendardvariable.css');

@import 'css/normalize.css';

Expand All @@ -13,11 +13,18 @@ html {
}

:root {
font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic',
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
@apply text-gray-700;
}

h1, h2, h3, h4, h5, h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
@apply font-bold;
}

Expand All @@ -44,5 +51,3 @@ h5 {
h6 {
@apply text-lg;
}


44 changes: 23 additions & 21 deletions packages/client/src/components/atom/Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,33 @@
export let href = null;
</script>


<!--suppress RequiredAttributes -->
<svelte:element this='{href ? "a" : "button"}' on:click
on:dblclick
on:mousedown
on:mousemove
on:blur
on:mouseout
on:focus
on:mouseover
on:mouseup
on:mouseenter
on:mouseleave
on:keydown
on:keypress
on:keyup
{href}
tabindex='0'
class='{clazz} cursor-pointer select-none
<svelte:element
this={href ? 'a' : 'button'}
on:click
on:dblclick
on:mousedown
on:mousemove
on:blur
on:mouseout
on:focus
on:mouseover
on:mouseup
on:mouseenter
on:mouseleave
on:keydown
on:keypress
on:keyup
{href}
tabindex='0'
class='{clazz} cursor-pointer select-none
flex justify-between items-center px-4 py-3 flex-shrink-0 gap-x-3
rounded-xl shadow-md font-bold transition-all ease-in
[&[disabled]]:opacity-50 [&[disabled]]:shadow-none [&[disabled]]:pointer-events-none
hover:brightness-90 hover:shadow-lg
active:brightness-75 active:shadow-md'
{...$$restProps}>
{...$$restProps}
>
{#if !isIconRight}
{#if $$slots.icon}
<div class='btn-icon'>
Expand All @@ -48,7 +50,7 @@
</svelte:element>

<style>
:global(.btn-icon path:not([fill="none"])) {
:global(.btn-icon path:not([fill='none'])) {
fill: currentColor;
}
</style>
</style>
19 changes: 9 additions & 10 deletions packages/client/src/components/atom/DepartmentSelection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
export let activateFrom: Date;
export let activateTo: Date;

$: activateTime = (activateFrom || activateTo) ? timeCalc(activateFrom, activateTo) : '';
$: activateTime = activateFrom || activateTo ? timeCalc(activateFrom, activateTo) : '';

let ref = null;

Expand Down Expand Up @@ -45,7 +45,7 @@

<button
bind:this={ref}
class={`${lockerLeft <= 0 ? 'unavailable' : ''} ${selected ? "active" : ''}
class={`${lockerLeft <= 0 ? 'unavailable' : ''} ${selected ? 'active' : ''}
aspect-square max-w-[160px]
rounded-2xl bg-gray-100 box-border transition-all
flex-grow-0 flex-shrink-0 basis-[160px]
Expand All @@ -60,12 +60,12 @@
on:mouseleave
on:keydown
on:keydown={({ key }) => {
if (key === 'ArrowRight') {
ctx.change(1);
} else if (key === 'ArrowLeft') {
ctx.change(-1);
}
}}
if (key === 'ArrowRight') {
ctx.change(1);
} else if (key === 'ArrowLeft') {
ctx.change(-1);
}
}}
>
<div class='flex flex-col'>
<div class='department-text'>{departmentText}</div>
Expand Down Expand Up @@ -105,5 +105,4 @@
@apply shadow-md;
box-shadow: inset 0 0 0 4px theme('colors.primary.800');
}

</style>
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@
scrollbar-color: #c2c2c2 #e0e0e0;
scrollbar-width: thin;
}
</style>
</style>
2 changes: 1 addition & 1 deletion packages/client/src/components/atom/Divider.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
export { clazz as class };
</script>

<hr class='{clazz} w-full h-0.5 bg-gray-300' />
<hr class='{clazz} w-full h-0.5 bg-gray-300' />
2 changes: 1 addition & 1 deletion packages/client/src/components/atom/ErrorScreen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
</div>

<style>
</style>
</style>
23 changes: 15 additions & 8 deletions packages/client/src/components/atom/FloorMap.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,30 @@

$: if ($config.success && selectedBuildingId) {
const serviceConfig = getServiceConfig($config?.result);
alt = `${getBuildingName(serviceConfig.buildings, selectedBuildingId)} ${selectedFloor}층 배치도`;
alt = `${getBuildingName(
serviceConfig.buildings,
selectedBuildingId
)} ${selectedFloor}층 배치도`;
}
</script>

{#key `${selectedBuildingId}-${selectedFloor}`}
<div style:--bg-img='url("/floorMaps/{selectedBuildingId}/{selectedFloor}.svg")' class='{clazz} w-full h-full bg'
in:fly={{ y: 100, duration: 300 }} aria-label={alt}>
<div
style:--bg-img='url("/floorMaps/{selectedBuildingId}/{selectedFloor}.png")'
class='{clazz} w-full h-full bg'
in:fly={{ y: 100, duration: 300 }}
aria-label={alt}
>
{#if selectedSectionId}
<div in:fade style:--locker-img='url("/floorMaps/{selectedBuildingId}/{selectedFloor}/{selectedSectionId}.svg"'
class='w-full h-full locker animate-pulse transition-all'></div>
<div
in:fade
style:--locker-img='url("/floorMaps/{selectedBuildingId}/{selectedFloor}/{selectedSectionId}.svg")'
class='w-full h-full locker animate-pulse transition-all'></div>
{/if}
</div>
{/key}

<style>

.bg {
background-image: var(--bg-img);
background-repeat: no-repeat;
Expand All @@ -43,5 +52,3 @@
background-position: center;
}
</style>


75 changes: 45 additions & 30 deletions packages/client/src/components/atom/FloorStatus.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script lang='ts'>

import { config } from '$lib/store';
import { getServiceConfig } from '$lib/api/config';

Expand All @@ -9,57 +8,73 @@
export let totalLocker: number;
let clazz = '';
export { clazz as class };
$: buildingDisplay = $config && $config.success && (getServiceConfig($config.result).buildings[building]?.name ?? '알 수 없음');
$: buildingDisplay =
$config &&
$config.success &&
(getServiceConfig($config.result).buildings[building]?.name ?? '알 수 없음');
$: floorDisplay = !(floor ?? '').startsWith('B') ? `${floor}F` : floor;
$: percentage = totalLocker ? Math.round(((totalLocker - (lockerLeft ?? 0)) / totalLocker) * 100) : 0;
$: percentage = totalLocker
? Math.round(((totalLocker - (lockerLeft ?? 0)) / totalLocker) * 100)
: 0;
</script>

<div class={`${clazz || ''} ${lockerLeft <= 0 ? 'disabled' : ''} relative border-2 rounded-2xl overflow-hidden`}>
<div class='progress absolute top-0 left-0 bg-gray-100 rounded-2xl h-full' style='width: {percentage}%'></div>
<div
class={`${clazz || ''} ${
lockerLeft <= 0 ? 'disabled' : ''
} relative border-2 rounded-2xl overflow-hidden`}
>
<div
class='progress absolute top-0 left-0 bg-gray-100 rounded-2xl h-full'
style='width: {percentage}%'
/>
<div class='absolute top-0 left-0 flex justify-between items-center px-3 w-full h-full'>
<div class='flex justify-end items-center px-3 font-bold text-gray-400' style='width: {percentage}%'>
<div
class='flex justify-end items-center px-3 font-bold text-gray-400'
style='width: {percentage}%'
>
<span class='hidden md:inline'>
{#if percentage >= 20}
{percentage}%
{/if}
{percentage}%
{/if}
</span>

</div>
<div class='font-bold'>
<span class='locker-left text-primary-800 text-4xl'>{lockerLeft}</span><span class='text-xl'>/{totalLocker}</span>
<span class='locker-left text-primary-800 text-4xl'>{lockerLeft}</span><span class='text-xl'
>/{totalLocker}</span
>
</div>
</div>
<div class='absolute top-0 left-0 flex flex-row relative items-center justify-between gap-5 px-4 py-1.5'>
<div
class='absolute top-0 left-0 flex flex-row relative items-center justify-between gap-5 px-4 py-1.5'
>
<div class='flex flex-col'>
<p class='text-sm text-gray-500'>{buildingDisplay}</p>
<div class='flex text-3xl font-bold gap-5'>
<div>{floorDisplay} |</div>
<div>
<span class='hidden sm:inline'>
{#if lockerLeft > 0}
예약 가능
{:else}
예약 불가
{/if}
</span>
<span class='hidden sm:inline'>
{#if lockerLeft > 0}
예약 가능
{:else}
예약 불가
{/if}
</span>
</div>
</div>
</div>

</div>
</div>


<style>
.disabled {
@apply border-gray-300 text-gray-400 bg-gray-300;
}
.disabled {
@apply border-gray-300 text-gray-400 bg-gray-300;
}

.disabled .progress {
@apply bg-gray-300;
}
.disabled .progress {
@apply bg-gray-300;
}

.disabled .locker-left {
@apply text-red-600;
}
</style>
.disabled .locker-left {
@apply text-red-600;
}
</style>
8 changes: 1 addition & 7 deletions packages/client/src/components/atom/LoadingScreen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@
export { clazz as class };
</script>

<div class={clazz}>
<div class='{clazz} h-full bg-gray-200 text-gray-400 flex flex-col justify-center items-center'>
<ArrowClockwise class='animate-spin w-16 h-16' />
<p>불러오는 중...</p>
</div>

<style>
div {
@apply h-full bg-gray-200 text-gray-400 flex flex-col justify-center items-center;
}
</style>
Loading