104 lines
1.4 KiB
JavaScript
104 lines
1.4 KiB
JavaScript
|
|
|
||
|
|
import comment from '../comment.js';
|
||
|
|
|
||
|
|
import saveButton from './comment.saveButton.js';
|
||
|
|
|
||
|
|
import userLabel from './comment.userLabel.js';
|
||
|
|
|
||
|
|
import commentEditTitle from './comment.create.title.js';
|
||
|
|
|
||
|
|
import commentEditBody from './comment.create.body.js';
|
||
|
|
|
||
|
|
import commentEditAuthor from './comment.create.author.js';
|
||
|
|
|
||
|
|
import header from '/elements/header.js';
|
||
|
|
|
||
|
|
import collection from '/unify/collection.js';
|
||
|
|
|
||
|
|
import groups from '/user/group/user.group.permission.js';
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
export default class createComment extends comment{
|
||
|
|
|
||
|
|
display = "flex";
|
||
|
|
|
||
|
|
body = new commentEditBody();
|
||
|
|
|
||
|
|
saveButton = new saveButton();
|
||
|
|
|
||
|
|
title = false;
|
||
|
|
|
||
|
|
author = this.user; // bug destroys the permission system
|
||
|
|
|
||
|
|
|
||
|
|
#ifdef WINDOWS
|
||
|
|
|
||
|
|
#ifdef DARK
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifdef LIGHT
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|
||
|
|
|
||
|
|
#ifdef MACOS
|
||
|
|
|
||
|
|
#ifdef DARK
|
||
|
|
|
||
|
|
background = "#00000042";
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifdef LIGHT
|
||
|
|
|
||
|
|
background = "#ffffffd1";
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|
||
|
|
width = "50vw";
|
||
|
|
|
||
|
|
debug = true;
|
||
|
|
|
||
|
|
width = "100%";
|
||
|
|
|
||
|
|
marginTop = 40;
|
||
|
|
|
||
|
|
|
||
|
|
async create() {
|
||
|
|
|
||
|
|
this.body.value = "";
|
||
|
|
|
||
|
|
this.setID( false );
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
disableWRITE() {
|
||
|
|
|
||
|
|
this.hide();
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
enableWRITE() {
|
||
|
|
|
||
|
|
this.show();
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
permission() {
|
||
|
|
|
||
|
|
this.allow( groups.member, "WRITE" );
|
||
|
|
|
||
|
|
this.allow( groups.admin, "WRITE" );
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|