이 간단한 테마 컴포넌트는 게시글과 토픽의 공유 아이콘을 에서 로 변경합니다. Android에서는 로 변경됩니다.
참고: post_menu에 copyLink를 사용 중이라면 이 컴포넌트를 사용하지 않는 것이 좋습니다. 데스크톱에서 copyLink는 게시글 링크를 즉시 복사하기 때문에 아이콘이 그 용도에 적합합니다. 모바일로 이 컴포넌트를 제한하거나, copyLink가 활성화된 경우 데스크톱에서는 원래의 링크 아이콘을 유지해야 할지 고민 중입니다.
이 문제를 해결하기 위해 데스크톱에서 아이콘 변경을 비활성화할 수 있는 설정을 추가했습니다. post_menu에 copyLink가 추가된 경우 이 설정을 활성화하는 것이 권장됩니다. copyLink는 기본적으로 추가되므로 이 설정도 기본적으로 활성화되어 있습니다. 이를 통해 데스크톱의 게시글에서는 기본 링크 아이콘이 유지됩니다.
I like idea of that component, but I’m a bit wondering, as an apple mobile user, if it really works because the functionality of OS-icon in OS is different. It more than a just link or copying a link. But perhaps I’m just overthinking and overdramatizing this because I’m bored.
I’ve added a setting to keep the default link icon on desktop if the instant post copy link is active.
On iOS and Android it will change the default link icon because it uses the native share panel. So not instantly copying the post link but open the native share panel.
Overall, it only keeps the link icon by default, if it’s instantly copy the post link. But it can be control with the setting .
I got a deprecation notice for this great theme component in the developer console of the browser:
[THEME 57 ‘Change share icon by OS’] Deprecation notice: Accessing site.mobileView or site.desktopView during the site initialization can lead to errors and inconsistencies when the browser window is resized. Please move these checks to a component, transformer, or API callback that executes during page rendering. [deprecated since Discourse 3.5.0.beta9-dev] [deprecation id: discourse.static-viewport-initialization] [info: Designing for Different Devices (Viewport Size, Touch/Hover, etc.)]