Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
341
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
25
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
61c9b075
Commit
61c9b075
authored
1 year ago
by
tamaina
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of
https://github.com/misskey-dev/misskey
into develop
parents
62e347c2
bdf390eb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
packages/frontend/src/pages/announcements.vue
+13
-11
13 additions, 11 deletions
packages/frontend/src/pages/announcements.vue
with
14 additions
and
11 deletions
CHANGELOG.md
+
1
−
0
View file @
61c9b075
...
...
@@ -19,6 +19,7 @@
### Client
-
Fix: サーバー情報画面(
`/instance-info/{domain}`
)でブロックができないのを修正
-
Fix: 未読のお知らせの「わかった」をクリック・タップしてもその場で「わかった」が消えない問題を修正
### Server
-
...
...
This diff is collapsed.
Click to expand it.
packages/frontend/src/pages/announcements.vue
+
13
−
11
View file @
61c9b075
...
...
@@ -7,15 +7,15 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkStickyContainer>
<template
#header
><MkPageHeader
:actions=
"headerActions"
:tabs=
"headerTabs"
/></
template
>
<MkSpacer
:contentMax=
"800"
>
<MkPagination
v-slot=
"{items}"
:pagination=
"pagination"
class=
"ruryvtyk _gaps_m"
>
<section
v-for=
"
(
announcement
, i)
in items"
:key=
"announcement.id"
class=
"announcement _panel"
>
<MkPagination
ref=
"paginationEl"
v-slot=
"{items}"
:pagination=
"pagination"
class=
"ruryvtyk _gaps_m"
>
<section
v-for=
"announcement in items"
:key=
"announcement.id"
class=
"announcement _panel"
>
<div
class=
"header"
><span
v-if=
"$i && !announcement.isRead"
>
🆕
</span>
{{ announcement.title }}
</div>
<div
class=
"content"
>
<Mfm
:text=
"announcement.text"
/>
<img
v-if=
"announcement.imageUrl"
:src=
"announcement.imageUrl"
/>
</div>
<div
v-if=
"$i && !announcement.isRead"
class=
"footer"
>
<MkButton
primary
@
click=
"read(
items,
announcement
, i
)"
><i
class=
"ti ti-check"
></i>
{{ i18n.ts.gotIt }}
</MkButton>
<MkButton
primary
@
click=
"read(announcement
.id
)"
><i
class=
"ti ti-check"
></i>
{{ i18n.ts.gotIt }}
</MkButton>
</div>
</section>
</MkPagination>
...
...
@@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<
script
lang=
"ts"
setup
>
import
{
}
from
'
vue
'
;
import
{
ref
}
from
'
vue
'
;
import
MkPagination
from
'
@/components/MkPagination.vue
'
;
import
MkButton
from
'
@/components/MkButton.vue
'
;
import
*
as
os
from
'
@/os
'
;
...
...
@@ -37,13 +37,15 @@ const pagination = {
limit
:
10
,
};
// TODO: これは実質的に親コンポーネントから子コンポーネントのプロパティを変更してるのでなんとかしたい
function
read
(
items
,
announcement
,
i
)
{
items
[
i
]
=
{
...
announcement
,
isRead
:
true
,
};
os
.
api
(
'
i/read-announcement
'
,
{
announcementId
:
announcement
.
id
});
const
paginationEl
=
ref
<
InstanceType
<
typeof
MkPagination
>>
();
function
read
(
id
:
string
)
{
if
(
!
paginationEl
.
value
)
return
;
paginationEl
.
value
.
updateItem
(
id
,
announcement
=>
{
announcement
.
isRead
=
true
;
return
announcement
;
});
os
.
api
(
'
i/read-announcement
'
,
{
announcementId
:
id
});
}
const
headerActions
=
$computed
(()
=>
[]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment