mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Convert various components to gjs (#26782)
Those were all low hanging fruits - all were already glimmer components, so this was mostly merging js and hbs files and adding imports. (occasionally also adds/fixes class names)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import Component from "@glimmer/component";
|
||||
|
||||
export default class PluginCommitHash extends Component {
|
||||
get shortCommitHash() {
|
||||
return this.args.plugin.commitHash?.slice(0, 7);
|
||||
}
|
||||
|
||||
<template>
|
||||
{{#if @plugin.commitHash}}
|
||||
<a
|
||||
href={{@plugin.commitUrl}}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="current commit-hash"
|
||||
title={{@plugin.commitHash}}
|
||||
>{{this.shortCommitHash}}</a>
|
||||
{{/if}}
|
||||
</template>
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{{#if this.commitHash}}
|
||||
<a
|
||||
href={{@plugin.commitUrl}}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="current commit-hash"
|
||||
title={{this.commitHash}}
|
||||
>{{this.shortCommitHash}}</a>
|
||||
{{/if}}
|
||||
@@ -1,11 +0,0 @@
|
||||
import Component from "@glimmer/component";
|
||||
|
||||
export default class PluginCommitHash extends Component {
|
||||
get shortCommitHash() {
|
||||
return this.commitHash?.slice(0, 7);
|
||||
}
|
||||
|
||||
get commitHash() {
|
||||
return this.args.plugin.commitHash;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user