fix: Beschreibung generieren — AbortController, Readonly, Gold-Styling
- Textarea readonly + visuell gedimmt während Generierung läuft - AbortController bricht Request ab wenn Modal geschlossen wird - Stern-Icon entfernt, Button-Text in Gold (Akzentfarbe) - api.js _request() unterstützt externen AbortSignal
Dieser Commit ist enthalten in:
@@ -12,10 +12,15 @@ const API = {
|
||||
};
|
||||
},
|
||||
|
||||
async _request(method, path, body = null) {
|
||||
async _request(method, path, body = null, externalSignal = null) {
|
||||
const controller = new AbortController();
|
||||
const timeout = setTimeout(() => controller.abort(), 30000);
|
||||
|
||||
// Externen Abort weiterleiten an internen Controller
|
||||
if (externalSignal) {
|
||||
externalSignal.addEventListener('abort', () => controller.abort(), { once: true });
|
||||
}
|
||||
|
||||
const options = {
|
||||
method,
|
||||
headers: this._getHeaders(),
|
||||
@@ -70,8 +75,8 @@ const API = {
|
||||
return this._request('GET', `/incidents${query}`);
|
||||
},
|
||||
|
||||
enhanceDescription(title, description, type) {
|
||||
return this._request('POST', '/incidents/enhance-description', { title, description, type });
|
||||
enhanceDescription(title, description, type, signal = null) {
|
||||
return this._request('POST', '/incidents/enhance-description', { title, description, type }, signal);
|
||||
},
|
||||
|
||||
createIncident(data) {
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren