File tree Expand file tree Collapse file tree 4 files changed +90
-0
lines changed
packages/clients/textLocator/src Expand file tree Collapse file tree 4 files changed +90
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import Scale from '@polar/plugin-scale'
1111import Toast from '@polar/plugin-toast'
1212import Zoom from '@polar/plugin-zoom'
1313
14+ import Header from './plugins/Header'
1415import { searchCoastalGazetteer } from './search/coastalGazetteer'
1516import { idRegister } from './services'
1617
@@ -20,6 +21,10 @@ export const addPlugins = (core) => {
2021 setLayout ( NineLayout )
2122
2223 core . addPlugins ( [
24+ Header ( {
25+ displayComponent : true ,
26+ layoutTag : NineLayoutTag . TOP_LEFT ,
27+ } ) ,
2328 IconMenu ( {
2429 displayComponent : true ,
2530 // TODO fix, it's broken ...
Original file line number Diff line number Diff line change 1+ <template >
2+ <h1 class =" polar-plugin-header" lang =" en" >
3+ {{ $t('common:plugins.textLocator.header.text') }}
4+   ;
5+ <v-icon x-small color =" white" >fa-scroll</v-icon >
6+ <v-icon x-small color =" white" >fa-magnifying-glass</v-icon >
7+ </h1 >
8+ </template >
9+
10+ <script lang="ts">
11+ import Vue from ' vue'
12+
13+ export default Vue .extend ({
14+ name: ' TextLocatorHeader' ,
15+ })
16+ </script >
17+
18+ <style lang="scss" scoped>
19+ .polar-plugin-header {
20+ position : fixed ;
21+ top : 0 ;
22+ left : 0 ;
23+
24+ display : flex ;
25+
26+ pointer-events : all ;
27+
28+ color : #ffffff ;
29+ font-weight : initial ;
30+ font-size : 0.8rem ;
31+ background : #7d212b ;
32+ border-radius : 0 0 10px 0 ;
33+ padding : 0.1em 2em 0.1em 0.5em ;
34+ }
35+ </style >
36+
37+ <style lang="scss">
38+ /* TODO decide if required */
39+ .polar-plugin-address-search-toolbar {
40+ margin-top : 12px ;
41+ }
42+ </style >
Original file line number Diff line number Diff line change 1+ import Vue from 'vue'
2+ import { PluginOptions } from '@polar/lib-custom-types'
3+ import Header from './Header.vue'
4+ import language from './language'
5+
6+ export default ( options : PluginOptions ) => ( instance : Vue ) =>
7+ instance . $store . dispatch ( 'addComponent' , {
8+ name : 'header' ,
9+ plugin : Header ,
10+ language,
11+ options,
12+ } )
Original file line number Diff line number Diff line change 1+ import { LanguageOption } from '@polar/lib-custom-types'
2+
3+ const lang : LanguageOption [ ] = [
4+ {
5+ type : 'de' ,
6+ resources : {
7+ plugins : {
8+ textLocator : {
9+ header : {
10+ // remove lang="en" in component if this becomes german
11+ text : 'TextLocator' ,
12+ } ,
13+ } ,
14+ } ,
15+ } ,
16+ } ,
17+ {
18+ type : 'en' ,
19+ resources : {
20+ plugins : {
21+ textLocator : {
22+ header : {
23+ text : 'TextLocator' ,
24+ } ,
25+ } ,
26+ } ,
27+ } ,
28+ } ,
29+ ]
30+
31+ export default lang
You can’t perform that action at this time.
0 commit comments