-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9324dca
commit a692439
Showing
5 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
import { h } from 'tsx-dom'; | ||
import '../../types'; | ||
import unwrapWidget from '../../util/unwrapWidget'; | ||
|
||
let InternalConfigurationGroupTabPanel: any; | ||
|
||
/** | ||
* Initializes the process element. | ||
*/ | ||
function initConfigurationGroupTabPanel() { | ||
InternalConfigurationGroupTabPanel = class ConfigurationGroupTabPanel | ||
extends OO.ui.TabPanelLayout { | ||
|
||
static readonly logoUrl = | ||
'https://upload.wikimedia.org/wikipedia/commons/2/2b/Deputy_logo.svg'; | ||
|
||
/** | ||
* @return The {@Link Setting}s for this group. | ||
*/ | ||
get settings() { | ||
return this.config.config.all[ this.config.group ]; | ||
} | ||
|
||
/** | ||
*/ | ||
constructor() { | ||
super( 'configurationGroupPage_About' ); | ||
|
||
this.$element.append( <div> | ||
<div class="deputy-about"> | ||
<div style="flex: 0"><img src={ | ||
ConfigurationGroupTabPanel.logoUrl | ||
} alt="Deputy logo"/></div> | ||
<div style="flex: 1"> | ||
<div>{ mw.msg( 'deputy.name' ) }</div> | ||
<div>{ mw.msg( 'deputy.description' ) }</div> | ||
<div> | ||
<a href="https://w.wiki/5k$q" target="_blank">{ | ||
unwrapWidget( new OO.ui.ButtonWidget( { | ||
label: mw.msg( 'deputy.about.homepage' ), | ||
flags: [ 'progressive' ] | ||
} ) ) | ||
}</a> | ||
<a href="https://github.com/ChlodAlejandro/deputy" target="_blank">{ | ||
unwrapWidget( new OO.ui.ButtonWidget( { | ||
label: mw.msg( 'deputy.about.openSource' ), | ||
flags: [ 'progressive' ] | ||
} ) ) | ||
}</a> | ||
<a href="https://w.wiki/5k$p" target="_blank">{ | ||
unwrapWidget( new OO.ui.ButtonWidget( { | ||
label: mw.msg( 'deputy.about.contact' ), | ||
flags: [ 'progressive' ] | ||
} ) ) | ||
}</a> | ||
</div> | ||
</div> | ||
</div> | ||
<p dangerouslySetInnerHTML={ mw.msg( 'deputy.about.credit' ) }/> | ||
<p dangerouslySetInnerHTML={ mw.msg( 'deputy.about.license', | ||
'https://www.apache.org/licenses/LICENSE-2.0', | ||
'https://github.com/ChlodAlejandro/deputy' | ||
) }/> | ||
<p dangerouslySetInnerHTML={ mw.msg( 'deputy.about.thirdParty', | ||
'https://github.com/ChlodAlejandro/deputy#licensing' | ||
) }/> | ||
<p | ||
style={{ fontSize: '0.9em', color: 'darkgray' }} | ||
dangerouslySetInnerHTML={ mw.msg( 'deputy.about.footer' ) } | ||
/> | ||
</div> ); | ||
} | ||
|
||
/** | ||
* Sets up the tab item | ||
*/ | ||
setupTabItem() { | ||
this.tabItem.setLabel( mw.msg( 'deputy.about' ) ); | ||
} | ||
|
||
}; | ||
} | ||
|
||
/** | ||
* Creates a new ConfigurationGroupTabPanel. | ||
* | ||
* @return A ConfigurationGroupTabPanel object | ||
*/ | ||
export default function () { | ||
if ( !InternalConfigurationGroupTabPanel ) { | ||
initConfigurationGroupTabPanel(); | ||
} | ||
return new InternalConfigurationGroupTabPanel(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters