Skip to content

Commit

Permalink
部分汉化,去除广告
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Dec 27, 2021
1 parent af920db commit 83b332a
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.idea
9 changes: 9 additions & 0 deletions azure/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ nav li a:hover {

.float-right {
float: right;
margin-top: -5px;
}

.go {
Expand All @@ -123,4 +124,12 @@ nav li a:hover {
background: #F5C518;
border-radius: 5px;
padding: 3px 5px;
}

input[type=submit] {
cursor: pointer;
}

a {
cursor: pointer;
}
12 changes: 6 additions & 6 deletions azure/templates/account.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
{% block content %}
<p>{{ Credentials|length }} Accounts</p>
<form method="post">
<p>Email <input type="text" name="account" autocomplete="off" required></p>
<p>Client_id <input type="text" name="client_id" autocomplete="off" required></p>
<p>Client_secret <input type="text" name="client_secret" autocomplete="off" required></p>
<p>Tenant_id <input type="text" name="tenant_id" autocomplete="off" required></p>
<p>Subscription_id <input type="text" name="subscription_id" autocomplete="off" required></p>
<input class="btn" type="submit" name="submit" value="Add">
<p>邮箱 <input type="text" name="account" autocomplete="off" required></p>
<p>名称 <input type="text" name="client_id" autocomplete="off" required></p>
<p>密码 <input type="text" name="client_secret" autocomplete="off" required></p>
<p>租户 <input type="text" name="tenant_id" autocomplete="off" required></p>
<p>订阅 <input type="text" name="subscription_id" autocomplete="off" required></p>
<input class="btn" type="submit" name="submit" value="添加">
</form>
{% endblock %}
7 changes: 2 additions & 5 deletions azure/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@ <h2>
<nav>
<ul>
<li><a href="{{ url_for('index') }}">主页</a></li>
<li><a href="{{ url_for('account_add') }}">增加待管理账户</a></li>
<li><a href="https://t.me/azureboss">购买稳定Azure订阅</a></li>
</ul>
<li><a href="{{ url_for('account_add') }}">增加管理账户</a></li>
</nav>
{% block content %}{% endblock %}
<footer>
<small>购买Azure稳定订阅 请使用<a href="https://t.me/azureboss">Telegram</a> 联系我</small><br>
<small>&copy; 2021 Powered by Flask</small>
<small>&copy; 2021 Powered by 1injex</small>
</footer>
</body>
</html>
4 changes: 2 additions & 2 deletions azure/templates/createvm.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<p>{{ account }} 管理中</p>
<form method="post">
<div>
<p><label>tag(仅限英文数字组合) <input type="text" name="tag" autocomplete="off" required></label></p>
<p><label>标签(英文数字组合) <input type="text" name="tag" autocomplete="off" required></label></p>
<p><label>区域 <select name="location" required>
<option value="westus2">美国西2</option>
<option value="westus3">美国西3</option>
Expand Down Expand Up @@ -75,7 +75,7 @@
<option value="False">默认不开启</option>
<option value="True">开启</option>
</select></label></p>
<input class="btn" type="submit" name="submit" value="Add">
<input class="btn" type="submit" name="submit" value="添加">
</div>
</form>
{% endblock %}
4 changes: 2 additions & 2 deletions azure/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<li>{{ Credential.id }} - {{ Credential.account }}
<span class="float-right">
<form class="inline-form" method="post" action="{{ url_for('list', credential_id=Credential.id)}}">
<input class="go" type="submit" name="delete" value="Manage">
<input class="go" type="submit" name="delete" value="管理">
</form>
<form class="inline-form" method="post" action="{{ url_for('account_delete', credential_id=Credential.id)}}">
<input class="go" type="submit" name="delete" value="Delete" onclick="return confirm('Are you sure?')">
<input class="go" type="submit" name="delete" value="删除" onclick="return confirm('Are you sure?')">
</form>
</span>
</li>
Expand Down
10 changes: 5 additions & 5 deletions azure/templates/list.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{% extends 'base.html' %}

{% block content %}
<p>账户 {{ account }} 管理中 <a class="go" href="/account/{{ id }}/vm/create" title="GO!">NEWVM</a></p>
<p>账户 {{ account }} 管理中 <a class="go" href="/account/{{ id }}/vm/create" title="GO!">新增</a></p>
<p>VM信息不自动更新,请手动刷新浏览器页面</p>
<ul class="list">
{% for ip, tag in dict["ip"]|zip(dict["tag"]) %}
<li>{{ tag }} - {{ ip }}
<span class="float-right">
<form class="inline-form" method="post" action="{{ url_for('stop_vm', credential_id=id, tag=tag) }}">
<input class="go" type="submit" name="delete" value="Stop" onclick="return confirm('Are you sure?')">
<input class="go" type="submit" name="delete" value="停止" onclick="return confirm('Are you sure?')">
</form>
<form class="inline-form" method="post" action="{{ url_for('start_vm', credential_id=id, tag=tag) }}">
<input class="go" type="submit" name="delete" value="Start" onclick="return confirm('Are you sure?')">
<input class="go" type="submit" name="delete" value="启动" onclick="return confirm('Are you sure?')">
</form>
<form class="inline-form" method="post" action="{{ url_for('delete_vm', credential_id=id, tag=tag) }}">
<input class="go" type="submit" name="delete" value="Delete" onclick="return confirm('Are you sure?')">
<input class="go" type="submit" name="delete" value="删除" onclick="return confirm('Are you sure?')">
</form>
<form class="inline-form" method="post" action="{{ url_for('changeip_vm', credential_id=id, tag=tag) }}">
<input class="go" type="submit" name="delete" value="ChangeIP" onclick="return confirm('Are you sure?')">
<input class="go" type="submit" name="delete" value="更换IP" onclick="return confirm('Are you sure?')">
</form>
</span>
</li>
Expand Down
8 changes: 4 additions & 4 deletions azure/templates/login.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% extends 'base.html' %}

{% block content %}
<h3>Login</h3>
<h3></h3>
<form method="post">
Username<br>
账号<br>
<input type="text" name="username" required><br><br>
Password<br>
密码<br>
<input type="password" name="password" required><br><br>
<input class="btn" type="submit" name="submit" value="Submit">
<input class="btn" type="submit" name="submit" value="登录">
</form>
{% endblock %}

0 comments on commit 83b332a

Please sign in to comment.