Skip to content

Commit

Permalink
fix(promo): plugin detection
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyurec committed Oct 3, 2022
1 parent 4e088cc commit 33db865
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions src/css/ui/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,17 @@ html[data-theme="dark"] .ui__modal .ui__button:hover {


/* promo */
.panel-wrap[data-id="logseq-awesome-ui"] .desc-item[data-key="promoSolExt"] {
.panel-wrap[data-id="logseq-awesome-ui"] .desc-item[data-key="promoAwesomeStyler"] {
display: none;
}
body:not(.is-solext) .panel-wrap[data-id="logseq-awesome-ui"] .desc-item[data-key="promoSolExt"],
body:not(.is-solext-loaded) .panel-wrap[data-id="logseq-awesome-ui"] .desc-item[data-key="promoSolExt"] {
body:not(.is-awesomeStyler-loaded) .panel-wrap[data-id="logseq-awesome-ui"] .desc-item[data-key="promoAwesomeStyler"] {
display: block;
}
.desc-item[data-key="promoSolExt"] {
.desc-item[data-key="promoAwesomeStyler"] {
margin: 1em 0 !important;
font-size: 1.3em;
}
.desc-item[data-key="promoSolExt"] .form-checkbox {
.desc-item[data-key="promoAwesomeStyler"] .form-checkbox {
display: none;
}

Expand Down
8 changes: 4 additions & 4 deletions src/js/awesomeUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ let tabsPluginIframe: HTMLIFrameElement | null;
let pluginConfig: LSPluginBaseInfo['settings'];
let oldPluginConfig: LSPluginBaseInfo['settings'];

const promoSolExtMsg = '🐱‍👤 To customize UI & content text/bg colors, install "Awesome Styler" (former "Solarized Extended") theme! https://github.com/yoyurec/logseq-awesome-styler';
const promoAwesomeStylerMsg = '🐱‍👤 To customize UI & content text/bg colors, install "Awesome Styler" (former "Solarized Extended") theme! https://github.com/yoyurec/logseq-awesome-styler';
const promoUpdSolExtMgs = '⚠ Update "Solarized Extended" to latest to avoid same functionality conflicts!';

const settingSchema: SettingSchemaDesc[] = [
{
key: 'promoSolExt',
key: 'promoAwesomeStyler',
title: '',
description: promoSolExtMsg,
description: promoAwesomeStylerMsg,
type: 'boolean',
default: false,
},
Expand Down Expand Up @@ -529,7 +529,7 @@ const main = async () => {
if (doc.body.classList.contains('is-solext')) {
msg = promoUpdSolExtMgs;
} else if (!doc.body.classList.contains('is-awesomeStyler-loaded')) {
msg = promoSolExtMsg;
msg = promoAwesomeStylerMsg;
}
if (msg) {
logseq.UI.showMsg(msg, 'warning', {timeout: 300000});
Expand Down

0 comments on commit 33db865

Please sign in to comment.