Remove some spot.js dependencies
This commit is contained in:
@@ -50,9 +50,8 @@
|
||||
displayedId() {
|
||||
return this.options.displayed_id?(this.spot.lang('counter', this.options.displayed_id)):'';
|
||||
},
|
||||
hash() {
|
||||
let asHash = this.spot.getHash();
|
||||
return '#'+[asHash.page, asHash.items[0], this.options.type, this.options.id].join(this.spot.consts.hash_sep);
|
||||
anchorLink() {
|
||||
return '#'+[this.hash.page, this.hash.items[0], this.options.type, this.options.id].join(this.spot.consts.hash_sep);
|
||||
},
|
||||
modeHisto() {
|
||||
return (this.project.currProject.mode == this.spot.consts.modes.histo);
|
||||
@@ -69,10 +68,10 @@
|
||||
}
|
||||
|
||||
},
|
||||
inject: ['spot', 'project', 'user', 'map'],
|
||||
inject: ['spot', 'project', 'user', 'map', 'hash'],
|
||||
methods: {
|
||||
copyAnchor() {
|
||||
copyTextToClipboard(this.spot.consts.server+this.spot.hash());
|
||||
copyTextToClipboard(this.spot.consts.server+this.anchorLink);
|
||||
this.anchorTitle = this.spot.lang('link_copied');
|
||||
this.anchorIcon = 'copied';
|
||||
setTimeout(()=>{ //TODO animation
|
||||
@@ -141,7 +140,7 @@
|
||||
<div class="header">
|
||||
<div class="index">
|
||||
<spotIcon :icon="subType" :text="displayedId" />
|
||||
<a v-if="anchorVisible" class="link desktop" @click="copyAnchor" ref="anchor" :href="hash" :title="anchorTitle">
|
||||
<a v-if="anchorVisible" class="link desktop" @click="copyAnchor" ref="anchor" :href="anchorLink" :title="anchorTitle">
|
||||
<spotIcon :icon="anchorIcon" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user