-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
新着ノートをサウンドで通知する機能をdeck UIに追加 #13867
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
Merged
syuilo
merged 17 commits into
misskey-dev:develop
from
anatawa12:antenna-notification-sound
May 27, 2024
Merged
新着ノートをサウンドで通知する機能をdeck UIに追加 #13867
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
fd2783c
feat(deck-ui): implement note notification
anatawa12 7fdaa97
chore: remove notify in antenna
anatawa12 989729e
docs(changelog): 新着ノートをサウンドで通知する機能をdeck UIに追加
anatawa12 2adc965
fix: type error in test
anatawa12 7ef1fc0
lint: key order
anatawa12 4bddba2
fix: remove notify column
anatawa12 bf6b4d2
test: remove test for notify
anatawa12 ea8c6d0
chore: make sound selectable
anatawa12 cb3de7e
fix: add license header
anatawa12 a5d61f0
fix: add license header again
anatawa12 202df92
Merge branch 'develop' into antenna-notification-sound
syuilo f75f25e
Unnecessary await
anatawa12 6a18dcf
Merge branch 'develop' into antenna-notification-sound
syuilo 44caedf
ファイルを選択してください -> ファイルが選択されていません
anatawa12 ef77987
fix: i18n忘れ
anatawa12 53aca68
fix: i18n忘れ
anatawa12 618f6aa
pleaseSelectFile > fileNotSelected
anatawa12 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 hidden or 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 hidden or 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 hidden or 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
16 changes: 16 additions & 0 deletions
16
packages/backend/migration/1716450883149-RemoveAntennaNotify.js
This file contains hidden or 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,16 @@ | ||
/* | ||
* SPDX-FileCopyrightText: syuilo and misskey-project | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
|
||
export class RemoveAntennaNotify1716450883149 { | ||
name = 'RemoveAntennaNotify1716450883149' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "notify"`); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "antenna" ADD "notify" boolean NOT NULL`); | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,71 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: syuilo and misskey-project | ||
SPDX-License-Identifier: AGPL-3.0-only | ||
--> | ||
|
||
<template> | ||
<div> | ||
<MkButton inline rounded primary @click="selectButton($event)">{{ i18n.ts.selectFile }}</MkButton> | ||
<div :class="['_nowrap', !fileName && $style.fileNotSelected]">{{ friendlyFileName }}</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import * as Misskey from 'misskey-js'; | ||
import { computed, ref } from 'vue'; | ||
import { i18n } from '@/i18n.js'; | ||
import MkButton from '@/components/MkButton.vue'; | ||
import { selectFile } from '@/scripts/select-file.js'; | ||
import { misskeyApi } from '@/scripts/misskey-api.js'; | ||
|
||
const props = defineProps<{ | ||
fileId?: string | null; | ||
validate?: (file: Misskey.entities.DriveFile) => Promise<boolean>; | ||
}>(); | ||
|
||
const emit = defineEmits<{ | ||
(ev: 'update', result: Misskey.entities.DriveFile): void; | ||
}>(); | ||
|
||
const fileUrl = ref(''); | ||
const fileName = ref<string>(''); | ||
|
||
const friendlyFileName = computed<string>(() => { | ||
if (fileName.value) { | ||
return fileName.value; | ||
} | ||
if (fileUrl.value) { | ||
return fileUrl.value; | ||
} | ||
|
||
return i18n.ts.pleaseSelectFile; | ||
}); | ||
|
||
if (props.fileId) { | ||
misskeyApi('drive/files/show', { | ||
fileId: props.fileId, | ||
}).then((apiRes) => { | ||
fileName.value = apiRes.name; | ||
fileUrl.value = apiRes.url; | ||
}); | ||
} | ||
|
||
function selectButton(ev: MouseEvent) { | ||
selectFile(ev.currentTarget ?? ev.target).then(async (file) => { | ||
if (!file) return; | ||
if (props.validate && !await props.validate(file)) return; | ||
|
||
emit('update', file); | ||
fileName.value = file.name; | ||
fileUrl.value = file.url; | ||
}); | ||
} | ||
|
||
</script> | ||
|
||
<style module> | ||
.fileNotSelected { | ||
font-weight: 700; | ||
color: var(--infoWarnFg); | ||
} | ||
</style> |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
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.
618f6aa で修正しました