Merge branch 'sw-notification-action' of https://github.com/tamaina/misskey into sw-notification-action
This commit is contained in:
commit
946d948989
67 changed files with 1274 additions and 265 deletions
|
|
@ -192,8 +192,6 @@ export default (opts) => ({
|
|||
this.items = this.items.slice(-opts.displayLimit);
|
||||
this.more = true;
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
this.items.push(item);
|
||||
// TODO
|
||||
|
|
|
|||
|
|
@ -1,10 +1,18 @@
|
|||
// SafariがBroadcastChannel未実装なのでライブラリを使う
|
||||
import { BroadcastChannel } from 'broadcast-channel';
|
||||
|
||||
export const reloadChannel = new BroadcastChannel<'reload'>('reload');
|
||||
export const reloadChannel = new BroadcastChannel<boolean>('reload');
|
||||
|
||||
// BroadcastChannelを用いて、クライアントが一斉にreloadするようにします。
|
||||
export function unisonReload() {
|
||||
reloadChannel.postMessage('reload');
|
||||
location.reload();
|
||||
export function unisonReload(redirectToRoot: boolean = false) {
|
||||
reloadChannel.postMessage(!!redirectToRoot);
|
||||
reload();
|
||||
}
|
||||
|
||||
export function reload(redirectToRoot: boolean = false) {
|
||||
if (redirectToRoot) {
|
||||
location.href = '/';
|
||||
} else {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue