forked from Tucsky/aggr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
267 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<template> | ||
<div class="pane-website"> | ||
<pane-header :paneId="paneId" /> | ||
<div class="iframe__lock" v-if="locked"> | ||
<div class="ml8 mr8"> | ||
<p>Load <span class="condensed" v-text="trimmedUrl" title="url" v-tippy></span> ?</p> | ||
<div class="text-center"> | ||
<button class="btn" @click="$store.commit(paneId + '/UNLOCK_URL')">Yes, authorize</button> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="iframe__wrapper" v-else> | ||
<iframe :src="url" frameborder="0" :class="customId" width="100%" height="100%"></iframe> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Mixins } from 'vue-property-decorator' | ||
import PaneMixin from '@/mixins/paneMixin' | ||
import PaneHeader from '../panes/PaneHeader.vue' | ||
@Component({ | ||
components: { PaneHeader }, | ||
name: 'Website' | ||
}) | ||
export default class extends Mixins(PaneMixin) { | ||
customId = '' | ||
get locked() { | ||
return this.$store.state[this.paneId].locked | ||
} | ||
get url() { | ||
const url = this.$store.state[this.paneId].url | ||
this.customId = this.getCustomId(url) | ||
return url | ||
} | ||
get trimmedUrl() { | ||
if (this.url.length <= 33) { | ||
return this.url | ||
} else { | ||
return this.url.slice(0, 15) + '[...]' + this.url.substr(-15) | ||
} | ||
} | ||
getCustomId(url) { | ||
if (/okotoki.com/.test(url)) { | ||
return 'okotoki' | ||
} | ||
return null | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.iframe__lock { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: rgba($red, 0.5); | ||
} | ||
.iframe__wrapper { | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden; | ||
iframe { | ||
border: 0; | ||
width: 100%; | ||
height: 100%; | ||
&.okotoki { | ||
transform: translate(-30px, -66px); | ||
height: calc(100% + 146px); | ||
width: calc(100% + 280px); | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<Dialog @clickOutside="close" class="pane-dialog" @mousedown="clickOutsideClose = false" @mouseup="clickOutsideClose = true"> | ||
<template v-slot:header> | ||
<div class="title -editable" @dblclick="renamePane" v-text="name"></div> | ||
<div class="column -center"></div> | ||
</template> | ||
<website-pane-settings :paneId="paneId" /> | ||
</Dialog> | ||
</template> | ||
|
||
<script> | ||
import DialogMixin from '../../mixins/dialogMixin' | ||
import PaneDialogMixin from '../../mixins/paneDialogMixin' | ||
import WebsitePaneSettings from './WebsitePaneSettings.vue' | ||
export default { | ||
components: { WebsitePaneSettings }, | ||
mixins: [DialogMixin, PaneDialogMixin], | ||
data: () => ({ | ||
renaming: false | ||
}), | ||
methods: {} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<template> | ||
<div> | ||
<div class="form-group mb8"> | ||
<label> | ||
Url <span v-if="originalUrl">(<a :href="originalUrl" v-text="originalUrlTrimmed" target="_blank"></a>)</span> | ||
</label> | ||
<input | ||
ref="input" | ||
type="text" | ||
class="form-control w-100" | ||
placeholder="eg: https://cryptopanic.com/widgets/news/?bg_color=FFFFFF&font_family=sans&header_bg_color=30343B&header_text_color=FFFFFF&link_color=0091C2&news_feed=trending&text_color=333333&title=Latest%20News" | ||
:value="url" | ||
v-tippy | ||
title="Original URL" | ||
@change="$store.commit(paneId + '/SET_URL', $event.target.value)" | ||
/> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Vue } from 'vue-property-decorator' | ||
import Slider from '../framework/picker/Slider.vue' | ||
import Thresholds from '../settings/Thresholds.vue' | ||
@Component({ | ||
components: { Thresholds, Slider }, | ||
name: 'WebsiteSettings', | ||
props: { | ||
paneId: { | ||
type: String, | ||
required: true | ||
} | ||
} | ||
}) | ||
export default class extends Vue { | ||
paneId: string | ||
originalUrl: string | ||
created() { | ||
this.originalUrl = this.$store.state[this.paneId].url | ||
} | ||
get originalUrlTrimmed() { | ||
if (this.originalUrl.length <= 33) { | ||
return this.originalUrl | ||
} else { | ||
return this.originalUrl.slice(0, 15) + '[...]' + this.originalUrl.substr(-15) | ||
} | ||
} | ||
get url() { | ||
return this.$store.state[this.paneId].url | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.