mirror of
https://github.com/elder-plinius/P4RS3LT0NGV3.git
synced 2026-06-06 06:53:56 +02:00
Tokenade: remove drop/paste UI; add advanced custom carrier text override; keep quick picks + dropdown
This commit is contained in:
+5
-16
@@ -267,22 +267,11 @@
|
||||
<option v-for="em in carrierEmojiList" :key="em" :value="em">{{ em }}</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div v-if="tbSingleCarrier" class="tokenade-payload-drop">
|
||||
<div class="drop-zone"
|
||||
@dragover.prevent
|
||||
@drop="handleTokenadeDrop"
|
||||
@paste="handleTokenadePaste"
|
||||
title="Drag/Drop or paste emojis here to embed into the carrier">
|
||||
Drop or paste emojis to embed →
|
||||
</div>
|
||||
<div class="payload-list" v-if="tbPayloadEmojis.length">
|
||||
<div class="payload-item" v-for="(em, idx) in tbPayloadEmojis" :key="idx">
|
||||
<span class="payload-emoji">{{ em }}</span>
|
||||
<button class="decode-button" @click="removeTokenadePayloadAt(idx)" title="Remove">✖</button>
|
||||
</div>
|
||||
<button class="decode-button" @click="clearTokenadePayload" title="Clear all">Clear</button>
|
||||
</div>
|
||||
<label v-if="tbSingleCarrier" title="Advanced: use this symbol or string as the embedded payload for encoding">
|
||||
Advanced: custom carrier text
|
||||
<input type="text" v-model="tbCarrierManual" placeholder="e.g., ⚙️ or ::tag::" />
|
||||
<small>When set, this overrides quick picks and dropdown.</small>
|
||||
</label>
|
||||
</div>
|
||||
<div class="token-bomb-actions">
|
||||
<button class="transform-button" @click="generateTokenBomb" title="Build the tokenade with current settings">
|
||||
|
||||
@@ -54,6 +54,7 @@ window.app = new Vue({
|
||||
selectedEmoji: null,
|
||||
carrierEmojiList: [...window.emojiLibrary.EMOJI_LIST],
|
||||
quickCarrierEmojis: ['🐍','🐉','🐲','🔥','💥','🗿','⚓','⭐','✨','🚀','💀','🪨','🍃','🪶','🔮','🐢','🐊','🦎','🐍'],
|
||||
tbCarrierManual: '',
|
||||
// Token Bomb Generator
|
||||
tbDepth: 3,
|
||||
tbBreadth: 4,
|
||||
@@ -1744,7 +1745,8 @@ window.app = new Vue({
|
||||
}
|
||||
|
||||
if (this.tbSingleCarrier) {
|
||||
const carrier = (this.tbCarrier && String(this.tbCarrier)) || (this.selectedEmoji ? String(this.selectedEmoji) : '💥');
|
||||
const manual = (this.tbCarrierManual || '').trim();
|
||||
const carrier = manual || (this.tbCarrier && String(this.tbCarrier)) || (this.selectedEmoji ? String(this.selectedEmoji) : '💥');
|
||||
function countUnits(level) {
|
||||
if (level === 0) return breadth;
|
||||
return breadth * countUnits(level - 1);
|
||||
@@ -1753,13 +1755,7 @@ window.app = new Vue({
|
||||
const totalUnits = Math.max(1, repeats * unitsPerBlock);
|
||||
|
||||
let payload = [];
|
||||
if (this.tbPayloadEmojis && this.tbPayloadEmojis.length > 0) {
|
||||
for (let i = 0; i < totalUnits; i++) {
|
||||
payload.push(String(this.tbPayloadEmojis[i % this.tbPayloadEmojis.length]));
|
||||
}
|
||||
} else {
|
||||
payload = pickEmojis(totalUnits);
|
||||
}
|
||||
payload = pickEmojis(totalUnits);
|
||||
|
||||
function toTagSeqForEmojiChar(ch) {
|
||||
const cp = ch.codePointAt(0);
|
||||
|
||||
Reference in New Issue
Block a user