Update 'Tags to ignore' interface
parent
646241b45f
commit
381dac72d4
|
|
@ -103,7 +103,7 @@ async function importTagCategoriesFromInstance() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function addTagIgnore() {
|
function addTagIgnore() {
|
||||||
cfg.value.tagIgnores.push(new TagDetails([""]))
|
cfg.value.tagIgnores.push(new TagDetails([""]));
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetTagIgnores() {
|
function resetTagIgnores() {
|
||||||
|
|
@ -152,10 +152,7 @@ wnd.szc_set_config_version = (v = 0) => (cfg.value.version = v);
|
||||||
<input type="checkbox" v-model="cfg.alwaysUploadAsContent" />
|
<input type="checkbox" v-model="cfg.alwaysUploadAsContent" />
|
||||||
Always upload as content
|
Always upload as content
|
||||||
</label>
|
</label>
|
||||||
<p class="hint">
|
<p class="hint">This will always upload the image content directly, instead of as an URL</p>
|
||||||
This will always upload the image content directly, instead of
|
|
||||||
as an URL
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 md:col-6">
|
<div class="col-12 md:col-6">
|
||||||
|
|
@ -164,8 +161,8 @@ wnd.szc_set_config_version = (v = 0) => (cfg.value.version = v);
|
||||||
Send browser notifications after uploading
|
Send browser notifications after uploading
|
||||||
</label>
|
</label>
|
||||||
<p class="hint">
|
<p class="hint">
|
||||||
This will send a browser notification after a successful upload. Clicking the notification will open
|
This will send a browser notification after a successful upload. Clicking the notification will open the
|
||||||
the uploaded post in a new tab.
|
uploaded post in a new tab.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -279,68 +276,70 @@ wnd.szc_set_config_version = (v = 0) => (cfg.value.version = v);
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|
||||||
<TabPanel header="Tags">
|
<TabPanel header="Tags">
|
||||||
<div class="grid">
|
<div class="separated-content">
|
||||||
<DataTable :value="cfg.tagCategories" table-class="col-12" style="width: 100%">
|
<div class="grid">
|
||||||
<Column v-for="col of columns" :key="col.field" :field="col.field" :header="col.header">
|
<DataTable :value="cfg.tagCategories" table-class="col-12" style="width: 100%">
|
||||||
<template #body="{ data, field }">
|
<Column v-for="col of columns" :key="col.field" :field="col.field" :header="col.header">
|
||||||
<template v-if="field == 'color'">
|
<template #body="{ data, field }">
|
||||||
<div class="color-preview">
|
<template v-if="field == 'color'">
|
||||||
<input type="text" class="color" v-model="data[field]" />
|
<div class="color-preview">
|
||||||
<div
|
<input type="text" class="color" v-model="data[field]" />
|
||||||
class="preview background-preview"
|
<div
|
||||||
:style="{ 'border-color': data[field], 'background-color': data[field] }"
|
class="preview background-preview"
|
||||||
></div>
|
:style="{ 'border-color': data[field], 'background-color': data[field] }"
|
||||||
<div
|
></div>
|
||||||
class="preview text-preview"
|
<div
|
||||||
:style="{ 'border-color': data[field], color: data[field] }"
|
class="preview text-preview"
|
||||||
></div>
|
:style="{ 'border-color': data[field], color: data[field] }"
|
||||||
</div>
|
></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<input type="text" :name="field" v-model="data[field]" />
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
</Column>
|
||||||
|
|
||||||
<template v-else>
|
<Column field="name">
|
||||||
<input type="text" :name="field" v-model="data[field]" />
|
<template #body="{ index }">
|
||||||
|
<a class="color-primary cursor-pointer" @click="() => cfg.tagCategories.splice(index, 1)">Remove</a>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</Column>
|
||||||
</Column>
|
</DataTable>
|
||||||
|
|
||||||
<Column field="name">
|
<div class="col-12 flex flex-wrap grid grid-nogutter gap-1">
|
||||||
<template #body="{ index }">
|
<button class="primary" @click="addTagCategory">Add new category</button>
|
||||||
<a class="color-primary cursor-pointer" @click="() => cfg.tagCategories.splice(index, 1)">Remove</a>
|
<button @click="importTagCategoriesFromInstance">Import from active instance</button>
|
||||||
</template>
|
<button class="bg-danger sm:ml-auto" @click="resetTagCategories">Reset to default</button>
|
||||||
</Column>
|
</div>
|
||||||
</DataTable>
|
|
||||||
|
|
||||||
<div class="col-12 flex flex-wrap grid grid-nogutter gap-1">
|
|
||||||
<button class="primary" @click="addTagCategory">Add new category</button>
|
|
||||||
<button @click="importTagCategoriesFromInstance">Import from active instance</button>
|
|
||||||
<button class="bg-danger sm:ml-auto" @click="resetTagCategories">Reset to default</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- TODO: Tag category colors -->
|
<!-- TODO: Tag category colors -->
|
||||||
|
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<DataTable :value="cfg.tagIgnores" table-class="col-12" style="width: 100%">
|
<DataTable :value="cfg.tagIgnores" table-class="col-12" style="width: 100%">
|
||||||
<Column field="names" :header="'Names'">
|
<Column field="names" header="Tags to ignore">
|
||||||
<template #body="{ data, field }">
|
<template #body="{ data, field }">
|
||||||
<input type="text" :name="field" v-model="data[field][0]" />
|
<input type="text" :name="field" v-model="data[field][0]" />
|
||||||
</template>
|
</template>
|
||||||
</Column>
|
</Column>
|
||||||
|
|
||||||
<Column field="remove">
|
<Column field="remove">
|
||||||
<template #body="{ index }">
|
<template #body="{ index }">
|
||||||
<a class="color-primary cursor-pointer" @click="() => cfg.tagIgnores.splice(index, 1)">Remove</a>
|
<a class="color-primary cursor-pointer" @click="() => cfg.tagIgnores.splice(index, 1)">Remove</a>
|
||||||
</template>
|
</template>
|
||||||
</Column>
|
</Column>
|
||||||
</DataTable>
|
</DataTable>
|
||||||
|
|
||||||
<div class="col-12 flex flex-wrap grid grid-nogutter gap-1">
|
<div class="col-12 flex flex-wrap grid grid-nogutter gap-1">
|
||||||
<button class="primary" @click="addTagIgnore">Add tag</button>
|
<button class="primary" @click="addTagIgnore">Add tag</button>
|
||||||
<button class="bg-danger sm:ml-auto" @click="resetTagIgnores">Clear</button>
|
<button class="bg-danger sm:ml-auto" @click="resetTagIgnores">Clear</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- TODO: Category ignore list -->
|
<!-- TODO: Category ignore list -->
|
||||||
|
</div>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|
||||||
<!-- <TabPanel header="About">
|
<!-- <TabPanel header="About">
|
||||||
|
|
|
||||||
|
|
@ -268,3 +268,9 @@ a.remove-tag {
|
||||||
.color-primary {
|
.color-primary {
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.separated-content > * + * {
|
||||||
|
padding-top: 1rem;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
border-top: 3px solid #333;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue