Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To keep the compatible with mobile version when we use image as icon #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

snakewa
Copy link

@snakewa snakewa commented Oct 22, 2022

  • To keep the compatible with mobile version, add "icon-url::" page property for icon image
  • add support for "icon2::" and "icon-url2::" page properties for one extra icon or icon image (only be effective when "icon::" or "icon-url::" is provided)
  • add dev dependency "vite-plugin-logseq" to use logseqDevPlugin() for for 'npm run dev'

…property for icon image

- add support for "icon2::" and "icon-url2::" page properties for one extra icon or icon image (only be effective when "icon::" or "icon-url::" is provided)
- add dev dependency "vite-plugin-logseq" to use logseqDevPlugin() for for 'npm run dev'
- add dev dependency "vite-plugin-logseq"
@@ -32,7 +32,8 @@
"eslint": "^8.25.0",
"semantic-release": "^19.0.5",
"typescript": "^4.8.4",
"vite": "3.1.8"
"vite": "3.1.8",
"vite-plugin-logseq": "^1.1.2"
Copy link
Owner

@yoyurec yoyurec Oct 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this not needed )
dev mode never works ok with hot reload. only simple css... so i deleted if from everywhere

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to work for me to generate dist/index.html which source localhost's server tor translate TS. I wonder what is the alternative way to test the code without npm run build every time code changes?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i do every time npm run build and copy dist to plugins folder ((

@@ -136,15 +136,22 @@ export const processLinkItem = async (linkItem: HTMLElement) => {
export const setStyleToLinkItem = async (linkItem: HTMLElement, pageProps: propsObject) => {
linkItem.classList.remove('awLi-stroke');
// icon
const pageIcon = pageProps['icon'];
const pageIcon = pageProps['icon-url'] ? `<img src="${pageProps['icon-url']}">` : pageProps['icon'];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool that should work for image in asset. I will try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants