forked from misskey-dev/misskey
-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: 個人宛てお知らせ機能 #100
Merged
riku6460
merged 13 commits into
MisskeyIO:user-announcement
from
CyberRex0:pr-20230706-userannouncement
Jul 8, 2023
Merged
feat: 個人宛てお知らせ機能 #100
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9a546aa
feat: 個人宛てお知らせ機能
CyberRex0 e1789af
Remove unused import
CyberRex0 5d3cd13
Update packages/backend/src/server/api/endpoints/admin/announcements/…
CyberRex0 4c6374b
Update packages/frontend/src/pages/announcements.vue
CyberRex0 ee6d506
Restore breakline
CyberRex0 1d63c68
一般向けAPIにはuserオブジェクトを提供しない
CyberRex0 3625e07
fix
CyberRex0 a2529c6
Merge branch 'pr-20230706-userannouncement' of github.com:CyberRex0/m…
CyberRex0 350da16
Fix
CyberRex0 0befa5b
Update packages/misskey-js/src/entities.ts
CyberRex0 1685318
Fix
CyberRex0 f3dc0d5
Update misskey-js.api.md
CyberRex0 ddff633
Fix lint
CyberRex0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/backend/migration/1688647797135-userannouncement.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export class Userannouncement1688647797135 { | ||
name = 'Userannouncement1688647797135' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "announcement" ADD COLUMN "userId" character varying(64)`); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "announcement" DROP COLUMN "userId"`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
packages/frontend/src/components/MkNewUserAnnouncementModal.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<template> | ||
<MkModal ref="modal" :zPriority="'middle'" @click="$refs.modal.close()" @closed="$emit('closed')"> | ||
<div :class="$style.root"> | ||
<div :class="$style.title">{{ i18n.ts.newUserAnnouncementAvailable }}</div> | ||
<MkButton :class="$style.gotIt" primary full @click="jumpTo">{{ i18n.ts.viewAnnouncement }}</MkButton> | ||
</div> | ||
</MkModal> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { shallowRef } from 'vue'; | ||
import MkModal from '@/components/MkModal.vue'; | ||
import MkButton from '@/components/MkButton.vue'; | ||
import { i18n } from '@/i18n'; | ||
import { useRouter } from '@/router'; | ||
const router = useRouter(); | ||
const modal = shallowRef<InstanceType<typeof MkModal>>(); | ||
|
||
function jumpTo() { | ||
modal.value.close(); | ||
router.push('/announcements'); | ||
} | ||
</script> | ||
|
||
<style lang="scss" module> | ||
.root { | ||
margin: auto; | ||
position: relative; | ||
padding: 32px; | ||
min-width: 320px; | ||
max-width: 480px; | ||
box-sizing: border-box; | ||
text-align: center; | ||
background: var(--panel); | ||
border-radius: var(--radius); | ||
} | ||
|
||
.title { | ||
font-weight: bold; | ||
} | ||
|
||
.version { | ||
margin: 1em 0; | ||
} | ||
|
||
.gotIt { | ||
margin: 8px 0 0 0; | ||
} | ||
</style> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1クエリでできそう