change users sessions icons
This commit is contained in:
parent
9ff8e61c85
commit
ca2a1ae387
|
@ -15,7 +15,11 @@
|
||||||
<div class="col">Plattform:</div>
|
<div class="col">Plattform:</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-icon :name="getPlatformIcon(modelValue.platform)" size="24px" />
|
<q-icon :name="getPlatformIcon(modelValue.platform)" size="24px" />
|
||||||
<q-icon v-if="!modelValue.browser" :name="getOS(modelValue.platform)" size="24px" />
|
<q-icon
|
||||||
|
v-if="getOS(modelValue.platform)"
|
||||||
|
:name="getOS(modelValue.platform)"
|
||||||
|
size="24px"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -78,38 +82,46 @@ export default defineComponent({
|
||||||
const options = ref(['Minuten', 'Stunden', 'Tage']);
|
const options = ref(['Minuten', 'Stunden', 'Tage']);
|
||||||
const option = ref<string>(options.value[0]);
|
const option = ref<string>(options.value[0]);
|
||||||
const lifetime = ref(0);
|
const lifetime = ref(0);
|
||||||
function getBrowserIcon(browser: string) {
|
function getBrowserIcon(br: string) {
|
||||||
console.log('browser', browser);
|
const browser = br.toLowerCase();
|
||||||
return browser == 'firefox'
|
return browser.includes('firefox')
|
||||||
? 'mdi-firefox'
|
? 'mdi-firefox'
|
||||||
: browser == 'chrome'
|
: browser.includes('chrome')
|
||||||
? 'mdi-google-chrome'
|
? 'mdi-google-chrome'
|
||||||
: browser == 'safari'
|
: browser.includes('safari')
|
||||||
? 'mdi-apple-safari'
|
? 'mdi-apple-safari'
|
||||||
|
: browser.includes('edge')
|
||||||
|
? 'mdi-microsoft-edge'
|
||||||
|
: browser.includes('opera')
|
||||||
|
? 'mdi-opera'
|
||||||
|
: browser.includes('ie')
|
||||||
|
? 'mdi-internet-explorer'
|
||||||
: 'mdi-help';
|
: 'mdi-help';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPlatformIcon(platform: string) {
|
function getPlatformIcon(pl: string) {
|
||||||
|
const platform = pl.toLowerCase();
|
||||||
console.log('platform', platform);
|
console.log('platform', platform);
|
||||||
return platform == 'linux'
|
return platform.includes('linux')
|
||||||
? 'mdi-linux'
|
? 'mdi-linux'
|
||||||
: platform == 'windows'
|
: platform.includes('windows')
|
||||||
? 'mdi-microsoft-windows'
|
? 'mdi-microsoft-windows'
|
||||||
: platform == 'macos'
|
: platform.includes('mac')
|
||||||
? 'mdi-apple'
|
? 'mdi-apple'
|
||||||
: platform == 'iphone'
|
: platform.includes('ios')
|
||||||
? 'mdi-cellphone'
|
? 'mdi-cellphone'
|
||||||
: platform == 'android'
|
: platform.includes('android')
|
||||||
? 'mdi-cellphone'
|
? 'mdi-cellphone'
|
||||||
: 'mdi-help';
|
: 'mdi-help';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOS(platform: string) {
|
function getOS(pl: string) {
|
||||||
return platform == 'iphone'
|
const platform = pl.toLowerCase();
|
||||||
|
return platform.includes('ios')
|
||||||
? 'mdi-apple'
|
? 'mdi-apple'
|
||||||
: platform == 'android'
|
: platform.includes('android')
|
||||||
? 'mdi-android'
|
? 'mdi-android'
|
||||||
: 'mdi-help';
|
: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteSession(token: string) {
|
async function deleteSession(token: string) {
|
||||||
|
|
Loading…
Reference in New Issue