Commit code with double quotes instead of single quotes

This commit is contained in:
Dmitry Yankowski
2020-02-24 21:06:23 -05:00
parent 3bd7c00038
commit 48100ead55
74 changed files with 3184 additions and 3184 deletions

View File

@@ -12,20 +12,20 @@
/>
<i v-else class="material-icons">account_circle</i>
<span>
{{ fb.currentUser.displayName || 'Name not found' }}
{{ fb.currentUser.displayName || "Name not found" }}
</span>
</button>
<br />
<button class="icon">
<i class="material-icons">email</i>
<span>
{{ fb.currentUser.email || 'Email not found' }}
{{ fb.currentUser.email || "Email not found" }}
</span>
</button>
<br />
<button class="icon" @click="logout">
<i class="material-icons">exit_to_app</i>
<span>{{ $t('logout') }}</span>
<span>{{ $t("logout") }}</span>
</button>
<br />
<p v-for="setting in fb.currentSettings" :key="setting.id">
@@ -34,19 +34,19 @@
:on="setting.value"
@change="toggleSettings(setting.name, setting.value)"
>
{{ $t(setting.name) + ' ' + $t('sync') }}
{{ setting.value ? $t('enabled') : $t('disabled') }}
{{ $t(setting.name) + " " + $t("sync") }}
{{ setting.value ? $t("enabled") : $t("disabled") }}
</pw-toggle>
</p>
<p v-if="fb.currentSettings.length !== 3">
<button class="" @click="initSettings">
<i class="material-icons">sync</i>
<span>{{ $t('turn_on') + ' ' + $t('sync') }}</span>
<span>{{ $t("turn_on") + " " + $t("sync") }}</span>
</button>
</p>
</div>
<div v-else>
<label>{{ $t('login_with') }}</label>
<label>{{ $t("login_with") }}</label>
<p>
<button class="icon" @click="signInWithGoogle">
<svg
@@ -86,7 +86,7 @@
<pw-section class="cyan" :label="$t('theme')" ref="theme">
<ul>
<li>
<label>{{ $t('background') }}</label>
<label>{{ $t("background") }}</label>
<div class="backgrounds">
<span :key="theme.class" @click="applyTheme(theme)" v-for="theme in themes">
<swatch
@@ -102,7 +102,7 @@
</ul>
<ul>
<li>
<label>{{ $t('color') }}</label>
<label>{{ $t("color") }}</label>
<div class="colors">
<span
:key="entry.color"
@@ -127,8 +127,8 @@
:on="settings.FRAME_COLORS_ENABLED"
@change="toggleSetting('FRAME_COLORS_ENABLED')"
>
{{ $t('multi_color') }}
{{ settings.FRAME_COLORS_ENABLED ? $t('enabled') : $t('disabled') }}
{{ $t("multi_color") }}
{{ settings.FRAME_COLORS_ENABLED ? $t("enabled") : $t("disabled") }}
</pw-toggle>
</span>
</li>
@@ -140,8 +140,8 @@
:on="settings.SCROLL_INTO_ENABLED"
@change="toggleSetting('SCROLL_INTO_ENABLED')"
>
{{ $t('scrollInto_use_toggle') }}
{{ settings.SCROLL_INTO_ENABLED ? $t('enabled') : $t('disabled') }}
{{ $t("scrollInto_use_toggle") }}
{{ settings.SCROLL_INTO_ENABLED ? $t("enabled") : $t("disabled") }}
</pw-toggle>
</span>
</li>
@@ -156,7 +156,7 @@
:on="settings.EXTENSIONS_ENABLED"
@change="toggleSetting('EXTENSIONS_ENABLED')"
>
{{ $t('extensions_use_toggle') }}
{{ $t("extensions_use_toggle") }}
</pw-toggle>
</div>
</li>
@@ -169,8 +169,8 @@
<div class="flex-wrap">
<span>
<pw-toggle :on="settings.PROXY_ENABLED" @change="toggleSetting('PROXY_ENABLED')">
{{ $t('proxy') }}
{{ settings.PROXY_ENABLED ? $t('enabled') : $t('disabled') }}
{{ $t("proxy") }}
{{ settings.PROXY_ENABLED ? $t("enabled") : $t("disabled") }}
</pw-toggle>
</span>
<a
@@ -188,7 +188,7 @@
<ul>
<li>
<div class="flex-wrap">
<label for="url">{{ $t('url') }}</label>
<label for="url">{{ $t("url") }}</label>
<button class="icon" @click="resetProxy" v-tooltip.bottom="$t('reset_default')">
<i class="material-icons">clear_all</i>
</button>
@@ -204,11 +204,11 @@
<ul class="info">
<li>
<p>
{{ $t('postwoman_official_proxy_hosting') }}
{{ $t("postwoman_official_proxy_hosting") }}
<br />
{{ $t('read_the') }}
{{ $t("read_the") }}
<a class="link" href="https://apollotv.xyz/legal" target="_blank" rel="noopener">
{{ $t('apollotv_privacy_policy') }} </a
{{ $t("apollotv_privacy_policy") }} </a
>.
</p>
</li>
@@ -235,14 +235,14 @@
<style scoped lang="scss"></style>
<script>
import firebase from 'firebase/app'
import { fb } from '../functions/fb'
import firebase from "firebase/app"
import { fb } from "../functions/fb"
export default {
components: {
'pw-section': () => import('../components/section'),
'pw-toggle': () => import('../components/toggle'),
swatch: () => import('../components/settings/swatch'),
"pw-section": () => import("../components/section"),
"pw-toggle": () => import("../components/toggle"),
swatch: () => import("../components/settings/swatch"),
},
data() {
@@ -252,97 +252,97 @@ export default {
// set the relevant values.
themes: [
{
color: '#202124',
name: this.$t('kinda_dark'),
class: '',
aceEditor: 'twilight',
color: "#202124",
name: this.$t("kinda_dark"),
class: "",
aceEditor: "twilight",
},
{
color: '#ffffff',
name: this.$t('clearly_white'),
color: "#ffffff",
name: this.$t("clearly_white"),
vibrant: true,
class: 'light',
aceEditor: 'iplastic',
class: "light",
aceEditor: "iplastic",
},
{
color: '#000000',
name: this.$t('just_black'),
class: 'black',
aceEditor: 'vibrant_ink',
color: "#000000",
name: this.$t("just_black"),
class: "black",
aceEditor: "vibrant_ink",
},
{
color: 'var(--ac-color)',
name: this.$t('auto_system'),
vibrant: window.matchMedia('(prefers-color-scheme: light)').matches,
class: 'auto',
aceEditor: window.matchMedia('(prefers-color-scheme: light)').matches
? 'iplastic'
: 'twilight',
color: "var(--ac-color)",
name: this.$t("auto_system"),
vibrant: window.matchMedia("(prefers-color-scheme: light)").matches,
class: "auto",
aceEditor: window.matchMedia("(prefers-color-scheme: light)").matches
? "iplastic"
: "twilight",
},
],
// You can define a new color here! It will simply store the color value.
colors: [
// If the color is vibrant, black is used as the active foreground color.
{
color: '#50fa7b',
name: this.$t('green'),
color: "#50fa7b",
name: this.$t("green"),
vibrant: true,
},
{
color: '#f1fa8c',
name: this.$t('yellow'),
color: "#f1fa8c",
name: this.$t("yellow"),
vibrant: true,
},
{
color: '#ff79c6',
name: this.$t('pink'),
color: "#ff79c6",
name: this.$t("pink"),
vibrant: true,
},
{
color: '#ff5555',
name: this.$t('red'),
color: "#ff5555",
name: this.$t("red"),
vibrant: false,
},
{
color: '#bd93f9',
name: this.$t('purple'),
color: "#bd93f9",
name: this.$t("purple"),
vibrant: true,
},
{
color: '#ffb86c',
name: this.$t('orange'),
color: "#ffb86c",
name: this.$t("orange"),
vibrant: true,
},
{
color: '#8be9fd',
name: this.$t('cyan'),
color: "#8be9fd",
name: this.$t("cyan"),
vibrant: true,
},
{
color: '#57b5f9',
name: this.$t('blue'),
color: "#57b5f9",
name: this.$t("blue"),
vibrant: false,
},
],
settings: {
SCROLL_INTO_ENABLED:
typeof this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED !== 'undefined'
typeof this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED !== "undefined"
? this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED
: true,
THEME_COLOR: '',
THEME_TAB_COLOR: '',
THEME_COLOR: "",
THEME_TAB_COLOR: "",
THEME_COLOR_VIBRANT: true,
FRAME_COLORS_ENABLED: this.$store.state.postwoman.settings.FRAME_COLORS_ENABLED || false,
PROXY_ENABLED: this.$store.state.postwoman.settings.PROXY_ENABLED || false,
PROXY_URL:
this.$store.state.postwoman.settings.PROXY_URL || 'https://postwoman.apollotv.xyz/',
PROXY_KEY: this.$store.state.postwoman.settings.PROXY_KEY || '',
this.$store.state.postwoman.settings.PROXY_URL || "https://postwoman.apollotv.xyz/",
PROXY_KEY: this.$store.state.postwoman.settings.PROXY_KEY || "",
EXTENSIONS_ENABLED:
typeof this.$store.state.postwoman.settings.EXTENSIONS_ENABLED !== 'undefined'
typeof this.$store.state.postwoman.settings.EXTENSIONS_ENABLED !== "undefined"
? this.$store.state.postwoman.settings.EXTENSIONS_ENABLED
: true,
},
@@ -356,45 +356,45 @@ export default {
proxySettings: {
deep: true,
handler(value) {
this.applySetting('PROXY_URL', value.url)
this.applySetting('PROXY_KEY', value.key)
this.applySetting("PROXY_URL", value.url)
this.applySetting("PROXY_KEY", value.key)
},
},
},
methods: {
applyTheme({ class: name, color, aceEditor }) {
this.applySetting('THEME_CLASS', name)
this.applySetting('THEME_ACE_EDITOR', aceEditor)
document.querySelector('meta[name=theme-color]').setAttribute('content', color)
this.applySetting('THEME_TAB_COLOR', color)
this.applySetting("THEME_CLASS", name)
this.applySetting("THEME_ACE_EDITOR", aceEditor)
document.querySelector("meta[name=theme-color]").setAttribute("content", color)
this.applySetting("THEME_TAB_COLOR", color)
document.documentElement.className = name
},
setActiveColor(color, vibrant) {
// By default, the color is vibrant.
if (vibrant === null) vibrant = true
document.documentElement.style.setProperty('--ac-color', color)
document.documentElement.style.setProperty("--ac-color", color)
document.documentElement.style.setProperty(
'--act-color',
vibrant ? 'rgba(32, 33, 36, 1)' : 'rgba(255, 255, 255, 1)'
"--act-color",
vibrant ? "rgba(32, 33, 36, 1)" : "rgba(255, 255, 255, 1)"
)
this.applySetting('THEME_COLOR', color.toUpperCase())
this.applySetting('THEME_COLOR_VIBRANT', vibrant)
this.applySetting("THEME_COLOR", color.toUpperCase())
this.applySetting("THEME_COLOR_VIBRANT", vibrant)
},
getActiveColor() {
// This strips extra spaces and # signs from the strings.
const strip = str => str.replace(/#/g, '').replace(/ /g, '')
const strip = str => str.replace(/#/g, "").replace(/ /g, "")
return `#${strip(
window.getComputedStyle(document.documentElement).getPropertyValue('--ac-color')
window.getComputedStyle(document.documentElement).getPropertyValue("--ac-color")
).toUpperCase()}`
},
applySetting(key, value) {
this.settings[key] = value
this.$store.commit('postwoman/applySetting', [key, value])
this.$store.commit("postwoman/applySetting", [key, value])
},
toggleSetting(key) {
this.settings[key] = !this.settings[key]
this.$store.commit('postwoman/applySetting', [key, this.settings[key]])
this.$store.commit("postwoman/applySetting", [key, this.settings[key]])
},
logout() {
fb.currentUser = null
@@ -403,11 +403,11 @@ export default {
.signOut()
.catch(err => {
this.$toast.show(err.message || err, {
icon: 'error',
icon: "error",
})
})
this.$toast.info(this.$t('logged_out'), {
icon: 'vpn_key',
this.$toast.info(this.$t("logged_out"), {
icon: "vpn_key",
})
},
signInWithGoogle() {
@@ -417,17 +417,17 @@ export default {
.signInWithPopup(provider)
.then(({ additionalUserInfo }) => {
if (additionalUserInfo.isNewUser) {
this.$toast.info(`${this.$t('turn_on')} ${this.$t('sync')}`, {
icon: 'sync',
this.$toast.info(`${this.$t("turn_on")} ${this.$t("sync")}`, {
icon: "sync",
duration: null,
closeOnSwipe: false,
action: {
text: this.$t('yes'),
text: this.$t("yes"),
onClick: (e, toastObject) => {
fb.writeSettings('syncHistory', true)
fb.writeSettings('syncCollections', true)
fb.writeSettings('syncEnvironments', true)
this.$router.push({ path: '/settings' })
fb.writeSettings("syncHistory", true)
fb.writeSettings("syncCollections", true)
fb.writeSettings("syncEnvironments", true)
this.$router.push({ path: "/settings" })
toastObject.remove()
},
},
@@ -436,7 +436,7 @@ export default {
})
.catch(err => {
this.$toast.show(err.message || err, {
icon: 'error',
icon: "error",
})
})
},
@@ -447,17 +447,17 @@ export default {
.signInWithPopup(provider)
.then(({ additionalUserInfo }) => {
if (additionalUserInfo.isNewUser) {
this.$toast.info(`${this.$t('turn_on')} ${this.$t('sync')}`, {
icon: 'sync',
this.$toast.info(`${this.$t("turn_on")} ${this.$t("sync")}`, {
icon: "sync",
duration: null,
closeOnSwipe: false,
action: {
text: this.$t('yes'),
text: this.$t("yes"),
onClick: (e, toastObject) => {
fb.writeSettings('syncHistory', true)
fb.writeSettings('syncCollections', true)
fb.writeSettings('syncEnvironments', true)
this.$router.push({ path: '/settings' })
fb.writeSettings("syncHistory", true)
fb.writeSettings("syncCollections", true)
fb.writeSettings("syncEnvironments", true)
this.$router.push({ path: "/settings" })
toastObject.remove()
},
},
@@ -466,7 +466,7 @@ export default {
})
.catch(err => {
this.$toast.show(err.message || err, {
icon: 'error',
icon: "error",
})
})
},
@@ -474,15 +474,15 @@ export default {
fb.writeSettings(s, !v)
},
initSettings() {
fb.writeSettings('syncHistory', true)
fb.writeSettings('syncCollections', true)
fb.writeSettings('syncEnvironments', true)
fb.writeSettings("syncHistory", true)
fb.writeSettings("syncCollections", true)
fb.writeSettings("syncEnvironments", true)
},
resetProxy({ target }) {
this.settings.PROXY_URL = `https://postwoman.apollotv.xyz/`
target.innerHTML = this.doneButton
this.$toast.info(this.$t('cleared'), {
icon: 'clear_all',
this.$toast.info(this.$t("cleared"), {
icon: "clear_all",
})
setTimeout(() => (target.innerHTML = '<i class="material-icons">clear_all</i>'), 1000)
},