This repository was archived by the owner on Aug 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed
Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11<template >
22 <section >
33 <template v-if =" infoLoaded " >
4- <h2 class =" rev-title" >{{item.title}}</h2 >
4+ <h2 class =" rev-title" >< a :href = " wikiPageLink(item.wiki, item.title) " > {{item.title}}</ a > </h2 >
55 <div class =" rev-info" >
66 <div class =" rev-info__item" ><i class =" fas fa-faucet fa-fw" ></i >{{item.feed || 'default'}}</div >
77 <div class =" rev-info__item" ><i class =" fas fa-info-circle fa-fw" ></i >{{item.wiki}}:{{item.revId}}</div >
@@ -36,6 +36,7 @@ import { mapState } from 'vuex';
3636
3737import { Component , Prop , Vue } from ' nuxt-property-decorator' ;
3838import { RevisionPanelItem } from ' ~/shared/interfaces' ;
39+ import { wikiPageLink } from ' ~/shared/mwapi2' ;
3940
4041@Component ({
4142 components: {
@@ -47,6 +48,8 @@ export default class PureRevisionPanel extends Vue {
4748 @Prop ({ type: Boolean }) readonly infoLoaded: boolean ;
4849 @Prop ({ type: Boolean }) readonly diffLoaded: boolean ;
4950 @Prop ({ type: Object }) readonly item: RevisionPanelItem ;
51+
52+ public wikiPageLink = wikiPageLink ;
5053}
5154 </script >
5255<style lang="scss" scoped>
Original file line number Diff line number Diff line change 1919 "prod:pm2" : " npx pm2 start eco.yml --env=production" ,
2020 "prod" : " npm run build && npm run start" ,
2121 "release" : " HUSKY_SKIP_HOOKS=1 standard-version" ,
22+ "sb" : " nuxt storybook" ,
2223 "start" : " npm run dev" ,
2324 "test:integration" : " jest --testPathIgnorePatterns=THIS_SHALL_NEVER_MATCH_ANYTHING --testPathPattern=integration --verbose" ,
2425 "test:full" : " jest --testPathIgnorePatterns=THIS_SHALL_NEVER_MATCH_ANYTHING --verbose" ,
Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ export interface MwRevisionInfo extends MwPageInfo {
5252 timestampStr :string ,
5353}
5454
55+ export function wikiPageLink ( wiki , title ) {
56+ let encodedTitle = title . replace ( ' ' , '_' ) ;
57+ return `https://${ wikiToDomain [ wiki ] } /wiki/${ encodedTitle } ` ;
58+ }
59+
5560/**
5661 * An class for utility functions for MediaWiki Action Client.
5762 */
Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ export const wikiToLangMap = (function() {
8181 return _wikiToLangMap ;
8282} ) ( ) ;
8383
84-
8584export let getUrlBaseByWiki = function ( wiki ) {
8685 return `http://${ wikiToDomain [ wiki ] } ` ;
8786} ;
You can’t perform that action at this time.
0 commit comments