Implement in-unison reload (#7196)

* Resolve #6804
Implement unison reload

* ✌️

* fix

* Update share.vue

fix

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
tamaina 2021-02-17 21:36:56 +09:00 committed by GitHub
parent 9bc0110b86
commit 126826eb5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 89 additions and 12 deletions

View file

@ -40,6 +40,7 @@ import FormBase from '@/components/form/base.vue';
import FormGroup from '@/components/form/group.vue';
import { deckStore } from '@/ui/deck/deck-store';
import * as os from '@/os';
import { unisonReload } from '@/scripts/unison-reload';
export default defineComponent({
components: {
@ -81,7 +82,7 @@ export default defineComponent({
});
if (canceled) return;
location.reload();
unisonReload();
}
},
@ -99,7 +100,7 @@ export default defineComponent({
});
if (canceled) return;
this.profile = name;
location.reload();
unisonReload();
}
}
});

View file

@ -96,6 +96,7 @@ import { langs } from '@/config';
import { defaultStore } from '@/store';
import { ColdDeviceStorage } from '@/store';
import * as os from '@/os';
import { unisonReload } from '@/scripts/unison-reload';
export default defineComponent({
components: {
@ -200,7 +201,7 @@ export default defineComponent({
});
if (canceled) return;
location.reload();
unisonReload();
}
}
});

View file

@ -52,6 +52,7 @@ import FormBase from '@/components/form/base.vue';
import FormButton from '@/components/form/button.vue';
import { scroll } from '@/scripts/scroll';
import { signout } from '@/account';
import { unisonReload } from '@/scripts/unison-reload';
export default defineComponent({
components: {
@ -160,7 +161,7 @@ export default defineComponent({
clear: () => {
localStorage.removeItem('locale');
localStorage.removeItem('theme');
location.reload();
unisonReload();
},
faPalette, faPlug, faUser, faListUl, faLock, faLaugh, faCommentSlash, faMusic, faBell, faCogs, faEllipsisH, faBan, faShareAlt, faLockOpen, faKey, faBoxes, faEnvelope, faCloud,
};

View file

@ -40,6 +40,7 @@ import * as os from '@/os';
import { debug } from '@/config';
import { defaultStore } from '@/store';
import { signout } from '@/account';
import { unisonReload } from '@/scripts/unison-reload';
export default defineComponent({
components: {
@ -76,7 +77,7 @@ export default defineComponent({
changeDebug(v) {
console.log(v);
localStorage.setItem('debug', v.toString());
location.reload();
unisonReload();
},
onChangeInjectFeaturedNote(v) {

View file

@ -28,6 +28,7 @@ import FormButton from '@/components/form/button.vue';
import MkInfo from '@/components/ui/info.vue';
import * as os from '@/os';
import { ColdDeviceStorage } from '@/store';
import { unisonReload } from '@/scripts/unison-reload';
export default defineComponent({
components: {
@ -138,7 +139,7 @@ export default defineComponent({
os.success();
this.$nextTick(() => {
location.reload();
unisonReload();
});
},
}

View file

@ -76,7 +76,7 @@ export default defineComponent({
ColdDeviceStorage.set('plugins', this.plugins.filter(x => x.id !== plugin.id));
os.success();
this.$nextTick(() => {
location.reload();
unisonReload();
});
},