From 0eafdabc7d2155dceef419d8274e995ee941e868 Mon Sep 17 00:00:00 2001 From: rassi0429 Date: Mon, 30 Oct 2023 12:08:56 +0900 Subject: [PATCH 1/3] fix: docker actions --- .github/workflows/build-push-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-docker-image.yml b/.github/workflows/build-push-docker-image.yml index 03b92861cd8e..0a250f5b6384 100644 --- a/.github/workflows/build-push-docker-image.yml +++ b/.github/workflows/build-push-docker-image.yml @@ -18,7 +18,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} From 277fb3720785623293ecdf2179b22ee14e78c901 Mon Sep 17 00:00:00 2001 From: rassi0429 Date: Sat, 4 Nov 2023 02:47:46 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E7=94=BA=E4=B8=8A=E3=81=95?= =?UTF-8?q?=E3=82=93=E3=81=AE=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88=E3=82=B9?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=AB=E3=82=92=E5=8F=8D=E6=98=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/widgets/WidgetNeosEvent.vue | 87 +++++++++++++++++-- 1 file changed, 79 insertions(+), 8 deletions(-) diff --git a/packages/frontend/src/widgets/WidgetNeosEvent.vue b/packages/frontend/src/widgets/WidgetNeosEvent.vue index 51ccf44d97f6..0bbc7688893e 100644 --- a/packages/frontend/src/widgets/WidgetNeosEvent.vue +++ b/packages/frontend/src/widgets/WidgetNeosEvent.vue @@ -2,14 +2,19 @@
-
+
-
- {{formatDate(event.startTime)}}({{getDay(event.startTime)}}) +
+ {{i}} + ({{getDay(events[0].startTime)}}) +
+
+
+
+
{{formatTime(event.startTime)}}
+
{{event.title}}
-
{{formatTime(event.startTime)}}
{{formatTime(event.endTime)}}
-
{{event.title}}
@@ -77,21 +82,48 @@ const { widgetProps, configure } = useWidgetPropsManager(name, emit, ); -type NeosEvent = { +type EventData = { title: string startTime: number endTime: number detail: string place: string + color: string + teiki_event_flg: boolean +} + +type EventDataByDate = { + [date: string]: EventData[] } -const eventData = ref([]); + +const eventData = ref({}); const loaded = ref(false); const api = "https://calendar.resonite.love/"; +function groupEventsByDate(events) { + const eventsByDate: EventDataByDate = {}; + + events.forEach(event => { + // startDateを抽出 + const date = new Date(event.startTime).getTime() + const startDate = `${formatDate(date)}`; + + // startDateごとにイベントをグループ化 + if (!eventsByDate[startDate]) { + eventsByDate[startDate] = []; + } + eventsByDate[startDate].push(event); + }); + + return eventsByDate; +} + const getNeosEvent = async () => { const result = await (await fetch(api)).json(); - eventData.value = result; + + eventData.value = groupEventsByDate(result) + // eventData.value = result; loaded.value = true; }; getNeosEvent() @@ -128,6 +160,9 @@ defineExpose({ font-size: 60%; } +.event_inner { + flex: 1 +} .event_time { width: 50px; @@ -137,6 +172,42 @@ defineExpose({ .event_title { flex: 1; } +.event{ + align-items: baseline; + padding: 5px 0; + border-top: solid 1px rgba(222,231,228,1); +} + +.event:first-child{ + border-top: none; +} + +.event_box{ + display: flex; + align-items: baseline; + padding: 5px 0 0 5px; + border-bottom: dashed 1px rgba(222,231,228,3); +} + +.event_box:first-child{ + margin: 0px; +} + +.event_box:last-child{ + border: none; +} + +.event_date span{ + display: block; +} + +.event_title{ + padding: 5px 0 0 5px; +} + +.event_time{ + font-size: small; +} .text_blue { color: #00a8ff; From 2fbebc3e7d30c1e969ef8fea7f87d0b21f66e1c8 Mon Sep 17 00:00:00 2001 From: rassi0429 Date: Sat, 4 Nov 2023 02:48:07 +0900 Subject: [PATCH 3/3] 2023.10.2-resonite-love.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2f868a4aab5d..0590cf885876 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "2023.10.2-resonite-love.1", + "version": "2023.10.2-resonite-love.2", "codename": "nasubi", "repository": { "type": "git",