|
237 | 237 | </div>
|
238 | 238 | </v-card>
|
239 | 239 | </v-menu>
|
240 |
| - |
| 240 | + <div id="location-and-sharing"> |
241 | 241 | <location-search
|
242 | 242 | v-model="searchOpen"
|
243 | 243 | small
|
|
252 | 252 | }"
|
253 | 253 | @error="(error: string) => searchErrorMessage = error"
|
254 | 254 | ></location-search>
|
| 255 | + <use-clipboard v-slot="{ copy, copied }" :source="currentUrl"> |
| 256 | + <v-tooltip :text="copied ? 'Link Copied' : 'Copy Link to Share'"> |
| 257 | + <template v-slot:activator="{ props }"> |
| 258 | + <v-btn |
| 259 | + class="share-button" |
| 260 | + icon |
| 261 | + @click="copy()" |
| 262 | + @keyup.enter="copy()" |
| 263 | + v-bind="props" |
| 264 | + color="#ffffff66" |
| 265 | + elevation="0" |
| 266 | + size="small" |
| 267 | + rounded="1" |
| 268 | + > |
| 269 | + <v-icon color="#333">mdi-share-variant</v-icon> |
| 270 | + </v-btn> |
| 271 | + </template> |
| 272 | + </v-tooltip> |
| 273 | + </use-clipboard> |
| 274 | + </div> |
255 | 275 | </div>
|
256 | 276 | <colorbar
|
257 | 277 | v-if="$vuetify.display.width > 750"
|
@@ -856,6 +876,7 @@ export default defineComponent({
|
856 | 876 | }),
|
857 | 877 | cloudTimestamps,
|
858 | 878 | showClouds: false,
|
| 879 | + currentUrl: window.location.href, |
859 | 880 | };
|
860 | 881 | },
|
861 | 882 |
|
@@ -1146,6 +1167,7 @@ export default defineComponent({
|
1146 | 1167 | const url = new URL(location.origin);
|
1147 | 1168 | const searchParams = new URLSearchParams(state);
|
1148 | 1169 | url.search = searchParams.toString();
|
| 1170 | + this.currentUrl = url.toString(); |
1149 | 1171 | window.history.replaceState(null,'',url);
|
1150 | 1172 | }
|
1151 | 1173 | },
|
@@ -1866,12 +1888,17 @@ a {
|
1866 | 1888 | flex-shrink: 1;
|
1867 | 1889 | }
|
1868 | 1890 |
|
1869 |
| - .forward-geocoding-container { |
| 1891 | + #location-and-sharing { |
1870 | 1892 | position: absolute;
|
1871 | 1893 | bottom: 0;
|
1872 |
| - left: 0; |
1873 |
| - |
1874 | 1894 | z-index: 1000;
|
| 1895 | + display: flex; |
| 1896 | + flex-direction: row; |
| 1897 | + align-items: center; |
| 1898 | + gap: 0.5rem; |
| 1899 | + width:fit-content; |
| 1900 | + } |
| 1901 | + .forward-geocoding-container { |
1875 | 1902 | width: 250px;
|
1876 | 1903 | border: 2px solid black;
|
1877 | 1904 | }
|
@@ -2286,4 +2313,13 @@ button:focus-visible,
|
2286 | 2313 | image-rendering: pixelated; /* CSS4 Proposed */
|
2287 | 2314 | -ms-interpolation-mode: nearest-neighbor; /* IE8+ */
|
2288 | 2315 | }
|
| 2316 | +
|
| 2317 | +.share-button { |
| 2318 | + z-index: 1000; |
| 2319 | + background-color: rgb(255 255 255); |
| 2320 | + border: 1px solid black; |
| 2321 | + backdrop-filter: blur(5px); |
| 2322 | + padding-inline: 5px; |
| 2323 | + border-radius: 10px; |
| 2324 | +} |
2289 | 2325 | </style>
|
0 commit comments