wip
This commit is contained in:
parent
3575b1ecd8
commit
da3c183a76
|
@ -453,6 +453,7 @@ export default defineComponent({
|
||||||
|
|
||||||
addPinUser() {
|
addPinUser() {
|
||||||
os.modal(MkUserSelect, {}).then(user => {
|
os.modal(MkUserSelect, {}).then(user => {
|
||||||
|
if (user == null) return;
|
||||||
this.pinnedUsers = this.pinnedUsers.trim();
|
this.pinnedUsers = this.pinnedUsers.trim();
|
||||||
this.pinnedUsers += '\n@' + getAcct(user);
|
this.pinnedUsers += '\n@' + getAcct(user);
|
||||||
this.pinnedUsers = this.pinnedUsers.trim();
|
this.pinnedUsers = this.pinnedUsers.trim();
|
||||||
|
@ -461,6 +462,7 @@ export default defineComponent({
|
||||||
|
|
||||||
chooseProxyAccount() {
|
chooseProxyAccount() {
|
||||||
os.modal(MkUserSelect, {}).then(user => {
|
os.modal(MkUserSelect, {}).then(user => {
|
||||||
|
if (user == null) return;
|
||||||
this.proxyAccount = user;
|
this.proxyAccount = user;
|
||||||
this.proxyAccountId = user.id;
|
this.proxyAccountId = user.id;
|
||||||
this.save(true);
|
this.save(true);
|
||||||
|
|
|
@ -26,7 +26,9 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async generateToken() {
|
async generateToken() {
|
||||||
os.modal(await import('@/components/token-generate-window.vue'), {}).then(async ({ name, permissions }) => {
|
os.modal(await import('@/components/token-generate-window.vue'), {}).then(async result => {
|
||||||
|
if (result == null) return;
|
||||||
|
const { name, permissions } = result;
|
||||||
const { token } = await os.api('miauth/gen-token', {
|
const { token } = await os.api('miauth/gen-token', {
|
||||||
session: null,
|
session: null,
|
||||||
name: name,
|
name: name,
|
||||||
|
|
|
@ -58,14 +58,11 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
preview(ev) {
|
preview(ev) {
|
||||||
const picker = os.modal(MkReactionPicker, {
|
os.modal(MkReactionPicker, {
|
||||||
source: ev.currentTarget || ev.target,
|
source: ev.currentTarget || ev.target,
|
||||||
reactions: this.splited,
|
reactions: this.splited,
|
||||||
showFocus: false,
|
showFocus: false,
|
||||||
});
|
});
|
||||||
picker.$once('chosen', reaction => {
|
|
||||||
picker.close();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setDefault() {
|
setDefault() {
|
||||||
|
|
|
@ -123,7 +123,9 @@ export default defineComponent({
|
||||||
information: this.$t('pluginTokenRequestedDescription'),
|
information: this.$t('pluginTokenRequestedDescription'),
|
||||||
initialName: name,
|
initialName: name,
|
||||||
initialPermissions: permissions
|
initialPermissions: permissions
|
||||||
}).then(async ({ name, permissions }) => {
|
}).then(async result => {
|
||||||
|
if (result == null) return;
|
||||||
|
const { name, permissions } = result;
|
||||||
const { token } = await os.api('miauth/gen-token', {
|
const { token } = await os.api('miauth/gen-token', {
|
||||||
session: null,
|
session: null,
|
||||||
name: name,
|
name: name,
|
||||||
|
|
Loading…
Reference in New Issue