<$details summary="D/m">
D:<$fieldmangler tiddler="Seiten und Tiddler Style Desktop">
<$button message="tm-add-tag" param="$:/tags/Stylesheet">D</$button></$fieldmangler>
+<$fieldmangler tiddler="Seiten und Tiddler Style mobil">
<$button message="tm-remove-tag" param="$:/tags/Stylesheet">D</$button>
</$fieldmangler>
<br/><br/><br/>
m:
<$fieldmangler tiddler="Seiten und Tiddler Style mobil">
<$button message="tm-add-tag" param="$:/tags/Stylesheet">m</$button></$fieldmangler>
+<$fieldmangler tiddler="Seiten und Tiddler Style Desktop">
<$button message="tm-remove-tag" param="$:/tags/Stylesheet">m</$button>
</$fieldmangler>
</$details>D<$tiddler tiddler="Seiten und Tiddler Style Desktop">
<<cycletags "foo bar">>
m<$tiddler tiddler="Seiten und Tiddler Style mobil">
<<cycletags "bar foo">>
</$tiddler>\define SwapActiveStyle(style1,style2)
<$fieldmangler tiddler="$style1$">
<$action-sendmessage $message="tm-add-tag" $param="$:/tags/Stylesheet"/>
</$fieldmangler>
<$fieldmangler tiddler="$style2$">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/Stylesheet"/>
</$fieldmangler>
\end
\define swapper(style1,style2)
<$vars sheet="$:/tags/Stylesheet">
<$list filter="[[$style1$]tag<sheet>]">
<$button><$text text="""<m"""/>
<<SwapActiveStyle """$style2$""" """$style1$""">>
</$button>
</$list>
<$list filter="[[$style2$]tag<sheet>]">
<$button><$text text=""">D"""/>
<<SwapActiveStyle """$style1$""" """$style2$""">>
</$button>
</$list>
</$vars>
\end
<<swapper DesktopStyle mobilStyle>><<if-no-sidebar "
.tc-story-river {
width: calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}});
}
.tc-tiddler-frame {
width: 100%;
}
">>Create two buttons one mobile, one desktop in the same tiddler. set an initial value then display one when mobile selected hide it when desktop is enabled and visa versa for the other. Basically have a complex toggle.
You can load each button with multiple actions.
Forcing the initial value stops you having to deal with the first button press, ie before either is pressed.
Remember you can search for the code for any existing button core or coming with a plugin that behaves similarly to what you want and learn from how its done, even clone and modify.
Regards
Tony
<$button set="!!edit-fields-list" setTo="" class="tc-btn-invisible" tooltip="Create edit-fields-list and customise which fields to display for edit in view mode"><$action-setfield show-edit-fields="yes"/>{{$:/core/images/edit-button}}{{$:/core/images/storyview-classic}}</$button>
<$reveal type="match" state="!!show-edit-fields" text="yes"><$button set="!!show-edit-fields" setTo="no" class="tc-btn-invisible" tooltip="close edit fields view">{{$:/core/images/preview-closed}}{{$:/core/images/storyview-classic}}</$button></$reveal>
<$reveal type="match" state="!!show-edit-fields" text="no"><$button set="!!show-edit-fields" setTo="yes" class="tc-btn-invisible" tooltip="open edit fields view">{{$:/core/images/preview-open}}{{$:/core/images/storyview-classic}}</$button></$reveal>Glad you have what you need and thanks for sharing back your code.
To improve the way Google groups works Someone like yourself can use the forum view and edit your original post to note the solution. Visitors will see its solved in the first read.
Regards
Tony