@timus-networks/theme 1.0.144 → 1.0.146
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components-js/ThemeTag.vue +4 -4
- package/components-js/ThemeTypo.vue +3 -1
- package/components-ts/ThemeTypo.vue +3 -1
- package/images/applications/apple.png +0 -0
- package/images/applications/apple_icloud.png +0 -0
- package/images/applications/apple_itunes.png +0 -0
- package/images/applications/apple_store.png +0 -0
- package/images/applications/bloomberg.png +0 -0
- package/images/applications/chrome.png +0 -0
- package/images/applications/csgo.png +0 -0
- package/images/applications/dns.png +0 -0
- package/images/applications/dropbox.png +0 -0
- package/images/applications/evil.png +0 -0
- package/images/applications/facebook-messenger.png +0 -0
- package/images/applications/facebook.png +0 -0
- package/images/applications/ftp.png +0 -0
- package/images/applications/gmail.png +0 -0
- package/images/applications/google.png +0 -0
- package/images/applications/google_maps.png +0 -0
- package/images/applications/instagram.png +0 -0
- package/images/applications/messenger.png +0 -0
- package/images/applications/mysql.png +0 -0
- package/images/applications/netflix.png +0 -0
- package/images/applications/nintendo.png +0 -0
- package/images/applications/sap.png +0 -0
- package/images/applications/skype.png +0 -0
- package/images/applications/slack.png +0 -0
- package/images/applications/smtp.png +0 -0
- package/images/applications/snapchat.png +0 -0
- package/images/applications/spotify.png +0 -0
- package/images/applications/ssh.png +0 -0
- package/images/applications/teamspeak.png +0 -0
- package/images/applications/tiktok.png +0 -0
- package/images/applications/twitch.png +0 -0
- package/images/applications/twitter.png +0 -0
- package/images/applications/ubuntuone.png +0 -0
- package/images/applications/utorrent.png +0 -0
- package/images/applications/website.png +0 -0
- package/images/applications/whatsapp.png +0 -0
- package/images/applications/windows-update.png +0 -0
- package/images/applications/youtube.png +0 -0
- package/images/backgrounds/login-icon.png +0 -0
- package/images/backgrounds/login.jpg +0 -0
- package/images/backgrounds/login.png +0 -0
- package/images/cards/amex.svg +20 -0
- package/images/cards/default.svg +18 -0
- package/images/cards/dina.svg +12 -0
- package/images/cards/diners.svg +30 -0
- package/images/cards/discover.svg +28 -0
- package/images/cards/eftpos.svg +21 -0
- package/images/cards/jcb.svg +41 -0
- package/images/cards/mastercard.svg +5 -0
- package/images/cards/unionpay.svg +6 -0
- package/images/cards/visa.svg +3 -0
- package/images/devices/os-android.png +0 -0
- package/images/devices/os-ios.png +0 -0
- package/images/devices/os-linux-debian.png +0 -0
- package/images/devices/os-linux-ubuntu.png +0 -0
- package/images/devices/os-osx.png +0 -0
- package/images/devices/os-unknown.png +0 -0
- package/images/devices/os-windows.png +0 -0
- package/images/devices/type-laptop-ubuntu.png +0 -0
- package/images/devices/type-laptop.png +0 -0
- package/images/devices/type-printer.png +0 -0
- package/images/devices/type-switch-cisco.png +0 -0
- package/images/logos/timus-favicon.png +0 -0
- package/images/logos/timus-logo-partner.svg +35 -0
- package/module.js +11 -9
- package/output/main.css +1 -1
- package/package.json +5 -5
- package/plugins/html-to-string.js +5 -2
- package/plugins/js-components-installer.js +1 -0
- package/plugins/theme-provider.js +44 -40
- package/plugins/ts-components-installer.js +1 -0
- /package/{logo → images/logos}/timus-icon.svg +0 -0
- /package/{logo/timus-logo.svg → images/logos/timus-logo-manager.svg} +0 -0
- /package/{logo/timus-logo-no-name.svg → images/logos/timus-logo.svg} +0 -0
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timus-networks/theme",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.146",
|
|
4
4
|
"description": "A comprehensive Nuxt.js module providing a tailored theme experience with integrated TailwindCSS support for applications.",
|
|
5
5
|
"main": "module.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
|
+
"typings": "./index.d.ts",
|
|
8
|
+
"author": "Serkan Konakcı<serkan.konakci@timusnetworks.com>",
|
|
9
|
+
"license": "MIT",
|
|
7
10
|
"scripts": {
|
|
8
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
12
|
"convert-js": "node convert-js.js",
|
|
@@ -25,8 +28,6 @@
|
|
|
25
28
|
"peerDependencies": {
|
|
26
29
|
"vue": "*"
|
|
27
30
|
},
|
|
28
|
-
"author": "Serkan Konakcı<serkan.konakci@timusnetworks.com>",
|
|
29
|
-
"license": "MIT",
|
|
30
31
|
"dependencies": {
|
|
31
32
|
"@nuxtjs/tailwindcss": "*",
|
|
32
33
|
"sass": "*",
|
|
@@ -37,6 +38,5 @@
|
|
|
37
38
|
"glob": "*",
|
|
38
39
|
"sass": "*",
|
|
39
40
|
"sass-loader": "*"
|
|
40
|
-
}
|
|
41
|
-
"typings": "./index.d.ts"
|
|
41
|
+
}
|
|
42
42
|
}
|
|
@@ -10,13 +10,15 @@ import Vue from 'vue';
|
|
|
10
10
|
const StringConverter = function (str) {
|
|
11
11
|
console.log('convertera geldi', this, str);
|
|
12
12
|
// `str` parametresini HTML olarak kabul edip onu güvenli bir string'e dönüştürmelisiniz
|
|
13
|
+
|
|
13
14
|
return str.replace(/</g, '<').replace(/>/g, '>');
|
|
14
|
-
}
|
|
15
|
+
};
|
|
15
16
|
|
|
16
17
|
Vue.directive('str', {
|
|
17
18
|
bind: (el, binding) => {
|
|
18
19
|
// `binding.value` ile elementin içeriğini alabilirsiniz
|
|
19
20
|
const convertedString = StringConverter(binding.value);
|
|
21
|
+
|
|
20
22
|
el.innerHTML = convertedString; // İçeriği güncelleyin
|
|
21
23
|
el.style.opacity = '0';
|
|
22
24
|
console.log('bind', el);
|
|
@@ -27,7 +29,8 @@ Vue.directive('str', {
|
|
|
27
29
|
},
|
|
28
30
|
update: (el, binding) => {
|
|
29
31
|
const convertedString = StringConverter(binding.value);
|
|
32
|
+
|
|
30
33
|
el.innerHTML = convertedString;
|
|
31
34
|
console.log('update', el);
|
|
32
35
|
},
|
|
33
|
-
})
|
|
36
|
+
});
|
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Helper functions to handle localStorage safely
|
|
4
5
|
*/
|
|
5
6
|
function getDarkModeFromLocalStorage() {
|
|
6
|
-
|
|
7
|
+
return process.client && localStorage.getItem('darkMode') === 'true';
|
|
7
8
|
}
|
|
9
|
+
|
|
8
10
|
function setDarkModeToLocalStorage(value) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
if (process.client) {
|
|
12
|
+
localStorage.setItem('darkMode', value.toString());
|
|
13
|
+
}
|
|
12
14
|
}
|
|
15
|
+
|
|
13
16
|
function setHtmlDarkClass(isDark) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
17
|
+
if (process.client) {
|
|
18
|
+
const htmlElement = document.documentElement;
|
|
19
|
+
|
|
20
|
+
if (isDark) {
|
|
21
|
+
htmlElement.classList.add('dark');
|
|
22
|
+
} else {
|
|
23
|
+
htmlElement.classList.remove('dark');
|
|
22
24
|
}
|
|
25
|
+
}
|
|
23
26
|
}
|
|
27
|
+
|
|
24
28
|
/**
|
|
25
29
|
* ThemeProvider: A Vue instance to provide theme related functionalities.
|
|
26
30
|
*
|
|
@@ -32,37 +36,37 @@ function setHtmlDarkClass(isDark) {
|
|
|
32
36
|
* this.$theme.$on('darkMode', (value) => { console.log('darkMode:', value); });
|
|
33
37
|
*/
|
|
34
38
|
export const ThemeProvider = new Vue({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
watch: {
|
|
53
|
-
isDark(newVal) {
|
|
54
|
-
setHtmlDarkClass(newVal);
|
|
55
|
-
},
|
|
39
|
+
data() {
|
|
40
|
+
return {
|
|
41
|
+
isDarkMode: getDarkModeFromLocalStorage(),
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
computed: {
|
|
45
|
+
isDark: {
|
|
46
|
+
get() {
|
|
47
|
+
return this.isDarkMode;
|
|
48
|
+
},
|
|
49
|
+
set(value) {
|
|
50
|
+
this.isDarkMode = value;
|
|
51
|
+
setDarkModeToLocalStorage(value);
|
|
52
|
+
this.$emit('darkMode', value);
|
|
53
|
+
},
|
|
56
54
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
},
|
|
56
|
+
watch: {
|
|
57
|
+
isDark(newVal) {
|
|
58
|
+
setHtmlDarkClass(newVal);
|
|
61
59
|
},
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
},
|
|
61
|
+
created() {
|
|
62
|
+
setHtmlDarkClass(this.isDark); // Sayfa yüklendiğinde fonksiyonu manuel olarak tetikle
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
setDarkMode(value) {
|
|
66
|
+
this.isDark = value; // This will trigger the setter of isDark.
|
|
64
67
|
},
|
|
68
|
+
},
|
|
65
69
|
});
|
|
66
70
|
export default (context, inject) => {
|
|
67
|
-
|
|
71
|
+
inject('theme', ThemeProvider);
|
|
68
72
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|