Improve client
This commit is contained in:
parent
c968633d15
commit
65858dab3e
39 changed files with 286 additions and 83 deletions
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { modalMenu } from '@client/os';
|
||||
import { popupMenu } from '@client/os';
|
||||
import { url } from '@client/config';
|
||||
|
||||
export default defineComponent({
|
||||
|
|
@ -121,7 +121,7 @@ export default defineComponent({
|
|||
if (menu.length > 0) menu.push(null);
|
||||
menu = menu.concat(this.menu);
|
||||
}
|
||||
modalMenu(menu, ev.currentTarget || ev.target);
|
||||
popupMenu(menu, ev.currentTarget || ev.target);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ export default defineComponent({
|
|||
});
|
||||
}));
|
||||
|
||||
os.modalMenu([...[{
|
||||
os.popupMenu([...[{
|
||||
type: 'link',
|
||||
text: this.$ts.profile,
|
||||
to: `/@${ this.$i.username }`,
|
||||
|
|
@ -159,7 +159,7 @@ export default defineComponent({
|
|||
icon: 'fas fa-plus',
|
||||
text: this.$ts.addAccount,
|
||||
action: () => {
|
||||
os.modalMenu([{
|
||||
os.popupMenu([{
|
||||
text: this.$ts.existingAccount,
|
||||
action: () => { this.addAccount(); },
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ export default defineComponent({
|
|||
pleaseLogin();
|
||||
this.operating = true;
|
||||
this.blur();
|
||||
os.modalMenu([{
|
||||
os.popupMenu([{
|
||||
text: this.$ts.renote,
|
||||
icon: 'fas fa-retweet',
|
||||
action: () => {
|
||||
|
|
@ -726,7 +726,7 @@ export default defineComponent({
|
|||
|
||||
menu(viaKeyboard = false) {
|
||||
this.operating = true;
|
||||
os.modalMenu(this.getMenu(), this.$refs.menuButton, {
|
||||
os.popupMenu(this.getMenu(), this.$refs.menuButton, {
|
||||
viaKeyboard
|
||||
}).then(() => {
|
||||
this.operating = false;
|
||||
|
|
@ -736,7 +736,7 @@ export default defineComponent({
|
|||
|
||||
showRenoteMenu(viaKeyboard = false) {
|
||||
if (!this.isMyRenote) return;
|
||||
os.modalMenu([{
|
||||
os.popupMenu([{
|
||||
text: this.$ts.unrenote,
|
||||
icon: 'fas fa-trash-alt',
|
||||
danger: true,
|
||||
|
|
@ -780,7 +780,7 @@ export default defineComponent({
|
|||
|
||||
async clip() {
|
||||
const clips = await os.api('clips/list');
|
||||
os.modalMenu([{
|
||||
os.popupMenu([{
|
||||
icon: 'fas fa-plus',
|
||||
text: this.$ts.createNew,
|
||||
action: async () => {
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
openChannelMenu(ev) {
|
||||
os.modalMenu([{
|
||||
os.popupMenu([{
|
||||
text: this.$ts.copyUrl,
|
||||
icon: 'fas fa-link',
|
||||
action: () => {
|
||||
|
|
|
|||
|
|
@ -594,7 +594,7 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
showActions(ev) {
|
||||
os.modalMenu(postFormActions.map(action => ({
|
||||
os.popupMenu(postFormActions.map(action => ({
|
||||
text: action.title,
|
||||
action: () => {
|
||||
action.handler({
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ export default defineComponent({
|
|||
});
|
||||
}));
|
||||
|
||||
os.modalMenu([...[{
|
||||
os.popupMenu([...[{
|
||||
type: 'link',
|
||||
text: this.$ts.profile,
|
||||
to: `/@${ this.$i.username }`,
|
||||
|
|
@ -125,7 +125,7 @@ export default defineComponent({
|
|||
icon: 'fas fa-plus',
|
||||
text: this.$ts.addAccount,
|
||||
action: () => {
|
||||
os.modalMenu([{
|
||||
os.popupMenu([{
|
||||
text: this.$ts.existingAccount,
|
||||
action: () => { this.addAccount(); },
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ export default defineComponent({
|
|||
});
|
||||
}));
|
||||
|
||||
os.modalMenu([...[{
|
||||
os.popupMenu([...[{
|
||||
type: 'link',
|
||||
text: this.$ts.profile,
|
||||
to: `/@${ this.$i.username }`,
|
||||
|
|
@ -145,7 +145,7 @@ export default defineComponent({
|
|||
icon: 'fas fa-plus',
|
||||
text: this.$ts.addAccount,
|
||||
action: () => {
|
||||
os.modalMenu([{
|
||||
os.popupMenu([{
|
||||
text: this.$ts.existingAccount,
|
||||
action: () => { this.addAccount(); },
|
||||
}, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue