Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
47652e6
creat markup and logic for response
DevArtemNuss Aug 10, 2022
d458f58
rename var for ,odal
DevArtemNuss Aug 10, 2022
2adb3d3
hide links and hide btns fot unauthorized
DevArtemNuss Aug 15, 2022
554481b
update
DevArtemNuss Aug 15, 2022
4baeac2
upd
DevArtemNuss Aug 15, 2022
a2e3786
remove wombat
DevArtemNuss Aug 15, 2022
9d1402e
update layout for voter info
DevArtemNuss Aug 15, 2022
1383277
Merge branch 'dev' into feat/create_window_for_voters_details
DevArtemNuss Aug 16, 2022
943f0fd
refactoring
DevArtemNuss Aug 16, 2022
c85d25e
fix position for block
DevArtemNuss Aug 16, 2022
cd1cbc0
only anchor
DevArtemNuss Aug 16, 2022
488eb98
fix price for fee
DevArtemNuss Aug 16, 2022
f31c8c8
remove parrams
DevArtemNuss Aug 16, 2022
05020b0
final sulution
DevArtemNuss Aug 16, 2022
47f1f60
add margin-bottom for elements
DevArtemNuss Aug 16, 2022
f4802fd
Merge pull request #68 from telosnetwork/feat/hide-wallets-and-hide-btns
Aug 16, 2022
93f801c
Merge pull request #72 from telosnetwork/bug/fix-price-for-creating-poll
Aug 16, 2022
d4cc349
Merge pull request #73 from telosnetwork/bug/fix-murkup-for-end-time
Aug 16, 2022
976d5cf
Merge pull request #74 from telosnetwork/bug/remove-infinity-loop-for…
Aug 16, 2022
2e7cfd8
fix styles
DevArtemNuss Aug 17, 2022
d3d5b24
create new layout
DevArtemNuss Aug 17, 2022
271ecc2
remove console.log
DevArtemNuss Aug 18, 2022
71c7034
fix
DevArtemNuss Aug 18, 2022
c51cd72
fix logic
DevArtemNuss Aug 18, 2022
54227f0
Merge pull request #69 from telosnetwork/feat/create_window_for_voter…
Aug 24, 2022
b734759
fix duplicate items
DevArtemNuss Aug 18, 2022
687b33e
remove unused var
DevArtemNuss Aug 18, 2022
b072cbe
remove msg
DevArtemNuss Aug 23, 2022
6f65e0c
remove items
DevArtemNuss Aug 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions src/boot/ual.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { UAL } from 'universal-authenticator-library'
import { EOSIOAuth } from '@smontero/ual-eosio-reference-authenticator'
import { KeycatAuthenticator } from '@telosnetwork/ual-telos-keycat'
import { Ledger } from 'ual-ledger'
import { Scatter } from 'ual-scatter'
import { Sqrl } from '@smontero/ual-sqrl'
import { Anchor } from 'ual-anchor'
import { Wombat } from 'ual-wombat'

export default async ({ Vue, store }) => {
const mainChain = {
Expand All @@ -19,13 +13,7 @@ export default async ({ Vue, store }) => {
}

const authenticators = [
new KeycatAuthenticator([mainChain]),
new Anchor([mainChain], { appName: process.env.APP_NAME }),
new Sqrl([mainChain], { appName: process.env.APP_NAME }),
new Wombat([mainChain], { appName: process.env.APP_NAME }),
new Ledger([mainChain]),
new Scatter([mainChain], { appName: process.env.APP_NAME }),
new EOSIOAuth([mainChain], { appName: process.env.APP_NAME, protocol: 'eosio' })
new Anchor([mainChain], { appName: process.env.APP_NAME })
]

const ual = new UAL([mainChain], 'tet-ual', authenticators)
Expand Down
2 changes: 0 additions & 2 deletions src/components/layout/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export default {
const error = await this.login(idx)
if (!error) {
this.show = false
} else {
this.error = error
}
},
openUrl (url) {
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const utils = {
this.setIsLoading(state)
},
onlyNumbers (string) {
return string.replace(/[^0-9]/gi, '') // 100 TLOS -> 100
return string.split(' ')[0] // 100 TLOS -> 100
},
getPercentOfNumber (number, total) {
return (this.onlyNumbers(number) * 100 / this.onlyNumbers(total)).toFixed(2) + '%' // 35 * 100 / 70 = 50%
Expand Down
24 changes: 0 additions & 24 deletions src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,6 @@ export default {
data () {
return {
cards: [
{
title: '<b>Manage</b> Profile',
img: '../statics/app-icons/user-circle.svg',
icon: 'account_circle',
color: 'primary',
description: 'Manage your identity. Buy, stake, send tokens and discover apps.',
route: '/profiles/myProfile'
},
{
title: 'Find <b>Contacts</b>',
img: '../statics/app-icons/search.svg',
icon: 'perm_contact_calendar',
color: 'positive',
description: 'Find and view Telos account profiles. Add to favorites and send TLOS (Coming soon).',
route: '/profiles/contacts'
},
{
title: 'Join <b>Groups</b>',
img: '../statics/app-icons/users.svg',
Expand All @@ -40,14 +24,6 @@ export default {
color: 'negative',
description: 'Vote on Works, Amend and other eco-system ballots.',
route: '/trails/ballots'
},
{
title: 'Manage <b>Tokens</b>',
img: '../statics/app-icons/bar-chart.svg',
icon: 'savings',
color: 'primary',
description: 'Create, issue and discover tokens',
route: '/tokens'
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/trails/ballots/components/ballot-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default {
this.fetchTreasuriesForUser(account)
const getAccount = await this.$store.$api.getAccount(this.account)
this.userBalance = this.onlyNumbers(getAccount.core_liquid_balance)
this.fee = this.onlyNumbers(this.ballotFees.value)
this.fee = this.ballotFees.value
},
cid: function () {
this.form.IPFSString = this.cid.path
Expand Down
4 changes: 2 additions & 2 deletions src/pages/trails/ballots/components/ballot-list-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ div

q-card-section().row.justify-center.btn-section
btn(
:labelText="(isBallotOpened && ballot.status === 'voting') ? 'View proposal & vote' : 'View proposal'"
:labelText="(isBallotOpened && ballot.status === 'voting' && isAuthenticated) ? 'View proposal & vote' : 'View proposal'"
btnWidth='332'
fontSize='16'
hoverBlue=true
Expand Down Expand Up @@ -362,7 +362,7 @@ div
width: 340px
height: 434px
.row-direction .left-tag
top: 106px
top: 68px
.ballot-card-title
font-size: 18px
.ballot-card-sub-title-wrapper
Expand Down
33 changes: 8 additions & 25 deletions src/pages/trails/ballots/list/ballots-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
categories: [],
isBallotListRowDirection: true,
currentPage: 1,
limit: 12,
limit: 30,
page: 1,
sortMode: ''
}
Expand Down Expand Up @@ -52,15 +52,17 @@ export default {
methods: {
...mapActions('trails', ['fetchFees', 'fetchBallots', 'castVote', 'fetchTreasuries', 'fetchBallotsByStatus']),
...mapMutations('trails', ['resetBallots', 'stopAddBallots']),

async onLoad (index, done) {
if (!this.ballotsLoaded) {
this.limit += 50
const filter = {
index: 4,
lower: this.treasury || (this.$route.query && this.$route.query.treasury),
upper: this.treasury || (this.$route.query && this.$route.query.treasury)
upper: this.treasury || (this.$route.query && this.$route.query.treasury),
limit: this.limit
}
await this.fetchBallots(filter)

done()
} else {
this.$refs.infiniteScroll.stop()
Expand Down Expand Up @@ -95,6 +97,7 @@ export default {
const startTime = this.getLocalTime(ballot.begin_time)
return startTime > Date.now()
},

displayWinner (ballot) {
if (!ballot.total_voters) return false
let winnerValue = -1
Expand Down Expand Up @@ -152,9 +155,6 @@ export default {
changeDirection (isBallotListRowDirection) {
this.isBallotListRowDirection = isBallotListRowDirection
},
getPage (ballots) {
return ballots.slice((this.page - 1) * this.limit, (this.page - 1) * this.limit + this.limit)
},
getLoser () {
if (!this.ballot.total_voters || this.ballot.options.length !== 2) return false
return this.ballot.options.find(x => x.key !== this.getWinner.key)
Expand All @@ -172,6 +172,7 @@ export default {
return ballots
}
},

changeSortOption (option) {
this.sortMode = option
},
Expand Down Expand Up @@ -222,15 +223,13 @@ q-page
.ballots(ref="ballotsRef")
q-infinite-scroll(
ref="infiniteScroll"
:disable="ballotsLoaded"
@load="onLoad"
:offset="250"
:scroll-target="$refs.ballotsRef"
)
div(:class="isBallotListRowDirection ? 'row-direction' : 'column-direction'")
ballot-list-item(
@click.native="openBallot(ballot)"
v-for="(ballot, index) in getPage(sortBallots(filterBallots(ballots),sortMode))"
v-for="(ballot, index) in sortBallots(filterBallots(ballots),sortMode)"
:key="index"
:ballot="ballot"
:displayWinner="displayWinner"
Expand All @@ -241,22 +240,6 @@ q-page
:getLoser="getLoser"
:ballotContentImg="ballotContentImg"
)
div.flex.flex-center.pagination-wrapper
q-pagination(
v-model="page"
:min="currentPage"
:max="Math.ceil(filterBallots(ballots).length / limit)"
:max-pages="6"
v-if="filterBallots(ballots).length !== 0"
direction-links
boundary-links
icon-first="skip_previous"
icon-last="skip_next"
icon-prev="fast_rewind"
icon-next="fast_forward"
size="12px"
)
span(v-else).ballot-card-title {{ "There are no results for the current request" }}
template(v-slot:loading)
.row.justify-center.q-my-md
q-spinner-dots(
Expand Down
Loading