-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
e108145
commit 7928be2
Showing
4 changed files
with
90 additions
and
0 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
42 changes: 42 additions & 0 deletions
42
packages/clients/textLocator/src/plugins/Header/Header.vue
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,42 @@ | ||
<template> | ||
<h1 class="polar-plugin-header" lang="en"> | ||
{{ $t('common:plugins.textLocator.header.text') }} | ||
| ||
<v-icon x-small color="white">fa-scroll</v-icon> | ||
<v-icon x-small color="white">fa-magnifying-glass</v-icon> | ||
</h1> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue' | ||
export default Vue.extend({ | ||
name: 'TextLocatorHeader', | ||
}) | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.polar-plugin-header { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
display: flex; | ||
pointer-events: all; | ||
color: #ffffff; | ||
font-weight: initial; | ||
font-size: 0.8rem; | ||
background: #7d212b; | ||
border-radius: 0 0 10px 0; | ||
padding: 0.1em 2em 0.1em 0.5em; | ||
} | ||
</style> | ||
|
||
<style lang="scss"> | ||
/* TODO decide if required */ | ||
.polar-plugin-address-search-toolbar { | ||
margin-top: 12px; | ||
} | ||
</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,12 @@ | ||
import Vue from 'vue' | ||
import { PluginOptions } from '@polar/lib-custom-types' | ||
import Header from './Header.vue' | ||
import language from './language' | ||
|
||
export default (options: PluginOptions) => (instance: Vue) => | ||
instance.$store.dispatch('addComponent', { | ||
name: 'header', | ||
plugin: Header, | ||
language, | ||
options, | ||
}) |
31 changes: 31 additions & 0 deletions
31
packages/clients/textLocator/src/plugins/Header/language.ts
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,31 @@ | ||
import { LanguageOption } from '@polar/lib-custom-types' | ||
|
||
const lang: LanguageOption[] = [ | ||
{ | ||
type: 'de', | ||
resources: { | ||
plugins: { | ||
textLocator: { | ||
header: { | ||
// remove lang="en" in component if this becomes german | ||
text: 'TextLocator', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
type: 'en', | ||
resources: { | ||
plugins: { | ||
textLocator: { | ||
header: { | ||
text: 'TextLocator', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
] | ||
|
||
export default lang |