mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
fix(console): lock the group editor while saving
Prevent edits while a group save is in flight and make super-only installation settings readonly instead of silently ignoring edits.
This commit is contained in:
1 parent
f8dbb8ec0b
commit
0878a7768c
1 file changed
+9
-1
@@ -14,6 +14,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<form class="editor-body" @submit.prevent="save">
|
||||
<!-- Locked while saving: an edit made meanwhile would be lost when the
|
||||
save closes the editor. -->
|
||||
<fieldset :disabled="saving" class="contents">
|
||||
<section class="editor-section">
|
||||
<h3 class="editor-section-title">{{ t("groupEditor.sectionBasic") }}</h3>
|
||||
<div class="row2">
|
||||
@@ -166,10 +169,14 @@
|
||||
<span class="lbl-note">{{ t("groupEditor.installationIdNote") }}</span></label
|
||||
>
|
||||
<div class="ctl-md">
|
||||
<!-- Only super admins bind installations here (the server keeps
|
||||
the stored value for anyone else); owners use the install flow. -->
|
||||
<RcInput
|
||||
v-model="form.installationId"
|
||||
type="text"
|
||||
inputmode="numeric"
|
||||
:class="superAdmin ? '' : 'opacity-60'"
|
||||
:disabled="!superAdmin"
|
||||
:placeholder="t('groupEditor.installationIdPlaceholder')"
|
||||
/>
|
||||
</div>
|
||||
@@ -233,6 +240,7 @@
|
||||
</div>
|
||||
</section>
|
||||
<div class="err">{{ formError }}</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<template #footer>
|
||||
<div class="editor-foot">
|
||||
@@ -424,7 +432,7 @@ function save(): void {
|
||||
const all = [...form.providers, ...kept];
|
||||
return all.length ? all : undefined;
|
||||
})(),
|
||||
installationId,
|
||||
installationId: props.superAdmin ? installationId : props.group?.installationId,
|
||||
emoji: form.emoji,
|
||||
forgeSources: form.forgeSources.length
|
||||
? form.forgeSources.map((s) => ({
|
||||
|
||||
Reference in new issue
Block a user