mirror of
				https://github.com/em-squared/5e-drs.git
				synced 2025-10-31 13:34:21 +00:00 
			
		
		
		
	encode url
This commit is contained in:
		
							parent
							
								
									a8170ba02e
								
							
						
					
					
						commit
						0c710ef306
					
				
					 3 changed files with 13 additions and 2 deletions
				
			
		|  | @ -54,9 +54,9 @@ | ||||||
|         </v-card-title> |         </v-card-title> | ||||||
| 
 | 
 | ||||||
|         <v-card-text> |         <v-card-text> | ||||||
|           <v-text-field id="copy-uri" outlined readonly label="Copiez le lien pour partager" :hint="hintCopied" :value="$site.themeConfig.domain + '/homebrew/?brew=' + $store.state.shareURI" append-outer-icon="mdi-content-copy" @click:append-outer="copyURI('copy-uri')"></v-text-field> |           <v-text-field id="copy-uri" outlined readonly label="Copiez le lien pour partager" :hint="hintCopied" :value="$site.themeConfig.domain + '/homebrew/?brew=' + encodeURI($store.state.shareURI)" append-outer-icon="mdi-content-copy" @click:append-outer="copyURI('copy-uri')"></v-text-field> | ||||||
|           <div class="text-center"> |           <div class="text-center"> | ||||||
|             <v-btn color="accent" depressed link :to="{ path: '/homebrew/', query: { brew: $store.state.shareURI }}" @click="$store.commit('setIsOpenShareHomebrewDialog', !$store.state.isOpenShareHomebrewDialog)">Voir la page</v-btn> |             <v-btn color="accent" depressed link :to="{ path: '/homebrew/', query: { brew: encodeURI($store.state.shareURI) }}" @click="$store.commit('setIsOpenShareHomebrewDialog', !$store.state.isOpenShareHomebrewDialog)">Voir la page</v-btn> | ||||||
|           </div> |           </div> | ||||||
|         </v-card-text> |         </v-card-text> | ||||||
|       </v-card> |       </v-card> | ||||||
|  | @ -73,6 +73,7 @@ import RightDrawer from '@theme/components/RightDrawer.vue' | ||||||
| import Vue from 'vue' | import Vue from 'vue' | ||||||
| import RuleTooltip from '@theme/global-components/RT' | import RuleTooltip from '@theme/global-components/RT' | ||||||
| import Cookies from 'js-cookie' | import Cookies from 'js-cookie' | ||||||
|  | import { shortlink } from 'shortlink' | ||||||
| 
 | 
 | ||||||
| export default { | export default { | ||||||
|   name: 'GlobalLayout', |   name: 'GlobalLayout', | ||||||
|  | @ -176,6 +177,10 @@ export default { | ||||||
|       this.$store.commit('setRightDrawer', !this.$store.state.rightDrawer) |       this.$store.commit('setRightDrawer', !this.$store.state.rightDrawer) | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|  |     encodeURI (h) { | ||||||
|  |       return shortlink.encode(h) | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|     copyURI(id) { |     copyURI(id) { | ||||||
|       let toCopy = document.getElementById(id) |       let toCopy = document.getElementById(id) | ||||||
|       toCopy.select() |       toCopy.select() | ||||||
|  |  | ||||||
|  | @ -22,6 +22,7 @@ | ||||||
|     "material-design-icons-iconfont": "^5.0.1", |     "material-design-icons-iconfont": "^5.0.1", | ||||||
|     "node-sass": "^4.13.1", |     "node-sass": "^4.13.1", | ||||||
|     "sass-loader": "^8.0.2", |     "sass-loader": "^8.0.2", | ||||||
|  |     "shortlink": "^1.1.0", | ||||||
|     "slugify": "^1.4.0", |     "slugify": "^1.4.0", | ||||||
|     "vue": "^2.6.11", |     "vue": "^2.6.11", | ||||||
|     "vue-masonry-css": "^1.0.3", |     "vue-masonry-css": "^1.0.3", | ||||||
|  |  | ||||||
|  | @ -7228,6 +7228,11 @@ shebang-regex@^1.0.0: | ||||||
|   resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" |   resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" | ||||||
|   integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= |   integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= | ||||||
| 
 | 
 | ||||||
|  | shortlink@^1.1.0: | ||||||
|  |   version "1.1.0" | ||||||
|  |   resolved "https://registry.yarnpkg.com/shortlink/-/shortlink-1.1.0.tgz#b9c4ce003fb4d5bc5948843c7077c5074a3508bb" | ||||||
|  |   integrity sha1-ucTOAD+01bxZSIQ8cHfFB0o1CLs= | ||||||
|  | 
 | ||||||
| signal-exit@^3.0.0, signal-exit@^3.0.2: | signal-exit@^3.0.0, signal-exit@^3.0.2: | ||||||
|   version "3.0.3" |   version "3.0.3" | ||||||
|   resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" |   resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Maxime Moraine
						Maxime Moraine