refactor(client): ✨
This commit is contained in:
@ -163,7 +163,6 @@ import { v4 as uuid } from 'uuid';
|
||||
import i18n from './i18n';
|
||||
import { host, instanceName } from './config';
|
||||
import { search } from './scripts/search';
|
||||
import MkToast from './components/toast.vue';
|
||||
|
||||
const DESKTOP_THRESHOLD = 1100;
|
||||
|
||||
@ -535,14 +534,14 @@ export default Vue.extend({
|
||||
});
|
||||
},
|
||||
|
||||
onNotification(notification) {
|
||||
async onNotification(notification) {
|
||||
// TODO: ユーザーが画面を見てないと思われるとき(ブラウザやタブがアクティブじゃないなど)は送信しない
|
||||
if (true) {
|
||||
this.$root.stream.send('readNotification', {
|
||||
id: notification.id
|
||||
});
|
||||
|
||||
this.$root.new(MkToast, {
|
||||
this.$root.new(await import('./components/toast.vue').then(m => m.default), {
|
||||
notification
|
||||
});
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ import { faAngleDown, faAngleUp, faHome, faShareAlt, faGlobe, faListUl, faSatell
|
||||
import { faComments } from '@fortawesome/free-regular-svg-icons';
|
||||
import Progress from '../scripts/loading';
|
||||
import XTimeline from '../components/timeline.vue';
|
||||
import XTutorial from './index.home.tutorial.vue';
|
||||
import XPostForm from '../components/post-form.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
@ -41,7 +40,7 @@ export default Vue.extend({
|
||||
|
||||
components: {
|
||||
XTimeline,
|
||||
XTutorial,
|
||||
XTutorial: () => import('./index.home.tutorial.vue').then(m => m.default),
|
||||
XPostForm,
|
||||
},
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
import DriveWindow from '../components/drive-window.vue';
|
||||
|
||||
export function selectDriveFile($root: any, multiple) {
|
||||
return new Promise((res, rej) => {
|
||||
const w = $root.new(DriveWindow, {
|
||||
type: 'file',
|
||||
multiple
|
||||
});
|
||||
w.$once('selected', files => {
|
||||
res(multiple ? files : files[0]);
|
||||
import('../components/drive-window.vue').then(m => m.default).then(dialog => {
|
||||
const w = $root.new(dialog, {
|
||||
type: 'file',
|
||||
multiple
|
||||
});
|
||||
w.$once('selected', files => {
|
||||
res(multiple ? files : files[0]);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
import DriveWindow from '../components/drive-window.vue';
|
||||
|
||||
export function selectDriveFolder($root: any, multiple) {
|
||||
return new Promise((res, rej) => {
|
||||
const w = $root.new(DriveWindow, {
|
||||
type: 'folder',
|
||||
multiple
|
||||
});
|
||||
w.$once('selected', folders => {
|
||||
res(multiple ? folders : (folders.length === 0 ? null : folders[0]));
|
||||
import('../components/drive-window.vue').then(m => m.default).then(dialog => {
|
||||
const w = $root.new(dialog, {
|
||||
type: 'folder',
|
||||
multiple
|
||||
});
|
||||
w.$once('selected', folders => {
|
||||
res(multiple ? folders : (folders.length === 0 ? null : folders[0]));
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user