random-web-tools/src/components/Sidebar.vue

64 lines
1.7 KiB
Vue
Raw Normal View History

2023-11-10 16:00:27 +02:00
<template>
<header class="flex">
<span class="my-auto ml-2 font-bold">Tools</span>
</header>
<hr class="mt-2 mb-2">
<nav class="flex flex-col ml-2">
2023-11-10 16:46:05 +02:00
<div v-for="[title, routes] of Object.entries(menuRoutes)" class="flex flex-col mb-2">
<p><i>{{ title }}</i></p>
<router-link v-for="[key, value] of Object.entries(routes)" :to="{name:key}" class="ml-4" tag="button">{{ value }}</router-link>
</div>
2023-11-10 16:00:27 +02:00
</nav>
</template>
<script>
2023-11-10 16:46:05 +02:00
2023-11-10 16:00:27 +02:00
export default {
2023-11-10 16:46:05 +02:00
name: "Sidebar",
components: {},
2023-11-10 16:00:27 +02:00
data() {
return {
2023-11-10 16:46:05 +02:00
menuRoutes: {},
};
},
mounted() {
let menuRoutes = {
'General': {
2023-11-10 16:00:27 +02:00
'home': 'Home',
2023-12-14 10:16:40 +02:00
'explain_crontab': 'Explain crontab',
'table_to_mediawiki_table': 'Table to Mediawiki table',
2024-04-11 19:22:08 +03:00
'dummy_image': 'Dummy image',
2024-04-11 20:59:20 +03:00
'humans_txt': 'humans.txt generator',
2024-04-12 14:47:35 +03:00
'file_base64_encode_decode': 'File base64 encode/decode',
2023-11-10 16:46:05 +02:00
},
'Strings': {
2023-11-28 12:51:58 +02:00
'fix_ru_en_keyboard': 'Fix ru-en keyboard',
'str_length': 'Str length',
2023-12-04 10:56:09 +02:00
'str_sort_lines': 'Str sort lines',
'str_to_lower_upper': 'Str to lower/upper',
2023-12-04 10:35:34 +02:00
'str_remove_duplicate_lines': 'Str remove duplicate lines',
2023-12-12 12:27:46 +02:00
'url_encode_decode': 'URL encode/decode',
'url_query_viewer': 'URL query viewer',
2023-12-12 12:27:46 +02:00
},
'PHP': {
2023-12-12 11:45:57 +02:00
'str_to_php_array': 'Str to PHP array',
2023-12-12 12:21:09 +02:00
'php_array_to_json': 'PHP array to Json',
2023-11-10 16:46:05 +02:00
},
'GO': {
'go_json_to_struct': 'JSON to Go struct',
},
2024-03-05 12:04:07 +02:00
'JSON': {
'json_formatter': 'JSON formatter',
},
2023-11-10 16:46:05 +02:00
'SQL': {
2023-12-15 12:11:46 +02:00
'sql_formatter': 'SQL formatter',
2023-11-10 16:46:05 +02:00
'sql_split_in': 'SQL split IN',
2023-11-10 16:00:27 +02:00
},
};
2023-11-10 16:46:05 +02:00
this.menuRoutes = menuRoutes;
2023-11-10 16:00:27 +02:00
}
}
</script>