diff options
author | John Olheiser <42128690+jolheiser@users.noreply.github.com> | 2020-02-18 00:07:58 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 08:07:57 +0200 |
commit | d3f618362a5052954d8b02e9acfee30f022a5c36 (patch) | |
tree | 2a81a484d8a7ec03c0df0467876b261d1506aa7a | |
parent | 83801663ce0ffe3aa06d54ba2317bc50df3b0870 (diff) | |
download | gitea-d3f618362a5052954d8b02e9acfee30f022a5c36.tar.gz gitea-d3f618362a5052954d8b02e9acfee30f022a5c36.zip |
Fix JS and Vue (#10328)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
-rw-r--r-- | templates/user/dashboard/dashboard.tmpl | 2 | ||||
-rw-r--r-- | web_src/js/utils.js | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl index 7ebe28195a..f14f89d80b 100644 --- a/templates/user/dashboard/dashboard.tmpl +++ b/templates/user/dashboard/dashboard.tmpl @@ -85,7 +85,7 @@ <ul class="repo-owner-name-list"> <li v-for="repo in repos" :class="{'private': repo.private}" v-show="showRepo(repo, reposFilter)"> <a :href="suburl + '/' + repo.full_name"> - <svg :class="'svg ' + repoClass(repo)" width="16" height="16" aria-hidden="true"><use :xlink:href="staticPrefix + '/img/svg/icons.svg#' + repoClass(repo)" /></svg> + <svg :class="'svg ' + repoClass(repo)" width="16" height="16" aria-hidden="true"><use :xlink:href="'#' + repoClass(repo)" /></svg> <strong class="text truncate item-name">${repo.full_name}</strong> <i v-if="repo.archived" class="archive icon archived-icon"></i> <span class="ui right text light grey"> diff --git a/web_src/js/utils.js b/web_src/js/utils.js index 2effddd685..b000c1af77 100644 --- a/web_src/js/utils.js +++ b/web_src/js/utils.js @@ -1,5 +1,3 @@ -const { StaticUrlPrefix } = window.config; - export function svg(name, size) { - return `<svg class="svg ${name}" width="${size}" height="${size}" aria-hidden="true"><use xlink:href="${StaticUrlPrefix}/img/svg/icons.svg#${name}"/></svg>`; + return `<svg class="svg ${name}" width="${size}" height="${size}" aria-hidden="true"><use xlink:href="#${name}"/></svg>`; } |