mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
New support: fix UI issues
This commit is contained in:
parent
a4bdc64520
commit
eaf94f69ab
@ -205,6 +205,9 @@
|
||||
}
|
||||
button.btn {
|
||||
margin: 0 0.5rem 0 0;
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
span.cp-password-container {
|
||||
margin-bottom: 1rem;
|
||||
|
||||
@ -164,10 +164,6 @@
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
button {
|
||||
margin-left: 2px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -651,7 +651,6 @@ define([
|
||||
if (!ctx.adminRdyEvt) { return void cb({ error: 'EFORBIDDEN' }); }
|
||||
let tags = data.tags || [];
|
||||
let text = (data.text || '').toLowerCase();
|
||||
console.error(tags, text);
|
||||
ctx.adminRdyEvt.reg(() => {
|
||||
let doc = ctx.adminDoc.proxy;
|
||||
let t = doc.tickets;
|
||||
|
||||
@ -145,7 +145,6 @@ define([
|
||||
APP.module.execCommand('LIST_TICKETS_ADMIN', {
|
||||
type: type
|
||||
}, (tickets) => {
|
||||
console.error(tickets);
|
||||
if (tickets.error) {
|
||||
cb();
|
||||
if (tickets.error === 'EFORBIDDEN') {
|
||||
@ -259,6 +258,7 @@ define([
|
||||
refreshAll();
|
||||
});
|
||||
};
|
||||
onMove.disableMove = type === 'closed';
|
||||
onMove.isTicketActive = type === 'active';
|
||||
|
||||
const onTag = (channel, tags) => {
|
||||
@ -928,7 +928,7 @@ Attachments:${JSON.stringify(msg.attachments, 0, 2)}`;
|
||||
});
|
||||
};
|
||||
if (!$ticket.length) {
|
||||
content.category = 'closed'; // Consider ticket closed
|
||||
content.category = 'legacy'; // Hide invalid features
|
||||
$ticket = APP.support.makeTicket({id, content, onMove});
|
||||
$div.append($ticket);
|
||||
}
|
||||
|
||||
@ -416,12 +416,13 @@ define([
|
||||
let url = h('button.btn.fa.fa-link', { title: Messages.share_linkCopy, });
|
||||
$(url).click(function (e) {
|
||||
e.stopPropagation();
|
||||
var link = privateData.origin + privateData.pathname + '#' + 'open-' + linkId;
|
||||
let cat = content.category === 'closed' ? 'closed' : 'open';
|
||||
var link = privateData.origin + privateData.pathname + `#${cat}-${linkId}`;
|
||||
Clipboard.copy(link, (err) => {
|
||||
if (!err) { UI.log(Messages.shareSuccess); }
|
||||
});
|
||||
});
|
||||
if (content.category === 'closed') { url = undefined; }
|
||||
if (content.category === 'legacy') { url = undefined; }
|
||||
|
||||
|
||||
// Load & open ticket
|
||||
@ -453,7 +454,7 @@ define([
|
||||
|
||||
// Move active/pending
|
||||
let move;
|
||||
if (onMove) {
|
||||
if (onMove && !onMove.disableMove) {
|
||||
let text = onMove.isTicketActive ? Messages.support_movePending
|
||||
: Messages.support_moveActive;
|
||||
move = h('button.btn.btn-secondary.fa.fa-archive', { title: text });
|
||||
@ -478,7 +479,6 @@ define([
|
||||
});
|
||||
};
|
||||
redrawTags(content.tags);
|
||||
console.error(content.tags);
|
||||
|
||||
let $tags = $(tagsContainer).hide();
|
||||
let input = UI.dialog.textInput({id: `cp-${Util.uid()}`});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user