Re-add naming scheme frontend code and add autoscroll
This commit is contained in:
parent
1ab3f1d45a
commit
6366c947f4
@ -69,7 +69,7 @@
|
|||||||
.modal-wrapper {
|
.modal-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 75%;
|
width: 75%;
|
||||||
margin: 10% auto auto auto;
|
margin: 2% auto auto auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 1280px) {
|
@media only screen and (max-width: 1280px) {
|
||||||
|
@ -45,6 +45,28 @@
|
|||||||
<option value={form.form_id}>{form.title}</option>
|
<option value={form.form_id}>{form.title}</option>
|
||||||
{/each}
|
{/each}
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="naming-scheme-wrapper" class="form-label">Naming Scheme</label>
|
||||||
|
<div class="row" id="naming-scheme-wrapper">
|
||||||
|
<div>
|
||||||
|
<label class="form-label">Use Server Default</label>
|
||||||
|
<Toggle hideLabel
|
||||||
|
toggledColor="#66bb6a"
|
||||||
|
untoggledColor="#ccc"
|
||||||
|
bind:toggled={data.use_server_default_naming_scheme} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#if !data.use_server_default_naming_scheme}
|
||||||
|
<Input col4
|
||||||
|
label="Naming Scheme"
|
||||||
|
bind:value={data.naming_scheme}
|
||||||
|
placeholder="ticket-%id%"
|
||||||
|
tooltipText="Click here for the full placeholder list"
|
||||||
|
tooltipLink="https://docs.ticketsbot.net" />
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Collapsible>
|
</Collapsible>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="modal" transition:fade>
|
<div class="modal" transition:fade bind:this={modal}>
|
||||||
<div class="modal-wrapper">
|
<div class="modal-wrapper">
|
||||||
<Card footer="{true}" footerRight="{true}" fill="{false}">
|
<Card footer="{true}" footerRight="{true}" fill="{false}">
|
||||||
<span slot="title">Edit Panel</span>
|
<span slot="title">Edit Panel</span>
|
||||||
@ -29,6 +29,8 @@
|
|||||||
import Card from "../Card.svelte";
|
import Card from "../Card.svelte";
|
||||||
import Button from "../Button.svelte";
|
import Button from "../Button.svelte";
|
||||||
|
|
||||||
|
export let modal;
|
||||||
|
|
||||||
export let guildId;
|
export let guildId;
|
||||||
export let panel = {};
|
export let panel = {};
|
||||||
export let channels = [];
|
export let channels = [];
|
||||||
@ -74,7 +76,7 @@
|
|||||||
.modal-wrapper {
|
.modal-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 75%;
|
width: 75%;
|
||||||
margin: 10% auto auto auto;
|
margin: 2% auto auto auto;
|
||||||
padding-bottom: 5%;
|
padding-bottom: 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{#if editModal}
|
{#if editModal}
|
||||||
<PanelEditModal {guildId} {channels} {roles} {emojis} {teams} {forms} bind:panel={editData}
|
<PanelEditModal bind:modal={editModalElement} {guildId} {channels} {roles} {emojis} {teams} {forms} bind:panel={editData}
|
||||||
on:close={() => editModal = false} on:confirm={submitEdit}/>
|
on:close={() => editModal = false} on:confirm={submitEdit}/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
@ -149,6 +149,7 @@
|
|||||||
import MultiPanelCreationForm from '../components/manage/MultiPanelCreationForm.svelte';
|
import MultiPanelCreationForm from '../components/manage/MultiPanelCreationForm.svelte';
|
||||||
import MultiPanelEditModal from "../components/manage/MultiPanelEditModal.svelte";
|
import MultiPanelEditModal from "../components/manage/MultiPanelEditModal.svelte";
|
||||||
import ConfirmationModal from "../components/ConfirmationModal.svelte";
|
import ConfirmationModal from "../components/ConfirmationModal.svelte";
|
||||||
|
import {afterUpdate} from "svelte";
|
||||||
|
|
||||||
export let currentRoute;
|
export let currentRoute;
|
||||||
export let params = {};
|
export let params = {};
|
||||||
@ -176,14 +177,20 @@
|
|||||||
let multiPanelCreateData;
|
let multiPanelCreateData;
|
||||||
let multiPanelEditData;
|
let multiPanelEditData;
|
||||||
|
|
||||||
|
let editModalElement;
|
||||||
|
|
||||||
function openEditModal(panelId) {
|
function openEditModal(panelId) {
|
||||||
editData = panels.find((p) => p.panel_id === panelId);
|
editData = panels.find((p) => p.panel_id === panelId);
|
||||||
editModal = true;
|
editModal = true;
|
||||||
|
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
}
|
}
|
||||||
|
|
||||||
function openMultiEditModal(id) {
|
function openMultiEditModal(id) {
|
||||||
multiPanelEditData = multiPanels.find((mp) => mp.id === id);
|
multiPanelEditData = multiPanels.find((mp) => mp.id === id);
|
||||||
multiEditModal = true;
|
multiEditModal = true;
|
||||||
|
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
}
|
}
|
||||||
|
|
||||||
async function resendPanel(panelId) {
|
async function resendPanel(panelId) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user