Revert "Add a test link for bangs."

This reverts commit 6ba718de35.
This commit is contained in:
Bauke 2022-10-13 11:38:18 +02:00
parent ee70b18781
commit 46b3db5538
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 2 additions and 26 deletions

View File

@ -1,8 +1,4 @@
import { import {ConfirmButton, FeedbackButton} from '@holllo/preact-components';
ConfirmButton,
FeedbackButton,
PrivacyLink,
} from '@holllo/preact-components';
import {html} from 'htm/preact'; import {html} from 'htm/preact';
import {Component} from 'preact'; import {Component} from 'preact';
import browser from 'webextension-polyfill'; import browser from 'webextension-polyfill';
@ -193,18 +189,6 @@ export class PageMain extends Component<Props, State> {
? undefined ? undefined
: html`<p class="validate-error">${editorError}</p>`; : html`<p class="validate-error">${editorError}</p>`;
const testLinkAttributes: Record<string, any> = {
class: 'button',
};
if (this.state.editorBang.searchUrl.includes('{{bang}}')) {
testLinkAttributes.href = this.state.editorBang.searchUrl.replace(
/{{bang}}/g,
'test',
);
} else {
testLinkAttributes.disabled = true;
}
return html` return html`
<main class="page-main"> <main class="page-main">
<details open class="bang-editor"> <details open class="bang-editor">
@ -214,7 +198,6 @@ export class PageMain extends Component<Props, State> {
${editorInputs} ${editorInputs}
<div class="button-group"> <div class="button-group">
<${PrivacyLink} attributes=${testLinkAttributes}>Test<//>
<${FeedbackButton} <${FeedbackButton}
attributes=${{class: 'button'}} attributes=${{class: 'button'}}
click=${this.saveBang} click=${this.saveBang}

View File

@ -50,8 +50,6 @@
cursor: pointer; cursor: pointer;
font-weight: bold; font-weight: bold;
padding: 8px; padding: 8px;
text-align: center;
text-decoration: none;
width: 100%; width: 100%;
&.destructive { &.destructive {
@ -59,12 +57,7 @@
border-color: var(--da-1); border-color: var(--da-1);
} }
&[disabled] { &:hover {
cursor: not-allowed;
filter: grayscale(1);
}
&:not([disabled]):hover {
background-color: var(--df-2); background-color: var(--df-2);
border-color: var(--df-2); border-color: var(--df-2);
} }