Refactor client (#3178)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
This commit is contained in:
parent
5d882dc3df
commit
3f79c9ae49
52 changed files with 328 additions and 421 deletions
|
|
@ -29,7 +29,6 @@
|
|||
import Vue from 'vue';
|
||||
import i18n from '../../../../i18n';
|
||||
import Menu from '../../../../common/views/components/menu.vue';
|
||||
import contextmenu from '../../../api/contextmenu';
|
||||
import { countIf } from '../../../../../../prelude/array';
|
||||
|
||||
export default Vue.extend({
|
||||
|
|
@ -168,7 +167,7 @@ export default Vue.extend({
|
|||
icon: 'pencil-alt',
|
||||
text: this.$t('rename'),
|
||||
action: () => {
|
||||
this.$root.apis.input({
|
||||
this.$input({
|
||||
title: this.$t('rename'),
|
||||
default: this.name,
|
||||
allowEmpty: false
|
||||
|
|
@ -230,7 +229,7 @@ export default Vue.extend({
|
|||
|
||||
onContextmenu(e) {
|
||||
if (this.isTemporaryColumn) return;
|
||||
contextmenu((this as any).os)(e, this.getMenu());
|
||||
this.$contextmenu(e, this.getMenu());
|
||||
},
|
||||
|
||||
showMenu() {
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ export default Vue.extend({
|
|||
icon: 'hashtag',
|
||||
text: this.$t('@deck.hashtag'),
|
||||
action: () => {
|
||||
this.$root.apis.input({
|
||||
this.$input({
|
||||
title: this.$t('enter-hashtag-tl-title')
|
||||
}).then(title => {
|
||||
this.$store.dispatch('settings/addDeckColumn', {
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ export default Vue.extend({
|
|||
onBannerClick() {
|
||||
if (!this.$store.getters.isSignedIn || this.$store.state.i.id != this.user.id) return;
|
||||
|
||||
this.$root.apis.updateBanner().then(i => {
|
||||
this.$updateBanner().then(i => {
|
||||
this.user.bannerUrl = i.bannerUrl;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ export default Vue.extend({
|
|||
listId: list.id,
|
||||
userId: this.user.id
|
||||
});
|
||||
this.$root.apis.dialog({
|
||||
this.$dialog({
|
||||
title: 'Done!',
|
||||
text: this.$t('list-pushed').replace('{user}', this.user.name).replace('{list}', list.title)
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue