Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/vue/eslint-config-…
Browse files Browse the repository at this point in the history
…typescript-13.0.0
  • Loading branch information
mathsuky committed Oct 7, 2024
2 parents 602887d + 700c33c commit 1d2b74e
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 45 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -22,7 +22,7 @@ jobs:
${{ runner.os }}-yarn-
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -44,7 +44,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -53,7 +53,7 @@ jobs:
${{ runner.os }}-yarn-
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -77,7 +77,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -86,7 +86,7 @@ jobs:
${{ runner.os }}-yarn-
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "room-web",
"version": "1.5.0",
"version": "1.5.1",
"private": true,
"scripts": {
"build": "vite build",
Expand All @@ -18,7 +18,7 @@
"highlight.js": "^11.6.0",
"markdown-it": "^13.0.1",
"markdown-it-link-attributes": "^4.0.0",
"moment": "^2.29.4",
"moment": "^2.30.1",
"reflect-metadata": "^0.1.13",
"vue": "^2.7.14",
"vue-class-component": "^7.2.6",
Expand Down Expand Up @@ -49,7 +49,7 @@
"sass": "~1.69",
"typescript": "5.2.2",
"unplugin-vue-components": "^0.25.2",
"vite": "^4.5.3",
"vite": "^4.5.5",
"vue-template-compiler": "^2.7.14"
},
"browserslist": [
Expand All @@ -63,4 +63,4 @@
]
},
"packageManager": "[email protected]"
}
}
19 changes: 7 additions & 12 deletions src/components/event/EventFormTimeAndPlaceInstant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,20 @@ export default class EventFormTimeAndPlaceInstant extends Vue {
private timeStartMem = ''
private timeEndMem = ''
@Watch('timeStartInput', { immediate: true })
private onTimeStartPropChange() {
created() {
this.dateStartMem = this.timeStartInput && getDate(this.timeStartInput)
this.timeStartMem = this.timeStartInput && getTime(this.timeStartInput)
}
@Watch('timeEndInput', { immediate: true })
private onTimeEndPropChange() {
this.dateEndMem = this.timeEndInput && getDate(this.timeEndInput)
this.timeStartMem = this.timeStartInput && getTime(this.timeStartInput)
this.timeEndMem = this.timeEndInput && getTime(this.timeEndInput)
}
@Ref()
readonly form!: { validate(): void }
@Watch('timeStartMem')
@Watch('timeEndMem')
private async onTimeMemFixed() {
if (!this.timeStartMem || !this.timeEndMem) {
@Watch('timeStartInput')
@Watch('timeEndInput')
private async onDateTimeFixed() {
if (!this.timeStartInput || !this.timeEndInput) {
return
}
await this.$nextTick()
Expand All @@ -107,7 +102,7 @@ export default class EventFormTimeAndPlaceInstant extends Vue {
}
}
private setDefaultDateEnd() {
public setDefaultDateEnd() {
if (!this.dateEndMem) this.dateEndMem = this.dateStartMem
}
Expand Down
15 changes: 14 additions & 1 deletion src/components/shared/Calendar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<v-sheet height="64">
<v-sheet :height="status === 'loading' ? 60 : 64">
<v-toolbar flat>
<v-btn
outlined
Expand Down Expand Up @@ -44,6 +44,11 @@
</v-menu>
</v-toolbar>
</v-sheet>
<v-progress-linear
v-if="status == 'loading'"
indeterminate
color="primary"
></v-progress-linear>
<v-sheet :height="height - 64">
<v-calendar
:ref="calendarRefName"
Expand All @@ -56,6 +61,7 @@
@click:event="showEvent"
@click:more="viewDay"
@click:date="viewDay"
@input="onMonthChange"
/>

<v-menu
Expand Down Expand Up @@ -129,6 +135,9 @@ export default class Calendar extends Vue {
@Prop({ type: Array, default: [] })
events!: ResponseEvent[]
@Prop({ type: String, default: 'loading' })
status!: 'loading' | 'loaded' | 'error'
focus = ''
type = 'month'
Expand Down Expand Up @@ -217,6 +226,10 @@ export default class Calendar extends Vue {
return (event: CalendarEvent) =>
event?.admins.includes(this.$store.direct.state.me?.userId ?? '') ?? false
}
onMonthChange(value) {
value = new Date(value)
this.$emit('monthChanged', value)
}
}
</script>

Expand Down
25 changes: 23 additions & 2 deletions src/pages/Calendar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<template>
<v-col>
<calendar :height="784" :events="events" />
<calendar
:height="784"
:events="events"
:status="status"
@monthChanged="fetchMonthlyEvents"
/>
</v-col>
</template>

Expand All @@ -16,10 +21,26 @@ import api, { ResponseEvent } from '@/api'
},
})
export default class CalendarPage extends Vue {
status: 'loading' | 'loaded' | 'error' = 'loading'
events: ResponseEvent[] = []
async created() {
this.events = await api.events.getEvents({})
await this.fetchMonthlyEvents(new Date())
}
async fetchMonthlyEvents(newDate) {
this.status = 'loading'
const startDate = new Date(newDate.getFullYear(), newDate.getMonth(), 1)
const endDate = new Date(newDate.getFullYear(), newDate.getMonth() + 1, 0)
try {
this.events = await api.events.getEvents({
dateBegin: startDate.toISOString(),
dateEnd: endDate.toISOString(),
})
this.status = 'loaded'
} catch (e) {
this.status = 'error'
}
}
}
</script>
4 changes: 2 additions & 2 deletions src/workers/api.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import axios, { AxiosPromise } from 'axios'

export const baseURL =
process.env.NODE_ENV === 'development' ? 'http://localhost:6006/api' : '/api'
process.env.NODE_ENV === 'development' ? 'http://localhost:3000/api' : '/api'
export const icalURL =
process.env.NODE_ENV === 'development'
? 'http://localhost:6006/api/ical/v1'
? 'http://localhost:3000/api/ical/v1'
: `${window.location.origin}/api/ical/v1`
const traQAPIBaseURL = 'https://q.trap.jp/api/1.0'

Expand Down
36 changes: 18 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1303,11 +1303,11 @@ __metadata:
linkType: hard

"braces@npm:^3.0.2, braces@npm:~3.0.2":
version: 3.0.2
resolution: "braces@npm:3.0.2"
version: 3.0.3
resolution: "braces@npm:3.0.3"
dependencies:
fill-range: ^7.0.1
checksum: e2a8e769a863f3d4ee887b5fe21f63193a891c68b612ddb4b68d82d1b5f3ff9073af066c343e9867a393fe4c2555dcb33e89b937195feb9c1613d259edfcd459
fill-range: ^7.1.1
checksum: b95aa0b3bd909f6cd1720ffcf031aeaf46154dd88b4da01f9a1d3f7ea866a79eba76a6d01cbc3c422b2ee5cdc39a4f02491058d5df0d7bf6e6a162a832df1f69
languageName: node
linkType: hard

Expand Down Expand Up @@ -2565,12 +2565,12 @@ __metadata:
languageName: node
linkType: hard

"fill-range@npm:^7.0.1":
version: 7.0.1
resolution: "fill-range@npm:7.0.1"
"fill-range@npm:^7.1.1":
version: 7.1.1
resolution: "fill-range@npm:7.1.1"
dependencies:
to-regex-range: ^5.0.1
checksum: cc283f4e65b504259e64fd969bcf4def4eb08d85565e906b7d36516e87819db52029a76b6363d0f02d0d532f0033c9603b9e2d943d56ee3b0d4f7ad3328ff917
checksum: b4abfbca3839a3d55e4ae5ec62e131e2e356bf4859ce8480c64c4876100f4df292a63e5bb1618e1d7460282ca2b305653064f01654474aa35c68000980f17798
languageName: node
linkType: hard

Expand Down Expand Up @@ -3930,10 +3930,10 @@ __metadata:
languageName: node
linkType: hard

"moment@npm:^2.29.4":
version: 2.29.4
resolution: "moment@npm:2.29.4"
checksum: 0ec3f9c2bcba38dc2451b1daed5daded747f17610b92427bebe1d08d48d8b7bdd8d9197500b072d14e326dd0ccf3e326b9e3d07c5895d3d49e39b6803b76e80e
"moment@npm:^2.30.1":
version: 2.30.1
resolution: "moment@npm:2.30.1"
checksum: 859236bab1e88c3e5802afcf797fc801acdbd0ee509d34ea3df6eea21eb6bcc2abd4ae4e4e64aa7c986aa6cba563c6e62806218e6412a765010712e5fa121ba6
languageName: node
linkType: hard

Expand Down Expand Up @@ -4606,13 +4606,13 @@ __metadata:
lint-staged: ^15.2.0
markdown-it: ^13.0.1
markdown-it-link-attributes: ^4.0.0
moment: ^2.29.4
moment: ^2.30.1
prettier: 2.8
reflect-metadata: ^0.1.13
sass: ~1.69
typescript: 5.2.2
unplugin-vue-components: ^0.25.2
vite: ^4.5.3
vite: ^4.5.5
vue: ^2.7.14
vue-class-component: ^7.2.6
vue-property-decorator: ^9.1.2
Expand Down Expand Up @@ -5379,9 +5379,9 @@ __metadata:
languageName: node
linkType: hard

"vite@npm:^4.5.3":
version: 4.5.3
resolution: "vite@npm:4.5.3"
"vite@npm:^4.5.5":
version: 4.5.5
resolution: "vite@npm:4.5.5"
dependencies:
esbuild: ^0.18.10
fsevents: ~2.3.2
Expand Down Expand Up @@ -5415,7 +5415,7 @@ __metadata:
optional: true
bin:
vite: bin/vite.js
checksum: fd3f512ce48ca2a1fe60ad0376283b832de9272725fdbc65064ae9248f792de87b0f27a89573115e23e26784800daca329f8a9234d298ba6f60e808a9c63883c
checksum: 300c5f39c83b22413dfdc84f72e9ba979bf4004e4d939409eea1470b116626294495b09e2bd73fae387a254b79988c8d54ceb281f9515120a0eda179c33b216e
languageName: node
linkType: hard

Expand Down

0 comments on commit 1d2b74e

Please sign in to comment.