mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add raw quotes indicator in slash command autocomplete
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
import { hljs } from '../../lib.js';
|
import { hljs } from '../../lib.js';
|
||||||
|
import { t } from '../i18n.js';
|
||||||
import { SlashCommandAbortController } from './SlashCommandAbortController.js';
|
import { SlashCommandAbortController } from './SlashCommandAbortController.js';
|
||||||
import { SlashCommandArgument, SlashCommandNamedArgument } from './SlashCommandArgument.js';
|
import { SlashCommandArgument, SlashCommandNamedArgument } from './SlashCommandArgument.js';
|
||||||
import { SlashCommandClosure } from './SlashCommandClosure.js';
|
import { SlashCommandClosure } from './SlashCommandClosure.js';
|
||||||
@ -260,6 +261,15 @@ export class SlashCommand {
|
|||||||
].filter(it=>it).join('\n');
|
].filter(it=>it).join('\n');
|
||||||
head.append(src);
|
head.append(src);
|
||||||
}
|
}
|
||||||
|
if (this.rawQuotes) {
|
||||||
|
const rawQuotes = document.createElement('div'); {
|
||||||
|
rawQuotes.classList.add('rawQuotes');
|
||||||
|
rawQuotes.classList.add('fa-solid');
|
||||||
|
rawQuotes.classList.add('fa-quote-left');
|
||||||
|
rawQuotes.title = t`Does not alter quoted literal unnamed arguments`;
|
||||||
|
head.append(rawQuotes);
|
||||||
|
}
|
||||||
|
}
|
||||||
specs.append(head);
|
specs.append(head);
|
||||||
}
|
}
|
||||||
const body = document.createElement('div'); {
|
const body = document.createElement('div'); {
|
||||||
|
@ -2086,6 +2086,15 @@ body[data-stscript-style] .hljs.language-stscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
>.head>.rawQuotes {
|
||||||
|
padding: 0 0.5em;
|
||||||
|
cursor: help;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: 1px dotted underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
>.head>.source {
|
>.head>.source {
|
||||||
padding: 0 0.5em;
|
padding: 0 0.5em;
|
||||||
cursor: help;
|
cursor: help;
|
||||||
|
Reference in New Issue
Block a user