chore: 🔨 喜欢就点个 Star️ 吧! (#127)

This commit is contained in:
nsnail 2024-05-22 19:23:36 +08:00 committed by GitHub
parent e5208cd751
commit a01acddb9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 2 deletions

View File

@ -10,7 +10,7 @@ public sealed class PortAttribute : RangeAttribute
/// Initializes a new instance of the <see cref="PortAttribute" /> class. /// Initializes a new instance of the <see cref="PortAttribute" /> class.
/// </summary> /// </summary>
public PortAttribute() // public PortAttribute() //
: base(1, 65535) : base(1, ushort.MaxValue)
{ {
ErrorMessageResourceName = nameof(Ln.); ErrorMessageResourceName = nameof(Ln.);
ErrorMessageResourceType = typeof(Ln); ErrorMessageResourceType = typeof(Ln);

View File

@ -15,7 +15,9 @@
</el-col> </el-col>
</el-form-item> </el-form-item>
<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> </el-form-item>
<div class="login-reg"> <div class="login-reg">
{{ $t('还没有账号?') }} {{ $t('还没有账号?') }}
@ -28,6 +30,7 @@
export default { export default {
data() { data() {
return { return {
starred: false,
autoLogin: false, autoLogin: false,
form: { form: {
account: 'root', account: 'root',
@ -50,6 +53,12 @@ export default {
}, },
methods: { methods: {
async login() { async login() {
if (!this.starred) {
window.open('https://github.com/nsnail/NetAdmin')
this.starred = true
return
}
const validate = await this.$refs.loginForm.validate().catch(() => {}) const validate = await this.$refs.loginForm.validate().catch(() => {})
if (!validate) { if (!validate) {
return false return false

View File

@ -4,6 +4,7 @@
<img alt="" src="@/assets/img/logo.png" /> <img alt="" src="@/assets/img/logo.png" />
<h2>{{ packageJson.name }}</h2> <h2>{{ packageJson.name }}</h2>
<p>{{ ver }}</p> <p>{{ ver }}</p>
<el-link href="https://github.com/nsnail/NetAdmin" target="_blank">喜欢就点个 Star </el-link>
</div> </div>
</el-card> </el-card>
</template> </template>
@ -44,9 +45,11 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.main { .main {
height: 25rem; height: 25rem;
} }
.wrap { .wrap {
gap: 1rem; gap: 1rem;
} }