2020-02-17 19:49:43 +00:00
import personalMenuTemplate from '!!raw-loader!../includes/templates/PersonalMenu.mustache' ;
import { htmluserlangattributes } from './utils' ;
2020-04-03 20:05:22 +00:00
/ * *
* @ type { MenuDefinition }
* /
2020-02-17 19:49:43 +00:00
const loggedOut = {
2020-04-03 20:05:22 +00:00
id : 'p-personal' ,
class : '' ,
'label-id' : 'p-personal-label' ,
label : 'Personal tools' ,
2020-02-17 19:49:43 +00:00
'html-userlangattributes' : htmluserlangattributes ,
2020-04-03 20:05:22 +00:00
'html-items' : ` '<li id="pt-anonuserpage">Not logged in</li><li id="pt-anontalk"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [⌃⌥n]" accesskey="n">Talk</a></li><li id="pt-anoncontribs"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [⌃⌥y]" accesskey="y">Contributions</a></li><li id="pt-createaccount"><a href="/w/index.php?title=Special:CreateAccount&returnto=Main+Page" title="You are encouraged to create an account and log in; however, it is not mandatory">Create account</a></li><li id="pt-login"><a href="/w/index.php?title=Special:UserLogin&returnto=Main+Page" title="You're encouraged to log in; however, it's not mandatory. [⌃⌥o]" accesskey="o">Log in</a></li> `
2020-02-17 19:49:43 +00:00
} ;
2020-04-03 20:05:22 +00:00
/ * *
* @ type { MenuDefinition }
* /
2020-02-17 19:49:43 +00:00
const loggedInWithEcho = {
2020-04-03 20:05:22 +00:00
id : 'p-personal' ,
'label-id' : 'p-personal-label' ,
label : 'Personal tools' ,
2020-02-17 19:49:43 +00:00
'html-userlangattributes' : htmluserlangattributes ,
2020-04-03 20:05:22 +00:00
'html-items' : ` <li id="pt-userpage"><a href="/wiki/User:Jdlrobson" dir="auto" title="Your user page [⌃⌥.]" accesskey=".">Jdlrobson</a></li><li id="pt-notifications-alert"><a href="/wiki/Special:Notifications" class="mw-echo-notifications-badge mw-echo-notification-badge-nojs oo-ui-icon-bell mw-echo-notifications-badge-all-read" data-counter-num="0" data-counter-text="0" title="Your alerts">Alerts (0)</a></li><li id="pt-notifications-notice"><a href="/wiki/Special:Notifications" class="mw-echo-notifications-badge mw-echo-notification-badge-nojs oo-ui-icon-tray" data-counter-num="3" data-counter-text="3" title="Your notices">Notices (3)</a></li><li id="pt-mytalk"><a href="/wiki/User_talk:Jdlrobson" title="Your talk page [⌃⌥n]" accesskey="n">Talk</a></li><li id="pt-sandbox"><a href="/wiki/User:Jdlrobson/sandbox" title="Your sandbox">Sandbox</a></li><li id="pt-preferences"><a href="/wiki/Special:Preferences" title="Your preferences">Preferences</a></li><li id="pt-betafeatures"><a href="/wiki/Special:Preferences#mw-prefsection-betafeatures" title="Beta features">Beta</a></li><li id="pt-watchlist"><a href="/wiki/Special:Watchlist" title="A list of pages you are monitoring for changes [⌃⌥l]" accesskey="l">Watchlist</a></li><li id="pt-mycontris"><a href="/wiki/Special:Contributions/Jdlrobson" title="A list of your contributions [⌃⌥y]" accesskey="y">Contributions</a></li><li id="pt-logout"><a href="/w/index.php?title=Special:UserLogout&returnto=Main+Page&returntoquery=useskin%3Dvector" title="Log out">Log out</a></li> `
2020-02-17 19:49:43 +00:00
} ;
2020-04-03 20:05:22 +00:00
const ULS _LANGUAGE _SELECTOR = '<li class="uls-trigger active"><a href="#">English</a></li>' ;
/ * *
* @ type { MenuDefinition }
* /
2020-02-17 19:49:43 +00:00
const loggedInWithULS = {
2020-04-03 20:05:22 +00:00
id : 'p-personal' ,
'label-id' : 'p-personal-label' ,
label : 'Personal tools' ,
2020-02-17 19:49:43 +00:00
'html-userlangattributes' : htmluserlangattributes ,
2020-04-03 20:05:22 +00:00
'html-items' : ` ${ ULS _LANGUAGE _SELECTOR } <li id="pt-userpage"><a href="/wiki/User:Jdlrobson" dir="auto" title="Your user page [⌃⌥.]" accesskey=".">Jdlrobson</a></li><li id="pt-notifications-alert"><a href="/wiki/Special:Notifications" class="mw-echo-notifications-badge mw-echo-notification-badge-nojs oo-ui-icon-bell mw-echo-notifications-badge-all-read" data-counter-num="0" data-counter-text="0" title="Your alerts">Alerts (0)</a></li><li id="pt-notifications-notice"><a href="/wiki/Special:Notifications" class="mw-echo-notifications-badge mw-echo-notification-badge-nojs oo-ui-icon-tray" data-counter-num="3" data-counter-text="3" title="Your notices">Notices (3)</a></li><li id="pt-mytalk"><a href="/wiki/User_talk:Jdlrobson" title="Your talk page [⌃⌥n]" accesskey="n">Talk</a></li><li id="pt-sandbox"><a href="/wiki/User:Jdlrobson/sandbox" title="Your sandbox">Sandbox</a></li><li id="pt-preferences"><a href="/wiki/Special:Preferences" title="Your preferences">Preferences</a></li><li id="pt-betafeatures"><a href="/wiki/Special:Preferences#mw-prefsection-betafeatures" title="Beta features">Beta</a></li><li id="pt-watchlist"><a href="/wiki/Special:Watchlist" title="A list of pages you are monitoring for changes [⌃⌥l]" accesskey="l">Watchlist</a></li><li id="pt-mycontris"><a href="/wiki/Special:Contributions/Jdlrobson" title="A list of your contributions [⌃⌥y]" accesskey="y">Contributions</a></li><li id="pt-logout"><a href="/w/index.php?title=Special:UserLogout&returnto=Main+Page&returntoquery=useskin%3Dvector" title="Log out">Log out</a></li> `
2020-02-17 19:49:43 +00:00
} ;
2020-04-03 20:05:22 +00:00
/ * *
* @ type { Object . < string , MenuDefinition > }
* /
2020-02-17 19:49:43 +00:00
const PERSONAL _MENU _TEMPLATE _DATA = {
loggedOut ,
loggedInWithEcho ,
loggedInWithULS
} ;
export { PERSONAL _MENU _TEMPLATE _DATA , personalMenuTemplate } ;