tweaks
This commit is contained in:
@@ -43,6 +43,13 @@ class Guild extends SnowFlake{
|
||||
this.setnotifcation();
|
||||
});
|
||||
|
||||
this.contextmenu.addbutton(
|
||||
()=>I18n.getTranslation("user.editServerProfile"),
|
||||
function(){
|
||||
this.member.showEditProfile();
|
||||
}
|
||||
);
|
||||
|
||||
Guild.contextmenu.addbutton(
|
||||
()=>I18n.getTranslation("guild.leave"),
|
||||
function(this: Guild){
|
||||
|
@@ -4,7 +4,7 @@ import{ Guild }from"./guild.js";
|
||||
import{ SnowFlake }from"./snowflake.js";
|
||||
import{ memberjson, presencejson }from"./jsontypes.js";
|
||||
import { I18n } from "./i18n.js";
|
||||
import { Dialog, Options } from "./settings.js";
|
||||
import { Dialog, Options, Settings } from "./settings.js";
|
||||
|
||||
class Member extends SnowFlake{
|
||||
static already = {};
|
||||
@@ -179,6 +179,11 @@ class Member extends SnowFlake{
|
||||
body: JSON.stringify(json),
|
||||
});
|
||||
}
|
||||
showEditProfile(){
|
||||
const settings=new Settings("");
|
||||
this.editProfile(settings.addButton(I18n.getTranslation("user.editServerProfile"),{ltr:true}));
|
||||
settings.show();
|
||||
}
|
||||
editProfile(options:Options){
|
||||
if(this.hasPermission("CHANGE_NICKNAME")){
|
||||
const hypotheticalProfile = document.createElement("div");
|
||||
|
@@ -201,9 +201,7 @@ class User extends SnowFlake{
|
||||
()=>I18n.getTranslation("user.editServerProfile"),
|
||||
function(this: User, member: Member | undefined){
|
||||
if(!member) return;
|
||||
const settings=new Settings(I18n.getTranslation("user.editServerProfile"));
|
||||
member.editProfile(settings.addButton(I18n.getTranslation("user.editServerProfile"),{ltr:true}));
|
||||
settings.show();
|
||||
member.showEditProfile();
|
||||
},
|
||||
null,
|
||||
member=>{
|
||||
|
Reference in New Issue
Block a user