Add "download" button

This commit is contained in:
Pig Fang 2019-03-12 23:56:48 +08:00
parent 69b6d3685d
commit a75b358751
5 changed files with 14 additions and 20 deletions

View File

@ -25,15 +25,24 @@
<a
v-if="liked"
@click="removeFromCloset"
style="margin-left: 12px"
class="btn btn-primary pull-right"
v-t="'skinlib.removeFromCloset'"
></a>
<a
v-else
@click="addToCloset"
style="margin-left: 12px"
class="btn btn-primary pull-right"
v-t="'skinlib.addToCloset'"
></a>
<a
v-if="canBeDownloaded"
class="btn btn-default pull-right"
v-t="'skinlib.show.download'"
:href="`${baseUrl}/raw/${tid}.png`"
:download="`${name}`.png"
></a>
</template>
<div
class="btn likes"
@ -77,22 +86,9 @@
</td>
</tr>
<tr>
<td>TID</td>
<td>{{ tid }}</td>
</tr>
<tr>
<td>Hash
<i
v-if="canBeDownloaded"
class="fas fa-question-circle"
:title="$t('skinlib.show.download-raw')"
data-toggle="tooltip"
data-placement="top"
></i>
</td>
<td>Hash</td>
<td>
<a v-if="canBeDownloaded" :href="`${baseUrl}/raw/${tid}.png`" :title="hash">{{ hash.slice(0, 15) }}...</a>
<span v-else :title="hash">{{ hash.slice(0, 15) }}...</span>
<span :title="hash">{{ hash.slice(0, 15) }}...</span>
</td>
</tr>
<tr>

View File

@ -93,12 +93,12 @@ skinlib:
name: Texture Name
edit: Edit
model: Applicable Model
download-raw: Click to download raw texture
size: File Size
uploader: Uploader
upload-at: Upload At
download: Download Texture
delete-texture: Delete Texture
notice: The texture which was deleted or setted to private will be removed from the closet of everyone who had favorited it.
manage-notice: The texture which was deleted or setted to private will be removed from the closet of everyone who had favorited it.
user:
signRemainingTime: 'Available after :time :unit'

View File

@ -38,7 +38,6 @@ show:
name: Texture Name
edit-name: Edit Name
model: Applicable Model
download-raw: Click to download raw texture
size: File Size
uploader: Uploader
upload-at: Upload At

View File

@ -95,10 +95,10 @@ skinlib:
name: 名称
edit: 修改
model: 适用模型
download-raw: 右键另存为即可下载原始皮肤文件
size: 文件大小
uploader: 上传者
upload-at: 上传日期
download: 下载材质
delete-texture: 删除材质
manage-notice: 材质设为隐私或被删除后将会从每一个收藏者的衣柜中移除。

View File

@ -38,7 +38,6 @@ show:
name: 名称
edit-name: 修改名称
model: 适用模型
download-raw: 右键另存为即可下载原始皮肤文件
size: 文件大小
uploader: 上传者
upload-at: 上传日期