Skip to content

Commit

Permalink
chore: 🔨 喜欢就点个 Star⭐️ 吧! (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsnail committed May 22, 2024
1 parent e5208cd commit a01acdd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public sealed class PortAttribute : RangeAttribute
/// Initializes a new instance of the <see cref="PortAttribute" /> class.
/// </summary>
public PortAttribute() //
: base(1, 65535)
: base(1, ushort.MaxValue)
{
ErrorMessageResourceName = nameof(Ln.无效端口号);
ErrorMessageResourceType = typeof(Ln);
Expand Down
11 changes: 10 additions & 1 deletion src/frontend/admin/src/views/guest/components/passwordForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
</el-col>
</el-form-item>
<el-form-item>
<el-button :loading="isLoading" @click="login" round style="width: 100%" type="primary">{{ $t('登录') }}</el-button>
<el-button :loading="isLoading" @click="login" round style="width: 100%" type="primary"
>{{ starred ? $t('登录') : $t('Star 后可登录') }}
</el-button>
</el-form-item>
<div class="login-reg">
{{ $t('还没有账号?') }}
Expand All @@ -28,6 +30,7 @@
export default {
data() {
return {
starred: false,
autoLogin: false,
form: {
account: 'root',
Expand All @@ -50,6 +53,12 @@ export default {
},
methods: {
async login() {
if (!this.starred) {
window.open('https://github.com/nsnail/NetAdmin')
this.starred = true
return
}
const validate = await this.$refs.loginForm.validate().catch(() => {})
if (!validate) {
return false
Expand Down
3 changes: 3 additions & 0 deletions src/frontend/admin/src/views/home/widgets/components/ver.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<img alt="" src="@/assets/img/logo.png" />
<h2>{{ packageJson.name }}</h2>
<p>{{ ver }}</p>
<el-link href="https://github.com/nsnail/NetAdmin" target="_blank">喜欢就点个 Star⭐️ 吧!</el-link>
</div>
</el-card>
</template>
Expand Down Expand Up @@ -44,9 +45,11 @@ export default {
justify-content: center;
align-items: center;
}
.main {
height: 25rem;
}
.wrap {
gap: 1rem;
}
Expand Down

0 comments on commit a01acdd

Please sign in to comment.