Skip to content

Commit

Permalink
fix ts compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit committed Jun 21, 2020
1 parent f622ade commit f46f68d
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/browseraction/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
:tab="tab"
:key="style.url"
:url="style.url"
:enabled="style.enabled"
:disabled="isStylebotOpen"
:initialEnabled="style.enabled"
:disableToggle="isStylebotOpen"
v-for="style in styleUrlMetadata"
/>
Expand Down
6 changes: 4 additions & 2 deletions src/browseraction/components/Style.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-list-item
link
:ripple="false"
:disabled="disabled"
:disabled="disableToggle"
:class="{ 'green lighten-4': enabled }"
@click="toggleStyle"
>
Expand All @@ -26,15 +26,17 @@ import { mdiEye, mdiEyeOffOutline } from '@mdi/js';
export default Vue.extend({
name: 'Style',
props: ['tab', 'url', 'enabled', 'disabled'],
props: ['tab', 'url', 'initialEnabled', 'disableToggle'],
data(): {
enabled: boolean;
icons: {
enabled: string;
disabled: string;
};
} {
return {
enabled: this.initialEnabled,
icons: {
enabled: mdiEye,
disabled: mdiEyeOffOutline,
Expand Down
6 changes: 4 additions & 2 deletions src/options/components/AppButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
</template>

<script lang="ts">
export default {
import Vue from 'vue';
export default Vue.extend({
name: 'AppButton',
props: {
text: {
Expand Down Expand Up @@ -42,7 +44,7 @@ export default {
default: '',
},
},
};
});
</script>

<style scoped>
Expand Down
5 changes: 3 additions & 2 deletions src/options/components/StyleDeleteButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@
</template>

<script lang="ts">
import Vue from 'vue';
import AppButton from './AppButton.vue';
export default {
export default Vue.extend({
name: 'StyleDeleteButton',
props: ['url'],
components: {
Expand All @@ -65,5 +66,5 @@ export default {
dialog: false,
};
},
};
});
</script>
6 changes: 4 additions & 2 deletions src/options/components/StyleEditButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
</template>

<script lang="ts">
export default {
import Vue from 'vue';
export default Vue.extend({
name: 'StyleEditButton',
};
});
</script>
6 changes: 4 additions & 2 deletions src/options/components/TheBackupTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,16 @@
</template>

<script lang="ts">
import Vue from 'vue';
import AppButton from './AppButton.vue';
import {
exportStylesAsJSONString,
importStylesFromJSONString,
copyToClipboard,
} from '../utilities';
export default {
export default Vue.extend({
name: 'TheBackupTab',
components: {
AppButton,
Expand Down Expand Up @@ -164,5 +166,5 @@ export default {
}
},
},
};
});
</script>
18 changes: 14 additions & 4 deletions src/options/components/TheBasicsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
</template>

<script lang="ts">
import Vue from 'vue';
import { StylebotOptions, StylebotShortcutMetaKey } from '../types';
import {
Expand All @@ -56,14 +57,23 @@ import {
getCharacterFromKeydownCode,
} from '../utilities';
export default {
export default Vue.extend({
name: 'TheBasicsTab',
data(): {
options?: StylebotOptions;
shortcutKeyCharacter?: string;
options: StylebotOptions;
shortcutKeyCharacter: string;
shortcutMetaKeys: Array<{ text: string; value: StylebotShortcutMetaKey }>;
} {
return {
options: {
contextMenu: true,
useShortcutKey: true,
shortcutKey: 77,
shortcutMetaKey: 'alt',
mode: 'Basic',
},
shortcutKeyCharacter: 'M',
shortcutMetaKeys: [
{
text: 'Ctrl',
Expand Down Expand Up @@ -110,7 +120,7 @@ export default {
saveOption('shortcutMetaKey', this.options.shortcutMetaKey);
},
},
};
});
</script>

<style scoped>
Expand Down
5 changes: 3 additions & 2 deletions src/options/components/TheDeleteAllStylesButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@
</template>

<script lang="ts">
import Vue from 'vue';
import AppButton from './AppButton.vue';
export default {
export default Vue.extend({
name: 'TheDeleteAllStylesButton',
components: {
AppButton,
Expand All @@ -54,5 +55,5 @@ export default {
dialog: false,
};
},
};
});
</script>
6 changes: 4 additions & 2 deletions src/options/components/TheNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
</template>

<script lang="ts">
export default {
import Vue from 'vue';
export default Vue.extend({
name: 'TheNavigation',
props: {
tabs: {
Expand All @@ -52,5 +54,5 @@ export default {
data(): { model: number } {
return { model: 0 };
},
};
});
</script>

0 comments on commit f46f68d

Please sign in to comment.