remove smtp preview and fix missing type

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing
2026-06-13 12:57:58 +02:00
parent d1f100968e
commit 96e4289ed1
2 changed files with 8 additions and 22 deletions
@@ -12,8 +12,8 @@
destroyVimClipboardIntegration
} from '$lib/utils/vimClipboard.js';
import { displayMode, DISPLAY_MODE } from '$lib/store/displayMode';
/** @type {'domain'|'page'|'email'} */
/** @type {'domain'|'page'|'email'|'report'} */
export let contentType;
export let value;
export let baseURL = 'example.test';
@@ -94,7 +94,9 @@
result['Device Code'] = deviceCodeTemplates;
}
if ($displayMode === DISPLAY_MODE.BLACKBOX && contentType === 'page') {
result['Remote Browser'] = [{ label: 'Script', text: '{{RemoteBrowserScript "remote_browser_name"}}' }];
result['Remote Browser'] = [
{ label: 'Script', text: '{{RemoteBrowserScript "remote_browser_name"}}' }
];
}
return result;
})();
@@ -510,7 +512,10 @@
.replaceAll('{{MicrosoftDeviceCode}}', 'ABCD-1234')
.replaceAll('{{MicrosoftDeviceCodeURL}}', 'https://microsoft.com/devicelogin')
.replaceAll('{{DeviceCodeCaptured}}', 'false')
.replace(/\{\{RemoteBrowserScript\s+"[^"]*"\}\}/g, '<!-- RemoteBrowserScript (injected at runtime) -->');
.replace(
/\{\{RemoteBrowserScript\s+"[^"]*"\}\}/g,
'<!-- RemoteBrowserScript (injected at runtime) -->'
);
case 'email':
return text
.replaceAll('{{.FirstName}}', 'Alice')
@@ -587,7 +592,6 @@
}
};
// formatDate converts readable date format (YmdHis) to formatted date string
const formatDate = (date, format) => {
const pad = (num, size = 2) => num.toString().padStart(size, '0');
@@ -216,8 +216,6 @@
}
};
$: selectedSmtp = form.smtpConfigurationID ? smtpByID[form.smtpConfigurationID] : null;
$: isBusy = isSaving || isDeleting;
</script>
@@ -322,22 +320,6 @@
bind:value={form.smtpConfigurationID}
options={smtpOptions}>SMTP configuration</TextFieldSelect
>
{#if selectedSmtp}
<div
class="-mt-2 rounded-md bg-gray-50 dark:bg-gray-900/40 border border-gray-200 dark:border-gray-700/60 px-3 py-2 text-xs text-gray-500 dark:text-gray-400 space-y-0.5"
>
<p>
Host <span class="text-gray-700 dark:text-gray-300 font-mono">{selectedSmtp.host}</span>
</p>
{#if selectedSmtp.username}
<p>
Username
<span class="text-gray-700 dark:text-gray-300 font-mono">{selectedSmtp.username}</span>
</p>
{/if}
</div>
{/if}
<!-- sender email (the From address) -->
<TextField
width="full"