Merge branch 'small-fixes-and-improvements' into shigusegubu-themes3
This commit is contained in:
commit
5a67a32c2f
13 changed files with 88 additions and 38 deletions
|
|
@ -61,12 +61,14 @@ export default {
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.checkbox {
|
.checkbox {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
min-height: 1.2em;
|
min-height: 1.2em;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 0 0.5em;
|
||||||
|
|
||||||
&-indicator,
|
&-indicator,
|
||||||
& .label {
|
& .label {
|
||||||
vertical-align: middle;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > &-indicator {
|
& > &-indicator {
|
||||||
|
|
@ -138,15 +140,5 @@ export default {
|
||||||
content: "–";
|
content: "–";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& > .label {
|
|
||||||
&.-after {
|
|
||||||
margin-left: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.-before {
|
|
||||||
margin-right: 0.5em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,6 @@
|
||||||
flex: 10 0 auto;
|
flex: 10 0 auto;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
padding-left: 0.5em;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,7 @@
|
||||||
<button
|
<button
|
||||||
v-if="quotingAvailable"
|
v-if="quotingAvailable"
|
||||||
class="bottom-left-button quote-icon button-unstyled"
|
class="bottom-left-button quote-icon button-unstyled"
|
||||||
:disabled="newStatus.quote.thread"
|
:disabled="quoteThreadToggled"
|
||||||
:class="{ toggled: quoteFormVisible }"
|
:class="{ toggled: quoteFormVisible }"
|
||||||
:title="$t('tool_tip.add_quote')"
|
:title="$t('tool_tip.add_quote')"
|
||||||
@click="toggleQuoteForm"
|
@click="toggleQuoteForm"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
:trigger-attrs="{ 'aria-label': $t('settings.setting_changed') }"
|
:trigger-attrs="{ 'aria-label': $t('settings.setting_changed') }"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
|
|
||||||
<FAIcon icon="circle-question" />
|
<FAIcon icon="circle-question" />
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
trigger="hover"
|
trigger="hover"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
|
|
||||||
<FAIcon
|
<FAIcon
|
||||||
icon="desktop"
|
icon="desktop"
|
||||||
:aria-label="$t('settings.setting_local_side')"
|
:aria-label="$t('settings.setting_local_side')"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
:trigger-attrs="{ 'aria-label': $t('settings.setting_changed') }"
|
:trigger-attrs="{ 'aria-label': $t('settings.setting_changed') }"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
|
|
||||||
<FAIcon
|
<FAIcon
|
||||||
icon="wrench"
|
icon="wrench"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,6 @@
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.suboptions {
|
|
||||||
margin-left: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidenote {
|
.sidenote {
|
||||||
margin-left: 5em;
|
margin-left: 5em;
|
||||||
padding: 0.25em 1em;
|
padding: 0.25em 1em;
|
||||||
|
|
@ -66,6 +62,7 @@
|
||||||
column-gap: 0.5em;
|
column-gap: 0.5em;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
padding: 0.5em 0;
|
padding: 0.5em 0;
|
||||||
|
line-height: 1.5em;
|
||||||
|
|
||||||
.setting-label {
|
.setting-label {
|
||||||
grid-area: label;
|
grid-area: label;
|
||||||
|
|
@ -96,6 +93,9 @@
|
||||||
|
|
||||||
.checkbox-indicator {
|
.checkbox-indicator {
|
||||||
grid-area: control;
|
grid-area: control;
|
||||||
|
height: 1.5em;
|
||||||
|
line-height: 1.5em;
|
||||||
|
align-self: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.-mobile & {
|
.-mobile & {
|
||||||
|
|
@ -130,6 +130,12 @@
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
|
&.suboptions {
|
||||||
|
margin-left: 2em;
|
||||||
|
border-top: 1px dotted var(--border);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.btn:not(.dropdown-button) {
|
.btn:not(.dropdown-button) {
|
||||||
padding: 0 2em;
|
padding: 0 2em;
|
||||||
}
|
}
|
||||||
|
|
@ -207,6 +213,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
.sidenote {
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* stylelint-disable no-descending-specificity */
|
/* stylelint-disable no-descending-specificity */
|
||||||
.setting-item {
|
.setting-item {
|
||||||
grid-template-columns: 1fr min-content;
|
grid-template-columns: 1fr min-content;
|
||||||
|
|
@ -221,9 +233,14 @@
|
||||||
.checkbox {
|
.checkbox {
|
||||||
.label {
|
.label {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin-left: 0;
|
order: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-indicator {
|
||||||
|
order: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
|
|
@ -236,14 +253,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.setting-list:not(.suboptions),
|
.setting-list:not(.suboptions),
|
||||||
.option-list {
|
.option-list {
|
||||||
&.two-column {
|
&.two-column {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.UnitSetting {
|
||||||
|
padding-right: 0.5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.peek {
|
&.peek {
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ const FilteringTab = {
|
||||||
hide = false,
|
hide = false,
|
||||||
name = '',
|
name = '',
|
||||||
value = '',
|
value = '',
|
||||||
|
caseSensitive = false,
|
||||||
} = data
|
} = data
|
||||||
|
|
||||||
this.createFilter({
|
this.createFilter({
|
||||||
|
|
@ -66,6 +67,7 @@ const FilteringTab = {
|
||||||
hide,
|
hide,
|
||||||
name,
|
name,
|
||||||
value,
|
value,
|
||||||
|
caseSensitive,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onImportFailure(result) {
|
onImportFailure(result) {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,16 @@
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> label.checkbox {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: subgrid;
|
||||||
|
grid-template-rows: subgrid;
|
||||||
|
grid-column: 1 / span 2;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
.filter-field-value {
|
.filter-field-value {
|
||||||
|
display: flex;
|
||||||
grid-column: 2 / span 2;
|
grid-column: 2 / span 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -254,6 +254,20 @@
|
||||||
:value="filter[1].value"
|
:value="filter[1].value"
|
||||||
@input="updateFilter(filter[0], 'value', $event.target.value)"
|
@input="updateFilter(filter[0], 'value', $event.target.value)"
|
||||||
>
|
>
|
||||||
|
{{ ' ' }}
|
||||||
|
</div>
|
||||||
|
<div class="filter-value filter-field">
|
||||||
|
<Checkbox
|
||||||
|
:id="'filterCaseSensitive' + filter[0]"
|
||||||
|
:model-value="filter[1].caseSensitive"
|
||||||
|
:name="'filterCaseSensitive' + filter[0]"
|
||||||
|
class="input-inset input-boolean case-sensitive"
|
||||||
|
@update:model-value="updateFilter(filter[0], 'caseSensitive', $event)"
|
||||||
|
>
|
||||||
|
<template #before>
|
||||||
|
{{ $t('settings.filter.case_sensitive') }}
|
||||||
|
</template>
|
||||||
|
</Checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="filter-expires filter-field">
|
<div class="filter-expires filter-field">
|
||||||
<label
|
<label
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
.quick-action-buttons {
|
.quick-action-buttons {
|
||||||
display: grid;
|
display: grid;
|
||||||
margin-left: -0.5em;
|
margin-left: -0.5em;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(3.5em, 10%));
|
grid-template-columns: repeat(auto-fill, minmax(3.75em, 10%));
|
||||||
grid-auto-flow: row dense;
|
grid-auto-flow: row dense;
|
||||||
grid-auto-rows: 1fr;
|
grid-auto-rows: 1fr;
|
||||||
grid-gap: 0.5em 0.1em;
|
grid-gap: 0.5em 0.1em;
|
||||||
|
|
|
||||||
|
|
@ -440,6 +440,7 @@
|
||||||
"plain": "Simple",
|
"plain": "Simple",
|
||||||
"user": "User (Simple)",
|
"user": "User (Simple)",
|
||||||
"user_regexp": "User (RegExp)",
|
"user_regexp": "User (RegExp)",
|
||||||
|
"case_sensitive": "Case-sensitive",
|
||||||
"hide": "Hide completely",
|
"hide": "Hide completely",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"value": "Value",
|
"value": "Value",
|
||||||
|
|
|
||||||
|
|
@ -10,24 +10,32 @@ export const muteFilterHits = (muteFilters, status) => {
|
||||||
return muteFilters
|
return muteFilters
|
||||||
.toSorted((a, b) => b.order - a.order)
|
.toSorted((a, b) => b.order - a.order)
|
||||||
.map((filter) => {
|
.map((filter) => {
|
||||||
const { hide, expires, name, value, type, enabled } = filter
|
const { hide, expires, name, value, type, enabled, caseSensitive = false } = filter
|
||||||
if (!enabled) return false
|
if (!enabled) return false
|
||||||
if (value === '') return false
|
if (value === '') return false
|
||||||
if (expires !== null && expires < Date.now()) return false
|
if (expires !== null && expires < Date.now()) return false
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'word': {
|
case 'word': {
|
||||||
|
let match = false
|
||||||
|
if (caseSensitive) {
|
||||||
|
match =
|
||||||
|
statusText.includes(value) ||
|
||||||
|
statusSummary.includes(value)
|
||||||
|
} else {
|
||||||
const lowercaseValue = value.toLowerCase()
|
const lowercaseValue = value.toLowerCase()
|
||||||
if (
|
match =
|
||||||
statusText.toLowerCase().includes(lowercaseValue) ||
|
statusText.toLowerCase().includes(lowercaseValue) ||
|
||||||
statusSummary.toLowerCase().includes(lowercaseValue)
|
statusSummary.toLowerCase().includes(lowercaseValue)
|
||||||
) {
|
}
|
||||||
|
|
||||||
|
if (match) {
|
||||||
return { hide, name }
|
return { hide, name }
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'regexp': {
|
case 'regexp': {
|
||||||
try {
|
try {
|
||||||
const re = new RegExp(value, 'i')
|
const re = new RegExp(value, caseSensitive ? '' : 'i')
|
||||||
if (re.test(statusText) || re.test(statusSummary)) {
|
if (re.test(statusText) || re.test(statusSummary)) {
|
||||||
return { hide, name }
|
return { hide, name }
|
||||||
}
|
}
|
||||||
|
|
@ -37,18 +45,27 @@ export const muteFilterHits = (muteFilters, status) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 'user': {
|
case 'user': {
|
||||||
if (
|
let match = false
|
||||||
|
if (caseSensitive) {
|
||||||
|
match =
|
||||||
poster.includes(value) ||
|
poster.includes(value) ||
|
||||||
replyToUser.includes(value) ||
|
replyToUser.includes(value) ||
|
||||||
mentions.some((mention) => mention.includes(value))
|
mentions.some((mention) => mention.includes(value))
|
||||||
) {
|
} else {
|
||||||
|
const lowercaseValue = value.toLowerCase()
|
||||||
|
match =
|
||||||
|
poster.toLowerCase().includes(lowercaseValue) ||
|
||||||
|
replyToUser.toLowerCase().includes(lowercaseValue) ||
|
||||||
|
mentions.some((mention) => mention.toLowerCase().includes(lowercaseValue))
|
||||||
|
}
|
||||||
|
if (match) {
|
||||||
return { hide, name }
|
return { hide, name }
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'user_regexp': {
|
case 'user_regexp': {
|
||||||
try {
|
try {
|
||||||
const re = new RegExp(value, 'i')
|
const re = new RegExp(value, caseSensitive ? '' : 'i')
|
||||||
if (
|
if (
|
||||||
re.test(poster) ||
|
re.test(poster) ||
|
||||||
re.test(replyToUser) ||
|
re.test(replyToUser) ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue