Merge "Apply target=_blank in code"
这个提交包含在:
当前提交
7e8eef6253
|
@ -119,7 +119,7 @@
|
|||
"ellipsis",
|
||||
"tutorial-popup-title",
|
||||
"tutorial-popup-text1",
|
||||
"tutorial-popup-text3",
|
||||
"tutorial-popup-text2",
|
||||
"tutorial-popup-text-mobile",
|
||||
"tutorial-popup-close"
|
||||
]
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"searchvue-links-showmore": "view other pages",
|
||||
"tutorial-popup-title": "Search result previews",
|
||||
"tutorial-popup-text1": "Click on the the article snippet to preview the search result and view related content.",
|
||||
"tutorial-popup-text3": "You can turn previews on and off in the <a href=\"$1\" target=\"_blank\">search preferences</a>.",
|
||||
"tutorial-popup-text2": "You can turn previews on and off in the [[Special:Preferences#mw-prefsection-searchoptions|search preferences]].",
|
||||
"tutorial-popup-text-mobile": "Tap on the the article snippet or the arrow to preview the search result and see related content.",
|
||||
"tutorial-popup-close": "Close"
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
"searchvue-links-showmore": "Button text used to toggle between interwiki links on mobile view.",
|
||||
"tutorial-popup-title": "Heading of the tutorial popup",
|
||||
"tutorial-popup-text1": "First paragraph in the tutorial popup",
|
||||
"tutorial-popup-text3": "Second paragraph in the tutorial popup. Parameters:\n* $1 - The URL of the search preferences",
|
||||
"tutorial-popup-text2": "Second paragraph in the tutorial popup, instructing users to enable/disable previous in the Search preferences.",
|
||||
"tutorial-popup-text-mobile": "Tutorial popup text for mobile devices",
|
||||
"tutorial-popup-close": "Title for the svg used to close tutorial popup\n{{identical|Close}}"
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
{{ $i18n( 'tutorial-popup-text1' ).text() }}
|
||||
</p>
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<p v-html="$i18n( 'tutorial-popup-text3', url ).text()"></p>
|
||||
<p v-html="preferencesMessage"></p>
|
||||
</template>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -61,10 +61,6 @@ module.exports = exports = {
|
|||
compatConfig: { MODE: 3 },
|
||||
compilerOptions: { whitespace: 'condense' },
|
||||
props: {
|
||||
url: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
isMobile: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
|
@ -73,6 +69,11 @@ module.exports = exports = {
|
|||
computed: {
|
||||
QuickViewTutorialPopupClass() {
|
||||
return this.isMobile ? 'QuickViewTutorialPopup__mobile' : 'QuickViewTutorialPopup';
|
||||
},
|
||||
preferencesMessage() {
|
||||
const $msg = $( '<p>' ).append( this.$i18n( 'tutorial-popup-text2' ).parseDom() );
|
||||
$msg.find( 'a' ).attr( 'target', '_blank' );
|
||||
return $msg.html();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<div>
|
||||
<quick-view-tutorial-popup
|
||||
v-if="tutorialPopupVisible"
|
||||
:url="preferencesUrl"
|
||||
:is-mobile="isMobile"
|
||||
:style="{ top: firstSectionContentHeight / 2 + firstSectionHeadingHeight + topPositionAdjuster + 'px' }"
|
||||
@close="onCloseTutorialPopup"
|
||||
|
@ -44,12 +43,7 @@ module.exports = exports = {
|
|||
mapState( useRootStore, [
|
||||
'selectedIndex',
|
||||
'isMobile'
|
||||
] ),
|
||||
{
|
||||
preferencesUrl() {
|
||||
return new mw.Title( 'Preferences#mw-prefsection-searchoptions', -1 ).getUrl();
|
||||
}
|
||||
}
|
||||
] )
|
||||
),
|
||||
methods: {
|
||||
setTutorialPopupVisibility() {
|
||||
|
|
正在加载...
在新工单中引用